Skip to content

Commit f064ec1

Browse files
committed
Branch in order to continue working, fixing problems
- Legacy-Id: 6329
1 parent f96af68 commit f064ec1

3,745 files changed

Lines changed: 968478 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

r6328/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/.project
2+
/.pydevproject
3+
/.settings
4+
/unix.tag
5+
/testresult
6+
/mergelog
7+
/mergequeue
8+
/INSTALL.pdf

r6328/INSTALL

Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
=====================================
2+
Datatracker Installation Instructions
3+
=====================================
4+
5+
6+
General Instructions for Deployment of a New Release
7+
====================================================
8+
9+
10+
1. In order to fetch a new release of the django datatracker code, simply
11+
check out the appropriate tag from svn::
12+
13+
svn co http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$releasenumber
14+
15+
2. Don't forget to copy $releasenumber/ietf/settings_local.py from the
16+
old release to the new one; otherwise things won't work!
17+
::
18+
19+
cp $oldreleasenumber/ietf/settings_local.py $releasenumber/ietf/
20+
21+
3. Change into the directory of the new release and run migrations::
22+
23+
cd $releasenumber
24+
PYTHONPATH=$PWD ietf/manage.py migrate
25+
cd ..
26+
27+
4. Then re-point the 'web' symlink::
28+
29+
rm ./web; ln -s $releasenumber web
30+
31+
5. Restart apache::
32+
33+
sudo /etc/init.d/apache2 restart
34+
35+
6. It's now also a good idea to go to the datatracker front page:
36+
37+
http://datatracker.ietf.org/
38+
39+
to check that it's alive and kicking, and displaying the new release
40+
number at the bottom of the left-side menubar :-)
41+
42+
7. If things **aren't** cool, revert the symlink step, re-pointing the
43+
symlink to the release that was running before the new release, and restart
44+
apache again to roll back to that.
45+
46+
47+
Installing from Scratch
48+
=======================
49+
50+
In addition to the new release deployment instructions above, the
51+
settings_local.py file has to be set up properly, and Apache has to be
52+
configured. Since the IETF datatracker is only intended to be deployed from
53+
scratch once, these instructions don't cover this scenario in any more detail.
54+
The general Django depoloyment instructions are relevant, however.
55+
56+
57+
Patching a Production Release
58+
=============================
59+
60+
Sometimes it can prove necessary to patch an existing release. The following
61+
process should be used:
62+
63+
1. Code and test the patch on a development system copy of the production
64+
release which has no other code changes (or on trunk, with no uncommitted
65+
code changes, if it's sufficiently close).
66+
67+
2. Produce a patch file, named with date and subject::
68+
69+
~/src/ietfdb/working $ svn diff > 2013-03-25-ballot-calculation.patch
70+
71+
3. Move the patch file to the production server, and place it in
72+
'/a/www/ietf-datatracker/patches/'
73+
74+
4. Make a recursive copy of the production code to a new directory, named
75+
with a patch number. Assuming the production code is in 4.43/, and we
76+
have web -> 4.43/::
77+
78+
/a/www/ietf-datatracker $ rsync -a web/ 4.43.p1/
79+
80+
(you could use 'cp -rp' instead, but rsync seems to do this faster).
81+
82+
5. Apply the patch::
83+
84+
/a/www/ietf-datatracker $ cd 4.43.p1/
85+
/a/www/ietf-datatracker/4.43.p1 $ patch -p0 \
86+
< ../patches/2013-03-25-ballot-calculation.patch
87+
88+
This should not produce any messages about failing to apply any chunks;
89+
if it does, you probably should go back to 1. and figure
90+
out why.
91+
92+
6. Edit ``.../ietf/__init__.py`` in the new patched release to indicate the patch
93+
version in the ``__version__`` string and current date and time in the ``__date__``
94+
string.
95+
96+
7. Change the 'web' symlink, reload etc. as described in
97+
`General Instructions for Deployment of a New Release`_ .
98+
99+
100+
Installing a Secretariat Release
101+
================================
102+
103+
Secretariat releases are based on a regular tagged release, but contain
104+
updated code in the ietf/secr/ tree. They are named with a trailing
105+
'.secr<N>' version number. If the tagged release is for instance 4.42, the
106+
first secretariat release based on that would have release number 4.42.secr1,
107+
and the second secretariat release based on it would be numbered 4.42.secr2.
108+
109+
Secretariat releases are deployed in the same manner as regular releases, with
110+
the addition that patches made to the regular release needs to be picked up
111+
and applied. Assuming we'releasing 4.42.p1.secr2, then after we've cd'd into
112+
the release diretory to run migrations, we'd also run a patch step to pick
113+
up the current patches to the current production release, which is pointed
114+
to by ../web::
115+
116+
/a/www/ietf-datatracker/4.42.p1.secr2 $ svn diff ../web/ | patch -p2
117+
118+
Assuming that runs without error messages, the deployment is continued as
119+
usual, with re-pointing the symlink and restarting apache.
120+
121+
Additional Version-Specific Instructions
122+
========================================
123+
124+
Version 4.50
125+
------------
126+
127+
Before you run step 3 (migration) of the general instructions, please run some specific
128+
initial migrations with the a --fake argument:
129+
130+
cd $releasenumber
131+
PYTHONPATH=$PWD ietf/manage.py migrate group 0001 --fake
132+
cd ..
133+
134+
135+
Version 4.42
136+
------------
137+
138+
- In order to serve the secretariat tools static pages (such as image, css and js
139+
files) the exceptions to which urls need to be handled by the python-handler
140+
must be updated.
141+
142+
In the datatracker test server, the following configuration has been used to
143+
make apache handle the static files, and Django the dynamic pages. The new
144+
part is the <LocationMatch/> which mentions /secr/. Adapt as needed for ietfa::
145+
146+
----------------
147+
# Logging and document root settings omitted
148+
149+
<Location "/">
150+
PythonPath "['/srv/www/ietfdb'] + sys.path"
151+
SetHandler python-program
152+
PythonHandler django.core.handlers.modpython
153+
SetEnv DJANGO_SETTINGS_MODULE ietf.settings
154+
PythonDebug On
155+
</Location>
156+
157+
<LocationMatch "^/(robots.txt|favicon.ico|images|css|js|media|error)(/|$)">
158+
SetHandler None
159+
</LocationMatch>
160+
161+
# New for secretariat tools:
162+
<LocationMatch "^/secr/(img|css|js|error)">
163+
SetHandler None
164+
</LocationMatch>
165+
166+
<Location "/accounts/login/">
167+
AuthType Digest
168+
AuthName "IETF"
169+
AuthUserFile /var/local/loginmgr/digest
170+
AuthGroupFile /var/local/loginmgr/groups
171+
AuthDigestDomain http://tools.ietf.org/
172+
Require valid-user
173+
</Location>
174+
175+
# Caching and compression settings omitted
176+
----------------
177+
178+
Version 4.40
179+
------------
180+
181+
- (DONE) Add ianasync user with an auth role in the "iana" group and an
182+
rfceditorsync user with an auth role in the "rfceditor" group (don't
183+
think Group(acronym="rfceditor") exists yet); IANA and RFC Editor need
184+
to know the passwords for the poke mechanism
185+
186+
187+
- (DONE) Make sure mailing list for iab-stream@iab.org is up (since we're now
188+
emailing that)
189+
190+
- (DONE) Set rfc_must_published_later_than date in bin/iana-protocols-updates to today
191+
192+
- (DONE) Run the 3 new doc South migrations
193+
194+
- (DONE) New polling scripts, to be run every hour::
195+
196+
web/ietf/bin/iana-changes-updates
197+
web/ietf/bin/iana-protocols-updates
198+
web/ietf/bin/rfc-editor-index-updates (replaces mirror_rfc_index)
199+
web/ietf/bin/rfc-editor-queue-updates (replaces mirror_rfc_queue)
200+
201+
- (DONE) Import old events from IANA::
202+
203+
bin/iana-changes-updates --from="2005-01-01 00:00:00" --to="2013-01-31 00:00:00" --no-email
204+
205+
- (DONE) Pipe IANA review emails to the datatracker. There used to be an action to pipe
206+
such mails to henrik@levkowetz.com, for testing this feature, but I haven't seen
207+
any in a little while, so I don't know if this has broken. Anyway, the iana review
208+
emails should be piped into::
209+
210+
/www/ietf-datatracker/web/ietf/bin/iana-review-email
211+
212+
213+
- (DONE) Tell IANA we're doing this for real now.
214+
215+
216+
Version 4.34
217+
------------
218+
219+
The migration step you do as a part of the release sequence is going to take
220+
quite some time -- probably minutes. It will generate some output while it's
221+
working, too. As long as it doesn't halt and say that something failed or
222+
gave an error, this is as expected, and when it terminates, you should be OK
223+
to continue.
224+
225+
Version 4.21
226+
------------
227+
228+
This release will you to run migrations before moving the link to the new
229+
version and doing the apache reload. I know you have a routine for the steps
230+
needed to deploy a new release by now, but thought I'd mention it, anyway.
231+
232+
If there is any problem at all doing the migrations, then you'll need to
233+
do a fake initial migration, as follows::
234+
235+
web $ PYTHONPATH=PWD ietf/manage.py migrate --fake meeting 0001
236+
237+
and then to the regular migration again.
238+
239+
Version 4.20
240+
------------
241+
242+
Some one-time actions that need to be taken are as follows::
243+
244+
Assuming that the release has been checked out in /a/www/ietf-datatracker/4.20:
245+
246+
cd /a/www/ietf-datatracker/4.20
247+
248+
PYTHONPATH=$PWD ietf/manage.py migrate --fake doc 0001
249+
PYTHONPATH=$PWD ietf/manage.py migrate --fake name 0001
250+
251+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< "delete from django_content_type where app_label='doc'
252+
and model='groupballotpositiondocevent';"
253+
254+
PYTHONPATH=$PWD ietf/manage.py migrate doc || { \
255+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'CREATE TABLE `doc_groupballotpositiondocevent`
256+
(`block_comment` longtext NOT NULL, `comment` longtext NOT NULL,
257+
`ad_id` integer NOT NULL, `comment_time` datetime NULL,
258+
`block_comment_time` datetime NULL, `pos_id` varchar(8) NOT NULL DEFAULT "norecord",
259+
`docevent_ptr_id` integer NOT NULL PRIMARY KEY);'
260+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballottype` CASCADE;'
261+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballottype_positions` CASCADE;'
262+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'DROP TABLE `doc_ballotdocevent` CASCADE;'
263+
PYTHONPATH=$PWD ietf/manage.py dbshell <<< 'ALTER TABLE `doc_ballotpositiondocevent`
264+
DROP COLUMN `ballot_id` CASCADE;'
265+
}
266+
267+
PYTHONPATH=$PWD ietf/manage.py migrate doc
268+
PYTHONPATH=$PWD ietf/manage.py migrate name
269+
PYTHONPATH=$PWD python ietf/wgcharter/migrate.py | tee -a ~/charter-migration.log
270+
271+

r6328/LICENSE

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
For code in the django/ directory, see LICENSE.django file).
2+
3+
For files under static/js/yui/, static/css/yui/ and static/images/yui/,
4+
see http://developer.yahoo.net/yui/license.txt.
5+
6+
---------------------------------------------------------------------------
7+
8+
Copyright (c) 2008, The IETF Trust
9+
All rights reserved.
10+
11+
Redistribution and use in source and binary forms, with or without
12+
modification, are permitted provided that the following conditions are met:
13+
14+
* Redistributions of source code must retain the above copyright notice,
15+
this list of conditions and the following disclaimer.
16+
17+
* Redistributions in binary form must reproduce the above copyright
18+
notice, this list of conditions and the following disclaimer in the
19+
documentation and/or other materials provided with the distribution.
20+
21+
* Neither the name of the <ORGANIZATION> nor the names of its contributors
22+
may be used to endorse or promote products derived from this software
23+
without specific prior written permission.
24+
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
29+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
31+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
32+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

r6328/LICENSE.django

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
(this applies to the django/ subdirectory)
2+
---------------------------------------------------------------------------
3+
4+
Copyright (c) Django Software Foundation and individual contributors.
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
1. Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
13+
2. Redistributions in binary form must reproduce the above copyright
14+
notice, this list of conditions and the following disclaimer in the
15+
documentation and/or other materials provided with the distribution.
16+
17+
3. Neither the name of Django nor the names of its contributors may be used
18+
to endorse or promote products derived from this software without
19+
specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
25+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

r6328/bin/commitlog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
svn log $PWD -r ${2:-HEAD}:${1:-BASE} | sed -n -e 's/^/ * /' -e '1,/^ \* Set version info and settings back to development mode/p' | egrep -v -- '^ \* (----------|r[0-9]+ |$)' | head -n -1 | tac | sed 's/$/\n/' | fold -s -w 76 | sed -r 's/^([^ ])/ \1/'
3+
date +" -- Henrik Levkowetz <henrik@netnod.se> %d %b %Y %H:%M:%S %z"

r6328/bin/graph-models

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
#
3+
# Copyright The IETF Trust 2007, All Rights Reserved
4+
#
5+
# Requires modelviz.py from
6+
# http://code.djangoproject.com/wiki/DjangoGraphviz
7+
#
8+
PYTHONPATH=`dirname $PWD`
9+
export PYTHONPATH
10+
module=${PWD##*/}
11+
DJANGO_SETTINGS_MODULE=$module.settings
12+
export DJANGO_SETTINGS_MODULE
13+
for d in *
14+
do
15+
if grep models.Model $d/models.py > /dev/null 2>&1
16+
then
17+
models="$models $d"
18+
fi
19+
done
20+
modelviz.py $* $models > models.dot
21+
dot -Tpng models.dot

0 commit comments

Comments
 (0)