OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   09-Feb-2004 21:18:30
  Branch: HEAD                             Handle: 2004020920182901

  Modified files:
    openpkg-src/openpkg     HISTORY openpkg.boot openpkg.spec rpmmacros

  Log:
    cleanup "rpmmacros" for consistent "%l_prefix" usage and this way
    implicitly fix "rpmtool not found" issue during bootstrapping from scratch.

  Summary:
    Revision    Changes     Path
    1.126       +1  -0      openpkg-src/openpkg/HISTORY
    1.45        +5  -3      openpkg-src/openpkg/openpkg.boot
    1.282       +1  -1      openpkg-src/openpkg/openpkg.spec
    1.54        +46 -47     openpkg-src/openpkg/rpmmacros
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/HISTORY
  ============================================================================
  $ cvs diff -u -r1.125 -r1.126 HISTORY
  --- openpkg-src/openpkg/HISTORY       8 Feb 2004 08:17:43 -0000       1.125
  +++ openpkg-src/openpkg/HISTORY       9 Feb 2004 20:18:29 -0000       1.126
  @@ -2,6 +2,7 @@
   2004
   ====
   
  +20040209 cleanup "rpmmacros" for consistent "%l_prefix" usage and fix "rpmtool not 
found" issue
   20040208 added version tracking for OSSP uuid
   20040206 upgraded to OSSP uuid 0.9.5
   20040206 disable %prep checks under --track-dump and cleanup its output
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/openpkg.boot
  ============================================================================
  $ cvs diff -u -r1.44 -r1.45 openpkg.boot
  --- openpkg-src/openpkg/openpkg.boot  28 Jan 2004 13:04:35 -0000      1.44
  +++ openpkg-src/openpkg/openpkg.boot  9 Feb 2004 20:18:30 -0000       1.45
  @@ -439,9 +439,10 @@
       -e "s;@NUSR@;$nusr;" \
       -e "s;@NGRP@;$ngrp;" \
       -e "s;@TAG@;$tag;" \
  -    -e "s;^\\(%l_root_install *\\)@l_prefix@;\\1 $prefix;" \
  -    -e "s;^\\(%l_root_rpm *\\)@l_prefix@;\\1 $RPM_BUILD_ROOT$prefix;" \
  -    -e "s;@l_prefix@;$RPM_BUILD_ROOT$prefix;" \
  +    -e "s;\\(%{l_prefix}/lib/openpkg/rpmtool\\);%{l_bash} \\1;g" \
  +    -e "s;@l_prefix@;$RPM_BUILD_ROOT$prefix;g" \
  +    -e "s;%l_prefix;%l_prefix_INTERNAL;g" \
  +    -e "s;%{l_prefix};%{l_prefix_INTERNAL};g" \
       -e "s;^\\(%_specdir *\\).*;\\1 `pwd`;" \
       -e "s;^\\(%_sourcedir *\\).*;\\1 $distdir;" \
       -e "s;^\\(%_builddir *\\).*;\\1 $tmpdir;" \
  @@ -450,6 +451,7 @@
       -e "s;@l_build_path@;/bin:/sbin:/usr/bin:/usr/sbin;g" \
       -e "s;@l_build_ldlp@;/usr/lib;g" \
       -e "s;@l_build_ulim@;:;g"
  +echo "%l_prefix $prefix" >>$tmpdir/rpm.3
   
   #   use an own $HOME/.popt in order to make sure the "rpm"
   #   tool is able to execute its sub-tools "rpm<x>".
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/openpkg.spec
  ============================================================================
  $ cvs diff -u -r1.281 -r1.282 openpkg.spec
  --- openpkg-src/openpkg/openpkg.spec  8 Feb 2004 08:17:43 -0000       1.281
  +++ openpkg-src/openpkg/openpkg.spec  9 Feb 2004 20:18:30 -0000       1.282
  @@ -39,7 +39,7 @@
   #   o any cc(1)
   
   #   the package version/release
  -%define       V_openpkg  20040208
  +%define       V_openpkg  20040209
   
   #   the used software versions
   %define       V_rpm      4.2.1
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/openpkg/rpmmacros
  ============================================================================
  $ cvs diff -u -r1.53 -r1.54 rpmmacros
  --- openpkg-src/openpkg/rpmmacros     4 Feb 2004 08:37:10 -0000       1.53
  +++ openpkg-src/openpkg/rpmmacros     9 Feb 2004 20:18:30 -0000       1.54
  @@ -27,7 +27,7 @@
   ##
   
   #   the OpenPKG release identification (for the current package or as a fallback 
for the bootstrap package)
  -%l_openpkg_release(F:)   %(echo "%{?release}%{!?release:%(@l_prefix@/bin/rpm -q 
--qf '%{release}' openpkg)}" | sed -e 's;^;X;' -e 
's;^X\\([0-9][0-9]*\\.[0-9][0-9]*\\).*$;\\1;' -e 
's;^X\\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\\)$;CURRENT;' -e 's;^X.*$;UNKNOWN;' | 
awk '{ printf(%{?-F:%{-F*}}%{!?-F:"OpenPKG-%s"}, $0); }')
  +%l_openpkg_release(F:)   %(echo "%{?release}%{!?release:%(%{l_prefix}/bin/rpm -q 
--qf '%{release}' openpkg)}" | sed -e 's;^;X;' -e 
's;^X\\([0-9][0-9]*\\.[0-9][0-9]*\\).*$;\\1;' -e 
's;^X\\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\\)$;CURRENT;' -e 's;^X.*$;UNKNOWN;' | 
awk '{ printf(%{?-F:%{-F*}}%{!?-F:"OpenPKG-%s"}, $0); }')
   
   #   the OpenPKG OIDs (root is officially registered at IANA)
   %l_openpkg_oid           1.3.6.1.4.1.18749
  @@ -93,7 +93,7 @@
   %l_host                  %{_host_cpu}-%{_host_os}
   
   #   new OpenPKG platform identification
  -%l_platform(cptF:)       %(if [ ".%{?-F}" != . ]; then fmt="%{-F*}"; else 
T="%{?-c:c}%{?-p:p}%{?-t:t}"; [ ".$T" = . ] && T="p"; fmt="%%<a$T>-%%<s$T>"; fi; 
@l_prefix@/lib/openpkg/shtool platform -n -L -S "" -C "+" -F "$fmt")
  +%l_platform(cptF:)       %(if [ ".%{?-F}" != . ]; then fmt="%{-F*}"; else 
T="%{?-c:c}%{?-p:p}%{?-t:t}"; [ ".$T" = . ] && T="p"; fmt="%%<a$T>-%%<s$T>"; fi; 
%{l_shtool} platform -n -L -S "" -C "+" -F "$fmt")
   
   #   old OpenPKG platform identification
   %l_target                %{l_platform -t}
  @@ -128,25 +128,23 @@
   %l_npuid                 %{l_nuid}
   %l_npgid                 %{l_ngid}
   
  -#   the two root directories
  -%l_root_install          @l_prefix@
  -%l_root_rpm              @l_prefix@/RPM
  -
  -#   define the installation hierarchy
  -%l_prefix                %{l_root_install}
  -%l_exec_prefix           %{l_root_install}
  -%l_bindir                %{l_root_install}/bin
  -%l_sbindir               %{l_root_install}/sbin
  -%l_libexecdir            %{l_root_install}/libexec
  -%l_datadir               %{l_root_install}/share
  -%l_sysconfdir            %{l_root_install}/etc
  -%l_sharedstatedir        %{l_root_install}/com
  -%l_localstatedir         %{l_root_install}/var
  -%l_libdir                %{l_root_install}/lib
  -%l_includedir            %{l_root_install}/include
  -%l_infodir               %{l_root_install}/info
  -%l_mandir                %{l_root_install}/man
  -%l_docdir                %{l_root_install}/doc
  +#   define the installation hierarchy (used parts)
  +%l_prefix                @l_prefix@
  +
  +#   define the installation hierarchy (unused parts)
  +%l_exec_prefix           %{l_prefix}
  +%l_bindir                %{l_prefix}/bin
  +%l_sbindir               %{l_prefix}/sbin
  +%l_libexecdir            %{l_prefix}/libexec
  +%l_datadir               %{l_prefix}/share
  +%l_sysconfdir            %{l_prefix}/etc
  +%l_sharedstatedir        %{l_prefix}/com
  +%l_localstatedir         %{l_prefix}/var
  +%l_libdir                %{l_prefix}/lib
  +%l_includedir            %{l_prefix}/include
  +%l_infodir               %{l_prefix}/info
  +%l_mandir                %{l_prefix}/man
  +%l_docdir                %{l_prefix}/doc
   
   #   provide killer macro "%{l_value -s|-b|-c (l_xxx ...|-a|-A)}" which
   #   expands to the values of previous l_xxx variables in this file. With
  @@ -163,21 +161,21 @@
   %l_value(sbcaA)          %{expand:%(l=""; for x in `if [ ".%*" != . ]; then echo 
"%* "; else p=""; if [ ".%{-a:yes}" = .yes ]; then 
p="^%%l_(prefix|[smrn](usr|grp|uid|gid))"; elif [ ".%{-A:yes}" = .yes ]; then 
p="^%%l_"; fi; if [ ".$p" != . ]; then egrep "$p" %{l_prefix}/etc/openpkg/rpmmacros | 
sed -e '/^%%l_value/,$d' -e 's;^%%\\(l_[a-z1-9_]*\\).*;\\1;'; fi; fi`; do e=""; if [ 
".%{-s:yes}" = .yes ]; then e="-e 's;@$x@;%%{$x};g'"; elif [ ".%{-b:yes}" = .yes ]; 
then e="$x='%%{$x}';"; elif [ ".%{-c:yes}" = .yes ]; then e="set $x = '%%{$x}';"; else 
e="%%{$x}"; fi; if [ ".$l" = . ]; then l="$e"; else l="$l $e"; fi; done; echo "$l")}
   
   #   override the internal RPM hierarchy variables
  -%_usr                    %{l_root_rpm}
  -%_var                    %{l_root_rpm}
  -%_usrsrc                 %{l_root_rpm}
  -%_topdir                 %{l_root_rpm}
  -%_dbpath                 %{l_root_rpm}/DB
  -%_builddir               %{l_root_rpm}/TMP
  -%_tmppath                %{l_root_rpm}/TMP
  -%_sourcedir              %{l_root_rpm}/SRC/%{name}
  -%_specdir                %{l_root_rpm}/SRC/%{name}
  -%_rpmdir                 %{l_root_rpm}/PKG
  -%_srcrpmdir              %{l_root_rpm}/PKG
  -%_repackage_dir          %{l_root_rpm}/PKG
  -%_cache_dbpath           %{l_root_rpm}/PKG
  -%_solve_dbpath           %{l_root_rpm}/PKG
  -%_solve_pkgsdir          %{l_root_rpm}/PKG
  +%_usr                    %{nil}
  +%_var                    %{nil}
  +%_usrsrc                 %{nil}
  +%_topdir                 %{nil}
  +%_dbpath                 %{l_prefix}/RPM/DB
  +%_builddir               %{l_prefix}/RPM/TMP
  +%_tmppath                %{l_prefix}/RPM/TMP
  +%_sourcedir              %{l_prefix}/RPM/SRC/%{name}
  +%_specdir                %{l_prefix}/RPM/SRC/%{name}
  +%_rpmdir                 %{l_prefix}/RPM/PKG
  +%_srcrpmdir              %{l_prefix}/RPM/PKG
  +%_repackage_dir          %{l_prefix}/RPM/PKG
  +%_cache_dbpath           %{l_prefix}/RPM/PKG
  +%_solve_dbpath           %{l_prefix}/RPM/PKG
  +%_solve_pkgsdir          %{l_prefix}/RPM/PKG
   %_defaultdocdir          %{l_docdir}
   
   #   complement the %{SOURCE<n>} and %{PATCH<n>} with %{SOURCE <file>} and %{PATCH 
<file>}
  @@ -201,7 +199,7 @@
   %__ln_s                  ln -s
   %__make                  make
   %__mkdir                 mkdir
  -%__mkdir_p               %{l_prefix}/lib/openpkg/shtool mkdir -p
  +%__mkdir_p               %{l_shtool} mkdir -p
   %__mv                    mv
   %__patch                 %{_patchbin}
   %__perl                  perl
  @@ -238,7 +236,7 @@
   %l_uuid                  %{l_prefix}/lib/openpkg/uuid
   
   #   provide smart paths to tools
  -%l_tool_locate()         %(if [ ".%{expand:%%{?use_%1}}" != . ]; then 
tool="%{expand:%%{use_%1}}"; elif [ -f "%{l_bindir}/%2" ]; then tool="%{l_bindir}/%2"; 
elif [ -f "%{l_prefix}/lib/openpkg/%2" ]; then tool="%{l_prefix}/lib/openpkg/%2"; else 
tool="%2"; fi; echo $tool)
  +%l_tool_locate()         %(if [ ".%{expand:%%{?use_%1}}" != . ]; then 
tool="%{expand:%%{use_%1}}"; elif [ -f "%{l_prefix}/bin/%2" ]; then 
tool="%{l_prefix}/bin/%2"; elif [ -f "%{l_prefix}/lib/openpkg/%2" ]; then 
tool="%{l_prefix}/lib/openpkg/%2"; else tool="%2"; fi; echo $tool)
   %l_gzip                  %{l_tool_locate gzip     gzip}
   %l_bzip2                 %{l_tool_locate bzip2    bzip2}
   %l_tar                   %{l_tool_locate tar      tar}
  @@ -286,13 +284,17 @@
   %l_tmpfile()             %{l_tmpdir}/%{name}-%{version}-%{release}-tmp%{?1:-%1}
   
   #   executable path for %post/%pre
  -%_install_script_path    
@l_prefix@/bin:@l_prefix@/sbin:/bin:/sbin:/usr/bin:/usr/sbin
  +%_install_script_path    
%{l_prefix}/bin:%{l_prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbin
  +
  +#   names of RPM files
  +%l_srcrpmfilename        %%{NAME}-%%{VERSION}-%%{RELEASE}.src.rpm
  +%l_binrpmfilename        
%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}-%%{OS}-%{l_tag}.rpm
   
   #   override the name scheme for RPM files
  -%_rpmfilename            
%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}-%%{OS}-%{l_tag}.rpm
  -%_build_name_fmt         
%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}-%%{OS}-%{l_tag}.rpm
  -%_repackage_name_fmt     
%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}-%%{OS}-%{l_tag}.rpm
  -%_solve_name_fmt         
%{_solve_pkgsdir}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}-%%{OS}-%{l_tag}.rpm
  +%_rpmfilename            %{l_binrpmfilename}
  +%_build_name_fmt         %{l_binrpmfilename}
  +%_repackage_name_fmt     %{l_binrpmfilename}
  +%_solve_name_fmt         %{_solve_pkgsdir}/%{l_binrpmfilename}
   
   #   override the payload compression for the CPIO parts of an RPM
   #   (we use the equivalent of "bzip2 -9")
  @@ -318,7 +320,7 @@
   %integrity()             %{l_check_nosource}
   
   #   macros for checking build environment
  -%l_check_nosource()      %(for url in . %{?_restricted}; do [ ".$url" = .. ] && 
continue; eval `echo "$url" | sed -e 's!^\\(.*\\)::/\\([^/][^/]*\\)$!;url=\\"\\1 --> 
\\"; file=\\"\\2\\"!' -e 's!^\\([^:;][^:]*://.*/\\)\\([^/][^/]*\\)$!;url=\\"\\1\\"; 
file=\\"\\2\\"!' -e 's:^\\([^;].*\\)$:;url="(from unknown location) "; file="\\1":' -e 
's:^;::'`; if [ ! -f "%{_specdir}/$file" ] && [ ! -f "%{_sourcedir}/$file" ]; then ( 
echo "Sorry, this OpenPKG package contains a DISTRIBUTION RESTRICTED source file."; 
echo "Before you can proceed building this package you have to MANUALLY fetch"; echo " 
   ${url}${file}"; echo "and provide it locally under the path"; echo "    
%{_sourcedir}/$file" ) | (if [ -f %{l_rpmtool} ]; then %{l_rpmtool} msg -b -t error; 
fi) 1>&2; echo "exit 1"; fi; done)
  +%l_check_nosource()      %(for url in . %{?_restricted}; do [ ".$url" = .. ] && 
continue; eval `echo "$url" | sed -e 's!^\\(.*\\)::/\\([^/][^/]*\\)$!;url=\\"\\1 --> 
\\"; file=\\"\\2\\"!' -e 's!^\\([^:;][^:]*://.*/\\)\\([^/][^/]*\\)$!;url=\\"\\1\\"; 
file=\\"\\2\\"!' -e 's:^\\([^;].*\\)$:;url="(from unknown location) "; file="\\1":' -e 
's:^;::'`; if [ ! -f "%{_specdir}/$file" ] && [ ! -f "%{_sourcedir}/$file" ]; then ( 
echo "Sorry, this OpenPKG package contains a DISTRIBUTION RESTRICTED source file."; 
echo "Before you can proceed building this package you have to MANUALLY fetch"; echo " 
   ${url}${file}"; echo "and provide it locally under the path"; echo "    
%{_sourcedir}/$file" ) | %{l_rpmtool} msg -b -t error; echo "exit 1"; fi; done)
   %l_check_class()         %(class=`echo "%{class}" | sed -e 's;^$;JUNK;'`; 
%{l_rpmtool} check-class "$class")
   %prep %%prep\
       %{l_check_nosource} \
  @@ -327,9 +329,6 @@
   
   #   macro-processor add-on for testing external conditions
   %l_test(pfd)             %(if [ ".%{?-p:yes}" = .yes ]; then %{l_prefix}/bin/rpm -q 
%1 >/dev/null 2>&1; rc=$?; elif [ ".%{?-f:yes}" = .yes ]; then test -f %1; rc=$?; elif 
[ ".%{?-d:yes}" = .yes ]; then test -d %1; rc=$?; fi; if [ ".$rc" = .0 ]; then echo 
"yes"; else echo "no"; fi)
  -
  -#   helper macros for creating local copies of GNU config scripts
  -%update_config_scripts   chmod u+w config.guess config.sub; cp 
%{l_prefix}/lib/openpkg/config.guess .; cp %{l_prefix}/lib/openpkg/config.sub .
   
   #   default list of vendor source fetching locations
   %l_fetch_mirror_0        -
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to