diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2022-08-19 15:15:36 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-21 22:51:42 +0100 |
commit | 48124db7ca06e9fd8879a2ff0d70f7ea63acfa37 (patch) | |
tree | aa76465b189f99b0e89d6a9ece7fcab3655e6e1f /meta/classes-global | |
parent | f2fb3c54a34ce925b7d3dff8955b78cb0e54e7f0 (diff) | |
download | poky-48124db7ca06e9fd8879a2ff0d70f7ea63acfa37.tar.gz |
package_rpm: Do not replace square brackets in %files
This reverts commit f95adb749619e70920c6cc6cd01c6d02cd348fd8.
At some point RPM stopped treating "[]?" characters in quoted text as a glob
This causes rpmbuild error [1] in oe-core if package contains filenames
with such characters [Yocto #13746]. Reverting commit which replaces "[]" with "?"
fixes the issue.
It should be safe now becuase rpm tries to use filename directly if not
found by glob [2].
[1]
| error: File not found: /mnt/builds/yocto/build/build/tmp/work/core2-64-poky-linux/testrpm/0.0.1-r0/package/42 All-Time Classics (E) ?v1.1?.cht
| File not found: /mnt/builds/yocto/build/build/tmp/work/core2-64-poky-linux/testrpm/0.0.1-r0/package/42 All-Time Classics (E) ?v1.1?.cht
|
[2] https://github.com/rpm-software-management/rpm/commit/c16c70cbd6b31cd93541d5c22d23ba98d212ad3d
(From OE-Core rev: 9916212b4810280108107d94cd2c0cd3e07ae6ed)
Signed-off-by: Pavel Zhukov <pavel.zhukov@huawei.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/package_rpm.bbclass | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/meta/classes-global/package_rpm.bbclass b/meta/classes-global/package_rpm.bbclass index 63c1b077a3..81a2060b68 100644 --- a/meta/classes-global/package_rpm.bbclass +++ b/meta/classes-global/package_rpm.bbclass | |||
@@ -199,8 +199,6 @@ python write_specfile () { | |||
199 | if path.endswith("DEBIAN") or path.endswith("CONTROL"): | 199 | if path.endswith("DEBIAN") or path.endswith("CONTROL"): |
200 | continue | 200 | continue |
201 | path = path.replace("%", "%%%%%%%%") | 201 | path = path.replace("%", "%%%%%%%%") |
202 | path = path.replace("[", "?") | ||
203 | path = path.replace("]", "?") | ||
204 | 202 | ||
205 | # Treat all symlinks to directories as normal files. | 203 | # Treat all symlinks to directories as normal files. |
206 | # os.walk() lists them as directories. | 204 | # os.walk() lists them as directories. |
@@ -220,8 +218,6 @@ python write_specfile () { | |||
220 | if dir == "CONTROL" or dir == "DEBIAN": | 218 | if dir == "CONTROL" or dir == "DEBIAN": |
221 | continue | 219 | continue |
222 | dir = dir.replace("%", "%%%%%%%%") | 220 | dir = dir.replace("%", "%%%%%%%%") |
223 | dir = dir.replace("[", "?") | ||
224 | dir = dir.replace("]", "?") | ||
225 | # All packages own the directories their files are in... | 221 | # All packages own the directories their files are in... |
226 | target.append('%dir "' + path + '/' + dir + '"') | 222 | target.append('%dir "' + path + '/' + dir + '"') |
227 | else: | 223 | else: |
@@ -236,8 +232,6 @@ python write_specfile () { | |||
236 | if file == "CONTROL" or file == "DEBIAN": | 232 | if file == "CONTROL" or file == "DEBIAN": |
237 | continue | 233 | continue |
238 | file = file.replace("%", "%%%%%%%%") | 234 | file = file.replace("%", "%%%%%%%%") |
239 | file = file.replace("[", "?") | ||
240 | file = file.replace("]", "?") | ||
241 | if conffiles.count(path + '/' + file): | 235 | if conffiles.count(path + '/' + file): |
242 | target.append('%config "' + path + '/' + file + '"') | 236 | target.append('%config "' + path + '/' + file + '"') |
243 | else: | 237 | else: |