gcrypt/gcrypt.spec

Mon, 20 Apr 2009 19:22:00 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 20 Apr 2009 19:22:00 +0200
changeset 178
0ba300bdf30a
parent 106
5e7005042079
child 284
33c60a6d7034
permissions
-rw-r--r--

Change unfortunate but partly useful overreaching security tradeoff.
The principle of allocating each running process an individual system
user and group can have security benefits, however maintining a plethora
of users, groups, processes, file modes, file permissions, and even
nonportable file ACLs on a host serving from a hundred processes has
some security disadvantages. This tradeoff is even worse for systems
like OpenPKG which benefit from administration transparency through the
use of minimal system intrusion and only three usage privilege levels.

     1 ##
     2 ##  gcrypt.spec -- OpenPKG RPM Package Specification
     3 ##  Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/>
     4 ##
     5 ##  Permission to use, copy, modify, and distribute this software for
     6 ##  any purpose with or without fee is hereby granted, provided that
     7 ##  the above copyright notice and this permission notice appear in all
     8 ##  copies.
     9 ##
    10 ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    11 ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    12 ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    13 ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    14 ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    15 ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    16 ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    17 ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    18 ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    19 ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    20 ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    21 ##  SUCH DAMAGE.
    22 ##
    24 #   package information
    25 Name:         gcrypt
    26 Summary:      Cryptography Library
    27 URL:          ftp://ftp.gnupg.org/gcrypt/libgcrypt/
    28 Vendor:       Werner Koch et al.
    29 Packager:     OpenPKG Foundation e.V.
    30 Distribution: OpenPKG Community
    31 Class:        PLUS
    32 Group:        Cryptography
    33 License:      LGPL
    34 Version:      1.4.3
    35 Release:      20090106
    37 #   package options
    38 %option       with_idea  no
    40 #   list of sources
    41 Source0:      ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.gz
    42 Source1:      idea.c
    43 Patch0:       gcrypt.patch
    45 #   build information
    46 Prefix:       %{l_prefix}
    47 BuildRoot:    %{l_buildroot}
    48 BuildPreReq:  OpenPKG, openpkg >= 20040130, gpg-error, make, gcc
    49 PreReq:       OpenPKG, openpkg >= 20040130, gpg-error
    50 AutoReq:      no
    51 AutoReqProv:  no
    53 %description
    54     GCrypt is the split-out cryptography library from GnuPG.
    56 %track
    57     prog gcrypt = {
    58         version   = %{version}
    59         url       = ftp://ftp.gnupg.org/gcrypt/libgcrypt/
    60         regex     = libgcrypt-(__VER__)\.tar\.gz
    61     }
    63 %prep
    64     %setup -q -n libgcrypt-%{version}
    65     %patch -p0
    66 %if "%{with_idea}" == "yes"
    67     echo $PWD
    68     pwd
    69     echo `pwd`
    70     cp %{SOURCE idea.c} cipher/
    71     %{l_shtool} subst \
    72         -e 's;^\(EXTRA_libcipher_la_SOURCES =\);\1 idea.c;' \
    73         -e 's;^\(GCRYPT_MODULES = .*[^\ \t]\)[\ \t]*$;\1 idea.lo;' \
    74         -e 's;^\(GCRYPT_CIPHERS = .*[^\ \t]\)[\ \t]*$;\1 idea.lo;' \
    75         -e 's;^\(LIBGCRYPT_CIPHERS = .*[^\ \t]\)[\ \t]*$;\1 idea;' \
    76         cipher/Makefile.in
    77     %{l_shtool} subst \
    78         -e 's;^\(available_ciphers="arcfour [^"][^"]*\)";\1 idea";' \
    79         configure
    80 %endif
    82 %build
    83     ( echo "ac_cv_lib_pthread_pthread_create=no"
    84       echo "ac_cv_lib_pth_pth_version=no"
    85     ) >config.cache
    86     CC="%{l_cc}" \
    87     CFLAGS="%{l_cflags -O}" \
    88 %if "%{with_idea}" == "yes"
    89     CPPFLAGS="-DUSE_IDEA $CPPFLAGS" \
    90 %endif
    91     GREP="grep" \
    92     ./configure \
    93         --cache-file=./config.cache \
    94         --prefix=%{l_prefix} \
    95         --mandir=%{l_prefix}/man \
    96         --infodir=%{l_prefix}/info \
    97         --disable-shared
    98     %{l_make} %{l_mflags -O}
   100 %install
   101     rm -rf $RPM_BUILD_ROOT
   102     %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   103     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   104     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   105         %{l_files_std}
   107 %files -f files
   109 %clean
   110     rm -rf $RPM_BUILD_ROOT

mercurial