OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 26-May-2006 21:06:05
Branch: HEAD Handle: 2006052620060301
Modified files:
openpkg-src/cvstrac cvstrac.patch cvstrac.spec
Log:
upgrading package: cvstrac 1.2.1 -> 2.0.0
Summary:
Revision Changes Path
1.7 +242 -34 openpkg-src/cvstrac/cvstrac.patch
1.42 +15 -6 openpkg-src/cvstrac/cvstrac.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/cvstrac/cvstrac.patch
============================================================================
$ cvs diff -u -r1.6 -r1.7 cvstrac.patch
--- openpkg-src/cvstrac/cvstrac.patch 11 Jan 2006 11:04:07 -0000 1.6
+++ openpkg-src/cvstrac/cvstrac.patch 26 May 2006 19:06:03 -0000 1.7
@@ -1,37 +1,245 @@
-Index: svn.c
---- svn.c.orig 2006-01-10 02:27:04 +0100
-+++ svn.c 2006-01-11 11:56:57 +0100
-@@ -258,6 +258,7 @@
+Index: attach.c
+--- attach.c.orig 2006-05-26 16:20:28 +0200
++++ attach.c 2006-05-26 20:59:52 +0200
+@@ -215,12 +215,14 @@
+ char **azArg, /* Text of data in all columns */
+ char **azName /* Names of the columns */
+ ){
+- if( nArg != 4 ) return 0;
++ if( nArg != 5 ) return 0;
+ (*nGot) ++;
+ cgi_set_content_type(azArg[1]);
+ cgi_modified_since(atoi(azArg[3]));
+ cgi_append_header(
+ mprintf("Last-Modified: %s\r\n",cgi_rfc822_datestamp(atoi(azArg[3]))));
++ cgi_append_header(mprintf("Content-disposition: attachment; "
++ "filename=\"%T\"\r\n", azArg[4]));
+ cgi_append_content(azArg[2], atoi(azArg[0]));
+ g.isConst = 1;
+ return 0;
+@@ -235,7 +237,7 @@
*/
- for(nRev=nBaseRevision+1; nRev<=nHeadRevision; nRev++){
- int nAddChng = 1;
-+ int isMsgEnd = 0;
- /* Example output of "svnlook info" is as follows:
- **
- ** chorlya <-Author
-@@ -312,6 +313,8 @@
- }else if( nLine==2 ){
- pRev->nMsgLength = atoi(zLine);
- if( pRev->nMsgLength==0 ){
-+ isMsgEnd = 1;
-+ pRev->zMessage = "";
- break; /* No comment here */
- }else{
- /* Allocate storage space for comment.
-@@ -332,7 +335,7 @@
- /* Concat comment lines into one string */
- strcat(pRev->zMessage, zLine);
+ int got = 0;
+ db_callback_query( output_attachment_callback, &got,
+- "SELECT size, mime, content, date "
++ "SELECT size, mime, content, date, fname "
+ "FROM attachment "
+ "WHERE atn=%d", atn);
+ if( !got ){
+Index: browse.c
+--- browse.c.orig 2006-05-26 16:20:28 +0200
++++ browse.c 2006-05-26 20:59:52 +0200
+@@ -503,6 +503,13 @@
+ ){
+ int set = (zFld==zField[0]);
+ int desc = P("desc")!=0;
++ /* Clicking same column header 3 times in a row resets any sorting.
++ */
++ if(set && desc){
++ @ <th align="left" bgcolor="%s(BG1)" class="bkgnd1">
++ @ <a href="dirview?d=%T(zNameNS)">%h(zColumn)</a></th>
++ return;
++ }
+ const char *zDesc = set ? (desc ? "" : "&desc" ) : "";
+ if(set){
+ @ <th align="left" bgcolor="%s(BG1)" class="bkgnd1"><a
+@@ -517,6 +524,7 @@
+ */
+ static void row_content(
+ const char *zName,
++ const char *zSortUrl,
+ int nCol,
+ const char **az
+ ){
+@@ -528,9 +536,9 @@
+
+ if( atoi(az[0])==1 ){
+ @ <td colspan="3">
+- @ <a href="dirview?d=%T(zName)%T(az[1])">
++ @ <a href="dirview?d=%T(zName)%T(az[1])&%s(zSortUrl)">
+ common_icon("dir");
+- @ </a> <a href="dirview?d=%T(zName)%T(az[1])">%h(az[1])/</a></td>
++ @ </a> <a
href="dirview?d=%T(zName)%T(az[1])&%s(zSortUrl)">%h(az[1])/</a></td>
+ @ <td valign="middle"
width="10%%">%h(file_age_to_text(atoi(az[5])))</td>
+ @ <td></td>
+ }else{
+@@ -580,6 +588,7 @@
+ char *zOrderBy = "1 DESC, 2";
+ const char *z;
+ char zFld = 0;
++ char *zSortUrl = "";
+
+ login_check_credentials();
+ if( !g.okCheckout ){ login_needed(); return; }
+@@ -617,19 +626,6 @@
+ *zBase = 0;
+ zBase++;
+ }
+- if( zName && zName[0] ){
+- /* this looks like navigation, but it's relative to the current page
+- */
+- common_add_action_item(mprintf("dirview"), "Top");
+- common_add_action_item(mprintf("dirview?d=%T",zDir), "Up");
+- common_add_action_item(mprintf("dir?d=%T&sc=1",zName), "Short");
+- }else{
+- common_add_action_item("dir?sc=1", "Short");
+- }
+- common_add_help_item("CvstracBrowse");
+-
+- zNameNS = mprintf("%s",zName);
+- if( zName[0] ){ zName = mprintf("%s/",zName); }
+
+ /* Figure out how should we order this and display our intent in <th>
+ ** If no ordering preference is found, don't display anything in <th>
+@@ -638,6 +634,7 @@
+
+ z = P("o");
+ if( z ){
++ zSortUrl = mprintf("o=%t%s", z, (zDesc[0]=='D')?"&desc":"");
+ zFld = z[0];
+ switch( zFld ){
+ case 'f':
+@@ -660,6 +657,22 @@
+ break;
+ }
+ }
++
++ if( zName && zName[0] ){
++ /* this looks like navigation, but it's relative to the current page
++ */
++ common_add_action_item(
++ mprintf("dirview%s%s",(zSortUrl[0])?"?":"",zSortUrl), "Top");
++ common_add_action_item(
++ mprintf("dirview?d=%T%s%s",zDir,(zSortUrl[0])?"&":"",zSortUrl), "Up");
++ common_add_action_item(mprintf("dir?d=%T&sc=1",zName), "Short");
++ }else{
++ common_add_action_item("dir?sc=1", "Short");
++ }
++ common_add_help_item("CvstracBrowse");
++
++ zNameNS = mprintf("%s",zName);
++ if( zName[0] ){ zName = mprintf("%s/",zName); }
+
+ db_add_functions();
+ az = db_query(
+@@ -694,9 +707,9 @@
+
+ if( zName[0] ){
+ @ <tr><td colspan="5">
+- @ <a href="dirview?d=%T(zDir)">
++ @ <a href="dirview?d=%T(zDir)&%s(zSortUrl)">
+ common_icon("backup");
+- @ </a> <a href="dirview?d=%T(zDir)">..</a></td></tr>
++ @ </a> <a href="dirview?d=%T(zDir)&%s(zSortUrl)">..</a></td></tr>
+ }
+
+ /* In case dir is empty, exit nicely */
+@@ -707,7 +720,7 @@
+ }
+
+ for(i=0; az[i]; i+=8){
+- row_content(zName,i/8,&az[i]);
++ row_content(zName,zSortUrl,i/8,&az[i]);
+ }
+ @ </table>
+ db_query_free(az);
+@@ -815,6 +828,7 @@
+ const char *zFile = g.zExtra ? g.zExtra : P("f");
+ const char *zVers = P("v");
+ char *zSuffix;
++ const char *zName;
+ char *zMime = "text/plain"; /* The default MIME type */
+
+ /* The following table lists some alternative MIME types based on
+@@ -878,6 +892,16 @@
+ }
+ }
+ }
++
++ /*
++ ** This means the user gets something meaningful as a default filename
++ ** when they try to save to file (depending on the browser).
++ */
++ zName = strrchr(zFile, '/');
++ if (zName) zName += 1;
++ cgi_append_header(mprintf("Content-disposition: attachment; "
++ "filename=\"%T\"\r\n", zName ? zName : zFile));
++
+ if( zVers && zVers[0] ){
+ g.isConst = 1;
+ }
+Index: cgi.c
+--- cgi.c.orig 2006-05-26 16:20:28 +0200
++++ cgi.c 2006-05-26 20:59:52 +0200
+@@ -382,7 +382,7 @@
+ continue;
+ }
+ }
+- if( zDest[i+1]=='/' ) continue;
++ if( zDest[i+1]=='/' && (i==0 || zDest[i-1]!=':') ) continue;
}
--
-+ if( isMsgEnd ) break;
- nLine++;
+ zDest[j++] = zDest[i];
}
- pclose(in);
-@@ -357,6 +360,7 @@
- ** If it deviates from it too much, abort.
- */
- if( nAddChng ){
-+ if( pRev->zMessage==0 ) pRev->zMessage = "";
- db_execute(
- "INSERT INTO chng(cn, date, branch, milestone, user, message) "
- "VALUES(%d,%d,'',0,'%q','%q');",
+Index: common.c
+--- common.c.orig 2006-05-26 16:20:28 +0200
++++ common.c 2006-05-26 20:59:52 +0200
+@@ -394,7 +394,10 @@
+ }
+ @ </small>
+ }else{
+- const char *zUri = getenv("REQUEST_URI");
++ /* We don't want to be redirected back to captcha page, but ratehr to
++ ** one from which we were redirected to captcha in the first place.
++ */
++ const char *zUri = (P("cnxp")!=0) ? P("cnxp") : getenv("REQUEST_URI");
+ @ <a href="honeypot"><small><notatag arg="meaningless"></small></a>
+ @ <small><a href="login?nxp=%T(zUri)" title="Log in">Not logged
in</a></small>
+ }
+Index: db.c
+--- db.c.orig 2006-05-26 16:20:28 +0200
++++ db.c 2006-05-26 20:59:52 +0200
+@@ -1044,12 +1044,13 @@
+ @ FROM ticket");
+ @
----------------------------------------------------------------------------
+ @ INSERT INTO reportfmt VALUES(5,NULL,'Tickets counts',NULL,"SELECT
+-@ status,
+-@ count(case when type='code' then 'x' end),
+-@ count(case when type='doc' then 'x' end),
+-@ count(case when type='new' then 'x' end),
+-@ count(case when type NOT IN ('code','doc','new') then 'x' end),
+-@ count(*)
++@ status AS 'Status',
++@ count(case when type='code' then 'x' end) AS 'Code Bugs',
++@ count(case when type='doc' then 'x' end) AS 'Doc Bugs',
++@ count(case when type='new' then 'x' end) AS 'Enhancements',
++@ count(case when type NOT IN ('code','doc','new') then 'x' end)
++@ AS 'Other',
++@ count(*) AS 'All Types'
+ @ FROM ticket GROUP BY status
+ @ UNION
+ @ SELECT
+Index: throttle.c
+--- throttle.c.orig 2006-05-26 16:20:28 +0200
++++ throttle.c 2006-05-26 20:59:52 +0200
+@@ -165,7 +165,7 @@
+ }
+
+ if( zUrl==0 ) zUrl = "index";
+- cgi_redirect(mprintf("captcha?nxp=%T", zUrl));
++ cgi_redirect(mprintf("captcha?cnxp=%T", zUrl));
+ }else if( overload && exitOnOverload ){
+ /* Just block the client */
+ lockout();
+Index: timeline.c
+--- timeline.c.orig 2006-05-26 16:20:28 +0200
++++ timeline.c 2006-05-26 20:59:52 +0200
+@@ -1105,6 +1105,9 @@
+ z = db_short_query("SELECT date FROM chng WHERE cn=%d",cn);
+ if( z ) cgi_modified_since(atoi(z));
+
++ cgi_append_header(mprintf("Content-disposition: attachment; "
++ "filename=\"%T_patchset_%d.diff\"\r\n", g.zName, cn));
++
+ /* patchsets are raw output based one what are supposed to be unchanging
file
+ ** revisions.
+ */
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/cvstrac/cvstrac.spec
============================================================================
$ cvs diff -u -r1.41 -r1.42 cvstrac.spec
--- openpkg-src/cvstrac/cvstrac.spec 11 Jan 2006 11:04:07 -0000 1.41
+++ openpkg-src/cvstrac/cvstrac.spec 26 May 2006 19:06:04 -0000 1.42
@@ -32,8 +32,8 @@
Class: BASE
Group: Database
License: GPL
-Version: 1.2.1
-Release: 20060111
+Version: 2.0.0
+Release: 20060526
# list of sources
Source0: http://www.cvstrac.org/cvstrac-%{version}.tar.gz
@@ -45,8 +45,8 @@
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20040130, make, gcc
PreReq: OpenPKG, openpkg >= 20040130, cvs, rcs
-BuildPreReq: sqlite >= 2.8.4
-PreReq: sqlite >= 2.8.4
+BuildPreReq: sqlite >= 3.3
+PreReq: sqlite >= 3.3
AutoReq: no
AutoReqProv: no
@@ -68,7 +68,7 @@
%patch -p0
%build
- libs="-lsqlite -lcrypt -lm"
+ libs="-lsqlite3 -lcrypt -lm"
case "%{l_platform -t}" in
*-sunos* ) libs="$libs -lsocket -lnsl" ;;
esac
@@ -111,10 +111,19 @@
if [ ".$1" = .1 ]; then
( echo "Hint: To use CVSTrac you have to create databases for your
projects."
echo "Run the following command as user %{l_nusr} for each project
<name>:"
- echo "\$ $RPM_INSTALL_PREFIX/bin/cvstrac init
$RPM_INSTALL_PREFIX/var/cvstrac <name>"
+ echo " \$ $RPM_INSTALL_PREFIX/bin/cvstrac init
$RPM_INSTALL_PREFIX/var/cvstrac <name>"
echo "After this login to
http://localhost/openpkg-cgi/cvstrac/<name>/"
echo "with user \"setup\" and password \"setup\" and configure
your"
echo "CVS repository path, add users and change the \"setup\"
password."
) | %{l_rpmtool} msg -b -t notice
+ elif [ ".$1" = .2 ]; then
+ ( echo "If you are upgrading from CVSTrac 1.x to 2.0 you have to
upgrade"
+ echo "the existing database from SQLite 2 to SQLite 3, too. For
this run"
+ echo "the following commands before using CVSTrac 2.0:"
+ echo " \$ cd $RPM_INSTALL_PREFIX/var/cvstrac"
+ echo " \$ mv <project>.db <project>.db.old"
+ echo " \$ $RPM_INSTALL_PREFIX/bin/sqlite <project>.db.old .dump
|\\ "
+ echo " $RPM_INSTALL_PREFIX/bin/sqlite3 <project>.db"
+ ) | %{l_rpmtool} msg -b -t notice
fi
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]