RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm-5_0: rpm/ CHANGES rpm/build/ files.c pack.c poptBT.c rp...

From: Jeff Johnson <jbj@rpm5.org>
Date: Thu 24 Jan 2008 - 21:03:27 CET
Message-Id: <20080124200327.1B3AA348454@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  jbj@rpm5.org
  Module: rpm                              Date:   24-Jan-2008 21:03:27
  Branch: rpm-5_0                          Handle: 2008012420032500

  Modified files:           (Branch: rpm-5_0)
    rpm                     CHANGES rpmpopt.in
    rpm/build               files.c pack.c poptBT.c rpmbuild.h spec.c

  Log:
    - jbj: proof-of-concept rpmbuild --lsb implementation.

  Summary:
    Revision    Changes     Path
    1.2054.2.15 +1  -0      rpm/CHANGES
    1.310.2.2   +3  -0      rpm/build/files.c
    2.281.2.1   +4  -0      rpm/build/pack.c
    2.20.2.2    +7  -3      rpm/build/poptBT.c
    2.92.2.1    +3  -0      rpm/build/rpmbuild.h
    2.175.2.1   +2  -2      rpm/build/spec.c
    2.47.2.2    +5  -1      rpm/rpmpopt.in
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2054.2.14 -r1.2054.2.15 CHANGES
  --- rpm/CHANGES	24 Jan 2008 19:24:07 -0000	1.2054.2.14
  +++ rpm/CHANGES	24 Jan 2008 20:03:25 -0000	1.2054.2.15
  @@ -1,4 +1,5 @@
   5.0.0 -> 5.0.1:
  +    - jbj: proof-of-concept rpmbuild --lsb implementation.
       - mej: catch EOF returned as RPMRC_NOTFOUND correctly.
       - jbj: fix: permit %{lua:...} to recurse.
       - jbj: unbreak rpm-python, preserve existing symbol in released versions.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/files.c
  ============================================================================
  $ cvs diff -u -r1.310.2.1 -r1.310.2.2 files.c
  --- rpm/build/files.c	15 Jan 2008 14:19:18 -0000	1.310.2.1
  +++ rpm/build/files.c	24 Jan 2008 20:03:25 -0000	1.310.2.2
  @@ -1504,6 +1504,7 @@
   	xx = headerPut(h, he, 0);
   	he->append = 0;
   
  +if (!(_rpmbuildFlags & 4)) {
   	ui32 = dalgo;
   	he->tag = RPMTAG_FILEDIGESTALGOS;
   	he->t = RPM_UINT32_TYPE;
  @@ -1512,6 +1513,7 @@
   	he->append = 1;
   	xx = headerPut(h, he, 0);
   	he->append = 0;
  +}
         }
   	
   	buf[0] = '\0';
  @@ -1570,6 +1572,7 @@
   	he->append = 0;
   	
   	/* Add file security context to package. */
  +if (!(_rpmbuildFlags & 4))
   	{
   	    static char *nocon = "";
   /*@-moduncon@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/pack.c
  ============================================================================
  $ cvs diff -u -r2.281 -r2.281.2.1 pack.c
  --- rpm/build/pack.c	2 Jan 2008 10:26:04 -0000	2.281
  +++ rpm/build/pack.c	24 Jan 2008 20:03:25 -0000	2.281.2.1
  @@ -946,6 +946,7 @@
       he->c = 1;
       xx = headerPut(h, he, 0);
   
  +if (!(_rpmbuildFlags & 4)) {
       val = rpmlibTimestamp();
       he->tag = RPMTAG_RPMLIBTIMESTAMP;
       he->t = RPM_UINT32_TYPE;
  @@ -966,6 +967,7 @@
       he->p.ui32p = &val;
       he->c = 1;
       xx = headerPut(h, he, 0);
  +}
   
       he->tag = RPMTAG_BUILDHOST;
       he->t = RPM_STRING_TYPE;
  @@ -1034,6 +1036,7 @@
   	he->c = 1;
   	xx = headerPut(pkg->header, he, 0);
   
  +if (!(_rpmbuildFlags & 4)) {
   	if (spec->sourcePkgId != NULL) {
   	    he->tag = RPMTAG_SOURCEPKGID;
   	    he->t = RPM_BIN_TYPE;
  @@ -1041,6 +1044,7 @@
   	    he->c = 16;
   	    xx = headerPut(pkg->header, he, 0);
   	}
  +}
   	
   	{   const char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
   	    char *binRpm, *binDir;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/poptBT.c
  ============================================================================
  $ cvs diff -u -r2.20.2.1 -r2.20.2.2 poptBT.c
  --- rpm/build/poptBT.c	18 Jan 2008 17:07:10 -0000	2.20.2.1
  +++ rpm/build/poptBT.c	24 Jan 2008 20:03:25 -0000	2.20.2.2
  @@ -47,10 +47,8 @@
   #define	POPT_TP			0x7470
   #define	POPT_TS			0x7473
   
  -/*@-redecl@*/
   /*@unchecked@*/
  -extern int _fsm_debug;
  -/*@=redecl@*/
  +int _rpmbuildFlags = 3;
   
   /*@-exportlocal@*/
   /*@unchecked@*/
  @@ -204,6 +202,12 @@
   	N_("do not execute any stages of the build"), NULL },
    { "nodeps", '\0', 0, NULL, RPMCLI_POPT_NODEPS,
   	N_("do not verify build dependencies"), NULL },
  + { "noautoprov", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &_rpmbuildFlags, 1,
  +	N_("disable automagic Provides: extraction"), NULL },
  + { "noautoreq", '\0', POPT_BIT_CLR|POPT_ARGFLAG_DOC_HIDDEN, &_rpmbuildFlags, 2,
  +	N_("disable automagic Requires: extraction"), NULL },
  + { "notinlsb", '\0', POPT_BIT_SET|POPT_ARGFLAG_DOC_HIDDEN, &_rpmbuildFlags, 4,
  +	N_("disable tags forbidden by LSB"), NULL },
   
    { "nodigest", '\0', POPT_ARGFLAG_DOC_HIDDEN, NULL, RPMCLI_POPT_NODIGEST,
           N_("don't verify package digest(s)"), NULL },
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/rpmbuild.h
  ============================================================================
  $ cvs diff -u -r2.92 -r2.92.2.1 rpmbuild.h
  --- rpm/build/rpmbuild.h	24 Dec 2007 23:58:47 -0000	2.92
  +++ rpm/build/rpmbuild.h	24 Jan 2008 20:03:25 -0000	2.92.2.1
  @@ -84,6 +84,9 @@
   #define STRIP_TRAILINGSPACE (1 << 0)
   #define STRIP_COMMENTS      (1 << 1)
   
  +/*@unchecked@*/
  +extern int _rpmbuildFlags;
  +
   #ifdef __cplusplus
   extern "C" {
   #endif
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/build/spec.c
  ============================================================================
  $ cvs diff -u -r2.175 -r2.175.2.1 spec.c
  --- rpm/build/spec.c	1 Jan 2008 02:00:16 -0000	2.175
  +++ rpm/build/spec.c	24 Jan 2008 20:03:25 -0000	2.175.2.1
  @@ -122,8 +122,8 @@
       p->header = headerNew();
       p->ds = NULL;
   
  -    p->autoProv = 1;
  -    p->autoReq = 1;
  +    p->autoProv = ((_rpmbuildFlags & 0x1) != 0);
  +    p->autoReq = ((_rpmbuildFlags & 0x2) != 0);
       
   #if 0    
       p->reqProv = NULL;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmpopt.in
  ============================================================================
  $ cvs diff -u -r2.47.2.1 -r2.47.2.2 rpmpopt.in
  --- rpm/rpmpopt.in	15 Jan 2008 14:19:18 -0000	2.47.2.1
  +++ rpm/rpmpopt.in	24 Jan 2008 20:03:25 -0000	2.47.2.2
  @@ -2,7 +2,7 @@
   # \verbatim
   #
   # @USRLIBRPM@/@configure_input@
  -# $Id: rpmpopt.in,v 2.47.2.1 2008/01/15 14:19:18 jbj Exp $
  +# $Id: rpmpopt.in,v 2.47.2.2 2008/01/24 20:03:25 jbj Exp $
   #
   # This file *should not be modified*. Local customizations
   # belong in /etc/popt, not here. This file will be replaced
  @@ -240,5 +240,9 @@
   	--POPTdesc=$"override build root" \
   	--POPTargs=$"DIRECTORY"
   
  +rpmbuild alias --lsb --noautoreq --noautoprov \
  +	--define '_use_internal_dependency_generator 0' \
  +	--notinlsb
  +
   # \endverbatim
   #*/
  @@ .
Received on Thu Jan 24 21:03:27 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.