source: branches/fc13-dev/server/doc/upgrade-tips @ 1617

Last change on this file since 1617 was 1617, checked in by ezyang, 14 years ago
In progress documentation about Fedora distribution upgrades.
File size: 5.7 KB
Line 
1Upgrading Scripts for a new Fedora distribution
2===============================================
3
41. Gather knowledge
5-------------------
6
7You should read the Release Notes for all of the intervening
8releases.  For example, here are the Fedora 13 release notes:
9
10    http://docs.fedoraproject.org/en-US/Fedora/13/html/Release_Notes/
11
12Because we sometimes skip releases, you should read any skipped
13release's report notes.
14
15Example:
16
17    In Fedora 12, i586 was deprecated in favor of i686; this meant
18    that any parts of Scripts that referenced i586 explicitly had to
19    changed to i686.
20
212. Update the Scripts build environment
22---------------------------------------
23
24A large amount of the Scripts source repository is Fedora Release
25specific, so when you are ramping up the new release, you will want
26a new branch to do development on, before merging back upon the
27official release.  You can do this with:
28
29    svn cp svn://scripts.mit.edu/trunk \
30           svn://scripts.mit.edu/branches/fcXX-dev
31
32On the new branch, there are a number of files you will have to
33update:
34
352.1 Mock
36
37Mock needs to be setup for the new environment.  The first thing to do
38is to update the Makefile by substituting
39s/scripts-fcOLD/scripts-fcNEW/g on the /usr/bin/mock invocations.
40After that, you need to go to /etc/mock and create the new cfg file
41for the new scripts-fcXX-ARCH configurations (where ARCH is x86_64 and
42i386).  You can base the new cfg off of the older version's, however
43you will want to make the following changes:
44
45    * Update all references to the old Fedora release to the new
46      Fedora release.  This includes root, dist, mirrorlist, baseurl
47
48    * Temporarily disabling the web.mit.edu Scripts RPM repository
49      and the local RPM repository by setting enabled=0 (it's there for
50      a reason!)  However, the local RPM repository is fairly painless
51      to create and will come in handy when you start attempting to
52      build packages that have dependencies on other scriptsified
53      packages: you can set one up as scripts-build with:
54
55        mkdir ~/mock-local
56        createrepo ~/mock-local
57
583. Rebuild Scripts packages
59---------------------------
60
61In order to support specific extra functionality, we have scriptsified
62a variety of Fedora packages.  When the base packages get upgrades,
63we need to upgrade the scriptsification.  Some of the following topics
64are covered in 'package-build-howto', but a new Fedora release tends
65to also result in somewhat rarer situations.
66
67Here are some of the common troubles you'll have to deal with:
68
693.1 Spec patches are no longer necessary
70
71When a Fedora release gets EOL'ed, we may continue to backport
72patches for CVE's manually.  When we upgrade to a non-EOL'd release,
73those patches will generally become unnecessary and can be dropped.
74
75You can drop a modified specfile from the repository simply by
76`svn rm`ing:
77
78    * The spec patch in server/fedora/specs,
79    * The source code patch in server/common/patches, and
80    * The upstream_yum entry in server/fedora/Makefile
81
82If a specfile merely bumps the version field, there may be no extra
83patch (this indicates that the maintainer rebuilt the package simply
84by manually dropping the new source tarball in rpmbuild/SOURCES,
85which is kind of sketchy but works.  See -c 1586 for an example.)
86
873.2 Spec patches no longer apply
88
89Symptom:
90
91    $ make patch-specs
92    patching file openssh.spec
93    Hunk #1 succeeded at 74 with fuzz 2 (offset 11 lines).
94    Hunk #2 failed at 88.
95    Hunk #3 succeeded at 177 (offset 14 lines).
96    Hunk #4 succeeded at 270 with fuzz 2 (offset 36 lines).
97    1 out of 4 hunks failed--saving rejects to openssh.spec.rej
98
99Fix:
100
101    The main thing to remember is where the generated files live
102    they are placed in rpmbuild/SPECS/openssh.spec{.rej,.orig}.
103    A workflow for fixing them might look like:
104
105        1. Inspect the rejects file.
106        2. As much as possible, manually fix the original diff
107           file in /srv/repository/server/fedora/specs
108        3. If absolutely necessary, edit the rpmbuild/SPECS/openssh.spec
109           file with any final changes (this is dangerous because
110           this file is blown away on a successive make)
111        4. Generate a new unified diff:
112             diff -u openssh.spec.orig openssh.spec > \
113                 /srv/repository/server/fedora/specs\openssh.spec.patch
114
1153.3 Mock fails with no error message
116
117Fix: You forgot to add scripts-build to the mock group.  See
118     https://bugzilla.redhat.com/show_bug.cgi?id=630791
119     [XXX: remove this entry when this bug is fixed]
120
1213.4 Source patches no longer apply
122
123Symptoms:
124
125    Generally, you will see these error messages after Mock starts
126    building (if they occur before Mock, that means it's a bug in the
127    spec patch, not a source patch that the spec patch references.)
128
129Fix:
130
131    The error message will be from within a schroot that Mock is using.
132    As a result, it's not immediately obvious where the files live.
133    There are two approaches you can take:
134
135    Find the schroot: XXX to write
136
137    Manually patch the source dist: Tarballs for the original source can
138    be found in ~/rpmbuild/SOURCES, and then you can manually apply the
139    failing patches and debug from there.
140
1414. "Officializing" everything
142-----------------------------
143
144web.mit.edu scripts repository (/mit/scripts/rpm-fcXX and
145/mit/scripts/rpm-fcXX-testing) needs to be made [XXX: document how to
146make]
147
1485. Extra stuff
149--------------
150
151Fedora occasionally updates the architecture name for 32-bit; the last
152such update was in Fedora 12, when i586 became i686.  Fixing this
153usually just involves replacing i586 with i686 in the appropriate places
154(Makefile, specfiles, /etc/mock configuration).  Note that for
155hysterical raisins we still refer to our 32-bit builds as i386.
156[XXX: Maybe this should change]
Note: See TracBrowser for help on using the repository browser.