diff options
author | Pavel Zhukov <pavel@zhukoff.net> | 2022-08-19 15:15:36 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-31 16:54:17 +0100 |
commit | ed9a6adb5de70bb3f7d99152c0f158600c60b561 (patch) | |
tree | d133d68b3436cdfb578e59d8dbfd6e7f15eda9b5 /meta/classes | |
parent | 1983fc67f50149e1ba498ea4c481a0751ac2353e (diff) | |
download | poky-ed9a6adb5de70bb3f7d99152c0f158600c60b561.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: c17806bcd3b16b7c13606325195270d7c799a5c9)
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>
(cherry picked from commit 9916212b4810280108107d94cd2c0cd3e07ae6ed)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/package_rpm.bbclass | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass index e9ff1f7e65..bbbef3793f 100644 --- a/meta/classes/package_rpm.bbclass +++ b/meta/classes/package_rpm.bbclass | |||
@@ -193,8 +193,6 @@ python write_specfile () { | |||
193 | if path.endswith("DEBIAN") or path.endswith("CONTROL"): | 193 | if path.endswith("DEBIAN") or path.endswith("CONTROL"): |
194 | continue | 194 | continue |
195 | path = path.replace("%", "%%%%%%%%") | 195 | path = path.replace("%", "%%%%%%%%") |
196 | path = path.replace("[", "?") | ||
197 | path = path.replace("]", "?") | ||
198 | 196 | ||
199 | # Treat all symlinks to directories as normal files. | 197 | # Treat all symlinks to directories as normal files. |
200 | # os.walk() lists them as directories. | 198 | # os.walk() lists them as directories. |
@@ -214,8 +212,6 @@ python write_specfile () { | |||
214 | if dir == "CONTROL" or dir == "DEBIAN": | 212 | if dir == "CONTROL" or dir == "DEBIAN": |
215 | continue | 213 | continue |
216 | dir = dir.replace("%", "%%%%%%%%") | 214 | dir = dir.replace("%", "%%%%%%%%") |
217 | dir = dir.replace("[", "?") | ||
218 | dir = dir.replace("]", "?") | ||
219 | # All packages own the directories their files are in... | 215 | # All packages own the directories their files are in... |
220 | target.append('%dir "' + path + '/' + dir + '"') | 216 | target.append('%dir "' + path + '/' + dir + '"') |
221 | else: | 217 | else: |
@@ -230,8 +226,6 @@ python write_specfile () { | |||
230 | if file == "CONTROL" or file == "DEBIAN": | 226 | if file == "CONTROL" or file == "DEBIAN": |
231 | continue | 227 | continue |
232 | file = file.replace("%", "%%%%%%%%") | 228 | file = file.replace("%", "%%%%%%%%") |
233 | file = file.replace("[", "?") | ||
234 | file = file.replace("]", "?") | ||
235 | if conffiles.count(path + '/' + file): | 229 | if conffiles.count(path + '/' + file): |
236 | target.append('%config "' + path + '/' + file + '"') | 230 | target.append('%config "' + path + '/' + file + '"') |
237 | else: | 231 | else: |