~ubuntu-branches/debian/squeeze/ntp/squeeze-201010051545

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-01-05 21:10:03 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20090105211003-mh6zc3um4k1uhsj7
Tags: 1:4.2.4p4+dfsg-8
It did not properly check the return value of EVP_VerifyFinal
which results in an malformed DSA signature being treated as
a good signature rather than as an error.  (CVE-2009-0021)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
# Comment this to turn off verbose mode.
4
 
# export DH_VERBOSE=1
5
 
 
6
 
config: config-stamp
7
 
config-stamp:
 
3
include /usr/share/quilt/quilt.make
 
4
 
 
5
# hacks to avoid running these things during the build
 
6
export ACLOCAL    = : aclocal
 
7
export AUTOCONF   = : autoconf
 
8
export AUTOMAKE   = : automake
 
9
export AUTOHEADER = : autoheader
 
10
 
 
11
CFLAGS = -g -fno-strict-aliasing
 
12
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
13
CFLAGS += -O0
 
14
else
 
15
CFLAGS += -O2
 
16
endif
 
17
 
 
18
config: patch config.status
 
19
config.status: $(QUILT_STAMPFN)
8
20
        dh_testdir
9
 
 
10
 
        # Create autoconf stuff, if not present
11
 
        if test ! -f configure; then $(MAKE) -f debian/rules clean; fi
12
 
        chmod +x ./configure
13
 
 
14
 
        # refclock version
15
 
        mkdir -p build-refclock
16
 
        cd build-refclock && ../configure --prefix=/usr \
 
21
        ./configure CFLAGS='$(CFLAGS)' \
 
22
                ac_cv_var_tick=no ac_cv_var_tickadj=no \
 
23
                --prefix=/usr \
17
24
                --enable-all-clocks --enable-parse-clocks --enable-SHM \
18
25
                --disable-debugging --sysconfdir=/var/lib/ntp \
19
 
                --cache-file=../config.cache --disable-errorcache \
20
 
                --enable-linuxcaps
21
 
        touch build-refclock/stamp-h.in
22
 
 
23
 
        # build simple version
24
 
        mkdir -p build-simple
25
 
        cd build-simple && ../configure --prefix=/usr \
26
 
                --disable-all-clocks --disable-parse-clocks \
27
 
                --disable-debugging --enable-LOCAL-CLOCK \
28
 
                --sysconfdir=/var/lib/ntp --cache-file=../config.cache \
29
 
                --disable-errorcache --enable-linuxcaps
30
 
        touch build-simple/stamp-h.in
31
 
 
32
 
        touch config-stamp
33
 
 
34
 
build: build-stamp
35
 
build-stamp: config-stamp
 
26
                --with-sntp=no \
 
27
                --enable-linuxcaps \
 
28
                --disable-dependency-tracking
 
29
 
 
30
build: config build-stamp
 
31
build-stamp: config.status
36
32
        dh_testdir
37
 
 
38
 
        make -C build-refclock/ntpd
39
 
        make -C build-simple
40
 
 
41
 
        touch build-stamp
42
 
 
43
 
clean:
 
33
        $(MAKE)
 
34
        touch $@
 
35
 
 
36
clean: clean-patched unpatch
 
37
clean-patched:
44
38
        dh_testdir
45
39
        dh_testroot
46
 
        rm -f config-stamp build-stamp 
47
 
        rm -rf build-simple build-refclock
48
 
        rm -f config.cache
 
40
        rm -f build-stamp 
 
41
        [ ! -f Makefile ] || $(MAKE) -k distclean
49
42
 
50
43
        -test -r /usr/share/misc/config.sub && \
51
44
                cp -f /usr/share/misc/config.sub config.sub
52
45
        -test -r /usr/share/misc/config.guess && \
53
46
                cp -f /usr/share/misc/config.guess config.guess
54
47
 
55
 
        -if test -f aclocal.m4 ; then touch aclocal.m4; else aclocal-1.7; fi
56
 
        -if test -f config.h.in ; then touch config.h.in; else autoheader; fi
57
 
        -if test -f Makefile.in ; then find . -name Makefile.in -exec touch {} \; ;\
58
 
                else automake-1.7 --copy --add-missing; fi
59
 
 
60
 
        -if test -f configure ; then touch configure; else autoconf; fi
61
 
        -if test -f version ; then touch version; else \
62
 
                dpkg-parsechangelog | sed -ne 's/^Version:[     ]*//p' > version; fi
63
 
 
64
48
        dh_clean
65
49
 
66
50
install: build-stamp
69
53
        dh_clean -k
70
54
        dh_installdirs
71
55
 
72
 
        $(MAKE) -C build-simple install \
73
 
                bindir=`pwd`/debian/ntp/usr/sbin \
74
 
                prefix=`pwd`/debian/ntp/usr
75
 
 
76
 
        # move the user-space programs from /usr/sbin to /usr/bin
77
 
        for file in ntpq ntpdc ntptrace; do \
78
 
                mv debian/ntp/usr/sbin/$$file debian/ntp/usr/bin/$$file; \
79
 
        done
80
 
 
81
 
        # move the daemon to their packages
82
 
        mv debian/ntp/usr/sbin/ntpd debian/ntp-simple/usr/sbin/ntpd
83
 
        install build-refclock/ntpd/ntpd debian/ntp-refclock/usr/sbin/ntpd
84
 
 
85
 
        # move support programs
86
 
        for file in ntp-wait ntptime tickadj; do \
87
 
                mv debian/ntp/usr/sbin/$$file debian/ntp-server/usr/sbin/$$file; \
88
 
        done
89
 
 
90
 
        install -o root -g root -m 0755 build-simple/scripts/ntpsweep \
91
 
                debian/ntp/usr/bin/ntpsweep
92
 
        install -o root -g root -m 0755 build-simple/util/ntp-keygen \
93
 
                debian/ntp/usr/sbin/ntp-keygen
94
 
        install -o root -g root -m 0644 debian/ntpsweep.1 \
95
 
                debian/ntp/usr/share/man/man1/ntpsweep.1
96
 
        # hand-craft the manpages since they're all worthless creations...
97
 
 
98
 
        install -o root -g root -m 0644 debian/ntpdate.1 \
99
 
                debian/ntpdate/usr/share/man/man1/ntpdate.1
100
 
        install -o root -g root -m 0644 debian/ntpd.1 \
101
 
                debian/ntp-simple/usr/share/man/man1/ntpd.1
102
 
        install -o root -g root -m 0644 debian/ntpd.1 \
103
 
                debian/ntp-refclock/usr/share/man/man1/ntpd.1
104
 
        install -o root -g root -m 0644 debian/useless.1 \
105
 
                debian/ntp/usr/share/man/man1/ntpdc.1
106
 
        install -o root -g root -m 0644 debian/useless.1 \
107
 
                debian/ntp/usr/share/man/man1/ntp-keygen.1
108
 
        install -o root -g root -m 0644 debian/useless.1 \
109
 
                debian/ntp-server/usr/share/man/man1/ntp-wait.1
110
 
        install -o root -g root -m 0644 debian/useless.1 \
111
 
                debian/ntp/usr/share/man/man1/ntpq.1
112
 
        install -o root -g root -m 0644 debian/useless.1 \
113
 
                debian/ntp/usr/share/man/man1/ntptrace.1
114
 
        install -o root -g root -m 0644 debian/useless.1 \
115
 
                debian/ntp-server/usr/share/man/man1/tickadj.1
116
 
        install -o root -g root -m 0644 debian/useless.1 \
117
 
                debian/ntp-server/usr/share/man/man1/ntptime.1
118
 
        install -o root -g root -m 0644 debian/ntp.conf \
119
 
                debian/ntp-server/etc
120
 
        install -o root -g root -m 0644 debian/useless.5 \
121
 
                debian/ntp-server/usr/share/man/man5/ntp.conf.5
122
 
        install -o root -g root -m 0644 debian/ntpdate.default \
123
 
                debian/ntpdate/etc/default/ntpdate
124
 
        install -o root -g root -m 0644 debian/ntp-server.ignore \
125
 
                debian/ntp-server/etc/logcheck/ignore.d.server/ntp-server
126
 
        install -o root -g root -m 0644 debian/ntpdate.ignore \
127
 
                debian/ntpdate/etc/logcheck/ignore.d.server/ntpdate
 
56
        $(MAKE) install DESTDIR=$(CURDIR)/debian/ntp
 
57
 
 
58
        # move the administrator programs from /usr/bin to /usr/sbin
 
59
        for file in ntpdate ntp-wait ntpd ntptime ntp-keygen; do \
 
60
                mv debian/ntp/usr/bin/$$file debian/ntp/usr/sbin/$$file || exit; \
 
61
        done
 
62
 
 
63
        install -D -m 0755 scripts/ntpsweep debian/ntp/usr/bin/ntpsweep
 
64
        install -D -m 0644 debian/ntp.dhcp debian/ntp/etc/dhcp3/dhclient-exit-hooks.d/ntp
 
65
        install -D -m 0644 debian/ntpdate.dhcp debian/ntpdate/etc/dhcp3/dhclient-exit-hooks.d/ntpdate
 
66
        install -D -m 0755 debian/ntpdate-debian debian/ntpdate/usr/sbin/ntpdate-debian
 
67
 
 
68
        install -D -m 0644 debian/ntp.conf debian/ntp/etc/ntp.conf
 
69
 
 
70
        # remove upstream man pages, which are currently not as nice as ours
 
71
        rm $(addprefix debian/ntp/usr/share/man/man1/,ntpd.1 ntpdc.1 ntpdsim.1 ntp-keygen.1 ntpq.1)
 
72
 
 
73
        rmdir debian/ntp/usr/lib/
128
74
 
129
75
        dh_movefiles --sourcedir=debian/ntp
130
76
 
131
 
# Build architecture-independent files here.
132
77
binary-indep: build install
133
 
#       dh_testversion
134
78
        dh_testdir -i
135
79
        dh_testroot -i
136
80
        dh_installdocs -i html
137
81
        rm -f debian/ntp-doc/usr/share/doc/ntp-doc/html/hints/solaris*
138
 
        find debian/ntp-doc/usr/share/doc/ntp-doc/html/ -name SCCS -print0 \
139
 
                | xargs -0r rm -rf
140
 
        rm -f debian/ntp-doc/usr/share/doc/ntp-doc/html/htmlprimer.html
141
82
        dh_installexamples -i
142
 
        dh_installmenu -i
143
 
#       dh_installemacsen -i
144
 
#       dh_installinit -i
 
83
        dh_installman -i
145
84
        dh_installcron -i
146
 
        dh_installdebconf -i
147
 
#       dh_installmanpages -i ansi2knr.1
148
 
#       dh_undocumented
 
85
        dh_installlogcheck -i
149
86
        dh_installchangelogs -i
150
 
        gzip -9f debian/ntp-doc/usr/share/doc/ntp-doc/changelog.Debian
 
87
        dh_installifupdown -i
 
88
        dh_perl -i
 
89
        dh_compress -i
151
90
        dh_fixperms -i
152
91
        dh_installdeb -i
153
92
        dh_gencontrol -i
154
93
        dh_md5sums -i
155
94
        dh_builddeb -i
156
95
 
157
 
# Build architecture-dependent files here.
158
96
binary-arch: build install
159
 
#       dh_testversion
160
97
        dh_testdir -a
161
98
        dh_testroot -a
162
99
        dh_installdocs -a
163
100
        dh_installexamples -a
164
 
        dh_installmenu -a
165
 
#       dh_installemacsen -a
166
 
        dh_installdebconf -a
167
 
        dh_installinit -pntp-server --update-rcd-params="defaults 23" 
168
 
        dh_installinit -pntpdate --update-rcd-params="start 51 S ." \
169
 
                --init-script=ntpdate
 
101
        dh_installman -a
 
102
        dh_installinit -pntp --update-rcd-params="defaults 23" --error-handler=installinit_error
 
103
        dh_installinit -pntpdate
170
104
        dh_installcron -a
171
 
#       dh_installmanpages -a ansi2knr.1
172
 
#       dh_undocumented
 
105
        dh_installlogcheck -a
173
106
        dh_installchangelogs -a
 
107
        dh_installifupdown -a
 
108
        dh_perl -a
174
109
        dh_strip -a
175
110
        dh_compress -a
176
111
        dh_fixperms -a
177
112
        dh_installdeb -a
178
113
        dh_shlibdeps -a
179
114
        dh_gencontrol -a
180
 
#       dh_makeshlibs -a
181
115
        dh_md5sums -a
182
116
        dh_builddeb -a
183
117
 
184
 
source diff:                                                                  
185
 
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
186
 
 
187
118
binary: binary-indep binary-arch
188
 
.PHONY: build clean binary-indep binary-arch binary install
 
119
.PHONY: build clean binary-indep binary-arch binary install patch unpatch clean-patched