summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2024-04-19 14:19:28 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-04-22 22:05:57 +0100
commit704ee342e05415b2284b6e2945bd46463ea8e68c (patch)
tree186d9d8348d313d629576d10182bc57e97ed9395
parent8e933ce81ebfe3b8e97577272f83616ade02dd78 (diff)
downloadpoky-704ee342e05415b2284b6e2945bd46463ea8e68c.tar.gz
package_rpm: remove support for DIRFILES
This was added here: https://git.yoctoproject.org/poky/commit/?id=2f42ef8d8fb1febf28252b98884cebabc931f720 It's undocumented, untested, rpm-specific, and currently broken, and to begin with looks like a workaround for Tizen/smack security label conflicts elsewhere. (From OE-Core rev: fe13868dbcca2dcb89f0c9d9d346021e9348929e) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes-global/package_rpm.bbclass31
1 files changed, 9 insertions, 22 deletions
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass
index 2e3e4e8c79..790ccbfaf0 100644
--- a/meta/classes-global/package_rpm.bbclass
+++ b/meta/classes-global/package_rpm.bbclass
@@ -191,7 +191,7 @@ python write_specfile () {
191 if not len(depends_dict[dep]): 191 if not len(depends_dict[dep]):
192 array.append("%s: %s" % (tag, dep)) 192 array.append("%s: %s" % (tag, dep))
193 193
194 def walk_files(walkpath, target, conffiles, dirfiles): 194 def walk_files(walkpath, target, conffiles):
195 # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories 195 # We can race against the ipk/deb backends which create CONTROL or DEBIAN directories
196 # when packaging. We just ignore these files which are created in 196 # when packaging. We just ignore these files which are created in
197 # packages-split/ and not package/ 197 # packages-split/ and not package/
@@ -233,22 +233,12 @@ python write_specfile () {
233 return False 233 return False
234 dirs[:] = [dir for dir in dirs if not move_to_files(dir)] 234 dirs[:] = [dir for dir in dirs if not move_to_files(dir)]
235 235
236 # Directory handling can happen in two ways, either DIRFILES is not set at all 236 for dir in dirs:
237 # in which case we fall back to the older behaviour of packages owning all their 237 if dir == "CONTROL" or dir == "DEBIAN":
238 # directories 238 continue
239 if dirfiles is None: 239 p = path + '/' + dir
240 for dir in dirs: 240 # All packages own the directories their files are in...
241 if dir == "CONTROL" or dir == "DEBIAN": 241 target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"')
242 continue
243 p = path + '/' + dir
244 # All packages own the directories their files are in...
245 target.append(get_attr(dir) + '%dir "' + escape_chars(p) + '"')
246 elif path:
247 # packages own only empty directories or explict directory.
248 # This will prevent the overlapping of security permission.
249 attr = get_attr(path)
250 if (not files and not dirs) or path in dirfiles:
251 target.append(attr + '%dir "' + escape_chars(path) + '"')
252 242
253 for file in files: 243 for file in files:
254 if file == "CONTROL" or file == "DEBIAN": 244 if file == "CONTROL" or file == "DEBIAN":
@@ -363,9 +353,6 @@ python write_specfile () {
363 localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg) 353 localdata.setVar('OVERRIDES', d.getVar("OVERRIDES", False) + ":" + pkg)
364 354
365 conffiles = oe.package.get_conffiles(pkg, d) 355 conffiles = oe.package.get_conffiles(pkg, d)
366 dirfiles = localdata.getVar('DIRFILES')
367 if dirfiles is not None:
368 dirfiles = dirfiles.split()
369 356
370 splitname = pkgname 357 splitname = pkgname
371 358
@@ -430,7 +417,7 @@ python write_specfile () {
430 srcrpostrm = splitrpostrm 417 srcrpostrm = splitrpostrm
431 418
432 file_list = [] 419 file_list = []
433 walk_files(root, file_list, conffiles, dirfiles) 420 walk_files(root, file_list, conffiles)
434 if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": 421 if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
435 bb.note("Not creating empty RPM package for %s" % splitname) 422 bb.note("Not creating empty RPM package for %s" % splitname)
436 else: 423 else:
@@ -522,7 +509,7 @@ python write_specfile () {
522 509
523 # Now process files 510 # Now process files
524 file_list = [] 511 file_list = []
525 walk_files(root, file_list, conffiles, dirfiles) 512 walk_files(root, file_list, conffiles)
526 if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1": 513 if not file_list and localdata.getVar('ALLOW_EMPTY', False) != "1":
527 bb.note("Not creating empty RPM package for %s" % splitname) 514 bb.note("Not creating empty RPM package for %s" % splitname)
528 else: 515 else: