Commit Graph

21 Commits

Author SHA1 Message Date
252df9b61a Fix %patch and %autopatch
* build/parsePrep.c (doPatch): Do not pass null pointer to sprintf.
(doAutopatchMacro): Do not pass null pointer to strcmp.

Fixes: 9c18a402 ("Make %autopatch and %patch accept -pg")
2020-01-04 10:43:44 +00:00
9c18a40269 Make %autopatch and %patch accept -pg
* parsePrep.c (doPatch): Change strip argument type to const char *.
(doPatchMacro, doAutopatchMacro): Change opt_p variable type to char *,
change checking of opt_p: it can be either a number or a 'g' symbol
assuming that -pg is a valid option for patch command.
2019-12-15 21:57:32 +00:00
efe5536cfe build: add %autopatch support
%autopatch is a directive to apply all patches, it supports -p<num> and
-F<num> options

%autopatch was initially introduced in rpm.org with version 4.11 but with
different implementation.
2019-10-03 21:14:18 +03:00
Ivan Zakharyaschev
6be20da468 headerNVR() replaced by the new header{NVRD,Name{,Version}}() in trivial cases
These are the cases where even the release was not needed (so, the
disttag is not needed, too), or one case where the filename is
contructed (and it doesn't include the disttag).

Now grep -Ee 'headerNVR[^D]' will show the remaining non-trivial
cases, where adapting to disttags may be needed.
2019-02-26 23:16:13 +03:00
Igor Vlasenko
8468c6fb06 build/parsePrep.c: add %patch -F<N> support (ALT#27662)
In modern rpms both %patch -F <N> and %patch -F<N> are valid option
calls whereas old -F implementation supported -F <N> syntax only.
This patch adds support for %patch -F<N> syntax.
2012-08-24 08:30:44 +00:00
c4a3fcd4ca Cleanup previous commit 2012-08-16 23:16:57 +00:00
Igor Vlasenko
f1e0f83d55 build/parsePrep.c: %patch -F, -d options and macros (ALT#27627)
Backport from rpm 4.10:
%patch -F <fuzz>
%patch -d <destdir>
support for macros:
%{_default_patch_fuzz}  Default fuzz level for %patch in spec file.
%{_default_patch_flags} Default patch flags
2012-08-16 22:57:17 +00:00
Igor Vlasenko
c9505d67b9 build.c,parsePrep.c: quoted buildSubdir, to allow spaces. 2011-08-06 18:38:30 +03:00
Alexey Tourbin
19e6de9d5e added support for .xz/.lzma compressed sources and patches
This also fixes some bugs:
- %uncompress macro never worked;
- %patch -s -b .orig never worked.
2009-09-29 14:18:01 +04:00
Igor Vlasenko
4e4aa34d9d build/parsePrep.c (doUntar): Remove "-L" option from "unzip" invocation
This unzip mode is more compatible with rpm4.4 and rpm5.
Fixes ALT#17407

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
(cherry picked from commit 01431efc01)
2009-09-29 09:09:08 +04:00
5ed9fe36e1 build/parsePrep.c: Change %setup to enable -q option by default, introduce -v option to make %setup as verbose as before this change. 2006-11-19 00:24:59 +00:00
1e771d2a5a build/parsePrep.c: Change %patch to be more verbose by default, introduce -s option to make %patch as silent as before this change (#10261). 2006-11-19 00:21:38 +00:00
35877f4306 fixed spacing 2005-10-06 18:21:40 +00:00
c0a2a76a04 fix readLine() usage 2005-10-06 15:24:35 +00:00
9fcb008b58 fixed rpmExpand() usage 2005-10-06 01:21:27 +00:00
58e1dad6cc fixed compilation warnings 2003-11-24 18:59:03 +00:00
a98dc9173f fixed merge typo 2002-03-26 15:29:49 +00:00
57b558feb3 sync with rpm4 branch 2002-03-26 00:00:27 +00:00
1409bd2b85 sync with rpm4 branch: added preprocess mode 2002-03-25 23:09:32 +00:00
dee952c2f8 sync with rpm4 branch: include local headers 2002-03-25 22:02:39 +00:00
82a4763c66 Initial revision 2002-03-25 20:16:26 +00:00