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: 19-Jan-2008 00:04:08
Branch: HEAD Handle: 2008011823040500
Modified files:
rpm CHANGES rpmpopt.in
rpm/build files.c pack.c poptBT.c rpmbuild.h spec.c
Log:
- proof-of-concept rpmbuild --lsb implementation. ptooey!
Summary:
Revision Changes Path
1.2078 +1 -0 rpm/CHANGES
1.312 +3 -0 rpm/build/files.c
2.282 +4 -0 rpm/build/pack.c
2.22 +5 -3 rpm/build/poptBT.c
2.93 +3 -0 rpm/build/rpmbuild.h
2.177 +2 -5 rpm/build/spec.c
2.49 +5 -1 rpm/rpmpopt.in
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2077 -r1.2078 CHANGES
--- rpm/CHANGES 18 Jan 2008 17:41:28 -0000 1.2077
+++ rpm/CHANGES 18 Jan 2008 23:04:05 -0000 1.2078
@@ -1,4 +1,5 @@
5.0.0 -> 5.1a1:
+ - jbj: proof-of-concept rpmbuild --lsb implementation. ptooey!
- jbj: unbreak rpm-python, preserve existing symbol in released versions.
- jbj: fix several typos noticed by the translation project.
- jbj: add -noautoreq/--noautoprov options to rpmbuild.
@@ .
patch -p0 <<'@@ .'
Index: rpm/build/files.c
============================================================================
$ cvs diff -u -r1.311 -r1.312 files.c
--- rpm/build/files.c 9 Jan 2008 00:36:01 -0000 1.311
+++ rpm/build/files.c 18 Jan 2008 23:04:05 -0000 1.312
@@ -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.282 pack.c
--- rpm/build/pack.c 2 Jan 2008 10:26:04 -0000 2.281
+++ rpm/build/pack.c 18 Jan 2008 23:04:05 -0000 2.282
@@ -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)) {
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.21 -r2.22 poptBT.c
--- rpm/build/poptBT.c 18 Jan 2008 17:00:52 -0000 2.21
+++ rpm/build/poptBT.c 18 Jan 2008 23:04:05 -0000 2.22
@@ -48,7 +48,7 @@
#define POPT_TS 0x7473
/*@unchecked@*/
-int _rpmbuildAutoFlags = 3;
+int _rpmbuildFlags = 3;
/*@-exportlocal@*/
/*@unchecked@*/
@@ -202,10 +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, &_rpmbuildAutoFlags, 1,
+ { "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, &_rpmbuildAutoFlags, 2,
+ { "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.93 rpmbuild.h
--- rpm/build/rpmbuild.h 24 Dec 2007 23:58:47 -0000 2.92
+++ rpm/build/rpmbuild.h 18 Jan 2008 23:04:05 -0000 2.93
@@ -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.176 -r2.177 spec.c
--- rpm/build/spec.c 18 Jan 2008 17:00:52 -0000 2.176
+++ rpm/build/spec.c 18 Jan 2008 23:04:05 -0000 2.177
@@ -17,9 +17,6 @@
extern int specedit;
/*@=redecl@*/
-/*@unchecked@*/
-extern int _rpmbuildAutoFlags;
-
#define SKIPWHITE(_x) {while(*(_x) && (xisspace(*_x) || *(_x) == ',')) (_x)++;}
#define SKIPNONWHITE(_x){while(*(_x) &&!(xisspace(*_x) || *(_x) == ',')) (_x)++;}
@@ -125,8 +122,8 @@
p->header = headerNew();
p->ds = NULL;
- p->autoProv = ((_rpmbuildAutoFlags & 0x1) != 0);
- p->autoReq = ((_rpmbuildAutoFlags & 0x2) != 0);
+ 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.48 -r2.49 rpmpopt.in
--- rpm/rpmpopt.in 14 Jan 2008 14:52:39 -0000 2.48
+++ rpm/rpmpopt.in 18 Jan 2008 23:04:05 -0000 2.49
@@ -2,7 +2,7 @@
# \verbatim
#
# @USRLIBRPM@/@configure_input@
-# $Id: rpmpopt.in,v 2.48 2008/01/14 14:52:39 jbj Exp $
+# $Id: rpmpopt.in,v 2.49 2008/01/18 23:04:05 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 \
+ --target=i486 --define '_use_internal_dependency_generator 0' \
+ --notinlsb
+
# \endverbatim
#*/
@@ .
Received on Sat Jan 19 00:04:08 2008