summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/archiver.bbclass2
-rw-r--r--meta/classes/package_rpm.bbclass11
2 files changed, 10 insertions, 3 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index b01b0784cd..7056714bd7 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -573,7 +573,7 @@ python do_remove_tarball(){
573 except (TypeError, OSError): 573 except (TypeError, OSError):
574 pass 574 pass
575} 575}
576do_remove_taball[deptask] = "do_archive_scripts_logs" 576do_remove_tarball[deptask] = "do_archive_scripts_logs"
577do_package_write_rpm[postfuncs] += "do_remove_tarball " 577do_package_write_rpm[postfuncs] += "do_remove_tarball "
578export get_licenses 578export get_licenses
579export get_package 579export get_package
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 58a9aac779..b999c28a9b 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -585,11 +585,17 @@ python write_specfile () {
585 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 585 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
586 source_number = 0 586 source_number = 0
587 patch_number = 0 587 patch_number = 0
588 workdir = d.getVar('WORKDIR', True)
588 for source in source_list: 589 for source in source_list:
590 # The rpmbuild doesn't need the root permission, but it needs
591 # to know the file's user and group name, the only user and
592 # group in fakeroot is "root" when working in fakeroot.
593 os.chown("%s/%s" % (workdir, source), 0, 0)
589 spec_preamble_top.append('Source' + str(source_number) + ': %s' % source) 594 spec_preamble_top.append('Source' + str(source_number) + ': %s' % source)
590 source_number += 1 595 source_number += 1
591 if patch_list: 596 if patch_list:
592 for patch in patch_list: 597 for patch in patch_list:
598 os.chown("%s/%s" % (workdir, patch), 0, 0)
593 print_deps(patch, "Patch" + str(patch_number), spec_preamble_top, d) 599 print_deps(patch, "Patch" + str(patch_number), spec_preamble_top, d)
594 patch_number += 1 600 patch_number += 1
595 # We need a simple way to remove the MLPREFIX from the package name, 601 # We need a simple way to remove the MLPREFIX from the package name,
@@ -1142,8 +1148,9 @@ python do_package_rpm () {
1142 cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'" 1148 cmd = cmd + " --define '_rpmfc_magic_path " + magicfile + "'"
1143 cmd = cmd + " --define '_tmppath " + workdir + "'" 1149 cmd = cmd + " --define '_tmppath " + workdir + "'"
1144 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM': 1150 if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) and d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True).upper() == 'SRPM':
1145 cmdsrpm = cmd + " --define '_sourcedir " + workdir + "' --define '_srcrpmdir " + creat_srpm_dir(d) + "'" 1151 cmd = cmd + " --define '_sourcedir " + workdir + "'"
1146 cmdsrpm = 'fakeroot ' + cmdsrpm + " -bs " + outspecfile 1152 cmdsrpm = cmd + " --define '_srcrpmdir " + creat_srpm_dir(d) + "'"
1153 cmdsrpm = cmdsrpm + " -bs " + outspecfile
1147 cmd = cmd + " -bb " + outspecfile 1154 cmd = cmd + " -bb " + outspecfile
1148 1155
1149 # Build the source rpm package ! 1156 # Build the source rpm package !