~d-jj/+junk/sudo

« back to all changes in this revision

Viewing changes to Makefile.in

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-05-13 15:43:49 UTC
  • mfrom: (1.4.17) (1.3.38 sid)
  • Revision ID: package-import@ubuntu.com-20150513154349-3wazxyt6jxlgtgpi
Tags: 1.8.12-1ubuntu1
* Merge from Debian unstable. (LP: #1451274, LP: #1219337)
  Remaining changes:
  - debian/rules:
    + compile with --without-lecture --with-tty-tickets --enable-admin-flag
    + install man/man8/sudo_root.8 in both flavours
    + install apport hooks
  - debian/sudoers:
    + also grant admin group sudo access
  - debian/source_sudo.py, debian/sudo-ldap.dirs, debian/sudo.dirs:
    + add usr/share/apport/package-hooks
  - debian/sudo.pam:
    + Use pam_env to read /etc/environment and /etc/default/locale
      environment files. Reading ~/.pam_environment is not permitted due to
      security reasons.
  - debian/control:
    + dh-autoreconf dependency fixes missing-build-dependency-for-dh_-command
  - Remaining patches:
    + keep_home_by_default.patch: Keep HOME in the default environment
    + debian/patches/also_check_sudo_group.diff: also check the sudo group
      in plugins/sudoers/sudoers.c to create the admin flag file. Leave the
      admin group check for backwards compatibility.
* Dropped patches no longer needed:
    + add_probe_interfaces_setting.diff
    + actually-use-buildflags.diff
    + CVE-2014-9680.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com>
 
2
# Copyright (c) 2010-2014 Todd C. Miller <Todd.Miller@courtesan.com>
3
3
#
4
4
# Permission to use, copy, modify, and distribute this software for any
5
5
# purpose with or without fee is hereby granted, provided that the above
32
32
localedir = @localedir@
33
33
localstatedir = @localstatedir@
34
34
docdir = @docdir@
 
35
exampledir = $(datarootdir)/examples/$(PACKAGE_TARNAME)
35
36
mandir = @mandir@
36
 
timedir = @timedir@
 
37
rundir = @rundir@
 
38
vardir = @vardir@
37
39
 
38
40
# User and group ids the installed files should be "owned" by
39
41
install_uid = 0
46
48
sudoers_mode = @SUDOERS_MODE@
47
49
shlib_mode = @SHLIB_MODE@
48
50
 
49
 
SUBDIRS = compat common @ZLIB_SRC@ plugins/group_file plugins/sudoers \
50
 
          plugins/system_group src include doc
 
51
SUBDIRS = lib/util @ZLIB_SRC@ plugins/group_file plugins/sudoers \
 
52
          plugins/system_group src include doc examples
51
53
 
52
54
SAMPLES = plugins/sample
53
55
 
58
60
 
59
61
SHELL = @SHELL@
60
62
 
 
63
SED = @SED@
 
64
 
61
65
INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
 
66
INSTALL_OWNER = -o $(install_uid) -g $(install_gid)
62
67
 
63
68
ECHO_N = @ECHO_N@
64
69
ECHO_C = @ECHO_C@
65
70
 
66
71
# Message catalog support
67
72
NLS = @SUDO_NLS@
68
 
POTFILES = src/po/sudo.pot plugins/sudoers/po/sudoers.pot
 
73
POTFILES = po/sudo.pot plugins/sudoers/po/sudoers.pot
69
74
LOCALEDIR_SUFFIX = @LOCALEDIR_SUFFIX@
70
75
MSGFMT = msgfmt
71
76
MSGMERGE = msgmerge
75
80
                --package-name=@PACKAGE_NAME@ --package-version=$(VERSION) \
76
81
                --flag warning:1:c-format --flag warningx:1:c-format \
77
82
                --flag fatal:1:c-format --flag fatalx:1:c-format \
78
 
                --flag easprintf:3:c-format --flag lbuf_append:2:c-format \
79
 
                --flag lbuf_append_quoted:3:c-format --foreign-user
 
83
                --flag easprintf:3:c-format --flag sudo_lbuf_append:2:c-format \
 
84
                --flag sudo_lbuf_append_quoted:3:c-format --foreign-user
 
85
 
 
86
# Default cppcheck options when run from the top-level Makefile
 
87
CPPCHECK_OPTS = -q --force --enable=warning,performance,portability --suppress=constStatement --error-exitcode=1 --inline-suppr -Dva_copy=va_copy -U__cplusplus -UQUAD_MAX -UQUAD_MIN -UUQUAD_MAX -U_POSIX_HOST_NAME_MAX -U_POSIX_PATH_MAX -U__NBBY -DNSIG=64
80
88
 
81
89
all: config.status
82
 
        for d in $(SUBDIRS); \
83
 
            do (cd $$d && exec $(MAKE) $@) && continue; \
 
90
        for d in $(SUBDIRS); do \
 
91
            (cd $$d && exec $(MAKE) $@) && continue; \
84
92
            exit $$?; \
85
93
        done
86
94
 
87
95
check pre-install: config.status
88
 
        for d in $(SUBDIRS); \
89
 
            do (cd $$d && exec $(MAKE) $@) && continue; \
 
96
        for d in $(SUBDIRS); do \
 
97
            (cd $$d && exec $(MAKE) $@) && continue; \
90
98
            exit $$?; \
91
99
        done
92
100
 
 
101
cppcheck: config.status
 
102
        rval=0; \
 
103
        for d in $(SUBDIRS); do \
 
104
            echo checking $$d; \
 
105
            (cd $$d && exec $(MAKE) CPPCHECK_OPTS="$(CPPCHECK_OPTS)" $@) || rval=`expr $$rval + $$?`; \
 
106
        done; \
 
107
        exit $$rval
 
108
 
93
109
install-dirs install-binaries install-includes install-plugin: config.status pre-install
94
 
        for d in $(SUBDIRS); \
95
 
            do (cd $$d && exec $(MAKE) $@) && continue; \
 
110
        for d in $(SUBDIRS); do \
 
111
            (cd $$d && exec $(MAKE) "INSTALL_OWNER=$(INSTALL_OWNER)" $@) && continue; \
96
112
            exit $$?; \
97
113
        done
98
114
 
99
115
install-doc: config.status ChangeLog
100
 
        for d in $(SUBDIRS); \
101
 
            do (cd $$d && exec $(MAKE) $@) && continue; \
 
116
        for d in $(SUBDIRS); do \
 
117
            (cd $$d && exec $(MAKE) "INSTALL_OWNER=$(INSTALL_OWNER)" $@) && continue; \
102
118
            exit $$?; \
103
119
        done
104
120
 
105
121
install: config.status ChangeLog pre-install install-nls
106
 
        for d in $(SUBDIRS); \
107
 
            do (cd $$d && exec $(MAKE) $@) && continue; \
 
122
        for d in $(SUBDIRS); do \
 
123
            (cd $$d && exec $(MAKE) "INSTALL_OWNER=$(INSTALL_OWNER)" $@) && continue; \
108
124
            exit $$?; \
109
125
        done
110
126
 
111
127
uninstall: uninstall-nls
112
 
        for d in $(SUBDIRS); \
113
 
            do (cd $$d && exec $(MAKE) $@) && continue; \
 
128
        for d in $(SUBDIRS); do \
 
129
            (cd $$d && exec $(MAKE) $@) && continue; \
114
130
            exit $$?; \
115
131
        done
116
132
 
121
137
        done
122
138
 
123
139
siglist.c signame.c:
124
 
        (cd compat && exec $(MAKE) $@)
 
140
        (cd lib/util && exec $(MAKE) $@)
125
141
 
126
142
depend: siglist.c signame.c
127
143
        @if test "$(srcdir)" != "."; then \
128
144
            echo "make depend only supported in the source directory"; \
129
145
            exit 1; \
130
146
        fi; \
131
 
        $(srcdir)/mkdep.pl $(srcdir)/common/Makefile.in \
132
 
            $(srcdir)/compat/Makefile.in $(srcdir)/plugins/sample/Makefile.in \
 
147
        $(srcdir)/mkdep.pl $(srcdir)/lib/util/Makefile.in \
 
148
            $(srcdir)/plugins/sample/Makefile.in \
133
149
            $(srcdir)/plugins/group_file/Makefile.in \
134
150
            $(srcdir)/plugins/sudoers/Makefile.in \
135
151
            $(srcdir)/plugins/system_group/Makefile.in \
136
 
            $(srcdir)/src/Makefile.in $(srcdir)/zlib/Makefile.in; \
137
 
        ./config.status --file $(srcdir)/common/Makefile \
138
 
            --file $(srcdir)/compat/Makefile \
 
152
            $(srcdir)/src/Makefile.in $(srcdir)/lib/zlib/Makefile.in; \
 
153
        ./config.status --file $(srcdir)/lib/util/Makefile \
139
154
            --file $(srcdir)/plugins/sample/Makefile \
140
155
            --file $(srcdir)/plugins/group_file/Makefile \
141
156
            --file $(srcdir)/plugins/sudoers/Makefile \
142
157
            --file $(srcdir)/plugins/system_group/Makefile \
143
 
            --file $(srcdir)/src/Makefile --file $(srcdir)/zlib/Makefile
 
158
            --file $(srcdir)/src/Makefile --file $(srcdir)/lib/zlib/Makefile
144
159
 
145
160
ChangeLog:
146
161
        if test -d $(srcdir)/.hg && cd $(srcdir); then \
166
181
sync-po: rsync-po compile-po
167
182
 
168
183
rsync-po:
169
 
        rsync -Lrtvz  translationproject.org::tp/latest/sudo/ src/po/
 
184
        rsync -Lrtvz  translationproject.org::tp/latest/sudo/ po/
170
185
        rsync -Lrtvz  translationproject.org::tp/latest/sudoers/ plugins/sudoers/po/
171
186
 
172
187
update-pot:
176
191
                echo "Updating $$pot"; \
177
192
                domain=`basename $$pot .pot`; \
178
193
                case "$$domain" in \
179
 
                    sudo) tmpfiles=; cfiles="src/*c common/*c compat/*c";; \
 
194
                    sudo) tmpfiles=; cfiles="src/*c lib/*/*c";; \
180
195
                    sudoers) \
181
 
                        echo "syntax error" > confstr.sh; \
182
 
                        sed -n -e 's/^badpass_message="/gettext "/p' \
 
196
                        echo "gettext \"syntax error\"" > confstr.sh; \
 
197
                        $(SED) -n 's/^.*--with-passprompt=\(.*\)$$/gettext \"\1\"/p' mkpkg | sort -u >> confstr.sh; \
 
198
                        $(SED) -n -e 's/^badpass_message="/gettext "/p' \
183
199
                            -e 's/^passprompt="/gettext "/p' \
184
200
                            -e 's/^mailsub="/gettext "/p' configure.ac \
185
201
                            >> confstr.sh; \
193
209
                    rm -f $$pot.tmp; \
194
210
                else \
195
211
                    printf '/^#$$/+1,$$d\nw\nq\n' | ed - $$pot; \
196
 
                    sed '1,/^#$$/d' $$pot.tmp >> $$pot; \
 
212
                    $(SED) '1,/^#$$/d' $$pot.tmp >> $$pot; \
197
213
                    rm -f $$pot.tmp; \
198
214
                fi; \
199
215
            done; \
223
239
                    POFILES="$$POFILES $$po"; \
224
240
                done; \
225
241
            done; \
226
 
            echo "all: `echo $$POFILES | sed 's/\.po/.mo/g'`" >> Makefile.$$$$; \
 
242
            echo "all: `echo $$POFILES | $(SED) 's/\.po/.mo/g'`" >> Makefile.$$$$; \
227
243
            echo "" >> Makefile.$$$$; \
228
244
            for po in $$POFILES; do \
229
 
                mo=`echo $$po | sed 's/po$$/mo/'`; \
 
245
                mo=`echo $$po | $(SED) 's/po$$/mo/'`; \
230
246
                echo "$$mo: $$po" >> Makefile.$$$$; \
231
247
                echo "  $(MSGFMT) --statistics -c -o $$mo $$po" >> Makefile.$$$$; \
232
248
            done; \
233
 
            make -f Makefile.$$$$; \
 
249
            $(MAKE) -f Makefile.$$$$; \
234
250
            rm -f Makefile.$$$$; \
235
251
        fi
236
252
 
237
253
install-nls:
238
254
        @if test "$(NLS)" = "enabled"; then \
239
 
            cd $(top_srcdir); \
240
255
            for pot in $(POTFILES); do \
241
 
                podir=`dirname $$pot`; \
 
256
                podir=`dirname $(top_srcdir)/$$pot`; \
242
257
                domain=`basename $$pot .pot`; \
243
 
                SUDO_LINGUAS=$${LINGUAS-"`echo $$podir/*.mo|sed 's:'$$podir'/\([^ ]*\).mo:\1:g'`"}; \
 
258
                SUDO_LINGUAS=$${LINGUAS-"`echo $$podir/*.mo | $(SED) 's:'$$podir'/\([^ ]*\).mo:\1:g'`"}; \
244
259
                echo $(ECHO_N) "Installing $$domain message catalogs:$(ECHO_C)"; \
245
260
                for lang in $$SUDO_LINGUAS; do \
246
261
                    test -s $$podir/$$lang.mo || continue; \
251
266
                            ln -s $$lang $(DESTDIR)$(localedir)/$$lang$(LOCALEDIR_SUFFIX); \
252
267
                        fi; \
253
268
                    fi; \
254
 
                    $(INSTALL) -O $(install_uid) -G $(install_gid) -m 0644 $$podir/$$lang.mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$$domain.mo; \
 
269
                    $(INSTALL) $(INSTALL_OWNER) -m 0644 $$podir/$$lang.mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$$domain.mo; \
255
270
                done; \
256
271
                echo ""; \
257
272
            done; \
271
286
force-dist: ChangeLog $(srcdir)/MANIFEST
272
287
        pax -w -x ustar -s '/^/$(PACKAGE_TARNAME)-$(VERSION)\//' \
273
288
            -f ../$(PACKAGE_TARNAME)-$(VERSION).tar \
274
 
            `sed 's/[   ].*//' $(srcdir)/MANIFEST`
 
289
            `$(SED) 's/[        ].*//' $(srcdir)/MANIFEST`
275
290
        gzip -9f ../$(PACKAGE_TARNAME)-$(VERSION).tar
276
291
        ls -l ../$(PACKAGE_TARNAME)-$(VERSION).tar.gz
277
292
 
278
 
package: sudo.pp
 
293
package: $(srcdir)/sudo.pp
279
294
        DESTDIR=`cd $(top_builddir) && pwd`/destdir; rm -rf $$DESTDIR; \
280
 
        $(MAKE) install DESTDIR=$$DESTDIR && \
 
295
        $(MAKE) install INSTALL_OWNER= DESTDIR=$$DESTDIR && \
281
296
        $(SHELL) $(srcdir)/pp $(PPFLAGS) \
282
297
            --destdir=$$DESTDIR \
283
298
            $(srcdir)/sudo.pp \
 
299
            prefix=$(prefix) \
284
300
            bindir=$(bindir) \
285
301
            sbindir=$(sbindir) \
286
302
            libexecdir=$(libexecdir) \
287
303
            includedir=$(includedir) \
288
 
            timedir=$(timedir) \
 
304
            vardir=$(vardir) \
 
305
            rundir=$(rundir) \
289
306
            mandir=$(mandir) \
290
307
            localedir=$(localedir) \
291
308
            docdir=$(docdir) \
 
309
            exampledir=$(exampledir) \
292
310
            sysconfdir=$(sysconfdir) \
293
311
            sudoersdir=$(sudoersdir) \
294
312
            sudoers_uid=$(sudoers_uid) \
309
327
            (cd $$d && exec $(MAKE) $@); \
310
328
        done
311
329
        -rm -rf Makefile pathnames.h config.h config.status config.cache \
312
 
                config.log libtool stamp-* autom4te.cache
 
330
                config.log libtool stamp-* autom4te.cache init.d/*.sh
313
331
 
314
332
cleandir: distclean
315
333