summaryrefslogtreecommitdiff
path: root/rdiff-backup/dist/makerpm
diff options
context:
space:
mode:
Diffstat (limited to 'rdiff-backup/dist/makerpm')
-rwxr-xr-xrdiff-backup/dist/makerpm27
1 files changed, 10 insertions, 17 deletions
diff --git a/rdiff-backup/dist/makerpm b/rdiff-backup/dist/makerpm
index 70c5edc..a5e87e3 100755
--- a/rdiff-backup/dist/makerpm
+++ b/rdiff-backup/dist/makerpm
@@ -6,7 +6,7 @@ SourceDir = "src"
def GetVersion():
"""Return version string by reading in ./rdiff-backup"""
- fp = open(SourceDir + "/rdiff-backup", "r")
+ fp = open("rdiff-backup", "r")
match = re.search("Version (.*?) ", fp.read())
fp.close()
return match.group(1)
@@ -26,21 +26,14 @@ else:
base = ".".join(specfile.split(".")[:-1])
srcrpm = base+".src.rpm"
-noarchrpm = base+".noarch.rpm"
+i386rpm = base+".i386.rpm"
+source_rpm = base+".src.rpm"
tarfile = "-".join(base.split("-")[:-1]) + ".tar.gz"
-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("install -o root -g root -m 644 %s /usr/src/redhat/SOURCES" %
- (tarfile,))
-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)
+assert not os.system("install -o root -g root -m 644 %s "
+ "/usr/src/redhat/SOURCES" % (tarfile,))
+assert not os.system("rpm -ba --sign -vv --target i386 " + specfile)
+assert not os.system("install -o ben -g ben -m 644 "
+ "/usr/src/redhat/RPMS/i386/%s ." % i386rpm)
+assert not os.system("install -o ben -g ben -m 644 "
+ "/usr/src/redhat/SRPMS/%s ." % source_rpm)