[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6372/8267] package_ipk: Clean up Source entry in ipk packages
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6372/8267] package_ipk: Clean up Source entry in ipk packages
- Date: Sun, 17 Dec 2017 04:45:08 +0000 (UTC)
commit 31a9e8d114e23208d074d6e319aa95bbf688e513
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Fri Jun 16 09:42:30 2017 +0100
package_ipk: Clean up Source entry in ipk packages
There is the potential for sensitive information to leak through the urls
there and removing it brings this into the behavior of the other package
backends since filtering it is likely error prone.
Since ipks don't appear to be generated at all if we don't set this, set
the field to the recipe name used (basename only, no paths). This avoids
information leaking. We may want to drop the field if opkg can allow that
at a future point but the recipe name is a suitable identifier for now.
Reported-by: Andrej Valek <andrej valek siemens com>
(From OE-Core rev: ec7feb9d315f357b9a073425a31b352ec24ddfd9)
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/package_ipk.bbclass | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index d2ce3b3..8e69b5d 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -57,6 +57,7 @@ def ipk_write_pkg(pkg, d):
outdir = d.getVar('PKGWRITEDIRIPK')
pkgdest = d.getVar('PKGDEST')
+ recipesource = os.path.basename(d.getVar('FILE'))
localdata = bb.data.createCopy(d)
root = "%s/%s" % (pkgdest, pkg)
@@ -205,10 +206,7 @@ def ipk_write_pkg(pkg, d):
ctrlfile.write("Replaces: %s\n" % bb.utils.join_deps(rreplaces))
if rconflicts:
ctrlfile.write("Conflicts: %s\n" % bb.utils.join_deps(rconflicts))
- src_uri = localdata.getVar("SRC_URI").strip() or "None"
- if src_uri:
- src_uri = re.sub("\s+", " ", src_uri)
- ctrlfile.write("Source: %s\n" % " ".join(src_uri.split()))
+ ctrlfile.write("Source: %s\n" % recipesource)
ctrlfile.close()
for script in ["preinst", "postinst", "prerm", "postrm"]:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]