summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-04-08 09:13:48 +0000
committerben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2002-04-08 09:13:48 +0000
commit6fe0035bb3eaf59d8a7fe13c230c534619dba04b (patch)
tree475c7a641fc84bf3a960ec615fb330c6aec8e4f5
parent34d29a9d9961f4ba481828385364fa7c9a6fb2dc (diff)
downloadrdiff-backup-6fe0035bb3eaf59d8a7fe13c230c534619dba04b.tar.gz
Thought about making separate redhat 7.x RPMs, now I don't think I'll bother
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@38 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rwxr-xr-xrdiff-backup/dist/makedist26
-rwxr-xr-xrdiff-backup/dist/makerpm14
-rw-r--r--rdiff-backup/dist/rdiff-backup.rh7x.spec5
3 files changed, 31 insertions, 14 deletions
diff --git a/rdiff-backup/dist/makedist b/rdiff-backup/dist/makedist
index 8a57ed2..a23fca3 100755
--- a/rdiff-backup/dist/makedist
+++ b/rdiff-backup/dist/makedist
@@ -10,7 +10,7 @@ filelist = [SourceDir + "/rdiff-backup", "CHANGELOG",
# Various details about the files must also be specified by the rpm
# spec template.
spec_template = "dist/rdiff-backup.spec"
-
+redhat_spec_template = "dist/rdiff-backup.rh7x.spec"
def GetVersion():
"""Return version string by reading in ./rdiff-backup"""
@@ -51,14 +51,20 @@ def MakeTar(version):
def MakeSpecFile(version):
"""Create spec file using spec template"""
+ def helper(spec_template, specfile):
+ """Added now that there are special redhat rpms"""
+ outfp = open(specfile, "w")
+ outfp.write("Version: %s\n" % version)
+ infp = open(spec_template, "r")
+ outfp.write(infp.read())
+ infp.close()
+ outfp.close()
+
specfile = "rdiff-backup-%s-1.spec" % version
- outfp = open(specfile, "w")
- outfp.write("Version: %s\n" % version)
- infp = open(spec_template, "r")
- outfp.write(infp.read())
- infp.close()
- outfp.close()
- return specfile
+ redhat_specfile = "rdiff-backup-%s-1.rh7x.spec" % version
+ helper(spec_template, specfile)
+ helper(redhat_spec_template, redhat_specfile)
+ return (specfile, redhat_specfile)
def Main():
cwd = os.getcwd()
@@ -69,8 +75,8 @@ def Main():
print "Processing version " + version
tarfile = MakeTar(version)
print "Made tar file " + tarfile
- specfile = MakeSpecFile(version)
- print "Made specfile " + specfile
+ specfiles = MakeSpecFile(version)
+ print "Made specfiles %s and %s" % specfiles
if __name__ == "__main__": Main()
diff --git a/rdiff-backup/dist/makerpm b/rdiff-backup/dist/makerpm
index 5f3a488..8fc3027 100755
--- a/rdiff-backup/dist/makerpm
+++ b/rdiff-backup/dist/makerpm
@@ -13,7 +13,8 @@ def GetVersion():
if len(sys.argv) == 1:
- specfile = "rdiff-backup-%s-1.spec" % GetVersion()
+ version = GetVersion()
+ specfile = "rdiff-backup-%s-1.spec" % version
print "Using specfile %s" % specfile
elif len(sys.argv) == 2:
specfile = sys.argv[1]
@@ -28,9 +29,16 @@ srcrpm = base+".src.rpm"
noarchrpm = base+".noarch.rpm"
tarfile = "-".join(base.split("-")[:-1]) + ".tar.gz"
-os.system("install -o root -g root -m 644 %s /usr/src/redhat/SOURCES" %
- tarfile)
+redhat_srcrpm = base+"rh7x.src.rpm"
+redhat_noarchrpm = base+"rh7x.noarch.rpm"
+redhat_patch = "rdiff-backup-rh7x.patch"
+redhat_specfile = "rdiff-backup-%s-1.rh7x.spec" % version
+
+os.system("install -o root -g root -m 644 %s %s /usr/src/redhat/SOURCES" %
+ tarfile, redhat_patch)
os.system("rpm -ba --sign -vv --target noarch " + specfile)
+os.system("rpm -ba --sign -vv --target noarch.rh7x " + redhat
+
#os.system("install -o ben -g ben -m 644 /usr/src/redhat/SRPMS/%s ." % srcrpm)
os.system("install -o ben -g ben -m 644 /usr/src/redhat/RPMS/noarch/%s ." %
noarchrpm)
diff --git a/rdiff-backup/dist/rdiff-backup.rh7x.spec b/rdiff-backup/dist/rdiff-backup.rh7x.spec
index cc72a38..7005e04 100644
--- a/rdiff-backup/dist/rdiff-backup.rh7x.spec
+++ b/rdiff-backup/dist/rdiff-backup.rh7x.spec
@@ -7,6 +7,7 @@ Copyright: GPL
Group: Applications/Archiving
BuildRoot: %{_tmppath}/%{name}-root
requires: librsync, python2 >= 2.2
+Patch: rdiff-backup-rh7x.patch
%description
rdiff-backup is a script, written in Python, that backs up one
@@ -22,7 +23,7 @@ differences from the previous backup will be transmitted.
%prep
%setup
-
+%patch
%build
%install
@@ -42,6 +43,8 @@ install -m 644 rdiff-backup.1 $RPM_BUILD_ROOT/usr/share/man/man1/rdiff-backup.1
%doc CHANGELOG COPYING README FAQ.html
%changelog
+* Sat Apr 6 2002 Ben Escoto <bescoto@stanford.edu>
+- Made new version for Redhat 7.x series
* Sun Nov 4 2001 Ben Escoto <bescoto@stanford.edu>
- Initial RPM