gnupg/gnupg.spec

Sat, 21 Feb 2009 16:39:01 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 21 Feb 2009 16:39:01 +0100
changeset 107
2f8ffdf7658b
parent 31
bba786e365af
child 119
0c4aca8434e1
permissions
-rw-r--r--

Patch gnupg and its dependency gcrypt to accept use of the IDEA cipher.
This effort seems to be flawed, as runtime tests of generating a
revokation certificate for a IDEA encrypted key were inconclusive.
Suspicion rests on a flawed implementation or patch logic.

     1 ##
     2 ##  gnupg.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:         gnupg
    26 Summary:      GNU Privacy Guard
    27 URL:          http://www.gnupg.org/
    28 Vendor:       Werner Koch
    29 Packager:     OpenPKG Foundation e.V.
    30 Distribution: OpenPKG Community
    31 Class:        PLUS
    32 Group:        PGP
    33 License:      GPL
    34 Version:      2.0.9
    35 Release:      20090106
    37 #   package options
    38 %option       with_curl  yes
    39 %option       with_ldap  no
    40 %option       with_idea  no
    42 #   list of sources
    43 Source0:      ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-%{version}.tar.bz2
    44 Patch0:       gnupg.patch
    46 #   build information
    47 Prefix:       %{l_prefix}
    48 BuildRoot:    %{l_buildroot}
    49 BuildPreReq:  OpenPKG, openpkg >= 20040130, make
    50 PreReq:       OpenPKG, openpkg >= 20040130, pinentry
    51 BuildPreReq:  gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 1.0.2, gpg-error >= 1.4
    52 PreReq:       gcrypt >= 1.2.3, libksba >= 1.0.2, libassuan >= 1.0.2, gpg-error >= 1.4
    53 BuildPreReq:  zlib, bzip2, readline, pth, libiconv
    54 PreReq:       zlib, bzip2, readline, pth, libiconv
    55 %if "%{with_curl}" == "yes"
    56 BuildPreReq:  curl, openssl
    57 PreReq:       curl, openssl
    58 %endif
    59 %if "%{with_ldap}" == "yes"
    60 BuildPreReq:  openldap, openssl
    61 PreReq:       openldap, openssl
    62 %endif
    63 %if "%{with_idea}" == "yes"
    64 BuildPreReq:  gcrypt::with_idea
    65 PreReq:       gcrypt::with_idea
    66 %endif
    67 AutoReq:      no
    68 AutoReqProv:  no
    70 %description
    71     GnuPG (GNU Privacy Guard) is a GNU utility for encrypting data and
    72     creating digital signatures. GnuPG has advanced key management
    73     capabilities and is compliant with the proposed OpenPGP Internet
    74     standard described in RFC2440. Since GnuPG doesn't use any patented
    75     algorithm, it is not compatible with any version of PGP2 (PGP2.x
    76     uses only IDEA, patented worldwide).
    78 %track
    79     prog gnupg = {
    80         version   = %{version}
    81         url       = ftp://ftp.gnupg.org/gcrypt/gnupg/
    82         regex     = gnupg-(2\.__VER__)\.tar\.(gz|bz2)
    83     }
    85 %prep
    86     %setup -q -n gnupg-%{version}
    87     %patch -p0
    88     chmod a+rx scripts/install-sh
    89     %{l_shtool} subst \
    90         -e 's;PRINTABLE_OS_NAME;"%{l_openpkg_release}";g' \
    91         g10/armor.c
    93 %build
    94     #   configure program
    95     export LIBS=""
    96     case "%{l_platform -t}" in
    97         *-sunos* ) LIBS="$LIBS -lsocket -lnsl" ;;
    98     esac
    99     echo "int main(int argc, char *argv[]) { return 0; }" >dummy.c
   100     for lib in termcap termlib curses ncurses; do
   101         rc=0; %{l_cc} -o dummy dummy.c -l$lib >/dev/null 2>&1 || rc=1
   102         if [ $rc -eq 0 ]; then LIBS="$LIBS -l$lib"; break; fi
   103     done
   104 %if "%{with_curl}" == "yes" || "%{with_ldap}" == "yes"
   105     LIBS="$LIBS -lssl -lcrypto"
   106 %endif
   107 %if "%{with_curl}" == "yes"
   108     LIBS="$LIBS -lz"
   109 %endif
   110     LIBS="$LIBS -liconv"
   111     export CC="%{l_cc}"
   112     export CFLAGS="%{l_cflags -O}"
   113     export CPPFLAGS="%{l_cppflags}"
   114 %if "%{with_idea}" == "yes"
   115     export CPPFLAGS="-DUSE_IDEA $CPPFLAGS"
   116 %endif
   117     export LDFLAGS="%{l_ldflags}"
   118     ./configure \
   119         --prefix=%{l_prefix} \
   120         --libexecdir=%{l_prefix}/libexec/gnupg \
   121         --mandir=%{l_prefix}/man \
   122         --infodir=%{l_prefix}/info \
   123         --with-zlib=%{l_prefix} \
   124         --with-bzip2=%{l_prefix} \
   125         --with-readline=%{l_prefix} \
   126         --with-libiconv-prefix=%{l_prefix} \
   127         --with-gpg-error-prefix=%{l_prefix} \
   128         --with-libgcrypt-prefix=%{l_prefix} \
   129         --with-libassuan-prefix=%{l_prefix} \
   130         --with-ksba-prefix=%{l_prefix} \
   131         --with-pth-prefix=%{l_prefix} \
   132         --with-agent-pgm=%{l_prefix}/bin/gpg-agent \
   133         --with-pinentry-pgm=%{l_prefix}/bin/pinentry \
   134         --with-dirmngr-pgm=%{l_prefix}/bin/dirmngr \
   135         --with-included-regex \
   136 %if "%{with_curl}" == "yes"
   137         --with-libcurl=%{l_prefix} \
   138 %else
   139         --without-libcurl \
   140 %endif
   141         --without-included-gettext \
   142         --without-libintl-prefix \
   143         --disable-nls \
   144         --disable-scdaemon \
   145         --enable-generic \
   146         --enable-finger \
   147         --enable-hkp \
   148 %if "%{with_ldap}" == "yes"
   149         --enable-ldap \
   150 %else
   151         --disable-ldap \
   152 %endif
   153 %if "%{with_curl}" == "yes"
   154         --with-libcurl=%{l_prefix} \
   155 %else
   156         --without-libcurl \
   157 %endif
   158         --enable-exec \
   159         --enable-keyserver-helpers \
   160         --with-mailprog="%{l_prefix}/sbin/sendmail" \
   161         --disable-mailto
   163     #   build program
   164     %{l_make} %{l_mflags}
   166 %install
   167     #   install program
   168     rm -rf $RPM_BUILD_ROOT
   169     %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
   171     #   provide unversioned names
   172     ln  $RPM_BUILD_ROOT%{l_prefix}/bin/gpg2 \
   173         $RPM_BUILD_ROOT%{l_prefix}/bin/gpg
   174     ln  $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv2 \
   175         $RPM_BUILD_ROOT%{l_prefix}/bin/gpgv
   176     ln  $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg2.1 \
   177         $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpg.1
   178     ln  $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv2.1 \
   179         $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgv.1
   181     #   strip down and post-adjust installation files
   182     strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true
   183     strip $RPM_BUILD_ROOT%{l_prefix}/libexec/gnupg/* 2>/dev/null || true
   184     rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
   185     rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/scdaemon.1
   186     mv $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert.sh \
   187        $RPM_BUILD_ROOT%{l_prefix}/bin/gpgsm-gencert
   188     mv $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.sh.1 \
   189        $RPM_BUILD_ROOT%{l_prefix}/man/man1/gpgsm-gencert.1
   191     #   determine installation files
   192     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   193         %{l_files_std} \
   194         '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg' \
   195         '%attr(4755,%{l_susr},%{l_mgrp}) %{l_prefix}/bin/gpg2'
   197 %files -f files
   199 %clean
   200     rm -rf $RPM_BUILD_ROOT

mercurial