Import package vendor original specs for necessary manipulations.

Fri, 03 Aug 2012 15:42:27 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 03 Aug 2012 15:42:27 +0200
changeset 456
f243ce94972c
parent 455
eb5f1f7ac5ff
child 457
c5fbc773861c

Import package vendor original specs for necessary manipulations.

sudo/fsl.sudo file | annotate | diff | comparison | revisions
sudo/rc.sudo file | annotate | diff | comparison | revisions
sudo/sudo.conf file | annotate | diff | comparison | revisions
sudo/sudo.spec file | annotate | diff | comparison | revisions
sudo/sudoers file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/sudo/fsl.sudo	Fri Aug 03 15:42:27 2012 +0200
     1.3 @@ -0,0 +1,16 @@
     1.4 +##
     1.5 +##  fsl.sudo -- OSSP fsl configuration
     1.6 +##
     1.7 +
     1.8 +ident (.*sudo)/.+ q{
     1.9 +    prefix(
    1.10 +        prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
    1.11 +    )
    1.12 +    -> {
    1.13 +        debug: file(
    1.14 +            path="@l_prefix@/var/sudo/sudo.log",
    1.15 +            perm=0600
    1.16 +        )
    1.17 +    }
    1.18 +};
    1.19 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/sudo/rc.sudo	Fri Aug 03 15:42:27 2012 +0200
     2.3 @@ -0,0 +1,22 @@
     2.4 +#!@l_prefix@/bin/openpkg rc
     2.5 +##
     2.6 +##  rc.sudo -- Run-Commands
     2.7 +##
     2.8 +
     2.9 +%config
    2.10 +    sudo_enable="$openpkg_rc_def"
    2.11 +    sudo_log_prolog="true"
    2.12 +    sudo_log_epilog="true"
    2.13 +    sudo_log_numfiles="10"
    2.14 +    sudo_log_minsize="1M"
    2.15 +    sudo_log_complevel="9"
    2.16 +
    2.17 +%daily -u @l_susr@
    2.18 +    rcService sudo enable yes || exit 0
    2.19 +    shtool rotate -f \
    2.20 +        -n ${sudo_log_numfiles} -s ${sudo_log_minsize} -d \
    2.21 +        -z ${sudo_log_complevel} -o @l_rusr@ -g @l_rgrp@ -m 644 \
    2.22 +        -P "${sudo_log_prolog}" \
    2.23 +        -E "${sudo_log_epilog}" \
    2.24 +        @l_prefix@/var/sudo/sudo.log
    2.25 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/sudo/sudo.conf	Fri Aug 03 15:42:27 2012 +0200
     3.3 @@ -0,0 +1,9 @@
     3.4 +##
     3.5 +##  sudo.conf -- global sudo(8) configuration
     3.6 +##
     3.7 +
     3.8 +Plugin sudoers_policy sudoers.so
     3.9 +Plugin sudoers_io     sudoers.so
    3.10 +
    3.11 +Path noexec @l_prefix@/libexec/sudo/helper/sudo_noexec.so
    3.12 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/sudo/sudo.spec	Fri Aug 03 15:42:27 2012 +0200
     4.3 @@ -0,0 +1,232 @@
     4.4 +##
     4.5 +##  sudo.spec -- OpenPKG RPM Package Specification
     4.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     4.7 +##
     4.8 +##  Permission to use, copy, modify, and distribute this software for
     4.9 +##  any purpose with or without fee is hereby granted, provided that
    4.10 +##  the above copyright notice and this permission notice appear in all
    4.11 +##  copies.
    4.12 +##
    4.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    4.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    4.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    4.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    4.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    4.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    4.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    4.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    4.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    4.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    4.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    4.24 +##  SUCH DAMAGE.
    4.25 +##
    4.26 +
    4.27 +#   package information
    4.28 +Name:         sudo
    4.29 +Summary:      Flexible Switch User Command
    4.30 +URL:          http://www.sudo.ws/
    4.31 +Vendor:       Todd Miller
    4.32 +Packager:     OpenPKG Foundation e.V.
    4.33 +Distribution: OpenPKG Community
    4.34 +Class:        BASE
    4.35 +Group:        ShellUtils
    4.36 +License:      BSD
    4.37 +Version:      1.8.5p2
    4.38 +Release:      20120531
    4.39 +
    4.40 +#   package options
    4.41 +%option       with_fsl    yes
    4.42 +%option       with_pam    no
    4.43 +%option       with_skey   no
    4.44 +%option       with_opie   no
    4.45 +%option       with_ldap   no
    4.46 +
    4.47 +#   list of sources
    4.48 +Source0:      http://www.sudo.ws/sudo/dist/sudo-%{version}.tar.gz
    4.49 +Source1:      rc.sudo
    4.50 +Source2:      fsl.sudo
    4.51 +Source3:      sudo.conf
    4.52 +Source4:      sudoers
    4.53 +
    4.54 +#   build information
    4.55 +BuildPreReq:  OpenPKG, openpkg >= 20100101
    4.56 +PreReq:       OpenPKG, openpkg >= 20100101
    4.57 +BuildPreReq:  zlib
    4.58 +PreReq:       zlib
    4.59 +%if "%{with_fsl}" == "yes"
    4.60 +BuildPreReq:  fsl
    4.61 +PreReq:       fsl
    4.62 +%endif
    4.63 +%if "%{with_pam}" == "yes"
    4.64 +BuildPreReq:  PAM
    4.65 +PreReq:       PAM
    4.66 +%endif
    4.67 +%if "%{with_skey}" == "yes"
    4.68 +BuildPreReq:  skey
    4.69 +PreReq:       skey
    4.70 +%endif
    4.71 +%if "%{with_opie}" == "yes"
    4.72 +BuildPreReq:  opie
    4.73 +PreReq:       opie
    4.74 +%endif
    4.75 +%if "%{with_ldap}" == "yes"
    4.76 +BuildPreReq:  openldap
    4.77 +PreReq:       openldap
    4.78 +%endif
    4.79 +
    4.80 +%description
    4.81 +    Sudo (superuser do) allows a system administrator to give certain
    4.82 +    users (or groups of users) the ability to run some (or all) commands
    4.83 +    as root or another user while logging the commands and arguments.
    4.84 +
    4.85 +%track
    4.86 +    prog sudo = {
    4.87 +        version   = %{version}
    4.88 +        url       = http://www.sudo.ws/sudo/dist/
    4.89 +        regex     = sudo-(__VER__)\.tar\.gz
    4.90 +    }
    4.91 +
    4.92 +%prep
    4.93 +    %setup -q
    4.94 +    %{l_shtool} subst \
    4.95 +        -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
    4.96 +        configure
    4.97 +    case "%{l_platform -t}" in
    4.98 +        *-darwin* )
    4.99 +            %{l_shtool} subst \
   4.100 +                -e 's/\(\$(LIBTOOL).*sudo_noexec.lo.*$\)/\1; $(CC) -dynamiclib .libs\/sudo_noexec.o $(LDFLAGS) -o .libs\/sudo_noexec.dylib/' \
   4.101 +                Makefile.in
   4.102 +            ;;
   4.103 +        *-sunos* )
   4.104 +            %{l_shtool} subst \
   4.105 +                -e 's;^(void)isblank(1);if ((int)isblank(0x20)) exit(0);' \
   4.106 +                configure
   4.107 +            ;;
   4.108 +    esac
   4.109 +
   4.110 +%build
   4.111 +    #   configure program
   4.112 +    libs=""
   4.113 +    case "%{l_platform -t}" in
   4.114 +        *-freebsd* ) libs="$libs -lutil" ;;
   4.115 +    esac
   4.116 +    CC="%{l_cc}" \
   4.117 +    CFLAGS="%{l_cflags -O}" \
   4.118 +    LDFLAGS="%{l_fsl_ldflags}" \
   4.119 +    SUDO_LIBS="$libs %{l_fsl_libs}" \
   4.120 +%if "%{with_pam}" == "yes"
   4.121 +    CPPFLAGS="-I`%{l_rc} --query pam_incdir`" \
   4.122 +    LDFLAGS="-L`%{l_rc} --query pam_libdir` ${LDFLAGS}" \
   4.123 +%endif
   4.124 +    true=`%{l_shtool} path true` \
   4.125 +    ./configure \
   4.126 +        --prefix=%{l_prefix} \
   4.127 +        --mandir=%{l_prefix}/man \
   4.128 +        --sysconfdir=%{l_prefix}/etc/sudo \
   4.129 +        --libexecdir=%{l_prefix}/libexec/sudo \
   4.130 +        --with-plugindir=%{l_prefix}/libexec/sudo/plugin \
   4.131 +        --with-noexec=%{l_prefix}/libexec/sudo/helper/sudo_noexec.so \
   4.132 +        --with-logpath=%{l_prefix}/var/sudo/sudo.log \
   4.133 +        --with-timedir=%{l_prefix}/var/sudo \
   4.134 +        --enable-zlib=%{l_prefix} \
   4.135 +%if "%{with_fsl}" == "yes"
   4.136 +        --with-logging=syslog \
   4.137 +%else
   4.138 +        --with-logging=file \
   4.139 +%endif
   4.140 +        --with-sudoers-mode=0400 \
   4.141 +        --with-sudoers-uid=%{l_suid} \
   4.142 +        --with-sudoers-gid=%{l_sgid} \
   4.143 +        --with-sendmail=$true \
   4.144 +        --with-ignore-dot \
   4.145 +%if "%{with_pam}" == "yes"
   4.146 +        --with-pam \
   4.147 +%else
   4.148 +        --without-pam \
   4.149 +%endif
   4.150 +%if "%{with_skey}" == "yes" || "%{with_opie}" == "yes"
   4.151 +        --with-long-otp-prompt \
   4.152 +%endif
   4.153 +%if "%{with_skey}" == "yes"
   4.154 +        --with-skey=%{l_prefix} \
   4.155 +%endif
   4.156 +%if "%{with_opie}" == "yes"
   4.157 +        --with-opie=%{l_prefix} \
   4.158 +%endif
   4.159 +%if "%{with_ldap}" == "yes"
   4.160 +        --with-ldap=%{l_prefix} \
   4.161 +        --with-ldap-conf-file=%{l_prefix}/etc/sudo/ldap.conf \
   4.162 +%endif
   4.163 +        --enable-shell-sets-home \
   4.164 +        --disable-root-sudo \
   4.165 +        --with-env-editor \
   4.166 +        --disable-path-info \
   4.167 +        --disable-nls
   4.168 +
   4.169 +    #   build program
   4.170 +    %{l_make} %{l_mflags -O}
   4.171 +
   4.172 +%install
   4.173 +    #   install program
   4.174 +    %{l_shtool} mkdir -f -p -m 755 \
   4.175 +        $RPM_BUILD_ROOT%{l_prefix}/var/sudo
   4.176 +    %{l_shtool} subst \
   4.177 +        -e "s;-M 4111;-M 4511;" \
   4.178 +        -e "s;-M 0111;-M 0511;" \
   4.179 +        -e "s;-[OG] [^ ]*;;g" \
   4.180 +        Makefile
   4.181 +    %{l_make} %{l_mflags} install \
   4.182 +        DESTDIR=$RPM_BUILD_ROOT
   4.183 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/share
   4.184 +
   4.185 +    #   install run-command script
   4.186 +    %{l_shtool} mkdir -f -p -m 755 \
   4.187 +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
   4.188 +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
   4.189 +        %{SOURCE rc.sudo} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   4.190 +
   4.191 +    #   install OSSP fsl configuration
   4.192 +    %{l_shtool} mkdir -f -p -m 755 \
   4.193 +        $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
   4.194 +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
   4.195 +        %{SOURCE fsl.sudo} \
   4.196 +        $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
   4.197 +
   4.198 +    #   install default configuration file
   4.199 +    %{l_shtool} install -c -m 644 %{l_value -s -a} \
   4.200 +        %{SOURCE sudo.conf} %{SOURCE sudoers} \
   4.201 +        $RPM_BUILD_ROOT%{l_prefix}/etc/sudo/
   4.202 +
   4.203 +    #   determine installation files
   4.204 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   4.205 +        %{l_files_std} \
   4.206 +        '%config %{l_prefix}/etc/fsl/fsl.sudo' \
   4.207 +        '%attr(4111,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/sudo' \
   4.208 +        '%attr(4111,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/sudoedit' \
   4.209 +        '%attr(0111,%{l_susr},%{l_mgrp}) %{l_prefix}/sbin/visudo' \
   4.210 +        '%attr(0755,%{l_susr},%{l_mgrp}) %{l_prefix}/libexec/sudo/plugin/sudoers.so' \
   4.211 +        '%attr(0700,%{l_susr},%{l_mgrp}) %dir %{l_prefix}/var/sudo' \
   4.212 +        '%config(noreplace) %attr(0400,%{l_susr},%{l_sgrp}) %{l_prefix}/etc/sudo/sudo.conf' \
   4.213 +        '%config(noreplace) %attr(0400,%{l_susr},%{l_sgrp}) %{l_prefix}/etc/sudo/sudoers' \
   4.214 +        '%attr(0700,%{l_susr},%{l_sgrp}) %{l_prefix}/etc/sudo/sudoers.d'
   4.215 +
   4.216 +%files -f files
   4.217 +
   4.218 +%clean
   4.219 +
   4.220 +%post
   4.221 +%if "%{with_pam}" == "yes"
   4.222 +    #   add PAM configuration entry
   4.223 +    if [ $1 -eq 1 ]; then
   4.224 +        $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=sudo
   4.225 +    fi
   4.226 +%endif
   4.227 +
   4.228 +%preun
   4.229 +%if "%{with_pam}" == "yes"
   4.230 +    #   remove PAM configuration entry
   4.231 +    if [ $1 -eq 0 ]; then
   4.232 +        $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=sudo
   4.233 +    fi
   4.234 +%endif
   4.235 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/sudo/sudoers	Fri Aug 03 15:42:27 2012 +0200
     5.3 @@ -0,0 +1,17 @@
     5.4 +##
     5.5 +##  sudoers -- global sudoers(5) specification
     5.6 +##  Hint: general structure is "who where = (as_whom) what"
     5.7 +##
     5.8 +
     5.9 +#includedir @l_prefix@/etc/sudo/sudoers.d
    5.10 +
    5.11 +#   - allow root (first entry) and
    5.12 +#   - anybody in group "wheel" (second entry)
    5.13 +#   - to run on all hosts
    5.14 +#   - under any user
    5.15 +#   - without password request
    5.16 +#   - with set environment variables
    5.17 +#   - any command
    5.18 +root    ALL = (ALL) NOPASSWD: SETENV: ALL
    5.19 +%wheel  ALL = (ALL) NOPASSWD: SETENV: ALL
    5.20 +

mercurial