~ubuntu-branches/ubuntu/saucy/sudo/saucy

« back to all changes in this revision

Viewing changes to mkpkg

  • Committer: Package Import Robot
  • Author(s): Stéphane Graber
  • Date: 2012-11-16 09:31:32 UTC
  • mfrom: (1.4.13)
  • Revision ID: package-import@ubuntu.com-20121116093132-ptext55adlzbrq6y
Tags: 1.8.6p3-0ubuntu1
* New upstream release (1.8.6p3).
* Add patch to fix building with sssd when ldap is disabled.
* Drop sudo.manpages and sudo-ldap.manpages as the upstream build system
  now does the right thing here.
* Build the main sudo package with support for sssd, this doesn't add any
  additional build time or runtime dependency. sudo will dynamically load
  the sssd library if 'sss' is listed for the 'sudoers' nss service.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
test -n "$osversion" || exit 1
79
79
osrelease=`echo "$osversion" | sed -e 's/^[^0-9]*//' -e 's/-.*$//'`
80
80
 
81
 
# Default paths
82
 
prefix=/usr/local
83
 
 
84
 
# Linux distros may build binaries as pie files.
85
 
# This is really something libtool should figure out, but it does not.
86
 
case "$osversion" in
87
 
    *-s390*|*-sparc*|*-alpha*)
88
 
        F_PIE=-fPIE
89
 
        ;;
90
 
    *)
91
 
        F_PIE=-fpie
92
 
        ;;
93
 
esac
94
 
 
95
81
# Choose compiler options by osversion if not cross-compiling.
96
82
if [ "$crossbuild" = "false" ]; then
97
83
    case "$osversion" in
120
106
# We use the same configure options as vendor packages when possible.
121
107
case "$osversion" in
122
108
    centos*|rhel*)
123
 
        prefix=/usr
124
109
        if [ $osrelease -ge 40 ]; then
125
110
            # RHEL 4 and up support SELinux
126
111
            configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"
127
112
        fi
128
113
        if [ $osrelease -ge 50 ]; then
129
 
            # RHEL 5 and up build pies, have audit support and use a
130
 
            # separate PAM config file for "sudo -i".
131
 
            export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie"
 
114
            # RHEL 5 and up has audit support and uses a separate PAM
 
115
            # config file for "sudo -i".
132
116
            configure_opts="${configure_opts}${configure_opts+$tab}--with-linux-audit"
133
117
            configure_opts="${configure_opts}${configure_opts+$tab}--with-pam-login"
134
118
            PPVARS="${PPVARS}${PPVARS+$space}linux_audit=1.4.0"
135
119
        fi
136
120
        # Note, must indent with tabs, not spaces due to IFS trickery
137
 
        configure_opts="--prefix=$prefix
 
121
        configure_opts="--prefix=/usr
138
122
                --with-logging=syslog
139
123
                --with-logfac=authpriv
140
124
                --with-pam
148
132
                $configure_opts"
149
133
        ;;
150
134
    sles*)
151
 
        prefix=/usr
152
135
        if [ $osrelease -ge 10 ]; then
153
 
            # SLES 10 and higher build pies
154
 
            export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie"
 
136
            # SLES 11 and higher has SELinux
155
137
            if [ $osrelease -ge 11 ]; then
156
 
                # SLES 11 and higher has SELinux
157
138
                configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"
158
139
            fi
159
140
        fi
165
146
        esac
166
147
        # Note, must indent with tabs, not spaces due to IFS trickery
167
148
        # XXX - SuSE uses secure path but only for env_reset
168
 
        configure_opts="--prefix=$prefix
169
 
                --libexecdir=$prefix/$libexec/sudo
 
149
        configure_opts="--prefix=/usr
 
150
                --libexecdir=/usr/$libexec/sudo
170
151
                --with-logging=syslog
171
152
                --with-logfac=auth
172
153
                --with-all-insults
184
165
        make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
185
166
        ;;
186
167
    deb*|ubu*)
187
 
        prefix=/usr
 
168
        # Man pages should be compressed in .deb files
 
169
        export MANCOMPRESS='gzip -9'
 
170
        export MANCOMPRESSEXT='.gz'
188
171
        # If Ubuntu, add --enable-admin-flag
189
172
        case "$osversion" in
190
173
            ubu*)
191
174
                configure_opts="${configure_opts}${configure_opts+$tab}--enable-admin-flag${tab}--without-lecture"
192
 
                if [ $osrelease -ge 1004 ]; then
193
 
                    export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie"
194
 
                fi
195
 
                ;;
196
 
            deb*)
197
 
                if [ $osrelease -ge 600 ]; then
198
 
                    export CFLAGS="-O2 -g $F_PIE" LDFLAGS="-pie"
199
 
                fi
200
175
                ;;
201
176
        esac
202
177
        # Note, must indent with tabs, not spaces due to IFS trickery
204
179
            configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap
205
180
                --with-ldap-conf-file=/etc/sudo-ldap.conf"
206
181
        fi
 
182
        configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"
207
183
        configure_opts="--prefix=/usr
208
184
                --with-all-insults
209
185
                --with-pam
238
214
        fi
239
215
        export CFLAGS="-O2 -g $ARCH_FLAGS $SDK_FLAGS"
240
216
        export LDFLAGS="$ARCH_FLAGS $SDK_FLAGS"
241
 
        if [ $osrelease -ge 105 ]; then
242
 
            CFLAGS="$CFLAGS $F_PIE"
243
 
            LDFLAGS="$LDFLAGS -Wl,-pie"
244
 
        fi
245
217
        # Note, must indent with tabs, not spaces due to IFS trickery
246
 
        configure_opts="--prefix=$prefix
247
 
                --with-pam
 
218
        configure_opts="--with-pam
248
219
                --without-tty-tickets
249
220
                --enable-zlib=system
250
221
                --with-ldap
255
226
                --with-env-editor
256
227
                $configure_opts"
257
228
        ;;
 
229
    aix*)
 
230
        # Note, must indent with tabs, not spaces due to IFS trickery
 
231
        # Note: we include our own zlib instead of relying on the
 
232
        #       AIX freeware version being installed.
 
233
        configure_opts="
 
234
                --prefix=/opt/freeware
 
235
                --mandir=/opt/freeware/man
 
236
                --with-insults=disabled
 
237
                --with-logging=syslog
 
238
                --with-logfac=auth
 
239
                --with-editor=/usr/bin/vi
 
240
                --with-env-editor
 
241
                --enable-zlib=builtin
 
242
                --disable-nls
 
243
                $configure_opts"
 
244
        PPVARS="${PPVARS}${PPVARS+$space}aix_freeware=true"
 
245
        ;;
258
246
    *)
259
247
        # For Solaris, add project support and use let configure choose zlib.
260
248
        # For all others, use the builtin zlib and disable NLS support.
266
254
            configure_opts="${configure_opts}${configure_opts+$tab}--with-ldap"
267
255
        fi
268
256
        # Note, must indent with tabs, not spaces due to IFS trickery
269
 
        configure_opts="--prefix=$prefix
 
257
        configure_opts="
270
258
                --with-insults=disabled
271
259
                --with-logging=syslog
272
260
                --with-logfac=auth