[Fedora-directory-commits] ldapserver/ldap/cm Makefile, 1.36, 1.37 fedora-patch.inf, 1.3, 1.4 genRpmPatch.pl, 1.2, 1.3 redhat-patch.inf, 1.3, 1.4
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Tue Oct 25 16:55:51 UTC 2005
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/cm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4939
Modified Files:
Makefile fedora-patch.inf genRpmPatch.pl redhat-patch.inf
Log Message:
[167982] Service Pack framework
Reporting the patch generation code to the trunk.
Index: Makefile
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/Makefile,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- Makefile 21 Oct 2005 19:21:12 -0000 1.36
+++ Makefile 25 Oct 2005 16:55:48 -0000 1.37
@@ -208,8 +208,8 @@
ABSRELDIR = $(ABSBUILD_ROOT)/built/release
GENRPMPATCH = $(ABSBUILD_ROOT)/ldap/cm/genRpmPatch.pl
PATCHINF = $(ABSBUILD_ROOT)/ldap/cm/fedora-patch.inf
-DATETIME = $(shell date +%Y%m%d-%H%M%S)
-SPEXT = .SP.$(DATETIME)
+DATETIME := $(shell date +%Y%m%d-%H%M%S)
+SPEXT := .SP.$(DATETIME)
# This is the directory where we put what we're making: the files which go on the CD.
ifndef INSTDIR
@@ -220,6 +220,8 @@
endif
endif
ABS_INSTDIR = $(shell cd $(INSTDIR); pwd)
+ABS_DISTDIR = $(ABSBUILD_ROOT)/../dist
+ESCAPED_ABS_DISTDIR = $(shell echo $(ABS_DISTDIR) | sed -e 's/\//\\\//g')
ifdef BUILD_PATCH
PATCHINSTDIR = $(ABS_INSTDIR)-SP
@@ -581,15 +583,6 @@
$(INSTDIR)/perldap/$(PERLDAP_ZIP_FILE) \
$(ADMSERV_DEP)
-ifdef BUILD_PATCH
-ifdef BUILD_RPM
-# create a patch
- $(GENRPMPATCH) -i $(RPM_BASE_NAME) -o $(NS_BUILD_FLAVOR) -r $(ABSRELDIR) -e $(SPEXT) -f $(PATCHINF) -v
- mv $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR) $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR).original
- ln -s $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR)$(SPEXT)/opt/$(RPM_BASE_NAME)-ds $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR)
-endif
-endif
-
# this gets setup, setup.inf, silent.inf, the zip wrapper, and svrcore, among others
ifeq ($(USE_SETUPUTIL),1)
cp -R $(SETUPUTIL_BINPATH)/* $(INSTDIR)
@@ -616,6 +609,22 @@
endif
endif
endif
+
+ifdef BUILD_PATCH
+# take care of files in components (e.g., a file in nsadmin.zip)
+ - at for pair in `grep "^compfile:" $(PATCHINF) | awk '{print $$3}'`; do \
+ zipfile=`echo $$pair | awk -F: '{print $$1}' | sed -e "s/%DISTDIR%/$(ESCAPED_ABS_DISTDIR)\/$(NSOBJDIR_NAME)/"` ; \
+ afile=`echo $$pair | awk -F: '{print $$2}'` ; \
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); $(UNZIP) -o $$zipfile $$afile ; \
+ done
+ifdef BUILD_RPM
+# create a patch
+ $(GENRPMPATCH) -i $(RPM_BASE_NAME) -o $(NS_BUILD_FLAVOR) -r $(ABSRELDIR) -e $(SPEXT) -f $(PATCHINF) -v
+ mv $(ABSRELDIR)/$(NS_BUILD_FLAVOR) $(ABSRELDIR)/$(NS_BUILD_FLAVOR).original
+ ln -s $(ABSRELDIR)/$(NS_BUILD_FLAVOR)$(SPEXT)/opt/$(RPM_BASE_NAME)-ds $(ABSRELDIR)/$(NS_BUILD_FLAVOR)
+endif
+endif
+
ifeq ($(USE_CONSOLE),1)
# create the slapd-client.zip file, which only has the ds jar file for the console and
# the ldap client utility programs
@@ -740,7 +749,8 @@
echo "[$(SLAPDSP)]" >> $(PATCHINSTDIR)/setup.inf
echo "ComponentInfoFile = $(SLAPDSP)/$(SLAPDSP).inf" >> $(PATCHINSTDIR)/setup.inf
# create a zip file based upon the $(PATCHINF) file
- cd $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR); zip -r $(PATCHINSTDIR)/$(SLAPDSP)/ns$(SLAPDSP).zip `egrep "^file:" $(PATCHINF) | awk -F: '{print $$3}'`
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); zip -r $(PATCHINSTDIR)/$(SLAPDSP)/ns$(SLAPDSP).zip `grep "^file:" $(PATCHINF) | awk -F: '{print $$3}'`
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); zip -r $(PATCHINSTDIR)/$(SLAPDSP)/ns$(SLAPDSP).zip -u `grep "^compfile:" $(PATCHINF) | awk -F: '{print $$4}'`
# put ns-config and needed libs in the $(PATCHINSTDIR)/$(SLAPDSP) directory
$(INSTALL) -m 755 $(RELDIR_32)/bin/slapd/admin/bin/ns-config $(PATCHINSTDIR)/$(SLAPDSP)
- at for file in $(PACKAGE_SETUP_LIBS_32) ; \
@@ -750,7 +760,8 @@
done
# create patch inf file: $(SLAPD).inf
cp $(OBJDIR)/slapd-patch.inf $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf
- cd $(ABSRELDIR)/slapd/$(NS_BUILD_FLAVOR); ls `egrep "^file:" $(PATCHINF) | egrep -v "setup/setup" | awk -F: '{print $$3}'` > $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); ls `grep "^file:" $(PATCHINF) | egrep -v "setup/setup" | awk -F: '{print $$3}'` > $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp
+ cd $(ABSRELDIR)/$(NS_BUILD_FLAVOR); ls `grep "^compfile:" $(PATCHINF) | awk -F: '{print $$4}'` >> $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp
echo `cat $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp` | sed -e "s/ /,/g" > $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp2
echo "BackupFiles="`cat $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp2`>> $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf
rm -f $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp $(PATCHINSTDIR)/$(SLAPDSP)/$(SLAPDSP).inf.tmp2
@@ -840,7 +851,7 @@
cleanDirectory:
cd $(LDAPDIR); $(MAKE) clean
- rm -rf $(BUILD_ROOT)/../dist/$(NC_BUILD_FLAVOR)
+ rm -rf $(BUILD_ROOT)/../dist/$(NSOBJDIR_NAME)
rm -rf $(BUILD_ROOT)/built/$(NS_BUILD_FLAVOR)
Index: fedora-patch.inf
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/fedora-patch.inf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- fedora-patch.inf 4 Oct 2005 17:03:43 -0000 1.3
+++ fedora-patch.inf 25 Oct 2005 16:55:49 -0000 1.4
@@ -39,9 +39,12 @@
# Sample Info file to generate service pack
# base: <builddir> containing the base package -- e.g., DS7.1
# file: <bugzilla number>: <patchfile>
+# compfile: bug#: <patch_zipfile>:<patchfile>
+# %DISTDIR% points <buildroot>/dist/<platform>
#
base: /share/dev4/fedora-ds/fds71/ships/20050526.1
file: 000001: README.txt
file: 000002: lib/libback-ldbm.*
+compfile: 000003: %DISTDIR%/adminserver/admin/nsadmin.zip:manual/help/help
Index: genRpmPatch.pl
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/genRpmPatch.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- genRpmPatch.pl 22 Sep 2005 16:48:16 -0000 1.2
+++ genRpmPatch.pl 25 Oct 2005 16:55:49 -0000 1.3
@@ -129,7 +129,13 @@
$pos = rindex($l, ":", $pos);
$pos++;
$file = substr($l, $pos);
- $file =~ s/[ ]//g;
+ $file =~ s/[ ]//g;
+ push(@newfiles, ($file));
+ } elsif ($l =~ /^compfile: /) {
+ $pos = rindex($l, ":", $pos);
+ $pos++;
+ $file = substr($l, $pos);
+ $file =~ s/[ ]//g;
push(@newfiles, ($file));
}
}
@@ -161,9 +167,9 @@
}
$optordbg = "";
-if ($builtdirname =~ /full/) {
+if ($builtdirname =~ /_DBG/) {
$optordbg = "dbg";
-} elsif ($builtdirname =~ /optimize/) {
+} elsif ($builtdirname =~ /_OPT/) {
$optordbg = "opt";
} else {
print(STDERR "ERROR: $builtdirname has no opt/debug info\n");
@@ -205,7 +211,7 @@
}
# Expand the RPM file to the $releasedir
-$workdir = $releasedir . "/slapd/" . $builtdirname . $extension;
+$workdir = $releasedir . "/" . $builtdirname . $extension;
mkdir($workdir, 0700);
chdir($workdir);
if (1 == $verbose) {
@@ -216,7 +222,7 @@
# Copy new files onto the expanded files
foreach $afile (@newfiles) {
- $srcfile = $releasedir . "/slapd/" . $builtdirname . "/" . $afile;
+ $srcfile = $releasedir . "/" . $builtdirname . "/" . $afile;
$destfile = $workdir . "/opt/" . $iddir . "/" . $afile;
$destdir = substr($destfile, 0, rindex($destfile, "/", length($destfile)));
if (!(-d $destdir)) {
Index: redhat-patch.inf
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/cm/redhat-patch.inf,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- redhat-patch.inf 4 Oct 2005 17:03:43 -0000 1.3
+++ redhat-patch.inf 25 Oct 2005 16:55:49 -0000 1.4
@@ -39,8 +39,11 @@
# Sample Info file to generate service pack
# base: <builddir> containing the base package -- e.g., DS7.1
# file: <bugzilla number>: <patchfile>
+# compfile: bug#: <patch_zipfile>:<patchfile>
+# %DISTDIR% points <buildroot>/dist/<platform>
#
base: /share/dev4/fedora-ds/fds71/ships/20050526.1
file: 000001: README.txt
file: 000002: lib/libback-ldbm.*
+compfile: 000003: %DISTDIR%/adminserver/admin/nsadmin.zip:manual/help/help
More information about the 389-commits
mailing list