~ubuntu-branches/ubuntu/trusty/maradns/trusty-proposed

« back to all changes in this revision

Viewing changes to update/1.4.07/1.4.06-to-1.4.07

  • Committer: Package Import Robot
  • Author(s): Dariusz Dwornikowski
  • Date: 2014-02-16 19:36:04 UTC
  • mfrom: (1.2.11) (21.1.11 experimental)
  • Revision ID: package-import@ubuntu.com-20140216193604-xtmcopn9pilzszae
Tags: 2.0.09-1
* New maintainer (Closes: #739084)
* New upstream release to unstable
* Several security bugs (Closes: #739755)
   - security bugfix for CVE-2011-5055, CVE-2011-5056, CVE-2012-0024,
   CVE-2012-1570
   - security bugfix agains blind spoofing attack (no CVE number)
   - security bugfix for packet of death attack (no CVE number)
* Bump standards to 3.9.5
* Updated d/postinst to no longer modify conffiles (Closes: #710903)
* Init script fixed (Closes: #709826)
* --reinstall no longer kills the process (Closes: #701657)
* Updated old d/changelog entries, added information when the CVEs were
  fixed: 2.0.06-1, 2.0.04-1, 1.4.11-1, 1.2.12.06-1, 1.2.12.05-1, 1.0.28-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh -e
2
 
 
3
 
# This script updates MaraDNS 1.4
4
 
 
5
 
# To run this script, make sure that this script is in the directory
6
 
# containing the tarball for the version of MaraDNS you wish to update, and
7
 
# all of the patches are in a directory entitled 'patches'.
8
 
 
9
 
# For example, to update MaraDNS 1.4.02 to 1.4.03, make sure 
10
 
# maradns-1.3.02.tar.lzma is in the same directory as this script, and
11
 
# that the directory containing this script has a directory called
12
 
# "patches/" which has all of the maradns-1.2.02*.patch files.
13
 
 
14
 
CURRENT=${0%%-*}
15
 
CURRENT=${CURRENT##*/}
16
 
NEXT=${0##*-}
17
 
 
18
 
# The revision number; in the case of having multiple snapshots a day,
19
 
# the revision number can be incremented so as to minimize confusion
20
 
# This is only done when more than one snapshop is uploaded to the
21
 
# maradns.org server in a given day.
22
 
REVISION=.1
23
 
 
24
 
# Make a clean CURRENT install, which we rename NEXT
25
 
rm -fr maradns-$CURRENT 2> /dev/null
26
 
rm -fr maradns-$NEXT 2> /dev/null
27
 
echo extracting tarball
28
 
tar xjf maradns-$CURRENT.tar.bz2
29
 
if [ $? != 0 ] ; then
30
 
        echo run this from the correct directory
31
 
        exit 1
32
 
fi
33
 
rm -fr maradns-$NEXT*
34
 
mv maradns-$CURRENT maradns-$NEXT
35
 
cd maradns-$NEXT
36
 
 
37
 
# The patches
38
 
 
39
 
mkdir update/$NEXT
40
 
if [ "$1" != "new" ] ; then
41
 
        #cp ../patches/maradns-$CURRENT* update/$NEXT
42
 
        cp ../patches/1.4.07/maradns* update/$NEXT
43
 
        #echo
44
 
fi
45
 
 
46
 
# This is one of the few places where we will need to change anything
47
 
# in this script from version to version
48
 
 
49
 
echo applying patches
50
 
 
51
 
#if [ "$1" != "new" ] ; then
52
 
 
53
 
        # Update download link (this is always done)
54
 
        #patch -p1 < update/$NEXT/maradns-$CURRENT-download.patch
55
 
 
56
 
        # Patch: Update changelog
57
 
        #patch -p1 < update/$NEXT/maradns-$CURRENT-changelog.patch
58
 
 
59
 
#fi
60
 
 
61
 
# Update RPM spec file (We now have a script make the .spec file)
62
 
rm build/maradns-$CURRENT.spec
63
 
tools/misc/make.maradns.spec $NEXT > build/maradns-$NEXT.spec
64
 
 
65
 
# Update Deadwood to 3.0.05
66
 
rm -fr deadwood-3.0.02
67
 
tar xjf ../deadwood-3.0.05.tar.bz2
68
 
 
69
 
# Regenerate Deadwood's random prime number
70
 
echo Making new random prime
71
 
cd deadwood-3.0.05/src
72
 
cc -o foo RandomPrime.c
73
 
./foo > DwRandPrime.h
74
 
rm foo
75
 
cd ../..
76
 
 
77
 
# Release-specific fixes and changes go here
78
 
 
79
 
for a in update/$NEXT/maradns*patch ; do
80
 
        echo applying patch $a
81
 
        patch -p1 < $a
82
 
done
83
 
 
84
 
echo server/*orig
85
 
rm server/*orig
86
 
 
87
 
# Anything below this line normally is not changed between MaraDNS versions
88
 
 
89
 
# Make sure text changelog and FAQ are up-to-date
90
 
cp doc/en/webpage/faq.embed doc/en/source/faq.embed
91
 
cp doc/en/webpage/changelog.embed doc/en/source/changelog.embed
92
 
 
93
 
# Convert tabs in code to spaces, since this is inconsistant in different
94
 
# programs
95
 
echo removing tabs from source files
96
 
if true ; then
97
 
        for a in $( find . -type f -name \*.[ch] ) ; do 
98
 
                col -x < $a > foo
99
 
                mv foo $a
100
 
        done
101
 
fi
102
 
 
103
 
echo updating documentation
104
 
# Update the documentation
105
 
cd doc/en
106
 
make
107
 
cd man
108
 
make
109
 
cd ../examples
110
 
make
111
 
cd ../tutorial
112
 
make
113
 
cd ../text
114
 
make
115
 
cd ../webpage
116
 
#../../../tools/misc/make.download.embed > download.embed
117
 
make
118
 
# Go back to the maradns dir
119
 
cd ../../..
120
 
 
121
 
rm CHANGELOG
122
 
ln -s doc/en/changelog.txt CHANGELOG
123
 
 
124
 
# Go one level higher than the toplevel directory to copy this script
125
 
# over
126
 
cd ..
127
 
 
128
 
# Put this script in the "build" directory
129
 
cp $0 maradns-$NEXT/update/$NEXT
130
 
 
131
 
if [ "$1" = "new" ] ; then
132
 
        tar xjf maradns-$CURRENT.tar.bz2
133
 
        echo OK, both maradns-$CURRENT and maradns-$NEXT made\; you
134
 
        echo now can start making patches.
135
 
        exit 0
136
 
fi
137
 
 
138
 
if [ "$1" != "go" ] && [ "$1" != "snap" ] && [ "$1" != "work" ] ; then
139
 
        echo OK, maradns-$NEXT built.  Confirm this compiles and        
140
 
        echo perform basic regression before re-running this to make
141
 
        echo the tarballs.  Once you have tested this, rerun this 
142
 
        echo script as: \"$0 go\" or as \"$0 snap\" 
143
 
        echo to make a daily snapshot
144
 
        exit 0
145
 
fi
146
 
 
147
 
if [ "$1" = "work" ] ; then
148
 
        tar xjf maradns-$CURRENT.tar.bz2
149
 
        echo OK, both maradns-$CURRENT and maradns-$NEXT made\; you
150
 
        echo now can make more patches as needed.  
151
 
        exit 0
152
 
fi
153
 
 
154
 
# Build the tarballs
155
 
echo making new tarballs
156
 
 
157
 
if [ "$1" = "snap" ] ; then
158
 
        SNAP=Q.$( date +%Y%m%d )$REVISION
159
 
        rm -fr maradns-$SNAP
160
 
        mv maradns-$NEXT maradns-$SNAP
161
 
        tar cjf maradns-$SNAP.tar.bz2 maradns-$SNAP
162
 
        exit 0
163
 
else
164
 
        SNAP=$NEXT
165
 
        tar cjf maradns-$SNAP.tar.bz2 maradns-$SNAP
166
 
        tar czf maradns-$SNAP.tar.gz maradns-$SNAP
167
 
 
168
 
        # All of the compression we actually use was originally written by 
169
 
        # Igor Pavlov for the 7-zip compression suite
170
 
        echo shrinking .gz tarball
171
 
        advdef -z -4 maradns-$SNAP.tar.gz
172
 
fi
173
 
 
174
 
exit 0 # No exotic compression any more
175
 
 
176
 
echo using exotic compression
177
 
tar cf maradns-$SNAP.tar maradns-$SNAP
178
 
 
179
 
echo lzma compression \(this will take about 5 minutes\)
180
 
date
181
 
# To decompress: cat file.tar.lzma | lzma d -si -so | tar xvf -
182
 
# -d20 makes the file almost as small as -d22, but uses 1/4 of the memory
183
 
# (only a little over one meg needed for decompression)
184
 
lzma e maradns-$SNAP.tar maradns-$SNAP.tar.lzma -a2 -d20 -fb255
185
 
date
186
 
echo
187
 
 
188
 
# Clean up the uncompressed tarball
189
 
rm maradns-$SNAP.tar
190
 
 
191
 
exit 0
192
 
 
193
 
# The other exotic compressors can't be run in a pipeline
194
 
 
195
 
echo 7zip compression
196
 
date
197
 
7za a maradns-$SNAP.tar.7z maradns-$SNAP.tar
198
 
date
199
 
echo
200
 
 
201
 
echo paq6 compression \(This will take 2\-3 minutes\)
202
 
date
203
 
paq6v2 -2 maradns-$SNAP.tar.pq6 maradns-$SNAP.tar
204
 
date
205
 
echo
206
 
 
207
 
echo rzip compression
208
 
date
209
 
rzip maradns-$SNAP.tar
210
 
date
211
 
echo