-
Notifications
You must be signed in to change notification settings - Fork 0
/
UPGRADING
135 lines (113 loc) · 5.57 KB
/
UPGRADING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
RANCiD 3.2
3.2 includes support for the git SCM. It is based on the patch from Jeffrey C.
Ollie. However, unlike the patch, which places all of the rancid collections
into one repository rooted at rancid.conf:$BASEDIR, we've chosen to use
separate respositories as remote located in rancid.conf:$BASEDIR. This allows
the code to be same whether the master repository is local or remote and allows
each to be in a different location and autonomous. Also see rancid-cvs(1).
We do not want to instruct or help convert between SCMs; that is better left
to those that provide the tools that do the conversion. But, a few notes for
a starting point:
CVS to SVN:
% su - rancid
% cvs2svn -s `pwd`/.svn `pwd`/CVS/<rancid group name>
Now update the RCSSYS and CVSROOT variables in rancid.conf.
SVN to GIT:
cvs to git did not work well; so recommend cvs to svn to git. So,
assuming that your CVSROOT is ~/.svn from the conversion of cvs to svn,
convert to git as follows. If you began with svn, then your CVSROOT
is probably ~/CVS.
% su - rancid
% cat > authors<<EOF
(no author) = rancid <rancid@your mail domain>
rancid = rancid <rancid@your mail domain>
EOF
% mkdir .scm tmp
% cd tmp
% git init --bare `pwd`/.git
If you have more than one group, you must separate separate the groups
into individual git repositories: ~rancid/.scm/<group name1> etc. You
must --exclude the other groups as you convert each one.
% svn2git file://`echo ~`/.svn --notags --nobranches --authors \
~/authors
% mv .git ~/.scm/<rancid group name>
Now update the RCSSYS and CVSROOT variables in rancid.conf.
Please do not ask us for help with these tools. Also see
https://github.com/svn-all-fast-export/svn2git.
RANCiD 3.0
3.0 requires minimum revisions of perl 5.10 and expect 5.43.
The router.db field separator has been changed to ';' from ':' to avoid
conflict with IPv6 addresses and etc.
3.0 also introduces perl libraries for device O/S specific handling and
replaces the individual rancid scripts with rancid which imports the
libraries. Also, rancid.pm supplies the functions common among the former
rancid scripts.
RANCiD 2.3 introduces a new directory layout. It has been changed to more
closely follow the standard path hierarchy, which is defined by the FHS
standard and autoconf, and/or make these locations more easily configurable
within rancid.
The obvious advantage of this is making rancid more easily packagable; i.e.:
NetBSD pkgsrc, FreeBSD port, Linux RPM, etc.
Make sure your rancid repository is quiet before upgrading; disable rancid
cron jobs, wait for running jobs to complete, etc.
Autoconf defines the following (see configure --help):
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local/rancid]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--mandir=DIR man documentation [PREFIX/man]
Also defined, though not mentioned above, is:
pkgdatadir same as datadir, but datadir/rancid
File and directory movement:
bin/env the rancid configuration file has moved to
sysconfdir/rancid.conf
util/lg/lg.conf the looking glass configuration has moved to
sysconfdir/lg.conf
util/lg/lg.cgi
util/lg/lgform.cgi the looking glass CGI scripts have moved to bindir
util/lg/* the remainder of looking glass html, README, etc
files have moved to pkgdatadir
util/* misc examples, scripts, etc have moved to pkgdatadir
cloginrc.sample moved to pkgdatadir
For those upgrading, there is one basic choice to make; to move your CVS
repository and logs or not. Prior to rancid 2.3, these were placed in
<PREFIX>. They are now in "localstatedir". The user who runs rancid will
need write access to this directory.
To maintain the same location as was used prior to rancid 2.3, provide
the --localstatedir option to configure. e.g.:
./configure --localstatedir=/usr/local/rancid
/usr/local/rancid is, and has been, the default <PREFIX>.
To move them elsewhere, accept the default (e.g.: /usr/local/rancid/var) or
specify your own and move the existing directories. e.g.:
./configure --localstatedir=/var/rancid
make install
edit <SYSCONFDIR>/rancid.conf # merge with your old bin/env
# configuration file
mv /usr/local/rancid/logs /var/rancid
mv /usr/local/rancid/CVS /var/rancid
cd /var/rancid
su - rancid_user
/bin/sh
. <SYSCONFDIR>/rancid.conf
for grp in $LIST_OF_GROUPS; do
cvs -d /var/rancid/CVS co $grp
done
Note that the first rancid-run will send messages about routers being added,
marked up or down, etc., because the routers.{all,down,up} will have been
lost. Afterward, it will be back to normal.
Note also that any non-rancid files that may have been placed in these CVS
trees will be lost. You have been warned.
*** We strongly suggest that if a DIR used as the install prefix, as in
--prefix=DIR, is not dedicated to rancid that "/rancid" should be
appended to the --localstatedir, as in the example above.
Note that not all operating systems have a mv command that will move
directories across file systems. It may be necessary to use 'cp -r' or
'tar cf - <GROUPS> | (cd <SYSCONFDIR>; tar xpf -)'.