[CVS] RPM: rpm/scripts/ perl.req

2008-10-26 Thread Arkadiusz Miskiewicz
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Arkadiusz Miskiewicz
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   26-Oct-2008 10:50:54
  Branch: HEAD Handle: 2008102609505300

  Modified files:
rpm/scripts perl.req

  Log:
Improved handling of here-docs and POD sections ([EMAIL PROTECTED]).

  Summary:
RevisionChanges Path
1.20+16 -23 rpm/scripts/perl.req
  

  patch -p0 '@@ .'
  Index: rpm/scripts/perl.req
  
  $ cvs diff -u -r1.19 -r1.20 perl.req
  --- rpm/scripts/perl.req  26 Oct 2008 09:32:59 -  1.19
  +++ rpm/scripts/perl.req  26 Oct 2008 09:50:53 -  1.20
  @@ -79,15 +79,22 @@
 open(FILE, $file) || return;
 
 while (FILE) {
  -
  -# skip the =  block
   
  -if ( ( m/^\s*\$(.*)\s*=\s*\s*['](.*)[']/) ||
  - ( m/^\s*\$(.*)\s*=\s*\s*(.*);/) ) {
  -  $tag = $2;
  -  while (FILE) {
  -( $_ =~ /^$tag/)  last;
  -  }
  +# skip the documentation
  +if ( /^ = (?: head\d | pod | item | over | back | (?: begin|end|for ) 
\s+\S+ ) \b/x ) {
  +$_ = FILE until /^=cut/ or eof;
  +next;
  +}
  +
  +# naively strip some comments... will screw m/\#/, m##, q##, qw##, qr##, 
etc, but these don't really matter for us 
  +s/(?! \\ ) # \b .+ //x;
  +
  +# skip the = label, print , warn , foo(label) blocks
  +# note: watch out for the binary  operator and comments
  +if ( m/ (?: = | \b[a-z][a-z_]+\(? ) \s*  \s* (?: q{0,2}([']) (.+) \1 
| ([a-zA-Z][a-zA-Z\d_]*) ) [\s;\)]* $/x ) {
  +my $tag = defined $2 ? $2 : $3;
  +$_ = FILE until m/^\Q$tag\E\s*$/ or eof;
  +next;
   }
   
   # skip q{} quoted sections - just hope we don't have curly brackets
  @@ -96,21 +103,7 @@
   if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/  ! 
m/^\s*(require|use)\s/ ) {
 $tag = $1;
 $tag =~ tr/{([/})]/;
  -  $_ = FILE until m/\Q$tag\E/;
  -}
  -
  -# skip the documentation
  -
  -# we should not need to have item in this if statement (it
  -# properly belongs in the over/back section) but people do not
  -# read the perldoc.
  -
  -if ( (m/^=(head[1-4]|pod|item)/) .. (m/^=(cut)/) ) {
  -  next;
  -}
  -
  -if ( (m/^=(over)/) .. (m/^=(back)/) ) {
  -  next;
  +  $_ = FILE until m/\Q$tag\E/ or eof;
   }
   
   # skip the data section
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-4_5: rpm/ CHANGES rpm/lib/ depends.c

2008-10-26 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   26-Oct-2008 19:29:51
  Branch: rpm-4_5  Handle: 2008102618295000

  Modified files:   (Branch: rpm-4_5)
rpm CHANGES
rpm/lib depends.c

  Log:
- add a relation to to force install-before-erase.
- display dependency loops as an error for now.

  Summary:
RevisionChanges Path
1.1360.2.116+2  -0  rpm/CHANGES
1.327.2.10  +20 -1  rpm/lib/depends.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.1360.2.115 -r1.1360.2.116 CHANGES
  --- rpm/CHANGES   29 Aug 2008 21:39:49 -  1.1360.2.115
  +++ rpm/CHANGES   26 Oct 2008 18:29:50 -  1.1360.2.116
  @@ -1,4 +1,6 @@
   4.4.9 - 4.5:
  + - jbj: add a relation to to force install-before-erase.
  + - jbj: display dependency loops as an error for now.
- glen: do not skip %clean from spec file
- robert: install rpmdeps and debugedit to pkglibdir as on HEAD
- jbj: fix: python ts.hdrFromFdno(fdno) segfault.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/depends.c
  
  $ cvs diff -u -r1.327.2.9 -r1.327.2.10 depends.c
  --- rpm/lib/depends.c 6 Jun 2008 14:50:46 -   1.327.2.9
  +++ rpm/lib/depends.c 26 Oct 2008 18:29:50 -  1.327.2.10
  @@ -2191,6 +2191,25 @@
}
 }
   
  +
  + /* Ensure that erasures follow installs during upgrades. */
  +  if (rpmteType(p) == TR_REMOVED  p-flink.Pkgid  p-flink.Pkgid[0]) 
{
  +
  + qi = rpmtsiInit(ts);
  + while ((q = rpmtsiNext(qi, TR_ADDED)) != NULL) {
  + if (strcmp(q-pkgid, p-flink.Pkgid[0]))
  + continue;
  + requires = rpmdsFromPRCO(q-PRCO, RPMTAG_NAME);
  + if (requires != NULL) {
  + /* XXX disable erased arrow reversal. */
  + p-type = TR_ADDED;
  + (void) addRelation(ts, p, selected, requires);
  + p-type = TR_REMOVED;
  + }
  + }
  + qi = rpmtsiFree(qi);
  +  }
  +
 if (_autobits != 0x)
 {
   
  @@ -2401,7 +2420,7 @@
const char * dp;
char buf[4096];
int msglvl = (anaconda || (rpmtsDFlags(ts)  
RPMDEPS_FLAG_DEPLOOPS))
  - ? RPMMESS_WARNING : RPMMESS_DEBUG;
  + ? RPMMESS_WARNING : RPMMESS_ERROR;
   ;
   
/* Unchain predecessor loop. */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/lib/ depends.c

2008-10-26 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   26-Oct-2008 19:42:51
  Branch: rpm-5_1  Handle: 2008102618425100

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/lib depends.c

  Log:
- add a relation to to force install-before-erase.
- display dependency loops as an error for now.

  Summary:
RevisionChanges Path
1.2288.2.142+2  -0  rpm/CHANGES
1.394.2.12  +19 -1  rpm/lib/depends.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.141 -r1.2288.2.142 CHANGES
  --- rpm/CHANGES   18 Oct 2008 08:04:12 -  1.2288.2.141
  +++ rpm/CHANGES   26 Oct 2008 18:42:51 -  1.2288.2.142
  @@ -1,4 +1,6 @@
   5.1.6 - 5.1.7:
  +- jbj: add a relation to to force install-before-erase.
  +- jbj: display dependency loops as an error for now.
   
   5.1.5 - 5.1.6:
   - jbj: verify trigger tests have same result as HEAD.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/depends.c
  
  $ cvs diff -u -r1.394.2.11 -r1.394.2.12 depends.c
  --- rpm/lib/depends.c 4 Oct 2008 18:13:43 -   1.394.2.11
  +++ rpm/lib/depends.c 26 Oct 2008 18:42:51 -  1.394.2.12
  @@ -2385,6 +2385,24 @@
}
 }
   
  + /* Ensure that erasures follow installs during upgrades. */
  +  if (rpmteType(p) == TR_REMOVED  p-flink.Pkgid  p-flink.Pkgid[0]) 
{
  +
  + qi = rpmtsiInit(ts);
  + while ((q = rpmtsiNext(qi, TR_ADDED)) != NULL) {
  + if (strcmp(q-pkgid, p-flink.Pkgid[0]))
  + continue;
  + requires = rpmdsFromPRCO(q-PRCO, RPMTAG_NAME);
  + if (requires != NULL) {
  + /* XXX disable erased arrow reversal. */
  + p-type = TR_ADDED;
  + (void) addRelation(ts, p, selected, requires);
  + p-type = TR_REMOVED;
  + }
  + }
  + qi = rpmtsiFree(qi);
  +  }
  +
 if (_autobits != 0x)
 {
   
  @@ -2597,7 +2615,7 @@
   #endif
const char * dp;
int msglvl = (anaconda || (rpmtsDFlags(ts)  
RPMDEPS_FLAG_DEPLOOPS))
  - ? RPMLOG_WARNING : RPMLOG_DEBUG;
  + ? RPMLOG_WARNING : RPMLOG_ERR;
   ;
   
/* Unchain predecessor loop. */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-4_5: rpm/scripts/ macros.php.in

2008-10-26 Thread Elan Ruusam�e
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Elan Ruusamäe
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   26-Oct-2008 21:53:13
  Branch: rpm-4_5  Handle: 2008102620531300

  Modified files:   (Branch: rpm-4_5)
rpm/scripts macros.php.in

  Log:
- typo

  Summary:
RevisionChanges Path
1.2.2.2 +1  -2  rpm/scripts/macros.php.in
  

  patch -p0 '@@ .'
  Index: rpm/scripts/macros.php.in
  
  $ cvs diff -u -r1.2.2.1 -r1.2.2.2 macros.php.in
  --- rpm/scripts/macros.php.in 7 Jun 2007 00:43:37 -   1.2.2.1
  +++ rpm/scripts/macros.php.in 26 Oct 2008 20:53:13 -  1.2.2.2
  @@ -1,4 +1,4 @@
  -# Perl specific macro definitions.
  +# PHP specific macro definitions.
   # To make use of these macros insert the following line into your spec file:
   # %include @USRLIBRPM@/macros.php
   
  @@ -6,4 +6,3 @@
   %define  __find_provides %{_usrlibrpm}/find-php-provides
   
   %define  php_pear_dir%{_datadir}/pear
  -
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-4_5: rpm/ CHANGES rpm/scripts/ php.prov php.req

2008-10-26 Thread Elan Ruusam�e
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Elan Ruusamäe
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   26-Oct-2008 22:30:48
  Branch: rpm-4_5  Handle: 2008102621304701

  Modified files:   (Branch: rpm-4_5)
rpm CHANGES
rpm/scripts php.prov php.req

  Log:
- update php dependency generators from PLD

  Summary:
RevisionChanges Path
1.1360.2.117+1  -0  rpm/CHANGES
1.2.2.1 +12 -9  rpm/scripts/php.prov
1.2.2.1 +72 -68 rpm/scripts/php.req
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.1360.2.116 -r1.1360.2.117 CHANGES
  --- rpm/CHANGES   26 Oct 2008 18:29:50 -  1.1360.2.116
  +++ rpm/CHANGES   26 Oct 2008 21:30:47 -  1.1360.2.117
  @@ -1,4 +1,5 @@
   4.4.9 - 4.5:
  + - glen: update php dependency generators from PLD
- jbj: add a relation to to force install-before-erase.
- jbj: display dependency loops as an error for now.
- glen: do not skip %clean from spec file
  @@ .
  patch -p0 '@@ .'
  Index: rpm/scripts/php.prov
  
  $ cvs diff -u -r1.2 -r1.2.2.1 php.prov
  --- rpm/scripts/php.prov  25 May 2007 18:34:16 -  1.2
  +++ rpm/scripts/php.prov  26 Oct 2008 21:30:48 -  1.2.2.1
  @@ -1,17 +1,20 @@
   #!/usr/bin/perl
   #
   #   #
  -# Small script to generate provides for php-pear/php-pecl   #
  +# Check system dependences between php-pear modules #
   #   #
  -# Adam Go³êbiowski [EMAIL PROTECTED]#
  -#   #
  -# Somehow based on previous work by:#
  -# Pawe³ Go³aszewski [EMAIL PROTECTED]   #
  +# Pawe³ Go³aszewski [EMAIL PROTECTED]#
   # Micha³ Moskal [EMAIL PROTECTED]#
  +# --#
  +# TODO: #
   #
   
  -# Contest: shrink this one to oneliner 
  -# Bonus  : and fit in 80 columns ;)
  +$pear = /usr/share/pear;
   
  -/package.xml/ and open(F, $_) foreach (@ARGV ? @ARGV :  );
  -/^\s+\name\([a-zA-Z0-9\_]+)\\/name\$/ and print php-pear-$1 while 
(F);
  +foreach (@ARGV ? @ARGV : ) {
  + chomp;
  + $f = $_;
  + next unless ($f =~ /$pear.*\.php$/);
  + $f =~ s/.*$pear\///;
  + print pear($f)\n;
  +}
  @@ .
  patch -p0 '@@ .'
  Index: rpm/scripts/php.req
  
  $ cvs diff -u -r1.2 -r1.2.2.1 php.req
  --- rpm/scripts/php.req   25 May 2007 18:34:16 -  1.2
  +++ rpm/scripts/php.req   26 Oct 2008 21:30:48 -  1.2.2.1
  @@ -1,78 +1,82 @@
  -#!/usr/bin/perl -W
  +#!/usr/bin/perl
   #
   #   #
  -# Check system dependencies between php-pear/php-pecl modules   #
  +# Check system dependences between php-pear modules #
   #   #
  -# Adam Go³êbiowski  [EMAIL PROTECTED]   #
  -#   #
  -# based on previous work by:#
   # Pawe³ Go³aszewski [EMAIL PROTECTED]#
  -# Micha³ Moskal [EMAIL PROTECTED]#
  -#   #
  -# - #
  -# ChangeLog:#
  -# 20031201: complete rewrite to use PEAR's package.xml, now handles #
  -#   all dependencies, including PHP modules (like php-gmp), #
  -#   and PECL extensions   (adamg)   #
  +# Micha³ Moskal [EMAIL PROTECTED]#
  +# --#
  +# TODO: #
  +# - extension_loaded - 

[CVS] RPM: rpm-4_5: rpm/scripts/ Makefile.am find-php-provides find-ph...

2008-10-26 Thread Elan Ruusam�e
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Elan Ruusamäe
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   26-Oct-2008 22:35:04
  Branch: rpm-4_5  Handle: 20020731151500196932003

  Modified files:   (Branch: rpm-4_5)
rpm/scripts Makefile.am
  Removed files:(Branch: rpm-4_5)
rpm/scripts find-php-provides find-php-requires
find-provides.php find-requires.php

  Log:
- newer php dependency generators are in php.req and php.prov

  Summary:
RevisionChanges Path
1.34.2.7+2  -1  rpm/scripts/Makefile.am
1.1 +0  -21 rpm/scripts/find-php-provides
1.1 +0  -31 rpm/scripts/find-php-requires
1.1 +0  -19 rpm/scripts/find-provides.php
1.1 +0  -46 rpm/scripts/find-requires.php
  

  patch -p0 '@@ .'
  Index: rpm/scripts/Makefile.am
  
  $ cvs diff -u -r1.34.2.6 -r1.34.2.7 Makefile.am
  --- rpm/scripts/Makefile.am   21 May 2008 20:48:22 -  1.34.2.6
  +++ rpm/scripts/Makefile.am   26 Oct 2008 21:35:03 -  1.34.2.7
  @@ -19,7 +19,7 @@
sql.prov sql.req symclash.py symclash.sh tcl.req tgpg trpm u_pkg.sh \
vpkg-provides.sh vpkg-provides2.sh \
macros.perl* macros.python* \
  - macros.php* find-*.php find-php-*
  + macros.php*
   
   installprefix = $(DESTDIR)
   
  @@ -44,3 +44,4 @@
rpm.daily rpm.log rpm.xinetd \
symclash.py symclash.sh tgpg u_pkg.sh \
vpkg-provides.sh vpkg-provides2.sh
  +
  @@ .
  rm -f rpm/scripts/find-php-provides '@@ .'
  Index: rpm/scripts/find-php-provides
  
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f rpm/scripts/find-php-requires '@@ .'
  Index: rpm/scripts/find-php-requires
  
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f rpm/scripts/find-provides.php '@@ .'
  Index: rpm/scripts/find-provides.php
  
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  rm -f rpm/scripts/find-requires.php '@@ .'
  Index: rpm/scripts/find-requires.php
  
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: lua/shadow/ copydir.c list.c strtoday.c useradd.c ...

2008-10-26 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm lua  Date:   27-Oct-2008 01:36:52
  Branch: rpm-5_1  Handle: 2008102700365101

  Modified files:   (Branch: rpm-5_1)
lua/shadow  copydir.c list.c strtoday.c useradd.c
rpm CHANGES

  Log:
- jbj: WRlua: preserve forward linkage by avoiding vmefail/get_date.

  Summary:
RevisionChanges Path
1.1.2.4 +8  -6  lua/shadow/copydir.c
1.1.2.4 +20 -8  lua/shadow/list.c
1.1.2.4 +5  -2  lua/shadow/strtoday.c
1.1.2.5 +22 -17 lua/shadow/useradd.c
1.2288.2.143+1  -0  rpm/CHANGES
  

  patch -p0 '@@ .'
  Index: lua/shadow/copydir.c
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 copydir.c
  --- lua/shadow/copydir.c  18 Aug 2008 19:47:16 -  1.1.2.3
  +++ lua/shadow/copydir.c  27 Oct 2008 00:36:52 -  1.1.2.4
  @@ -36,18 +36,18 @@
   #include system.h
   #include shadow_config.h
   
  -#ident $Id: copydir.c,v 1.1.2.3 2008/08/18 19:47:16 jbj Exp $
  +#ident $Id: copydir.c,v 1.1.2.4 2008/10/27 00:36:52 jbj Exp $
   
  -#include sys/stat.h
  -#include sys/types.h
   #include fcntl.h
  -#include stdio.h
   #include prototypes.h
   #include defines.h
   #ifdef WITH_SELINUX
   #include selinux/selinux.h
   static int selinux_enabled = -1;
   #endif
  +
  +#include debug.h
  +
   static const char *src_orig;
   static const char *dst_orig;
   
  @@ -125,7 +125,8 @@
if (sb-st_nlink == 1)
return 0;
   
  - lp = (struct link_name *) xmalloc (sizeof *lp);
  + lp = (struct link_name *) malloc (sizeof *lp);
  +assert(lp != NULL);
src_len = strlen (src_orig);
dst_len = strlen (dst_orig);
name_len = strlen (name);
  @@ -133,7 +134,8 @@
lp-ln_ino = sb-st_ino;
lp-ln_count = sb-st_nlink;
len = name_len - src_len + dst_len + 1;
  - lp-ln_name = xmalloc (len);
  + lp-ln_name = malloc (len);
  +assert(lp-ln_name != NULL);
snprintf (lp-ln_name, len, %s%s, dst_orig, name + src_len);
lp-ln_next = links;
links = lp;
  @@ .
  patch -p0 '@@ .'
  Index: lua/shadow/list.c
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 list.c
  --- lua/shadow/list.c 18 Aug 2008 19:47:17 -  1.1.2.3
  +++ lua/shadow/list.c 27 Oct 2008 00:36:52 -  1.1.2.4
  @@ -39,10 +39,13 @@
   #include system.h
   #include shadow_config.h
   
  -#ident $Id: list.c,v 1.1.2.3 2008/08/18 19:47:17 jbj Exp $
  +#ident $Id: list.c,v 1.1.2.4 2008/10/27 00:36:52 jbj Exp $
   
   #include prototypes.h
   #include defines.h
  +
  +#include debug.h
  +
   /*
* add_list - add a member to a list of group members
*
  @@ -69,7 +72,8 @@
 * old entries, and the new entries as well.
 */
   
  - tmp = (char **) xmalloc ((i + 2) * sizeof member);
  + tmp = (char **) malloc ((i + 2) * sizeof member);
  +assert(tmp != NULL);
   
/*
 * Copy the original list to the new list, then append the
  @@ -80,7 +84,9 @@
for (i = 0; list[i] != (char *) 0; i++)
tmp[i] = list[i];
   
  - tmp[i++] = xstrdup (member);
  + tmp[i] = strdup (member);
  +assert(tmp[i] != NULL);
  + i++;
tmp[i] = (char *) 0;
   
return tmp;
  @@ -116,7 +122,8 @@
 * old entries.
 */
   
  - tmp = (char **) xmalloc ((j + 1) * sizeof member);
  + tmp = (char **) malloc ((j + 1) * sizeof member);
  +assert(tmp != NULL);
   
/*
 * Copy the original list except the deleted members to the
  @@ -140,11 +147,14 @@
   
for (i = 0; list[i]; i++);
   
  - tmp = (char **) xmalloc ((i + 1) * sizeof (char *));
  + tmp = (char **) malloc ((i + 1) * sizeof (char *));
  +assert(tmp != NULL);
   
i = 0;
while (*list) {
  - tmp[i++] = xstrdup (*list);
  + tmp[i] = strdup (*list);
  +assert(tmp[i] != NULL);
  + i++;
list++;
}
   
  @@ -177,7 +187,8 @@
 * Make a copy since we are going to be modifying the list
 */
   
  - members = xstrdup (comma);
  + members =strdup (comma);
  +assert(members != NULL);
   
/*
 * Count the number of commas in the list
  @@ -199,7 +210,8 @@
 * Allocate the array we're going to store the pointers into.
 */
   
  - array = (char **) xmalloc (sizeof (char *) * i);
  + array = (char **) malloc (sizeof (char *) * i);
  +assert(array != NULL);
   
 

[CVS] RPM: lua/shadow/ copydir.c list.c strtoday.c useradd.c rpm/ CHAN...

2008-10-26 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm lua  Date:   27-Oct-2008 01:38:26
  Branch: HEAD Handle: 2008102700382600

  Modified files:
lua/shadow  copydir.c list.c strtoday.c useradd.c
rpm CHANGES

  Log:
- jbj: WRlua: preserve forward linkage by avoiding vmefail/get_date.

  Summary:
RevisionChanges Path
1.3 +8  -6  lua/shadow/copydir.c
1.4 +20 -8  lua/shadow/list.c
1.5 +5  -2  lua/shadow/strtoday.c
1.5 +22 -17 lua/shadow/useradd.c
1.2628  +1  -0  rpm/CHANGES
  

  patch -p0 '@@ .'
  Index: lua/shadow/copydir.c
  
  $ cvs diff -u -r1.2 -r1.3 copydir.c
  --- lua/shadow/copydir.c  18 Aug 2008 17:27:43 -  1.2
  +++ lua/shadow/copydir.c  27 Oct 2008 00:38:26 -  1.3
  @@ -36,18 +36,18 @@
   #include system.h
   #include shadow_config.h
   
  -#ident $Id: copydir.c,v 1.2 2008/08/18 17:27:43 jbj Exp $
  +#ident $Id: copydir.c,v 1.3 2008/10/27 00:38:26 jbj Exp $
   
  -#include sys/stat.h
  -#include sys/types.h
   #include fcntl.h
  -#include stdio.h
   #include prototypes.h
   #include defines.h
   #ifdef WITH_SELINUX
   #include selinux/selinux.h
   static int selinux_enabled = -1;
   #endif
  +
  +#include debug.h
  +
   static const char *src_orig;
   static const char *dst_orig;
   
  @@ -125,7 +125,8 @@
if (sb-st_nlink == 1)
return 0;
   
  - lp = (struct link_name *) xmalloc (sizeof *lp);
  + lp = (struct link_name *) malloc (sizeof *lp);
  +assert(lp != NULL);
src_len = strlen (src_orig);
dst_len = strlen (dst_orig);
name_len = strlen (name);
  @@ -133,7 +134,8 @@
lp-ln_ino = sb-st_ino;
lp-ln_count = sb-st_nlink;
len = name_len - src_len + dst_len + 1;
  - lp-ln_name = xmalloc (len);
  + lp-ln_name = malloc (len);
  +assert(lp-ln_name != NULL);
snprintf (lp-ln_name, len, %s%s, dst_orig, name + src_len);
lp-ln_next = links;
links = lp;
  @@ .
  patch -p0 '@@ .'
  Index: lua/shadow/list.c
  
  $ cvs diff -u -r1.3 -r1.4 list.c
  --- lua/shadow/list.c 18 Aug 2008 19:16:10 -  1.3
  +++ lua/shadow/list.c 27 Oct 2008 00:38:26 -  1.4
  @@ -39,10 +39,13 @@
   #include system.h
   #include shadow_config.h
   
  -#ident $Id: list.c,v 1.3 2008/08/18 19:16:10 jbj Exp $
  +#ident $Id: list.c,v 1.4 2008/10/27 00:38:26 jbj Exp $
   
   #include prototypes.h
   #include defines.h
  +
  +#include debug.h
  +
   /*
* add_list - add a member to a list of group members
*
  @@ -69,7 +72,8 @@
 * old entries, and the new entries as well.
 */
   
  - tmp = (char **) xmalloc ((i + 2) * sizeof member);
  + tmp = (char **) malloc ((i + 2) * sizeof member);
  +assert(tmp != NULL);
   
/*
 * Copy the original list to the new list, then append the
  @@ -80,7 +84,9 @@
for (i = 0; list[i] != (char *) 0; i++)
tmp[i] = list[i];
   
  - tmp[i++] = xstrdup (member);
  + tmp[i] = strdup (member);
  +assert(tmp[i] != NULL);
  + i++;
tmp[i] = (char *) 0;
   
return tmp;
  @@ -116,7 +122,8 @@
 * old entries.
 */
   
  - tmp = (char **) xmalloc ((j + 1) * sizeof member);
  + tmp = (char **) malloc ((j + 1) * sizeof member);
  +assert(tmp != NULL);
   
/*
 * Copy the original list except the deleted members to the
  @@ -140,11 +147,14 @@
   
for (i = 0; list[i]; i++);
   
  - tmp = (char **) xmalloc ((i + 1) * sizeof (char *));
  + tmp = (char **) malloc ((i + 1) * sizeof (char *));
  +assert(tmp != NULL);
   
i = 0;
while (*list) {
  - tmp[i++] = xstrdup (*list);
  + tmp[i] = strdup (*list);
  +assert(tmp[i] != NULL);
  + i++;
list++;
}
   
  @@ -177,7 +187,8 @@
 * Make a copy since we are going to be modifying the list
 */
   
  - members = xstrdup (comma);
  + members =strdup (comma);
  +assert(members != NULL);
   
/*
 * Count the number of commas in the list
  @@ -199,7 +210,8 @@
 * Allocate the array we're going to store the pointers into.
 */
   
  - array = (char **) xmalloc (sizeof (char *) * i);
  + array = (char **) malloc (sizeof (char *) * i);
  +assert(array != NULL);
   
/*
 * Empty list is special - 0 members, not 1 empty member. 

[CVS] RPM: lua/local/ lcrypto.h lxplib.h rpm/ CHANGES rpm/rpmio/ rpmlu...

2008-10-26 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm lua  Date:   27-Oct-2008 04:01:38
  Branch: HEAD Handle: 2008102703013701

  Modified files:
lua/local   lcrypto.h lxplib.h
rpm CHANGES
rpm/rpmio   rpmlua.c

  Log:
- lua: preload crypto in rpmlua.c.
- lua: lom.lua has requires(lxp), so preload lxp in rpmlua.c.

  Summary:
RevisionChanges Path
1.3 +5  -1  lua/local/lcrypto.h
1.3 +7  -1  lua/local/lxplib.h
1.2629  +2  -0  rpm/CHANGES
2.58+4  -0  rpm/rpmio/rpmlua.c
  

  patch -p0 '@@ .'
  Index: lua/local/lcrypto.h
  
  $ cvs diff -u -r1.2 -r1.3 lcrypto.h
  --- lua/local/lcrypto.h   24 Oct 2008 21:44:33 -  1.2
  +++ lua/local/lcrypto.h   27 Oct 2008 03:01:38 -  1.3
  @@ -1,7 +1,7 @@
   /*
* cal/lcrypto.h \
*
  - * $Id: lcrypto.h,v 1.2 2008/10/24 21:44:33 jbj Exp $
  + * $Id: lcrypto.h,v 1.3 2008/10/27 03:01:38 jbj Exp $
*
* Copyright © 2006 Keith Howe.
*
  @@ -42,6 +42,10 @@
   LUACRYPTO_API void luacrypto_setmeta (lua_State *L, const char *name);
   LUACRYPTO_API void luacrypto_set_info (lua_State *L);
   
  +
  +int luaopen_crypto(lua_State * L)
  + /[EMAIL PROTECTED] L @*/;
  +
   #define  CRYPTO_OPENSSL  1
   
   #endif
  @@ .
  patch -p0 '@@ .'
  Index: lua/local/lxplib.h
  
  $ cvs diff -u -r1.2 -r1.3 lxplib.h
  --- lua/local/lxplib.h24 Oct 2008 22:25:45 -  1.2
  +++ lua/local/lxplib.h27 Oct 2008 03:01:38 -  1.3
  @@ -21,6 +21,9 @@
*
*/
   
  +#ifndef LXPLIB_H
  +#define  LXPLIB_H
  +
   #define ParserType   Expat
   
   #define StartCdataKeyStartCdataSection
  @@ -39,4 +42,7 @@
   #define ProcessingInstructionKey ProcessingInstruction
   #define UnparsedEntityDeclKeyUnparsedEntityDecl
   
  -int luaopen_lxp (lua_State *L);
  +int luaopen_lxp (lua_State * L)
  + /[EMAIL PROTECTED] L @*/;
  +
  +#endif   /* LXPLIB_H */
  @@ .
  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2628 -r1.2629 CHANGES
  --- rpm/CHANGES   27 Oct 2008 00:38:26 -  1.2628
  +++ rpm/CHANGES   27 Oct 2008 03:01:37 -  1.2629
  @@ -1,5 +1,7 @@
   
   5.2a2 - 5.2a3:
  +- jbj: lua: preload crypto in rpmlua.c.
  +- jbj: lua: lom.lua has requires(lxp), so preload lxp in rpmlua.c.
   - jbj: WRlua: preserve forward linkage by avoiding vmefail/get_date.
   - jbj: lua: add virgin luasocket-2.0.2 lua bindings (unused atm).
   - jbj: lua: add license, and compile lxplib.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmlua.c
  
  $ cvs diff -u -r2.57 -r2.58 rpmlua.c
  --- rpm/rpmio/rpmlua.c17 Aug 2008 18:31:34 -  2.57
  +++ rpm/rpmio/rpmlua.c27 Oct 2008 03:01:37 -  2.58
  @@ -21,6 +21,8 @@
   #include lrexlib.h
   #include luuid.h
   #include lwrs.h
  +#include lcrypto.h
  +#include lxplib.h
   #endif
   
   #include unistd.h
  @@ -90,6 +92,8 @@
{rex_pcre, luaopen_rex_pcre},
{uuid, luaopen_uuid},
{wrs, luaopen_wrs},
  + {crypto, luaopen_crypto},
  + {lxp, luaopen_lxp},
{local, luaopen_local},
   #endif
{rpm, luaopen_rpm},
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmrc.c rpm/rpmio/ librpmio.vers rpml...

2008-10-26 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   27-Oct-2008 05:05:22
  Branch: HEAD Handle: 2008102704052100

  Modified files:
rpm CHANGES
rpm/lib rpmrc.c
rpm/rpmio   librpmio.vers rpmlua.c rpmlua.h

  Log:
- jbj: lua: display rudimentary info about lua with --showrc.

  Summary:
RevisionChanges Path
1.2630  +1  -0  rpm/CHANGES
2.248   +14 -1  rpm/lib/rpmrc.c
2.77+2  -0  rpm/rpmio/librpmio.vers
2.59+6  -3  rpm/rpmio/rpmlua.c
2.14+6  -0  rpm/rpmio/rpmlua.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2629 -r1.2630 CHANGES
  --- rpm/CHANGES   27 Oct 2008 03:01:37 -  1.2629
  +++ rpm/CHANGES   27 Oct 2008 04:05:21 -  1.2630
  @@ -1,5 +1,6 @@
   
   5.2a2 - 5.2a3:
  +- jbj: lua: display rudimentary info about lua with --showrc.
   - jbj: lua: preload crypto in rpmlua.c.
   - jbj: lua: lom.lua has requires(lxp), so preload lxp in rpmlua.c.
   - jbj: WRlua: preserve forward linkage by avoiding vmefail/get_date.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.247 -r2.248 rpmrc.c
  --- rpm/lib/rpmrc.c   22 Aug 2008 04:45:44 -  2.247
  +++ rpm/lib/rpmrc.c   27 Oct 2008 04:05:21 -  2.248
  @@ -1010,10 +1010,23 @@
   {const char * s = rpmExpand(%{?optflags}, NULL);
fprintf(fp, %-21s : %s\n, optflags, ((s  *s) ? s : (not set)));
s = _free(s);
  +
  + fprintf(fp, \nLUA MODULES:\n);
   /[EMAIL PROTECTED]@*/
  - s = rpmExpand(rpmMacrofiles, NULL);
  + s = rpmExpand(rpmluaFiles, NULL);
  +/[EMAIL PROTECTED]@*/
  + fprintf(fp, %-21s : %s\n, luafiles, ((s  *s) ? s : (not set)));
  + s = _free(s);
  +/[EMAIL PROTECTED]@*/
  + s = rpmExpand(rpmluaPath, NULL);
   /[EMAIL PROTECTED]@*/
  + fprintf(fp, %-21s : %s\n, luapath, ((s  *s) ? s : (not set)));
  + s = _free(s);
  +
fprintf(fp, \nMACRO DEFINITIONS:\n);
  +/[EMAIL PROTECTED]@*/
  + s = rpmExpand(rpmMacrofiles, NULL);
  +/[EMAIL PROTECTED]@*/
fprintf(fp, %-21s : %s\n, macrofiles, ((s  *s) ? s : (not 
set)));
s = _free(s);
   }
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.76 -r2.77 librpmio.vers
  --- rpm/rpmio/librpmio.vers   22 Sep 2008 01:56:35 -  2.76
  +++ rpm/rpmio/librpmio.vers   27 Oct 2008 04:05:21 -  2.77
  @@ -337,6 +337,8 @@
   rpmlogGetCallback;
   rpmlogSetFile;
   rpmlogSetMask;
  +rpmluaFiles;
  +rpmluaPath;
   rpmluaCheckScript;
   rpmluaDelVar;
   rpmluaFiles;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmlua.c
  
  $ cvs diff -u -r2.58 -r2.59 rpmlua.c
  --- rpm/rpmio/rpmlua.c27 Oct 2008 03:01:37 -  2.58
  +++ rpm/rpmio/rpmlua.c27 Oct 2008 04:05:21 -  2.59
  @@ -59,7 +59,10 @@
/[EMAIL PROTECTED] L, fileSystem @*/;
   
   /[EMAIL PROTECTED]@*/
  -const char *rpmluaFiles = RPMLUAFILES;
  +const char * rpmluaFiles = RPMLUAFILES;
  +
  +/[EMAIL PROTECTED]@*/
  +const char * rpmluaPath = %{?_rpmhome}%{!?_rpmhome: USRLIBRPM 
}/lua/?.lua;
   
   rpmlua rpmluaGetGlobalState(void)
   {
  @@ -114,8 +117,8 @@
lua_call(L, 1, 0);
   /[EMAIL PROTECTED]@*/
   }
  -{const char * _lua_path = rpmGetPath(%{?_rpmhome}%{!?_rpmhome: 
USRLIBRPM }, /lua/?.lua, NULL);
  - if (_lua_path != NULL) {
  +{const char * _lua_path = rpmGetPath(rpmluaPath, NULL);
  + if (_lua_path != NULL) {
lua_pushliteral(L, LUA_PATH);
lua_pushstring(L, _lua_path);
_lua_path = _free(_lua_path);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmlua.h
  
  $ cvs diff -u -r2.13 -r2.14 rpmlua.h
  --- rpm/rpmio/rpmlua.h2 Aug 2008 22:37:39 -   2.13
  +++ rpm/rpmio/rpmlua.h27 Oct 2008 04:05:21 -  2.14
  @@ -47,6 +47,12 @@
   extern C {
   #endif
   
  +/[EMAIL PROTECTED]@*/
  +extern const char * rpmluaFiles;
  +
  +/[EMAIL PROTECTED]@*/
  +extern const char * rpmluaPath;
  +
   /[EMAIL PROTECTED]@*/
   /[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/
   rpmlua 

[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/lib/ rpmrc.c rpm/rpmio/ librpmio....

2008-10-26 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  [EMAIL PROTECTED]
  Module: rpm  Date:   27-Oct-2008 05:07:47
  Branch: rpm-5_1  Handle: 2008102704074601

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/lib rpmrc.c
rpm/rpmio   librpmio.vers rpmlua.c rpmlua.h

  Log:
- jbj: lua: display rudimentary info about lua with --showrc.

  Summary:
RevisionChanges Path
1.2288.2.144+1  -0  rpm/CHANGES
2.234.2.4   +14 -1  rpm/lib/rpmrc.c
2.63.2.4+2  -0  rpm/rpmio/librpmio.vers
2.52.2.3+4  -1  rpm/rpmio/rpmlua.c
2.12.2.1+6  -0  rpm/rpmio/rpmlua.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.143 -r1.2288.2.144 CHANGES
  --- rpm/CHANGES   27 Oct 2008 00:36:51 -  1.2288.2.143
  +++ rpm/CHANGES   27 Oct 2008 04:07:46 -  1.2288.2.144
  @@ -1,4 +1,5 @@
   5.1.6 - 5.1.7:
  +- jbj: lua: display rudimentary info about lua with --showrc.
   - jbj: WRlua: preserve forward linkage by avoiding vmefail/get_date.
   - jbj: add a relation to to force install-before-erase.
   - jbj: display dependency loops as an error for now.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.234.2.3 -r2.234.2.4 rpmrc.c
  --- rpm/lib/rpmrc.c   22 Aug 2008 04:46:47 -  2.234.2.3
  +++ rpm/lib/rpmrc.c   27 Oct 2008 04:07:47 -  2.234.2.4
  @@ -981,10 +981,23 @@
   {const char * s = rpmExpand(%{?optflags}, NULL);
fprintf(fp, %-21s : %s\n, optflags, ((s  *s) ? s : (not set)));
s = _free(s);
  +
  + fprintf(fp, \nLUA MODULES:\n);
   /[EMAIL PROTECTED]@*/
  - s = rpmExpand(rpmMacrofiles, NULL);
  + s = rpmExpand(rpmluaFiles, NULL);
  +/[EMAIL PROTECTED]@*/
  + fprintf(fp, %-21s : %s\n, luafiles, ((s  *s) ? s : (not set)));
  + s = _free(s);
  +/[EMAIL PROTECTED]@*/
  + s = rpmExpand(rpmluaPath, NULL);
   /[EMAIL PROTECTED]@*/
  + fprintf(fp, %-21s : %s\n, luapath, ((s  *s) ? s : (not set)));
  + s = _free(s);
  +
fprintf(fp, \nMACRO DEFINITIONS:\n);
  +/[EMAIL PROTECTED]@*/
  + s = rpmExpand(rpmMacrofiles, NULL);
  +/[EMAIL PROTECTED]@*/
fprintf(fp, %-21s : %s\n, macrofiles, ((s  *s) ? s : (not 
set)));
s = _free(s);
   }
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.63.2.3 -r2.63.2.4 librpmio.vers
  --- rpm/rpmio/librpmio.vers   15 Oct 2008 19:45:15 -  2.63.2.3
  +++ rpm/rpmio/librpmio.vers   27 Oct 2008 04:07:47 -  2.63.2.4
  @@ -313,6 +313,8 @@
   rpmlogGetCallback;
   rpmlogSetFile;
   rpmlogSetMask;
  +rpmluaFiles;
  +rpmluaPath;
   rpmluaCheckScript;
   rpmluaDelVar;
   rpmluaFiles;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmlua.c
  
  $ cvs diff -u -r2.52.2.2 -r2.52.2.3 rpmlua.c
  --- rpm/rpmio/rpmlua.c17 Aug 2008 18:49:37 -  2.52.2.2
  +++ rpm/rpmio/rpmlua.c27 Oct 2008 04:07:47 -  2.52.2.3
  @@ -58,6 +58,9 @@
   /[EMAIL PROTECTED]@*/
   const char *rpmluaFiles = RPMLUAFILES;
   
  +/[EMAIL PROTECTED]@*/
  +const char * rpmluaPath = %{?_rpmhome}%{!?_rpmhome: USRLIBRPM 
}/lua/?.lua;
  +
   rpmlua rpmluaGetGlobalState(void)
   {
   /[EMAIL PROTECTED]@*/
  @@ -109,7 +112,7 @@
lua_call(L, 1, 0);
   /[EMAIL PROTECTED]@*/
   }
  -{const char * _lua_path = rpmGetPath(%{?_rpmhome}%{!?_rpmhome: 
USRLIBRPM }, /lua/?.lua, NULL);
  +{const char * _lua_path = rpmGetPath(rpmluaPath, NULL);
if (_lua_path != NULL) {
lua_pushliteral(L, LUA_PATH);
lua_pushstring(L, _lua_path);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmlua.h
  
  $ cvs diff -u -r2.12 -r2.12.2.1 rpmlua.h
  --- rpm/rpmio/rpmlua.h10 Mar 2008 04:46:20 -  2.12
  +++ rpm/rpmio/rpmlua.h27 Oct 2008 04:07:47 -  2.12.2.1
  @@ -47,6 +47,12 @@
   extern C {
   #endif
   
  +/[EMAIL PROTECTED]@*/
  +extern const char * rpmluaFiles;
  +
  +/[EMAIL PROTECTED]@*/
  +extern const char * rpmluaPath;
  +
   /[EMAIL PROTECTED]@*/
   /[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/ /[EMAIL PROTECTED]@*/
   rpmlua rpmluaGetGlobalState(void)
  @@ .