LinuxMCE Forums

General => Developers => Topic started by: Zaerc on October 27, 2007, 06:08:20 pm

Title: sqlCVS
Post by: Zaerc on October 27, 2007, 06:08:20 pm
Does anybody know how this is supposed to work?

I'd like to check out a new clean database for testing with the components I've managed to build from source, but so far I can't find any good documentation on sqlCVS.

http://freshmeat.net/projects/sqlcvs/

http://plutohome.com/wiki/index.php/Pluto_Home_Software
http://plutohome.com/wiki/index.php/SqlCVS
http://plutohome.com/wiki/index.php/SqlCVS_User%27s_manual
http://plutohome.com/wiki/index.php/Naming_of_Foreign_Keys%2C_Indirect_Keys%2C_External_Keys
http://plutohome.com/wiki/index.php/What_do_the_psc_fields_do%3F
http://plutohome.com/wiki/index.php/What_do_the_psc_tables_do%3F
http://plutohome.com/wiki/index.php/SqlCVS_Programmer%27s_Guide

Code: [Select]
# /usr/pluto/bin/sqlCVS --help
 Copyright (C) 2004 Pluto, Inc., a Florida Corporation
 www.plutohome.com
 Phone: +1 (877) 758-8648
This program is distributed according to the terms
of the Pluto Public License, available at:
 http://plutohome.com/index.php?section=public_license
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the Pluto Public License for more details.

-------

Unknown option: --help
sqlCVS, v.<=version=>
Usage: sqlCVS [-h MySql hostname] [-u MySql username]
[-p MySql password] [-D MySql database] [-P mysql port]
[-H sqlCVS hostname] [-R sqlCVS port]
[-r Repository( -ies )] [-v] [-i] [-c comments]
[-t Table( s )] [-U Username[~Password][,...]] [-d username]
[-a] [-e everyone] [-w width]
[-s Skip Verification of fields] [-b batch] [-f] [-n]
-h hostname    -- address or DNS of database host,
                        default is `dcerouter`
-u username    -- username for database connection
-p password    -- password for database connection,
                        default is `` ( empty )
-D database    -- database name. default is pluto_main
-P port            -- port for database connection,
                        default is 3306
-r output path -- Where to put the output files.
                        Default is ../[database name]
-t input path  -- Where to find the template files.
                        Default is . then ../sqlCVS
-b batch       -- the batch number you want to approve
-U user~pass   -- the user(s) who are logged in and will be committing rows
-d username    -- the owner of any unclaimed new records
            Default is the first user checking in records
-v verify      -- Verifies the integrity of the database first (foreign keys)
-s Table:Field -- Comma delimted list of Fields to ignore when doing a verify
-i verify id   -- Verifies that all records have unique psc_id
-a allow       -- Allows checking in a row with a foreign key
            to a modified row in another table that is not
            being checked in
-e everyone    -- Checkin all records from every user
-n no prompts  -- Don't ever prompt, just exit if necessary
-c comments    -- Optional comments to be included with a checkin
-w screen width-- This value will 'stick' because it's stored in the config
-S restrictions-- Include the listed restrictions.
                  If one restriction, other than 0,
                  is specified with the -v option, rather than auto-deleting, it will
                  update orphaned rows to be in the same restriction
-f filename    -- Save the output of this command to a file, usually so
                  another program like a website can show the contents
                  normally used with -n
-O PK -N PK    -- For use with change_key command
-A anonymous   -- Support authorization witn anonymous~anonymous
                  username and password - all records are commited w/o quarantine
-C attempts count  -- Maximal attempts to connect server if it's busy, default is unlimited
-T processor timeout  -- Timeout for server-side processor (seconds, default is 15 min)

And from looking at some of the scripts included in the source tarball I gather there are "commands" like: import, checkin, change_key, update-psc as well, but what they actually do remains a mystery to me.  I'm guessing (hoping) that one of these scripts is probably used post-install to get a fresh copy of the pluto database.

Aparently sqlCVS does not accept another local username then "root" so I have simply removed the root password on the local mysql database, now running without parameters gives me the folowing menu:

Code: [Select]
# /usr/pluto/bin/sqlCVS
 Copyright (C) 2004 Pluto, Inc., a Florida Corporation
 www.plutohome.com
 Phone: +1 (877) 758-8648
This program is distributed according to the terms
of the Pluto Public License, available at:
 http://plutohome.com/index.php?section=public_license
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the Pluto Public License for more details.

-------

Database host:localhost user:root pass: name:pluto_main port:3306
Users:
Use sqlCVS -? for command line options.

What would you like to do?
In the future you can also make your selections on the command line using the command shown in parenthesis.
------Server-side functions------
1.      Create a new sqlCVS repository from an existing database ( create )
2.      Edit an existing repository ( edit )
3.      Start listening for incoming connections from clients ( listen )
4.      Permanently roll-back checkins ( rollback )
5.      Create a 'dump' file with the tables in the current repository ( dump )
6.      List all the tables and what repositories they are in ( list-tables )
7.      List all the repositories and what tables they have ( list-repositories )
8.      History on all tables ( history-all )
9.      History on no tables ( history-none )
10.     List unauthorized batches ( batches )
11.     List contents of batch ( batch-contents )
---The following are not normally used---
20.     Reset entire database--sqlCVS clients will be out of sync ( reset-all )
21.     Reset the system tables ( reset-sys )
22.     Update psc_id's ( update-psc )
23.     Update last_psc_batch/id **server only** ( update-last-psc )
------Client-side functions------
A.      Import a 'dump' file from a server and make a local, working copy ( import )
B.      Check-in changes you've made locally ( checkin )
C.      Update my local copy with changes from the server ( update )
D.      **disabled** Synchronize my database with the server. Same as checkin+update ( sync )
E.      View my local changes ( diff )
F.      Approve pending batch ( approve )
G.      Reject pending batch ( reject )
H.      Revert changes from a mask file ( revert )
I.      Changes a primary key and propagates ( change_key )

Z.      Change login or users

Q. Quit

I guess at least that clears the commands up a bit.  But now I guess I'm stuck at some file that can't be read:
Code: [Select]
# /usr/pluto/bin/sqlCVS -D pluto_main -r dce import
 Copyright (C) 2004 Pluto, Inc., a Florida Corporation
 www.plutohome.com
 Phone: +1 (877) 758-8648
This program is distributed according to the terms
of the Pluto Public License, available at:
 http://plutohome.com/index.php?section=public_license
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the Pluto Public License for more details.

-------

Database host:localhost user:root pass: name:pluto_main port:3306
Users:
01      10/27/07 17:37:17.876           Connect failed Unknown database 'pluto_main' <0xb7b166b0>
Creating database pluto_main
Caught exception: Cannot read file

Code: [Select]
# /usr/pluto/bin/sqlCVS -D pluto_main -r dce import
 Copyright (C) 2004 Pluto, Inc., a Florida Corporation
 www.plutohome.com
 Phone: +1 (877) 758-8648
This program is distributed according to the terms
of the Pluto Public License, available at:
 http://plutohome.com/index.php?section=public_license
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the Pluto Public License for more details.

-------

Database host:localhost user:root pass: name:pluto_main port:3306
Users:
Caught exception: Cannot read file

For all I know this could be a configuration file that sqlCVS depends on, but I feel a bit reluctant to try this on a real lmce installation as I'm obviously pretty clueless to what I'm exactly doing here and it wouldn't surprise me at all if I'm doing things horribly wrong...

Title: Re: sqlCVS
Post by: PeteK on October 27, 2007, 10:09:14 pm
Hmm, that's interesting.  I too am a little hesitant to play around with my pluto_main database as I've got a working version (and obviously no way to capture the changes), and I don't want to screw it up.  Is Paul around.  I'm certain he must have played with this for the port.  If not, i'll try to get some info from the Pluto guys.

I take it you're running it as root.  Right?
Title: Re: sqlCVS
Post by: Zaerc on October 27, 2007, 10:37:15 pm
Yes, I'm doing everything as the root user.  I was also running the sqlCVS commands from inside the /usr/pluto/database directory as a lot of the scripts seem to go there before executiong the sqlCVS commands.

I have briefly looked at what seems to be the sources for an installer as well, but that was a bit overwhelming and I couldn't make heads or tails of it, let alone figure out where the installed DB actually comes from.

Needless to say that any pointers would be greatly appreciated.
Title: Re: sqlCVS
Post by: darrenmason on October 28, 2007, 02:44:06 am
Maybe contact the Pluto developers for some assistance.

My understanding was that the Master DB was meant to not be an active Pluto_Main database, but just for the purpose of being a server.

The commands are meant to mimic CVS commands I guess.
Title: Re: sqlCVS
Post by: Zaerc on October 29, 2007, 10:35:48 pm
Well I got a little further, I copied /usr/pluto/database/dce.sqlcvs from an existing installation, and this seems to have been the missing file.  I've dropped the database to start fresh again first.

Code: [Select]
root@pms32:/usr/pluto/database# /usr/pluto/bin/sqlCVS -n -D pluto_main -r dce import
 Copyright (C) 2004 Pluto, Inc., a Florida Corporation
 www.plutohome.com
 Phone: +1 (877) 758-8648
This program is distributed according to the terms
of the Pluto Public License, available at:
 http://plutohome.com/index.php?section=public_license
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the Pluto Public License for more details.

-------

Database host:localhost user:root pass: name:pluto_main port:3306
Users:
01      10/29/07 20:41:21.450           Connect failed Unknown database 'pluto_main' <0xb7b6d6b0>
Creating database pluto_main
Importing table: psc_dce_repset (dce) 1 rows
Importing table: psc_dce_bathdr (dce) 1757 rows
Completed 500 rows out of 1757
Completed 1000 rows out of 1757
Completed 1500 rows out of 1757
Importing table: psc_dce_batuser (dce) 1806 rows
Completed 500 rows out of 1806
Completed 1000 rows out of 1806
Completed 1500 rows out of 1806
Importing table: psc_dce_batdet (dce) 7603 rows
Completed 500 rows out of 7603
Completed 1000 rows out of 7603
Completed 1500 rows out of 7603
Completed 2000 rows out of 7603
Completed 2500 rows out of 7603
Completed 3000 rows out of 7603
Completed 3500 rows out of 7603
Completed 4000 rows out of 7603
Completed 4500 rows out of 7603
Completed 5000 rows out of 7603
Completed 5500 rows out of 7603
Completed 6000 rows out of 7603
Completed 6500 rows out of 7603
Completed 7000 rows out of 7603
Completed 7500 rows out of 7603
Importing table: psc_dce_tables (dce) 69 rows
Importing table: psc_dce_schema (dce) 43 rows
Importing table: Broadcast (dce) 1 rows
Importing table: CannedEvents (dce) 22 rows
Importing table: CannedEvents_CriteriaParmList (dce) 38 rows
Importing table: Command (dce) 843 rows
Completed 500 rows out of 843
Importing table: CommandCategory (dce) 47 rows
Importing table: CommandParameter (dce) 238 rows
Importing table: Command_CommandParameter (dce) 722 rows
Completed 500 rows out of 722
Importing table: Command_Pipe (dce) 25 rows
Importing table: ConfigType (dce) 0 rows
Importing table: ConfigType_File (dce) 0 rows
Importing table: ConfigType_Setting (dce) 0 rows
Importing table: ConfigType_Token (dce) 0 rows
Importing table: ConnectorType (dce) 10 rows
Importing table: CriteriaList (dce) 2 rows
Importing table: CriteriaList_CriteriaParmList (dce) 18 rows
Importing table: CriteriaParmList (dce) 21 rows
Importing table: DHCPDevice (dce) 62 rows
Importing table: DHCPDevice_DeviceData (dce) 0 rows
Importing table: DeviceCategory (dce) 119 rows
Importing table: DeviceCategory_DeviceData (dce) 55 rows
Importing table: DeviceCategory_Event (dce) 0 rows
Importing table: DeviceCommandGroup (dce) 74 rows
Importing table: DeviceCommandGroup_Command (dce) 485 rows
Importing table: DeviceCommandGroup_DeviceCommandGroup_Parent (dce) 0 rows
Importing table: DeviceData (dce) 210 rows
Importing table: DeviceTemplate (dce) 1854 rows
Completed 500 rows out of 1854
Completed 1000 rows out of 1854
Completed 1500 rows out of 1854
Importing table: DeviceTemplate_AV (dce) 60 rows
Importing table: DeviceTemplate_DSPMode (dce) 74 rows
Importing table: DeviceTemplate_DesignObj (dce) 4 rows
Importing table: DeviceTemplate_DeviceCategory_ControlledVia (dce) 1759 rows
Completed 500 rows out of 1759
Completed 1000 rows out of 1759
Completed 1500 rows out of 1759
Importing table: DeviceTemplate_DeviceCategory_ControlledVia_Pipe (dce) 1 rows
Importing table: DeviceTemplate_DeviceCommandGroup (dce) 210 rows
Importing table: DeviceTemplate_DeviceData (dce) 2244 rows
Completed 500 rows out of 2244
Completed 1000 rows out of 2244
Completed 1500 rows out of 2244
Completed 2000 rows out of 2244
Importing table: DeviceTemplate_DeviceTemplate_ControlledVia (dce) 59 rows
Importing table: DeviceTemplate_DeviceTemplate_ControlledVia_Pipe (dce) 36 rows
Importing table: DeviceTemplate_DeviceTemplate_Related (dce) 63 rows
Importing table: DeviceTemplate_Event (dce) 85 rows
Importing table: DeviceTemplate_InfraredGroup (dce) 9 rows
Importing table: DeviceTemplate_Input (dce) 235 rows
Importing table: DeviceTemplate_MediaType (dce) 59 rows
Importing table: DeviceTemplate_MediaType_DesignObj (dce) 9 rows
Importing table: DeviceTemplate_Output (dce) 0 rows
Importing table: DeviceTemplate_PageSetup (dce) 0 rows
Importing table: Event (dce) 72 rows
Importing table: EventCategory (dce) 9 rows
Importing table: EventParameter (dce) 59 rows
Importing table: Event_EventParameter (dce) 143 rows
Importing table: HouseMode (dce) 6 rows
Importing table: Licensing (dce) 0 rows
Importing table: MediaType (dce) 23 rows
Importing table: MediaType_Broadcast (dce) 0 rows
Importing table: Package (dce) 568 rows
Completed 500 rows out of 568
Importing table: Package_Compat (dce) 654 rows
Completed 500 rows out of 654
Importing table: Package_Directory (dce) 532 rows
Completed 500 rows out of 532
Importing table: Package_Directory_File (dce) 1250 rows
Completed 500 rows out of 1250
Completed 1000 rows out of 1250
Importing table: Package_Package (dce) 859 rows
Completed 500 rows out of 859
Importing table: Package_Source (dce) 1443 rows
Completed 500 rows out of 1443
Completed 1000 rows out of 1443
Importing table: Package_Source_Compat (dce) 1420 rows
Completed 500 rows out of 1420
Completed 1000 rows out of 1420
Importing table: Package_Users (dce) 20 rows
Importing table: Package_Version (dce) 0 rows
Importing table: PhoneLineType (dce) 0 rows
Importing table: QuickStartCategory (dce) 0 rows
Importing table: QuickStartTemplate (dce) 2 rows
Importing table: RepositorySource (dce) 21 rows
Importing table: RepositorySource_URL (dce) 17 rows
Importing table: RoomType (dce) 14 rows
Importing table: StartupScript (dce) 45 rows
Importing table: System (dce) 1 rows
Importing table: Version (dce) 46 rows

Which created the pluto_main database with a whole bunch of tables:
Code: [Select]
# mysql pluto_main
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 127 to server version: 5.0.27-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW TABLES;
+--------------------------------------------------+
| Tables_in_pluto_main                             |
+--------------------------------------------------+
| Broadcast                                        |
| CannedEvents                                     |
| CannedEvents_CriteriaParmList                    |
| Command                                          |
| CommandCategory                                  |
| CommandParameter                                 |
| Command_CommandParameter                         |
| Command_Pipe                                     |
| ConfigType                                       |
| ConfigType_File                                  |
| ConfigType_Setting                               |
| ConfigType_Token                                 |
| ConnectorType                                    |
| CriteriaList                                     |
| CriteriaList_CriteriaParmList                    |
| CriteriaParmList                                 |
| DHCPDevice                                       |
| DHCPDevice_DeviceData                            |
| DeviceCategory                                   |
| DeviceCategory_DeviceData                        |
| DeviceCategory_Event                             |
| DeviceCommandGroup                               |
| DeviceCommandGroup_Command                       |
| DeviceCommandGroup_DeviceCommandGroup_Parent     |
| DeviceData                                       |
| DeviceTemplate                                   |
| DeviceTemplate_AV                                |
| DeviceTemplate_DSPMode                           |
| DeviceTemplate_DesignObj                         |
| DeviceTemplate_DeviceCategory_ControlledVia      |
| DeviceTemplate_DeviceCategory_ControlledVia_Pipe |
| DeviceTemplate_DeviceCommandGroup                |
| DeviceTemplate_DeviceData                        |
| DeviceTemplate_DeviceTemplate_ControlledVia      |
| DeviceTemplate_DeviceTemplate_ControlledVia_Pipe |
| DeviceTemplate_DeviceTemplate_Related            |
| DeviceTemplate_Event                             |
| DeviceTemplate_InfraredGroup                     |
| DeviceTemplate_Input                             |
| DeviceTemplate_MediaType                         |
| DeviceTemplate_MediaType_DesignObj               |
| DeviceTemplate_Output                            |
| DeviceTemplate_PageSetup                         |
| Event                                            |
| EventCategory                                    |
| EventParameter                                   |
| Event_EventParameter                             |
| HouseMode                                        |
| Licensing                                        |
| MediaType                                        |
| MediaType_Broadcast                              |
| Package                                          |
| Package_Compat                                   |
| Package_Directory                                |
| Package_Directory_File                           |
| Package_Package                                  |
| Package_Source                                   |
| Package_Source_Compat                            |
| Package_Users                                    |
| Package_Version                                  |
| PhoneLineType                                    |
| QuickStartCategory                               |
| QuickStartTemplate                               |
| RepositorySource                                 |
| RepositorySource_URL                             |
| RoomType                                         |
| StartupScript                                    |
| System                                           |
| Version                                          |
| psc_dce_batdet                                   |
| psc_dce_bathdr                                   |
| psc_dce_batuser                                  |
| psc_dce_repset                                   |
| psc_dce_schema                                   |
| psc_dce_tables                                   |
+--------------------------------------------------+
75 rows in set (0.00 sec)




Title: sqlCVS server set up (Re: sqlCVS)
Post by: hari on November 03, 2007, 04:38:12 pm
Well I got a little further, I copied /usr/pluto/database/dce.sqlcvs from an existing installation, and this seems to have been the missing file.  I've dropped the database to start fresh again first.

based on your findings i set up a sqlCVS server. The procedure is documented in the wiki:
http://wiki.linuxmce.org/index.php/SqlCVS#How_to_set_up_a_sqlCVS_Server

regards,
Hari
Title: Re: sqlCVS server set up (Re: sqlCVS)
Post by: hari on November 03, 2007, 10:27:24 pm
The procedure is documented in the wiki:
http://wiki.linuxmce.org/index.php/SqlCVS#How_to_set_up_a_sqlCVS_Server

The LinuxMCE webinterface for sqlCVS works fine. If there is demand i would host a master database for testing.

regards,
Hari
Title: Re: sqlCVS
Post by: tschak909 on November 04, 2007, 02:36:13 am
I can set up one on my Xen slice as well.  :)

-Thom
Title: Re: sqlCVS
Post by: Zaerc on November 04, 2007, 05:08:52 pm
Awesome work hari, and thank you very much for expanding the wiki page! 
Title: Re: sqlCVS
Post by: hari on November 04, 2007, 06:01:38 pm
Awesome work hari, and thank you very much for expanding the wiki page! 
that was easy after your preparations. What i don't get is how to list the pending batches on the server. The LinuxMCE Admin interface doesn't print the id after checkin. Maybe it will help to use the "View batches" scripts from the admin page on the server.

We need a work flow for updates:
1.) Contact the maintainer before submission
2.) Checkin changes and report batch id to maintainer (or maintainer gets batch id from repo)
3.) Maintainer approves batch

With a test system and two or three people submitting changes we should figure out proper row ownership for the repository. I wonder if we should assign ownership of new rows to a default user. Maybe i should further investigate the permission model of sqlCVS.

I think we should have a developement and a production repository. We could synchronize them with sqlCVS (or maybe with the sqlCVS diff admin interface ;)

@all: does anybody have information about the sqlCVS workflow @ pluto or contacts to pluto regarding sqlCVS?

@tschak909: do you have the slice ready? My public ip pool is empty, need a few days to free another ip and assign more cores and ram.

best regards,
hari
Title: Re: sqlCVS
Post by: tschak909 on November 04, 2007, 06:19:17 pm
yeah, my slice is a blank ubuntu server installation, ready to go.

-Thom
Title: Re: sqlCVS
Post by: PeteK on November 04, 2007, 06:22:06 pm
@all: does anybody have information about the sqlCVS workflow @ pluto or contacts to pluto regarding sqlCVS?

They've worked with Paul to do it in the past, but unfortunately, it seems that Paul has other commitments right now, though he's working with Pluto to release the 0710 version.  Daniel K is picking up Paul's role in working with Pluto.  He would be the best person to answer this question.
Title: Re: sqlCVS
Post by: hari on November 05, 2007, 09:22:24 pm
Hi Guys,

i have a repo for testing online.
I need two or three helpful souls to test the following:

Alice has a fresh database
Bob does a checkin of some stuff (e.g. a dce template) with given credentials
Hari approves the batch
Alice pulls the update and verifies the dce template
Charlie modifies template wand commits with other credentials

anyone?

the lazy guys can do a sqlCVS diff via web interface to see differences between the local database and the initial repository.

sqlCVS://62.99.143.187:3999

regards,
Hari
Title: Re: sqlCVS
Post by: Zaerc on November 06, 2007, 01:19:27 am
Love to help you test, but I'm going to need at least a few days to catch up first.

EDIT:

Starting from scratch, I first followed: http://wiki.linuxmce.org/index.php/SqlCVS#Importing_the_LinuxMCE_Data to get an initial DB setup.  And then: http://wiki.linuxmce.org/index.php/SqlCVS#Performing_an_update replacing <sqlCVS server port> with 3999 and <sqlCVS server host> with 62.99.143.187.  I answered 'y' to the question "Delete the bad data, and cleanup the repository table? [N/y]".  As far as I can tell there weren't any errors reported, so far so good...

Unfortunately I don't have the web-admin working yet on my experimental setup, so I'll try again later with an old test environment (that suffered from a broken DB) or maybe set up a fresh one just for this.  Then I should be able to add some stuff and check it in.  Would this be a suitable addition to test with: http://wiki.linuxmce.org/index.php/Logitech_QuickCam_Sphere (http://wiki.linuxmce.org/index.php/Logitech_QuickCam_Sphere)?
Title: Re: sqlCVS
Post by: hari on November 07, 2007, 10:34:54 pm
As far as I can tell there weren't any errors reported, so far so good...
great!

Quote
Would this be a suitable addition to test with: http://wiki.linuxmce.org/index.php/Logitech_QuickCam_Sphere (http://wiki.linuxmce.org/index.php/Logitech_QuickCam_Sphere)?
i don't care ;) for our first tests any device template will be fine.

best regards,
Hari
Title: Re: sqlCVS
Post by: Zaerc on November 09, 2007, 05:52:08 pm
Ok, so I did it the same on an old (and DB-broken) installation. Booted in recovery mode (started mysql by hand), dropped pluto_main, installed it again from the .sqlcvs files,  updated it against the "62.99.143.187" sqlCVS server and rebooted again.

After opening the admin website I had to create a new user as there weren't any (surprise surprise ;)).  But when I tried logging in I ran into the following error:
Code: [Select]
Fatal error: mysql error: [1064: You have an error in your SQL syntax; check the
 manual that corresponds to your MySQL server version for the right syntax to us
e near '?)) ORDER BY OrderNum ASC' at line 4] in EXECUTE(" SELECT DISTINCT PageS
etup.* FROM PageSetup LEFT JOIN DeviceTemplate ON PageSetup.FK_Package=DeviceTem
plate.FK_Package LEFT JOIN Device ON Device.FK_DeviceTemplate=PK_DeviceTemplate
WHERE showInTopMenu = 1 AND Website='1' AND (PageSetup.FK_Package IS NULL OR (PK
_Device IS NOT NULL AND FK_Installation=?)) ORDER BY OrderNum ASC") in /var/www/
pluto-admin/include/adodb/adodb-errorhandler.inc.php on line 77

I suspect that this is mainly because a few addidtional setup steps are needed (setting an installation number for instance).  I'll do some digging for those and if I can't figure that out then I'll just do a clean install and "update" that to get things going. 

In the mean time if anyone knows more about the post-install setup steps then I'd love to hear about it.

Title: Re: sqlCVS
Post by: Zaerc on November 14, 2007, 07:32:26 pm
Well I finally did a fresh install on my test machine again, and tried a few sqlCVS diffs for starters.

Against the default pluto sqlCVS: (http://img228.imageshack.us/img228/5179/sqlcvsdiffpluto001kn8.th.png) (http://img228.imageshack.us/my.php?image=sqlcvsdiffpluto001kn8.png) Against the "hari" test sqlCVS: (http://img155.imageshack.us/img155/2758/sqlcvsdiffhari001uw8.th.png) (http://img155.imageshack.us/my.php?image=sqlcvsdiffhari001uw8.png)

It would be nice if someone could explain what all this means, but I won't be holding my breath.  I'm guessing "Revert" will sync my local DB with the master, and "CheckIn" will upload the "changes" I have (none yet) made locally to the masted DB.  Might not be a bad idea since this is a fresh installation.

I think I'll try "CheckIn" first, hoping that will give you already a batch to look at hari.  And it might not be a bad idea to have the master synced with a fresh install as a starting point. 


Title: Re: sqlCVS
Post by: hari on November 14, 2007, 08:10:01 pm
It would be nice if someone could explain what all this means, but I won't be holding my breath.  I'm guessing "Revert" will sync my local DB with the master, and "CheckIn" will upload the "changes" I have (none yet) made locally to the masted DB.  Might not be a bad idea since this is a fresh installation.
go ahead.. as far as i get it this are only some old entries from the package system to be deleted by your batch.
Quote
I think I'll try "CheckIn" first, hoping that will give you already a batch to look at hari.  And it might not be a bad idea to have the master synced with a fresh install as a starting point. 
I think we should further investigate the import process. Maybe we are missing to setup additional tables for the master repository (like for history tracking and stuff). I'm still stuck with some other things. I don't see any way to show the batches with the "sqlCVS" utility alone.. at the moment i'm looking through the php scripts in pluto-admin/operations/sqlCVS. There is a batch history table for each repository. It's named "psc_<repository>_bathdr". To show the batch id's from changes in the dce repo i use "select * from psc_dce_bathdr order by date limit 20". I'll try to figure out how to get the exact sql statements from a batch.
When i get this right i'll update the wiki page.

happy hacking,
Hari
Title: Re: sqlCVS
Post by: Zaerc on November 14, 2007, 08:16:34 pm
I just did a checkin before right you posted:

Code: [Select]
sqlCVS command

sudo -u root /usr/pluto/bin/sqlCVS -R 3999 -H 62.99.143.187 -h localhost -a -n -r dce -t Broadcast,CannedEvents,CannedEvents_CriteriaParmList,Command,CommandCategory,CommandParameter,Command_CommandParameter,Command_Pipe,ConfigType,ConfigType_File,ConfigType_Setting,ConfigType_Token,ConnectorType,CriteriaList,CriteriaList_CriteriaParmList,CriteriaParmList,DeviceCategory,DeviceCategory_DeviceData,DeviceCategory_Event,DeviceCommandGroup,DeviceCommandGroup_Command,DeviceCommandGroup_DeviceCommandGroup_Parent,DeviceData,DeviceTemplate,DeviceTemplate_AV,DeviceTemplate_DesignObj,DeviceTemplate_DeviceCategory_ControlledVia,DeviceTemplate_DeviceCategory_ControlledVia_Pipe,DeviceTemplate_DeviceCommandGroup,DeviceTemplate_DeviceData,DeviceTemplate_DeviceTemplate_ControlledVia,DeviceTemplate_DeviceTemplate_ControlledVia_Pipe,DeviceTemplate_DeviceTemplate_Related,DeviceTemplate_DSPMode,DeviceTemplate_Event,DeviceTemplate_InfraredGroup,DeviceTemplate_Input,DeviceTemplate_MediaType,DeviceTemplate_MediaType_DesignObj,DeviceTemplate_Output,DeviceTemplate_PageSetup,DHCPDevice,DHCPDevice_DeviceData,Event,EventCategory,EventParameter,Event_EventParameter,HouseMode,Licensing,MediaType,MediaType_Broadcast,Package,Package_Compat,Package_Directory,Package_Directory_File,Package_Package,Package_Source,Package_Source_Compat,Package_Users,Package_Version,PhoneLineType,QuickStartCategory,QuickStartTemplate,RepositorySource,RepositorySource_URL,RoomType,StartupScript,System,Version -d "pluto" -U "pluto~pluto" -D pluto_main -e -m /tmp/tmp_sqlcvs_file_6940 checkin 2>/tmp/sqlCVS-errors-1195065994.log | grep "Requesting update table" | cut -f4 -d' '

Status: success

I think I'll try "Revert" next, if only just to see what happens.  I have backed up the entire database before I started so I should be able to put that back just in case. 

EDIT:

The "Revert" went smooth as well:

Code: [Select]
sqlCVS command

sudo -u root /usr/pluto/bin/sqlCVS -R 3999 -H 62.99.143.187 -h localhost -a -n -r dce -t Broadcast,CannedEvents,CannedEvents_CriteriaParmList,Command,CommandCategory,CommandParameter,Command_CommandParameter,Command_Pipe,ConfigType,ConfigType_File,ConfigType_Setting,ConfigType_Token,ConnectorType,CriteriaList,CriteriaList_CriteriaParmList,CriteriaParmList,DeviceCategory,DeviceCategory_DeviceData,DeviceCategory_Event,DeviceCommandGroup,DeviceCommandGroup_Command,DeviceCommandGroup_DeviceCommandGroup_Parent,DeviceData,DeviceTemplate,DeviceTemplate_AV,DeviceTemplate_DesignObj,DeviceTemplate_DeviceCategory_ControlledVia,DeviceTemplate_DeviceCategory_ControlledVia_Pipe,DeviceTemplate_DeviceCommandGroup,DeviceTemplate_DeviceData,DeviceTemplate_DeviceTemplate_ControlledVia,DeviceTemplate_DeviceTemplate_ControlledVia_Pipe,DeviceTemplate_DeviceTemplate_Related,DeviceTemplate_DSPMode,DeviceTemplate_Event,DeviceTemplate_InfraredGroup,DeviceTemplate_Input,DeviceTemplate_MediaType,DeviceTemplate_MediaType_DesignObj,DeviceTemplate_Output,DeviceTemplate_PageSetup,DHCPDevice,DHCPDevice_DeviceData,Event,EventCategory,EventParameter,Event_EventParameter,HouseMode,Licensing,MediaType,MediaType_Broadcast,Package,Package_Compat,Package_Directory,Package_Directory_File,Package_Package,Package_Source,Package_Source_Compat,Package_Users,Package_Version,PhoneLineType,QuickStartCategory,QuickStartTemplate,RepositorySource,RepositorySource_URL,RoomType,StartupScript,System,Version -d "pluto" -U "pluto~pluto" -D pluto_main -e -m /tmp/tmp_sqlcvs_file_2190 revert 2>/tmp/sqlCVS-errors-1195067128.log | grep "Requesting update table" | cut -f4 -d' '

Status: success

Resulting in the following diff: (http://img134.imageshack.us/img134/8359/sqlcvsdiffhari002jf8.th.png) (http://img134.imageshack.us/my.php?image=sqlcvsdiffhari002jf8.png) So now I'm synced with your master.  I'm curious what happens when I start the core and orbiter now, probably won't make much difference, but there's only one way to find out...

EDIT:

As anticipated, the system still seems to run fine, I'll have a stab at adding a device template and maybe try to check that in as well, if that's ok with you.

EDIT:

I've added just the logitech quickcam template: (http://img105.imageshack.us/img105/5880/sqlcvsdiffhari003am0.th.png) (http://img105.imageshack.us/my.php?image=sqlcvsdiffhari003am0.png) so I'm all set to check a real template in whenever you give me the go ahead.

Any luck with the batches yet?  If you can approve this one I could restore the database backup I made earlier and update it from the master.  Eventhough you obviously have a way better understanding of what we're doing here, is there anything I can do to assist you with figuring out how these batches work?  Meanwhile I'll have a look over the sqlCVS documentation again as well.

I'm thinking if we just keep shaking the tree something useful will probably fall out sooner or later. ;) 
Title: Re: sqlCVS
Post by: hari on November 20, 2007, 01:26:41 am
Hi Zaerc,

Any luck with the batches yet?  If you can approve this one I could restore the database backup I made earlier and update it from the master.  Eventhough you obviously have a way better understanding of what we're doing here, is there anything I can do to assist you with figuring out how these batches work?  Meanwhile I'll have a look over the sqlCVS documentation again as well.

I'm thinking if we just keep shaking the tree something useful will probably fall out sooner or later. ;) 
*plonk*

there fell something out:
http://62.99.143.187:4000/sqlcvs/?site=batch/view

with the batch id one can show the database changes:
sqlcvs:/# sqlCVS -h "127.0.0.1" -u "root" -p "" -D "pluto_main" -P "3306" -r "dce" -t "" -U "hari~XXXXXX" batch-contents
[...]
Batch: 1828 Repository: dce IP: 192.168.117.3 Date: 2007-11-07 06:41:04

Table: Command
=========================
NEW- PK_Command:920 Description:Add Insteon Device to Group Define:(NULL) FK_CommandCategory:26 AVCommand:0 Comments:(NULL) Log:1 psc_id:901 psc_user:2 psc_frozen:0 psc_restrict:(NULL)
NEW- PK_Command:921 Description:TurnOnSprinklerValve Define:(NULL) FK_CommandCategory:36 AVCommand:0 Comments:(NULL) Log:1 psc_id:902 psc_user:2 psc_frozen:0 psc_restrict:(NULL)
NEW- PK_Command:922 Description:TurnOffSprinklerValve Define:(NULL) FK_CommandCategory:36 AVCommand:0 Comments:(NULL) Log:1 psc_id:903 psc_user:2 psc_frozen:0 psc_restrict:(NULL)

so i think we are far enough to be able to run kinda developement repository. We can export sqlcvs files anytime to keep svn branches in sync. Feel free to add devices. Send me a md4 pw via mail or pm, i'll create a user zaerc with admin perms.

best regards,
Hari
Title: Re: sqlCVS
Post by: Zaerc on November 20, 2007, 05:32:56 am
Awesome, great work! :)  Looks like you've made another huge leap forward.

I've just checked in that webcam sphere thingy:
Code: [Select]
sudo -u root /usr/pluto/bin/sqlCVS -R 3999 -H 62.99.143.187 -h localhost -a -n -r dce -t Broadcast,CannedEvents,CannedEvents_CriteriaParmList,Command,CommandCategory,CommandParameter,Command_CommandParameter,Command_Pipe,ConfigType,ConfigType_File,ConfigType_Setting,ConfigType_Token,ConnectorType,CriteriaList,CriteriaList_CriteriaParmList,CriteriaParmList,DeviceCategory,DeviceCategory_DeviceData,DeviceCategory_Event,DeviceCommandGroup,DeviceCommandGroup_Command,DeviceCommandGroup_DeviceCommandGroup_Parent,DeviceData,DeviceTemplate,DeviceTemplate_AV,DeviceTemplate_DesignObj,DeviceTemplate_DeviceCategory_ControlledVia,DeviceTemplate_DeviceCategory_ControlledVia_Pipe,DeviceTemplate_DeviceCommandGroup,DeviceTemplate_DeviceData,DeviceTemplate_DeviceTemplate_ControlledVia,DeviceTemplate_DeviceTemplate_ControlledVia_Pipe,DeviceTemplate_DeviceTemplate_Related,DeviceTemplate_DSPMode,DeviceTemplate_Event,DeviceTemplate_InfraredGroup,DeviceTemplate_Input,DeviceTemplate_MediaType,DeviceTemplate_MediaType_DesignObj,DeviceTemplate_Output,DeviceTemplate_PageSetup,DHCPDevice,DHCPDevice_DeviceData,Event,EventCategory,EventParameter,Event_EventParameter,HouseMode,Licensing,MediaType,MediaType_Broadcast,Package,Package_Compat,Package_Directory,Package_Directory_File,Package_Package,Package_Source,Package_Source_Compat,Package_Users,Package_Version,PhoneLineType,QuickStartCategory,QuickStartTemplate,RepositorySource,RepositorySource_URL,RoomType,StartupScript,System,Version -d "pluto" -U "pluto~pluto" -D pluto_main -e -m /tmp/tmp_sqlcvs_file_4410 checkin 2>/tmp/sqlCVS-errors-1195530916.log | grep "Requesting update table" | cut -f4 -d' '

Status: success

And I'll send you an MD5 hash in PM next. 

When this batch is approved I can restore my database from a backup to what it was before I changed it, and try to check the changes out again. 

Title: Re: sqlCVS
Post by: hari on November 20, 2007, 08:46:53 am
I've just checked in that webcam sphere thingy:
don't see the batch id. can you try again without the grep and cut:
Code: [Select]
sudo -u root /usr/pluto/bin/sqlCVS -R 3999 -H 62.99.143.187 -h localhost -a -n -r dce -t Broadcast,CannedEvents,CannedEvents_CriteriaParmList,Command,CommandCategory,CommandParameter,Command_CommandParameter,Command_Pipe,ConfigType,ConfigType_File,ConfigType_Setting,ConfigType_Token,ConnectorType,CriteriaList,CriteriaList_CriteriaParmList,CriteriaParmList,DeviceCategory,DeviceCategory_DeviceData,DeviceCategory_Event,DeviceCommandGroup,DeviceCommandGroup_Command,DeviceCommandGroup_DeviceCommandGroup_Parent,DeviceData,DeviceTemplate,DeviceTemplate_AV,DeviceTemplate_DesignObj,DeviceTemplate_DeviceCategory_ControlledVia,DeviceTemplate_DeviceCategory_ControlledVia_Pipe,DeviceTemplate_DeviceCommandGroup,DeviceTemplate_DeviceData,DeviceTemplate_DeviceTemplate_ControlledVia,DeviceTemplate_DeviceTemplate_ControlledVia_Pipe,DeviceTemplate_DeviceTemplate_Related,DeviceTemplate_DSPMode,DeviceTemplate_Event,DeviceTemplate_InfraredGroup,DeviceTemplate_Input,DeviceTemplate_MediaType,DeviceTemplate_MediaType_DesignObj,DeviceTemplate_Output,DeviceTemplate_PageSetup,DHCPDevice,DHCPDevice_DeviceData,Event,EventCategory,EventParameter,Event_EventParameter,HouseMode,Licensing,MediaType,MediaType_Broadcast,Package,Package_Compat,Package_Directory,Package_Directory_File,Package_Package,Package_Source,Package_Source_Compat,Package_Users,Package_Version,PhoneLineType,QuickStartCategory,QuickStartTemplate,RepositorySource,RepositorySource_URL,RoomType,StartupScript,System,Version -d "pluto" -U "pluto~pluto" -D pluto_main -e -m /tmp/tmp_sqlcvs_file_4410 checkin
this should spit out the batch id for "submission".
Quote
And I'll send you an MD5 hash in PM next. 
great.
Quote
When this batch is approved I can restore my database from a backup to what it was before I changed it, and try to check the changes out again. 
i'll approve as soon as i figure out the id ;)

best regards,
hari
Title: Re: sqlCVS
Post by: Zaerc on November 20, 2007, 02:29:34 pm
I guess I shouldn't have been so lazy to use the web-admin, but I figured it knows better what it's doing then I am... I've removed the "-m" option as well since it's not in the "usage" and I have no idea what it actually does, I suspect it sends some of the output to a logfile or something.  I had to paste all the output into a file and attach it since it was to big to put inside the message...

Looks like it did't go through this time. :(  Seeing those duplicate key errors, could it be in conflict with my earlier checkin attempt?
Title: Re: sqlCVS
Post by: hari on November 20, 2007, 02:42:39 pm
I guess I shouldn't have been so lazy to use the web-admin, but I figured it knows better what it's doing then I am... I've removed the "-m" option as well since it's not in the "usage" and I have no idea what it actually does, I suspect it sends some of the output to a logfile or something.  I had to paste all the output into a file and attach it since it was to big to put inside the message...

Looks like it did't go through this time. :(  Seeing those duplicate key errors, could it be in conflict with my earlier checkin attempt?

yep. im just going through all psc_dce_* tables to trace the batch ids in sqlcvs... please be patient for an hour or two.. i'll approve your first commit (when i find it *g* )

best regards,
Hari
Title: Re: sqlCVS
Post by: Zaerc on November 20, 2007, 02:57:04 pm
Thanks, I'm so glad at least one of us knows what he's doing. ;)  And I'm not in any rush, so you can just take your time.
Title: Re: sqlCVS
Post by: hari on November 20, 2007, 04:07:00 pm
Thanks, I'm so glad at least one of us knows what he's doing. ;)  And I'm not in any rush, so you can just take your time.
i wanted to progress faster but without dsl (and my 3g provider is slooooooow) the last five weeks were really painful..
don't want to let you wait, i need helpful souls for testing ;)

best regards,
Hari
Title: Re: sqlCVS
Post by: hari on November 20, 2007, 11:53:45 pm
Thanks, I'm so glad at least one of us knows what he's doing. ;)
i hope this is you  ;D

The web gui got some improvements, maybe it helps to get some things sorted for you.. (also look at the wiki page, i did some updates)

best regards,
Hari
Title: Re: sqlCVS
Post by: Zaerc on November 21, 2007, 10:15:38 pm
Thanks, I'm so glad at least one of us knows what he's doing. ;)
i hope this is you  ;D
...
If that were true we wouldn't even have gotten this far. :D

Anyway, I've been looking around a bit, and I have no clue what batch(es) to approve.  And when I look at: http://62.99.143.187:4000/sqlcvs/?site=batch/view I only see 2 recent IPs, localhost and an internal one.  So I have no idea which one to approve either.  :-\

How about we approve all the recently added batches?  And then see if anything falls out of the tree again. ;)

Oh BTW, logging in on your sqlcvs web interface seems to work (at least that's what it told me).

Edit:

Oh and I almost forgot, when I try to view a batch, I get a bunch of errors:
Code: [Select]
dcerouter_44670:~# /usr/pluto/bin/sqlCVS -h "127.0.0.1" -u "root" -p "" -D "pluto_main" -P "3306" -r "dce" -t "" -H 62.99.143.187 -U "zaerc~XXX" batch-contents
 Copyright (C) 2004 Pluto, Inc., a Florida Corporation
 www.plutohome.com
 Phone: +1 (877) 758-8648
This program is distributed according to the terms
of the Pluto Public License, available at:
 http://plutohome.com/index.php?section=public_license
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the Pluto Public License for more details.

-------

Database host:127.0.0.1 user:root pass: name:pluto_main port:3306
Users:zaerc~XXX
Updating repository 'constants' schema version from: 4
Updating repository 'dce' schema version from: 44
Updating repository 'designer' schema version from: 39
Updating repository 'document' schema version from: 1
Updating repository 'ir' schema version from: 4
Updating repository 'local' schema version from: 50
Updating repository 'website' schema version from: 2
What batch number? (0 to quit) 1839
Batch: 1839 Repository: dce IP: 82.77.255.203 Date: 2007-08-08 21:56:30

Table: Version
=========================
01      11/21/07 21:50:07.016           Query failed (Table 'pluto_main.Version_pschist' doesn't exist): SELECT psc_id,psc_toc,`Version_pschist`.* FROM `Version_pschist` WHERE psc_batch=1839 (1) <0xb78d5a00>
05      11/21/07 21:50:07.016           Resetting mysql connection <0xb78d5a00>
01      11/21/07 21:50:07.017           Query failed (Table 'pluto_main.Version_pschist' doesn't exist): SELECT psc_id,psc_toc,`Version_pschist`.* FROM `Version_pschist` WHERE psc_batch=1839 (1) <0xb78d5a00>
05      11/21/07 21:50:07.018           Resetting mysql connection <0xb78d5a00>
01      11/21/07 21:50:07.018           Query failed (): SELECT psc_id,psc_toc,`Version_pschist`.* FROM `Version_pschist` WHERE psc_batch=1839 retry: (nil) <0xb78d5a00>


I figured I'd add the "-H 62.99.143.187" or I might be poking at pluto's sqlCVS (I get the same result without it though).

Title: Re: sqlCVS
Post by: hari on November 21, 2007, 10:41:04 pm
Anyway, I've been looking around a bit, and I have no clue what batch(es) to approve.  And when I look at: http://62.99.143.187:4000/sqlcvs/?site=batch/view I only see 2 recent IPs, localhost and an internal one.  So I have no idea which one to approve either.  :-\
i did some tests today and managed to checkin changes with a regular user (pluto~pluto). They show up with a negative batch id (not yet approved, sqlCVS calls this "quarantine"). After approving the batch id (works from the gui) with an admin user there is another batch generated (i call this "approval batch" for the moment) and the changes fall out of the tree ;) I commited two dce devices to the database (a dhcp stub "Printserver" and an unfinished "Marantz SR7001 RS232").
Quote
How about we approve all the recently added batches?  And then see if anything falls out of the tree again. ;)
Did you commit with your own user? Please try to checkin again with pluto~pluto (regular user) and approve with zaerc~XXXXX (sqlcvs admin).
Quote
Oh BTW, logging in on your sqlcvs web interface seems to work (at least that's what it told me).
the session handling is not finished yet. I also have to do some security fixes and implement permissions in the web interface. It's really quick and dirty hack to help me understand sqlCVS better ;) It's in the trunk now.

At the moment i try to implement row history for modifications and deletions and understand how row ownership is assumed to work..
Can you point me to the installer script for the database? I wonder if we have to do other things beside importing with sqlCVS to setup a repository. I saw some mysql syntax errors in the sqlCVS log.. maybe i use the wrong mysql version..

best regards,
Hari
Title: Re: sqlCVS
Post by: hari on November 21, 2007, 10:45:47 pm
Oh and I almost forgot, when I try to view a batch, I get a bunch of errors:
Code: [Select]
01      11/21/07 21:50:07.016           Query failed (Table 'pluto_main.Version_pschist' doesn't exist): SELECT psc_id,psc_toc,`Version_pschist`.* FROM `Version_pschist` WHERE psc_batch=1839 (1) <0xb78d5a00>
05      11/21/07 21:50:07.016           Resetting mysql connection <0xb78d5a00>
01      11/21/07 21:50:07.017           Query failed (Table 'pluto_main.Version_pschist' doesn't exist): SELECT psc_id,psc_toc,`Version_pschist`.* FROM `Version_pschist` WHERE psc_batch=1839 (1) <0xb78d5a00>
05      11/21/07 21:50:07.018           Resetting mysql connection <0xb78d5a00>
01      11/21/07 21:50:07.018           Query failed (): SELECT psc_id,psc_toc,`Version_pschist`.* FROM `Version_pschist` WHERE psc_batch=1839 retry: (nil) <0xb78d5a00>

it seems that you are missing the table "Version" from the dce repository. Maybe your initial import went wrong?

best regards,
Hari
Title: Re: sqlCVS
Post by: Zaerc on November 21, 2007, 11:01:33 pm
I did both my previous checkins with pluto~pluto.  And I wasn't aware that I needed to do an initial import, I'm doing these things from a fresh LMCE install.

Also I have no idea where the installer script for the database is, if there even is one.  I'm guessing the setup wizard does the final steps.
Title: Re: sqlCVS
Post by: hari on November 21, 2007, 11:09:44 pm
I did both my previous checkins with pluto~pluto.
ok, so i wonder why they don't show up as negative batch id.
Quote
And I wasn't aware that I needed to do an initial import, I'm doing these things from a fresh LMCE install.
i wasn't aware that you checkin from a fresh install. It should need no import (mine didn't). But i wonder where your "Version" table got lost..
Quote
Also I have no idea where the installer script for the database is, if there even is one.  I'm guessing the setup wizard does the final steps.
plutohome .44 did the import after the first boot iirc. I'll see if i find the relevant scripts..
Title: Re: sqlCVS
Post by: Zaerc on November 27, 2007, 01:00:39 am
We just did another test, and attached is the log from the following command:
/usr/pluto/bin/sqlCVS -r dce -U "pluto~nopass" -H sqlcvs.charonmedia.org checkin 2>&1|tee sqlCVS_checkin-2.log
Title: Re: sqlCVS
Post by: hari on December 10, 2007, 11:30:05 pm
big progress for today:

with the patience and help from Zaerc we sorted out some sqlCVS things
these days. We successfully checked in a complete DCE device template
(GSD) with ruby codes from one installation and pulled that from another.

For now we did the following:

Server side:
* imported the *.sqlcvs files from a 0704 installation on the master repo
* cleaned all *psc* tables and fields with the script
sqlcvs-dumps/scripts/RemovePSCfromDB.sh
* created a fresh repository with sqlcvs-dumps/scripts/CreateRepository.sh
* enabled history with "sqlCVS history-all"
* dumped new *.sqlcvs files with "sqlCVS -r dce,designer,ir,... dump"

Client side:
* dropped ir,designer and dce from the local database of a fresh 0704
installation with the scripts sqlcvs-dumps/scripts/RemoveRepofromDB.sh
(./RemoveRepofromDB.sh ir ; ./RemoveRepofromDB.sh dce ; ...)
That erases all psc information and all data for the tables in that repos
* imported the new *.sqlcvs files (sqlcvs-dumps/0704-new) with "sqlCVS
-r dce,designer,ir import"
* added the D-LinkDCS-5300G on one side and did a checkin with "nopass"
(-a has to be used for dce, FK_Users_Maintainer references Users, that
table is not in the master repo ***)
* approved the batch in the master repo:
http://sqlcvs.charonmedia.org/sqlcvs/?site=batch/detail&repository=dce&batchid=2
* did an update on the other installation
* newly synced device was checked for ruby codes, all there  ;)

so this gives us a newly initialized repo with future history and
synchronized clients. So we can start our own master even if we don't
get the history tables from pluto. We would have to include the new dump
files in a installer build.

I see the number of LMCE devices skyrocketing when we have sqlCVS in
production.

Big thanks (and some promised beers) to Sir Zaerc.
Title: Re: sqlCVS
Post by: bulek on December 11, 2007, 12:10:23 am
Hi,

thanks for efforts, great work.... Let us know, when it will be safe to enter valid contributions....

Regards,

Bulek.
Title: Re: sqlCVS
Post by: darrenmason on December 11, 2007, 04:23:27 am
Great effort guys, hopefully with some time off over christmas and january I can assist with some more testing and setup.
I believe what you are doing is a very important piece of work.

Regards
Darren
Title: Re: sqlCVS
Post by: ddamron on December 15, 2007, 10:13:23 am
Hari, Maybe I should post my Insteon Drivers...??
EZBridge works well, a few more enhancements and it'll be ready for RC2.
PLM is in progress...

Both are GSD/Ruby based.
Title: Re: sqlCVS
Post by: hari on December 15, 2007, 10:40:57 am
Hari, Maybe I should post my Insteon Drivers...??
great idea, but you would have to reimport at least dce and ir (don't know if your devicetemplate affects further repositories/tables) from the new dumps on a fresh installation and add your device there.
You can see the steps in my last post.
Until we get the complete history dumps from pluto we are not able to keep the psc_id's in our repo. We had to reinitialize. The 0704 lmce clients are now out of sync. So only clients doing the reimport of the new dump files will be able to update.

best regards,
Hari

Title: Re: sqlCVS
Post by: hari on December 15, 2007, 06:41:09 pm
Hi devs,

there is an installer to synchronize a fresh 0704 installation with the testing repository:
http://sqlcvs.charonmedia.org/ReinitSqlCVS.sh

It fetches the new dumps and a helper script, then drops all local tables from ir, designer and dce. After importing them it does a sqlCVS update to fetch latest changes.

There are three changes for now:
Screen sizes for Nokia770/N800
D-Link DCS-5300G IP Cam
Logitech sphere webcam

Soon to come:
Insteon support

best regards,
Hari
Title: Re: sqlCVS
Post by: Zaerc on December 15, 2007, 08:41:40 pm
And just in case, before you start you might want to do this as the root user:
Code: [Select]
mysqldump --skip-extended-insert pluto_main >pluto_main_$PK_Installation-`date '+%Y%m%d:%H%M%S'`.sql which will give you a nice backup of your main database with the installation-number and a timestamp in the filename (you can become the root user with "sudo su -").