Commit Graph

112 Commits

Author SHA1 Message Date
Alexey Tourbin
9889b7db55 build/parseReqs.c: allow versioned path-like dependencies
(cherry picked from commit 3dff3cd285)
2009-06-17 06:30:31 +04:00
Alexey Tourbin
aebc9a42dd removed prehistoric multilib support 2009-03-10 14:27:38 +03:00
3d4f77766e rpmmacro.h (rpmGetPath, rpmExpand): Add __attribute__ ((sentinel))
(cherry picked from commit 328d65def9)
2008-11-13 06:46:42 +03:00
389d7864cf build/files.c, lib/signature.c: Do not include unused md5.h
(cherry picked from commit fe6df19341)
2008-11-12 05:29:08 +03:00
Alexey Tourbin
f5c325744d reqprov.c: Requires(post) should not optimize out bare Requires
Both "Requires(post): foo" and "Requires: foo" should be kept.
The first dependency is only for %post-script: after the package
is installed, rpm allows to remove "foo" (though apt-get does not).

This is only a quick fix, perhaps the code should be rewritten.
For instance, if with have both "Requires(pre): foo" and
"Requires(post): foo", those can be folded into single
"Requires(pre,post): foo".
2008-09-22 10:34:53 +00:00
Panu Matilainen
52f50790ff Add parenthesis to make gcc happy 2008-09-15 14:17:37 +04:00
Jindrich Novy
33a4004746 Don't allow multiple definition of PatchX or SourceX (rhbz#458261, rhbz#458260) 2008-09-15 14:17:34 +04:00
Alexey Tourbin
faeab68da2 build/files.c: re-fixed RPMTAG_SIZE calculation (cf. #2634) 2008-06-17 05:56:35 +04:00
Alexey Tourbin
96f8c331e6 Revert "fixed RPMTAG_SIZE calculation"
This reverts commit 62c081a169.
2008-06-17 04:54:46 +04:00
ace47d0fd2 build/parseSpec.c (readLine): Fix chomp in preprocess mode 2008-06-15 08:43:51 +00:00
Alexey Tourbin
63d7ecd4a7 parseSpec.c: fixed duplicating 'rpmbuild -bE' output (Kirill A. Shutemov, #5662) 2008-06-13 04:29:14 +04:00
Alexey Tourbin
3ad2b101d0 parsePreamble.c, parseSpec.c: allow noarch subpackages
Based on rpm5.org code.  However, I do not introduce special variables
to distinguish between toplevel package and subpackages -- we can tell
the difference simply by checking if current "pkg" and "spec->packages"
point to the same record (which is toplevel package in the linked list).
This idiom is already used in e.g. parsePreamble().
2008-06-13 01:08:51 +04:00
Alexey Tourbin
9814453966 backported LZMA payload compression from SuSE 2008-05-24 13:47:41 +04:00
Alexey Tourbin
0c38145bf9 files.c (addFile): check that each intermediate path component is directory (not symlink)
%install
install -pD /dev/null %buildroot/etc/rc.d/init.d/functions
ln -s rc.d/init.d %buildroot/etc/init.d
%files
/etc/init.d/functions
/etc/init.d

Old behaviour:
lrwxrwxrwx    1 root    root               11 Mar 26 01:15 /etc/init.d -> rc.d/init.d
-rwxr-xr-x    1 root    root                0 Mar 20 18:50 /etc/init.d/functions

New behaviour:
error: File path component must be directory (/tmp/.private/at/test-buildroot/etc/init.d): /tmp/.private/at/test-buildroot/etc/init.d/functions
2008-03-30 01:56:31 +03:00
Alexey Tourbin
14762e9fa9 files.c (addFile): file path must be canonical (new function pathIsCanonical)
This fixes invalid cpio entries for `/dir/.*' constructs.
Consider this:

%install
install -pD /dev/null %buildroot/root/.bashrc
%files
/root/.*

Old behaviour:
$ rpm -qlvp /home/at/RPM/RPMS/athlon/test-1.0-alt1.athlon.rpm
drwxr-xr-x    2 root    root                0 Mar 30 01:47 /root/.
drwxr-xr-x    2 root    root                0 Mar 30 01:47 /root/..
drwxr-xr-x    2 root    root                0 Mar 30 01:47 /root/../root
-rwxr-xr-x    1 root    root                0 Mar 29 16:51 /root/../root/.bashrc
-rwxr-xr-x    1 root    root                0 Mar 29 16:51 /root/./.bashrc
-rwxr-xr-x    1 root    root                0 Mar 29 16:51 /root/.bashrc
$

New behaviour:
$ LD_LIBRARY_PATH=... rpm -bi test.spec
...
Processing files: test-1.0-alt1
error: File path must be canonical: /root/.
error: File path must be canonical: /root/..

RPM build errors:
    File path must be canonical: /root/.
    File path must be canonical: /root/..
$

The problem here is that glob(3) `dir/.*' globs both '.' and '..'.
It is not clear whether or not glob(3) should glob '.' and '..'.

$ bash -c 'echo /var/empty/.*'
/var/empty/. /var/empty/..
$ ksh -c 'echo /var/empty/.*'
/var/empty/.*
$
2008-03-30 01:53:27 +03:00
Alexey Tourbin
bbcc1b2fe2 files.c (addFile): reassure that file path starts with '/' 2008-03-25 04:40:21 +03:00
Alexey Tourbin
b842bf5b4a files.c (addFile): file path must match buildroot
Sample %files section:

%files
/../gcc-common-buildroot

Old behaviour:
$ rpm -bb test.spec
...
Wrote: /home/at/RPM/RPMS/athlon/test-1.0-alt1.athlon.rpm
$ rpm -qlvp /home/at/RPM/RPMS/athlon/test-1.0-alt1.athlon.rpm |head
drwxr-xr-x    2 root    root                0 Mar 22 22:20 ldroot
-rw-r--r--    1 root    root               73 Mar 22 22:20 ldroot/.files:gcc-c++-common
-rw-r--r--    1 root    root              508 Mar 22 22:20 ldroot/.files:gcc-common
-rw-r--r--    1 root    root              147 Mar 22 22:20 ldroot/.files:gcc-fortran-common
-rw-r--r--    1 root    root              348 Mar 22 22:20 ldroot/.files:gcc-java-common
-rw-r--r--    1 root    root               66 Mar 22 22:20 ldroot/.files:gcc-treelang-common
-rw-r--r--    1 root    root              117 Mar 22 22:20 ldroot/.files:libgcj-common
-rwxr-xr-x    1 root    root               80 Mar 22 22:20 ldroot/.post:gcc-common
-rwxr-xr-x    1 root    root              124 Mar 22 22:20 ldroot/.preun:gcc-common
drwxr-xr-x    2 root    root                0 Mar 22 22:20 ldroot/etc
$

New behaviour:
$ LD_LIBRARY_PATH=... rpm -bl test.spec
Processing files: test-1.0-alt1
error: File doesn't match buildroot (/tmp/.private/at/test-buildroot): /tmp/.private/at/gcc-common-buildroot

RPM build errors:
    File doesn't match buildroot (/tmp/.private/at/test-buildroot): /tmp/.private/at/gcc-common-buildroot
$
2008-03-25 04:09:52 +03:00
86ad8ff400 build/expression.c (doPrimary): Read closing parenthesis, patch from Michael Schroeder 2007-02-23 00:05:37 +00: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
bbddd38759 Removed const from getBuildTime(). 2006-05-15 04:54:03 +04:00
df61ee0b9e Include local headers. 2006-05-15 03:26:57 +04:00
8787ee5d55 Fixed "type qualifiers ignored on function return type" issue. 2006-05-15 02:48:59 +04:00
ed45223b24 Ignore RPMTAG_BUILDROOT completely. 2006-04-03 16:41:43 +00:00
f4d4d3fe83 parseSpec: do not delete _target_cpu macro in PART_BUILDARCHITECTURES parser 2006-02-24 02:40:09 +00:00
b397ca0085 Ignore RPMTAG_BUILDROOT completely. 2006-01-11 13:53:32 +00:00
7c858e2594 parseSpec: in preprocess mode, allow undefined macros 2005-10-25 11:01:42 +00:00
c653aa8345 copyNextLine: set rpmSetBuiltinMacroLookupFailedOK for comments 2005-10-12 23:55:57 +00:00
b23ff9b127 implemented rpmSetBuiltinMacroLookupFailedOK 2005-10-12 23:35:17 +00:00
26dfd3df04 revision 2.55
date: 2004/04/08 20:27:53;  author: niemeyer;  state: Exp;  lines: +2 -1
Implemented multiline macro support.
2005-10-10 14:59:14 +00:00
d1c90ba20f revision 2.98
date: 2004/04/08 20:27:53;  author: niemeyer;  state: Exp;  lines: +41 -3
Implemented multiline macro support.
2005-10-10 12:57:57 +00:00
78ab7cf4b4 revision 2.95
date: 2003/05/15 13:53:41;  author: jbj;  state: Exp;  lines: +3 -1
- fix nested %if handling
2005-10-10 12:50:41 +00:00
7668e35c2e added docdir to tags_files_list 2005-10-10 12:26:34 +00:00
45504c22d2 disabled check for undefined macros in %prep, %build, %install and %clean 2005-10-06 21:06:44 +00:00
d04814401c Fixed rpmBuiltinMacroLookup support 2005-10-06 20:31:10 +00:00
019f77ade6 introduced _allow_undefined_macros 2005-10-06 19:15:36 +00:00
35877f4306 fixed spacing 2005-10-06 18:21:40 +00:00
0b1e0e9ee4 Implemented rpmBuiltinMacroLookup support 2005-10-06 18:21:26 +00:00
17dd47e199 fixed rpmExpand() usage in generateDepends()a 2005-10-06 18:20:37 +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
a2f087de09 fixed rpmExpand() usage in fillOutMainPackage() 2005-10-05 23:42:30 +00:00
6a14cbc258 fixed rpmExpand usage 2005-09-29 17:10:24 +00:00
4086557633 fixed rpmExpand usage 2005-09-29 16:01:17 +00:00
8fe647ebd6 corrected rpmExpand usage 2005-09-29 15:50:56 +00:00
ce8ad9b9f0 fix rpmExpandNumeric handling 2005-09-29 15:46:13 +00:00
b59b7dcd44 if AutoReq is disabled, do not add automatic interp deps 2005-08-17 13:48:55 +00:00
a90ad7ec38 parseRCPOT: better error reporting 2004-04-25 10:34:53 +00:00
b098983ecf implemented %_deps_optimization support
addReqProv: implemented old "provided requires" optimization
2004-01-29 13:46:42 +00:00
e6100cca84 indent 2004-01-29 12:57:54 +00:00