OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 13-May-2006 19:21:29 Branch: HEAD Handle: 2006051318212701 Added files: openpkg-src/openpkg openssl.patch perl.patch Modified files: openpkg-src/openpkg HISTORY openpkg.sh openpkg.spec rpmtool Log: 1. major change: build and install Perl 5.8.8 miniperl (for building OpenSSL, rpmtool files, etc) 2. major change: build and install OpenSSL 0.9.8b (for adding SSL support to cURL) 3. build cURL with SSL support to allow it to fetch from HTTPS URLs Summary: Revision Changes Path 1.328 +4 -0 openpkg-src/openpkg/HISTORY 1.13 +1 -1 openpkg-src/openpkg/openpkg.sh 1.481 +99 -4 openpkg-src/openpkg/openpkg.spec 1.1 +20 -0 openpkg-src/openpkg/openssl.patch 1.1 +242 -0 openpkg-src/openpkg/perl.patch 1.47 +1 -1 openpkg-src/openpkg/rpmtool ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/openpkg/HISTORY ============================================================================ $ cvs diff -u -r1.327 -r1.328 HISTORY --- openpkg-src/openpkg/HISTORY 12 May 2006 14:35:05 -0000 1.327 +++ openpkg-src/openpkg/HISTORY 13 May 2006 17:21:27 -0000 1.328 @@ -2,6 +2,10 @@ 2006 ==== +20060513 build cURL with SSL support to allow it to fetch from HTTPS URLs +20060513 major change: build and install OpenSSL 0.9.8b (for adding SSL support to cURL) +20060513 major change: build and install Perl 5.8.8 miniperl (for building OpenSSL, rpmtool files, etc) + 20060512 **** RELEASE AS PART OF OPENPKG 2.5.2 *** 20060512 upgrade to OpenPKG Registry 0.4.0 20060512 add a bootstrap wrapper for "openpkg build" command similar to "openpkg install" @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/openpkg.sh ============================================================================ $ cvs diff -u -r1.12 -r1.13 openpkg.sh --- openpkg-src/openpkg/openpkg.sh 1 Jan 2006 13:17:50 -0000 1.12 +++ openpkg-src/openpkg/openpkg.sh 13 May 2006 17:21:27 -0000 1.13 @@ -241,7 +241,7 @@ if [ -x ${openpkg_prefix}/bin/perl ]; then cmd_shell="${openpkg_prefix}/bin/perl" else - cmd_shell=`${openpkg_prefix}/lib/openpkg/shtool path -m perl 2>&1` + cmd_shell=`${openpkg_prefix}/lib/openpkg/shtool path -p "$PATH:$openpkg_prefix/lib/openpkg" -m perl 2>&1` if [ ".${cmd_shell}" = . ]; then echo "openpkg:ERROR: No Perl interpreter found in \${PATH}" 1>&2 exit 1 @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/openpkg.spec ============================================================================ $ cvs diff -u -r1.480 -r1.481 openpkg.spec --- openpkg-src/openpkg/openpkg.spec 12 May 2006 20:02:38 -0000 1.480 +++ openpkg-src/openpkg/openpkg.spec 13 May 2006 17:21:27 -0000 1.481 @@ -38,7 +38,7 @@ # o any cc(1) # the package version/release -%define V_openpkg 20060512 +%define V_openpkg 20060513 # the used software versions %define V_rpm 4.2.1 @@ -54,6 +54,8 @@ %define V_uuid 1.4.2 %define V_config 20060310 %define V_registry 0.4.1 +%define V_perl 5.8.8 +%define V_openssl 0.9.8b # package information Name: openpkg @@ -134,6 +136,10 @@ Source62: uuid.sh Source63: ftp://ftp.openpkg.org/sources/CPY/openpkg-registry/openpkg-registry-%{V_registry}.tar.gz Source64: build.sh +Source65: ftp://ftp.openpkg.org/sources/CPY/perl/perl-%{V_perl}-mini.tar.gz +Source66: ftp://ftp.openssl.org/source/openssl-%{V_openssl}.tar.gz +Source67: perl.patch +Source68: openssl.patch # build information Prefix: %{l_prefix} @@ -158,7 +164,8 @@ RedHat RPM %{V_rpm}, ZLib %{V_zlib}, GNU Bzip2 %{V_bzip2}, GNU Gzip %{V_gzip}, GNU Tar %{V_tar}, GNU Patch %{V_patch}, GNU Make %{V_make}, GNU Bash %{V_bash}, cURL %{V_curl}, - OSSP uuid %{V_uuid}, BeeCrypt %{V_beecrypt} + OSSP uuid %{V_uuid}, BeeCrypt %{V_beecrypt}, + OpenSSL %{V_openssl}, Perl %{V_perl} %track prog openpkg:bash = { @@ -230,6 +237,16 @@ url = ftp://ftp.openpkg.org/sources/CPY/openpkg-registry/ regex = openpkg-registry-(__VER__)\.tar\.gz } + prog openpkg:perl = { + version = %{V_perl} + url = ftp://ftp.openpkg.org/sources/CPY/perl/ + regex = perl-(__VER__)-mini\.tar\.gz + } + prog openpkg:openssl = { + version = %{V_openssl} + url = ftp://ftp.openssl.org/source/ + regex = openssl-(\d+\.\d+\.\d+[a-z]?)\.tar\.gz + } %prep # skip in bootstrap phase 2 (see openpkg.boot) @@ -550,6 +567,8 @@ ${l_gzip} -dc `SOURCE uuid-%{V_uuid}.tar.gz` | ${l_tar} xf - 2>/dev/null || true ${l_gzip} -dc `SOURCE beecrypt-%{V_beecrypt}.tar.gz` | ${l_tar} xf - 2>/dev/null || true ${l_gzip} -dc `SOURCE openpkg-registry-%{V_registry}.tar.gz` | ${l_tar} xf - 2>/dev/null || true + ${l_gzip} -dc `SOURCE perl-%{V_perl}-mini.tar.gz` | ${l_tar} xf - 2>/dev/null || true + ${l_gzip} -dc `SOURCE openssl-%{V_openssl}.tar.gz` | ${l_tar} xf - 2>/dev/null || true # update config.guess/config.sub for dir in rpm-%{V_rpm} rpm-%{V_rpm}/popt beecrypt-%{V_beecrypt} \ @@ -596,6 +615,12 @@ -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \ configure ) || exit $? + ( cd perl-%{V_perl} + ${l_patch} -p0 <`SOURCE perl.patch` + ) || exit $? + ( cd openssl-%{V_openssl} + ${l_patch} -p0 <`SOURCE openssl.patch` + ) || exit $? # display verbosity header set +x; VERBOSE "PREPARATION: Build GNU make (Build Tool)"; set -x @@ -696,6 +721,65 @@ ) || exit $? # display verbosity header + set +x; VERBOSE "BUILD: Build Perl (Programming Language)"; set -x + + # build Perl tool + ( cd perl-%{V_perl} + chmod -R u+w . + sh $shtool subst \ + -e 's;\(.*for thislib in $libswanted.*\);libswanted=`echo " $libswanted " | sed -e "s/ bind / /g" -e "s/ db / /g" -e "s/ gdbm / /g" -e "s/ iconv / /g"`\; \1;' \ + -e 's;package=perl5;package=perl;' \ + Configure + sh $shtool subst \ + -e 's; */usr/local/lib;;' \ + hints/freebsd.sh hints/netbsd.sh + ./Configure \ + -d -e -s \ + -Dprefix=%{l_prefix} \ + -Dvendorprefix=%{l_prefix} \ + -Dinstallprefix=%{l_prefix} \ + -Dinstallstyle="lib/perl5" \ + -Dman1dir=%{l_prefix}/man/man1 \ + -Dman3dir=%{l_prefix}/man/man3 \ + -Dcc="${l_cc}" -Doptimize="" \ + -Dlocincpth="%{l_prefix}/include" \ + -Dloclibpth="%{l_prefix}/lib" \ + -Dldflags="%{l_ldflags}" \ + -Dlibpth="%{l_prefix}/lib /lib /usr/lib /usr/ccs/lib" \ + -Dglibpth="%{l_prefix}/lib /lib /usr/lib /usr/ccs/lib" \ + -Dscriptdir="%{l_prefix}/bin" \ + -Uinstallusrbinperl \ + -Ui_malloc -Ui_iconv -Ui_db + ${l_make} miniperl || exit $? + rm -f *.o >/dev/null 2>&1 || true + ) || exit $? + l_perl="`pwd`/perl-%{V_perl}/miniperl"; export l_perl + echo "l_perl=\"$l_perl\"; export l_perl" >>.buildenv + + # display verbosity header + set +x; VERBOSE "BUILD: Build OpenSSL (Crypography and SSL/TLS Toolkit)"; set -x + + # build OpenSSL toolkit + ( cd openssl-%{V_openssl} + sh $shtool subst \ + -e 's;-m486;-march=i486;g' \ + -e 's;BN_LLONG *;;' \ + Configure + sh $shtool subst \ + -e 's;test "$OSTYPE" = msdosdjgpp;true;' \ + util/point.sh + $l_perl util/perlpath.pl $l_perl + PERL=$l_perl \ + ./config \ + --prefix=%{l_prefix} \ + -fPIC no-asm \ + no-shared no-dso \ + no-zlib no-idea no-threads no-krb5 no-hw + ${l_make} build_libs build_apps || exit $? + ( mkdir lib; cd lib; ln -s ../lib*.a . ) || exit $? + ) || exit $? + + # display verbosity header set +x; VERBOSE "BUILD: Build cURL (URL Fetching Tool)"; set -x # build cURL tool @@ -713,12 +797,13 @@ LDFLAGS="-L`pwd`/../zlib-%{V_zlib}" \ ./configure \ --cache-file=./config.cache \ - --without-ssl \ --without-libidn \ --disable-shared \ --disable-thread \ --disable-ipv6 \ - --with-zlib=`pwd`/../zlib-%{V_zlib} + --with-zlib=`pwd`/../zlib-%{V_zlib} \ + --with-ssl=`pwd`/../openssl-%{V_openssl} \ + --with-ca-bundle=%{l_prefix}/etc/openpkg/openpkg.x509 ${l_make} || exit $? ( mv src/curl ..; ${l_make} clean || true; mv ../curl ./src ) || exit $? ) || exit $? @@ -1026,6 +1111,14 @@ cp file/file $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/file ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/file ) || exit $? + ( cd perl-%{V_perl} + cp miniperl $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/miniperl + ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/miniperl + ) || exit $? + ( cd openssl-%{V_openssl} + cp apps/openssl $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/openssl + ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/openssl + ) || exit $? ( cd curl-%{V_curl} cp src/curl $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/curl ${l_strip} $RPM_BUILD_ROOT%{l_prefix}/lib/openpkg/curl @@ -1266,6 +1359,8 @@ %{l_prefix}/lib/openpkg/bash %{l_prefix}/lib/openpkg/bzip2 %{l_prefix}/lib/openpkg/uuid + %{l_prefix}/lib/openpkg/miniperl + %{l_prefix}/lib/openpkg/openssl %{l_prefix}/lib/openpkg/curl %{l_prefix}/lib/openpkg/file %{l_prefix}/lib/openpkg/gzip @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/openssl.patch ============================================================================ $ cvs diff -u -r0 -r1.1 openssl.patch --- /dev/null 2006-05-13 19:21:28 +0200 +++ openssl.patch 2006-05-13 19:21:29 +0200 @@ -0,0 +1,20 @@ +Index: config +--- config.orig 2005-09-20 14:16:30 +0200 ++++ config 2006-04-07 19:17:06 +0200 +@@ -469,6 +469,7 @@ + + if [ "${SYSTEM}" = "AIX" ]; then # favor vendor cc over gcc + (cc) 2>&1 | grep -iv "not found" > /dev/null && CC=cc ++ (gcc) 2>&1 | grep -iv "not found" > /dev/null && CC=gcc + fi + + CCVER=${CCVER:-0} +@@ -640,7 +641,7 @@ + sun4*-*-solaris2) OUT="solaris-sparcv7-$CC" ;; + *86*-*-solaris2) + ISA64=`(isalist) 2>/dev/null | grep amd64` +- if [ "$ISA64" != "" ]; then ++ if [ "$ISA64" != "" -a "$CC" = "gcc" -a "$GCC_ARCH" = "-m64" ]; then + OUT="solaris64-x86_64-$CC" + else + OUT="solaris-x86-$CC" @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/perl.patch ============================================================================ $ cvs diff -u -r0 -r1.1 perl.patch --- /dev/null 2006-05-13 19:21:28 +0200 +++ perl.patch 2006-05-13 19:21:29 +0200 @@ -0,0 +1,242 @@ +By default, the "vendor" area is not used, so Perl's installation +procedure forgot to create its top-level paths, too. In OpenPKG we use +the "vendor" area, so make sure it is created the same way the "site" +area is. + +Index: installperl +--- installperl.orig 2006-01-28 16:35:28 +0100 ++++ installperl 2006-02-01 20:00:56 +0100 +@@ -189,6 +189,8 @@ + my $installarchlib = "$destdir$Config{installarchlib}"; + my $installsitelib = "$destdir$Config{installsitelib}"; + my $installsitearch = "$destdir$Config{installsitearch}"; ++my $installvendorlib = "$destdir$Config{installvendorlib}"; ++my $installvendorarch = "$destdir$Config{installvendorarch}"; + my $installman1dir = "$destdir$Config{installman1dir}"; + my $man1ext = $Config{man1ext}; + my $libperl = $Config{libperl}; +@@ -381,6 +383,8 @@ + mkpath($installarchlib, $verbose, 0777); + mkpath($installsitelib, $verbose, 0777) if ($installsitelib); + mkpath($installsitearch, $verbose, 0777) if ($installsitearch); ++mkpath($installvendorlib, $verbose, 0777) if ($installvendorlib); ++mkpath($installvendorarch, $verbose, 0777) if ($installvendorarch); + + if (chdir "lib") { + $do_installarchlib = ! samepath($installarchlib, '.'); + +----------------------------------------------------------------------------- + +By default, the Perl module search order is "use lib, -I, PERL[5]LIB, +perl, site, vendor, other". This means that in OpenPKG both the modules +installed via CPAN shell (in "site" area) and the "perl-xxx" packages +(in "vendor" area) cannot override the (sometimes obsoleted) module +versions distributed with Perl (in "perl" area). Hence, we change +the search order to a more reasonable one for OpenPKG: "use lib, -I, +PERL[5]LIB, site, vendor, perl, other". + +Index: perl.c +--- perl.c.orig 2006-01-31 13:34:47 +0100 ++++ perl.c 2006-02-01 20:00:56 +0100 +@@ -4776,39 +4776,6 @@ + incpush(APPLLIB_EXP, TRUE, TRUE, TRUE); + #endif + +-#ifdef ARCHLIB_EXP +- incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE); +-#endif +-#ifdef MACOS_TRADITIONAL +- { +- Stat_t tmpstatbuf; +- SV * privdir = NEWSV(55, 0); +- char * macperl = PerlEnv_getenv("MACPERL"); +- +- if (!macperl) +- macperl = ""; +- +- Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); +- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) +- incpush(SvPVX(privdir), TRUE, FALSE, TRUE); +- Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); +- if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) +- incpush(SvPVX(privdir), TRUE, FALSE, TRUE); +- +- SvREFCNT_dec(privdir); +- } +- if (!PL_tainting) +- incpush(":", FALSE, FALSE, TRUE); +-#else +-#ifndef PRIVLIB_EXP +-# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" +-#endif +-#if defined(WIN32) +- incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE); +-#else +- incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE); +-#endif +- + #ifdef SITEARCH_EXP + /* sitearch is always relative to sitelib on Windows for + * DLL-based path intuition to work correctly */ +@@ -4850,6 +4817,39 @@ + incpush(PERL_VENDORLIB_STEM, FALSE, TRUE, TRUE); + #endif + ++#ifdef ARCHLIB_EXP ++ incpush(ARCHLIB_EXP, FALSE, FALSE, TRUE); ++#endif ++#ifdef MACOS_TRADITIONAL ++ { ++ Stat_t tmpstatbuf; ++ SV * privdir = NEWSV(55, 0); ++ char * macperl = PerlEnv_getenv("MACPERL"); ++ ++ if (!macperl) ++ macperl = ""; ++ ++ Perl_sv_setpvf(aTHX_ privdir, "%slib:", macperl); ++ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) ++ incpush(SvPVX(privdir), TRUE, FALSE, TRUE); ++ Perl_sv_setpvf(aTHX_ privdir, "%ssite_perl:", macperl); ++ if (PerlLIO_stat(SvPVX(privdir), &tmpstatbuf) >= 0 && S_ISDIR(tmpstatbuf.st_mode)) ++ incpush(SvPVX(privdir), TRUE, FALSE, TRUE); ++ ++ SvREFCNT_dec(privdir); ++ } ++ if (!PL_tainting) ++ incpush(":", FALSE, FALSE, TRUE); ++#else ++#ifndef PRIVLIB_EXP ++# define PRIVLIB_EXP "/usr/local/lib/perl5:/usr/local/lib/perl" ++#endif ++#if defined(WIN32) ++ incpush(PRIVLIB_EXP, TRUE, FALSE, TRUE); ++#else ++ incpush(PRIVLIB_EXP, FALSE, FALSE, TRUE); ++#endif ++ + #ifdef PERL_OTHERLIBDIRS + incpush(PERL_OTHERLIBDIRS, TRUE, TRUE, TRUE); + #endif + +----------------------------------------------------------------------------- + +Port to [Open]Darwin 6.6.2: + +1. In OpenPKG, Perl does not use the vendor GCC and our GCC does not + understand "-no-cpp-precomp", so remove this build option. + +2. The <sys/mman.h> indirectly includes system specific headers + which in turn have fields named "environ" while Perl uses + a define of "environ" internally. So wrap the inclusion. + +3. Darwin 6 no longer accepts the non-standard "#import" statements, + so replace with "#include" and circumvent some header problem + related to the non-standard "__private_extern__" attribute. + +Index: hints/darwin.sh +--- hints/darwin.sh.orig 2005-09-18 17:13:41 +0200 ++++ hints/darwin.sh 2006-02-01 20:00:56 +0100 +@@ -120,9 +120,6 @@ + *-2147483648) ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" ;; + esac + +-# Avoid Apple's cpp precompiler, better for extensions +-cppflags="${cppflags} -no-cpp-precomp" +- + # This is necessary because perl's build system doesn't + # apply cppflags to cc compile lines as it should. + ccflags="${ccflags} ${cppflags}" +@@ -182,8 +179,7 @@ + esac + ldlibpthname='DYLD_LIBRARY_PATH'; + +-# useshrplib=true results in much slower startup times. +-# 'false' is the default value. Use Configure -Duseshrplib to override. ++useshrplib='true' + + cat > UU/archname.cbu <<'EOCBU' + # This script UU/archname.cbu will get 'called-back' by Configure +Index: perlio.c +--- perlio.c.orig 2006-01-06 23:42:20 +0100 ++++ perlio.c 2006-02-01 20:00:56 +0100 +@@ -448,7 +448,14 @@ + #include <unistd.h> + #endif + #ifdef HAS_MMAP ++#ifdef PERL_DARWIN ++#define environ_safe environ ++#undef environ + #include <sys/mman.h> ++#define environ environ_safe ++#else ++#include <sys/mman.h> ++#endif + #endif + + void + +----------------------------------------------------------------------------- + +Port to Tru64 5.1: + +Under Tru64 our gcc has to be built without binutils and the system +ld(1) does not accept a "-O" option, so remove the whole passing of +optimization flags to ld(1). Under a brain-dead platform like Tru64 we +really don't need any more optimization because we are already happy if +it works at all. + +Index: hints/dec_osf.sh +--- hints/dec_osf.sh.orig 2006-01-08 10:53:29 +0100 ++++ hints/dec_osf.sh 2006-02-01 20:00:56 +0100 +@@ -279,15 +279,6 @@ + *) if $test "X$optimize" = "X$undef"; then + lddlflags="$lddlflags -msym" + else +- case "$myosvers" in +- *4.0D*) +- # QAR 56761: -O4 + .so may produce broken code, +- # fixed in 4.0E or better. +- ;; +- *) +- lddlflags="$lddlflags $optimize" +- ;; +- esac + # -msym: If using a sufficiently recent /sbin/loader, + # keep the module symbols with the modules. + lddlflags="$lddlflags -msym $_lddlflags_strict_ansi" + +----------------------------------------------------------------------------- + +Index: Configure +--- Configure.orig 2006-01-08 15:51:03 +0100 ++++ Configure 2006-02-01 20:00:56 +0100 +@@ -7663,7 +7663,7 @@ + ;; + linux|irix*|gnu*) dflt='-shared' ;; + next) dflt='none' ;; +- solaris) dflt='-G' ;; ++ solaris) dflt='-shared' ;; + sunos) dflt='-assert nodefinitions' ;; + svr4*|esix*|nonstopux) dflt="-G $ldflags" ;; + *) dflt='none' ;; + +----------------------------------------------------------------------------- + +Security Fix (CVE-2005-3962, OpenPKG-SA-2005.025-perl) + +Index: sv.c +--- sv.c.orig 2006-01-16 13:22:21 +0100 ++++ sv.c 2006-02-01 20:00:56 +0100 +@@ -8650,7 +8650,10 @@ + if (EXPECT_NUMBER(q, width)) { + if (*q == '$') { + ++q; +- efix = width; ++ if (width > PERL_INT_MAX) ++ efix = PERL_INT_MAX; ++ else ++ efix = width; + } else { + goto gotwidth; + } @@ . patch -p0 <<'@@ .' Index: openpkg-src/openpkg/rpmtool ============================================================================ $ cvs diff -u -r1.46 -r1.47 rpmtool --- openpkg-src/openpkg/rpmtool 1 Jan 2006 13:17:54 -0000 1.46 +++ openpkg-src/openpkg/rpmtool 13 May 2006 17:21:28 -0000 1.47 @@ -545,7 +545,7 @@ # with it because Perl is a magnitude (factor 10!) faster than # what we can do here in Bourne-Shell. perl='' - for dir in `echo $PATH | sed -e 's/:/ /g'` .; do + for dir in `echo "$PATH:@l_prefix@/lib/openpkg" | sed -e 's/:/ /g'` .; do [ ".$dir" = .. -o ".$dir" = . ] && continue for tool in perl5 perl miniperl; do if [ -f "$dir/$tool" ]; then @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org