Commit Graph

924 Commits

Author SHA1 Message Date
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
5632ef5ac2 rpmrc.c: classify SSE2-capable CPUs as "pentium4" 2008-06-12 04:45:53 +04:00
9376fa4c22 rpmrc.c (is_pentium3): Add new p3 family models
http://download.intel.com/design/processor/applnots/24161832.pdf page 22
2008-06-05 21:52:02 +00:00
669c2e04c2 rpmrc.c (is_pentium4): Add new p4 models
http://download.intel.com/design/processor/applnots/24161832.pdf page 23
Patch from alexander@npo-inform.com
2008-06-05 21:52:02 +00:00
Alexey Tourbin
52b2499aff rpmio.c: implemented cpio hints for rsyncable_gzwrite() 2008-05-30 22:23:16 +04:00
Alexey Tourbin
8d5e355e06 rpmio.c: deal with partial rsyncable_gzwrite() return 2008-05-30 20:09:17 +04:00
Alexey Tourbin
f7b5ee1e80 rpmio.c: implemented rscynable_gzwrite() 2008-05-30 20:08:14 +04:00
Alexey Tourbin
c761902bcb rpmio.c: introduced rpmGZFILE wrapper for gzdio 2008-05-30 20:05:08 +04:00
Alexey Tourbin
dbfaf59314 scripts/rpm2cpio.sh: deal with decompressors 2008-05-24 20:24:39 +04:00
Alexey Tourbin
6f575ecded spec: _binary_payload w9.gzdio 2008-05-24 13:58:47 +04:00
Panu Matilainen
86679b599f Plug a memleak in lzclose() 2008-05-24 13:48:14 +04:00
Alexey Tourbin
9814453966 backported LZMA payload compression from SuSE 2008-05-24 13:47:41 +04:00
Alexey Tourbin
fdca55d311 spec: workaround config.rpath problem
(cherry picked from commit d78d0be4fd)
2008-05-24 12:28:57 +04:00
6535b7f1cc rpmReadPackageManifest: Fix comments handling 2008-04-08 15:28:53 +00: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
Alexey Tourbin
845a750521 spec: removed 'BuildConflicts: rpm-devel' (checked with buildreq) 2008-03-25 03:27:37 +03:00
Alexey Tourbin
c0e8d34d90 spec: buildreq 2008-03-25 03:27:14 +03:00
d534994b4e relative: Fix potential NULL dereference (ALT#14067) 2008-01-17 18:12:23 +00:00
aa45567317 platform.in (%__autoreconf): Add deprecation warning 2008-01-07 22:44:30 +00:00
4b478a1305 platform.in: Add %warning() macro
Signed-off-by: Alex V. Myltsev <avm@altlinux.ru>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2008-01-07 22:41:47 +00:00
a3d0fe14b1 platform.in: Add %autoreconf macro (ALT#13925). 2008-01-07 22:38:10 +00:00
b21c2f85da relative.c: Reindent 2007-12-13 23:17:31 +00:00
d013b49984 relative.c: Use heap for memory allocation
Stack allocation is unsafe:
$ ulimit -s 64; relative /b `perl -e 'print "/a" x 32768'`
2007-12-13 23:17:31 +00:00
986ef530f3 relative.c: Introduce xstrdup(), reindent 2007-12-13 23:17:30 +00:00
c97667fad5 relative.c: Fix normalize()
Testcase:
$ relative //a/. /
a/
2007-12-13 23:17:30 +00:00
afed4d2da9 relative.c: Reindent 2007-12-13 23:17:30 +00:00
2949819ce6 relative.c: s/__progname/program_invocation_short_name/ 2007-12-13 23:17:30 +00:00
4c5f7e154d relative.c: Reindent 2007-12-13 23:17:30 +00:00
Alex V. Myltsev
9a21fe32e7 relative.c: fix an off-by-one (kind of) error.
Test:
 $ relative /a/b/ /ax/
should print "../a/b/".
2007-12-13 23:17:30 +00:00
Kirill A. Shutemov
629b4b18bc Add armv5tejl support 2007-11-10 13:26:47 +00:00
Kirill A. Shutemov
80426c365f rpmrc.in: remove -fsigned-char from optflags for arm* 2007-11-10 13:26:46 +00:00
Kirill A. Shutemov
f002179ab8 Refresh ARM support
Add arm and armb CANONARCH: common CANONARCH for general purpose distribution. It's armv4 without Thumb now.
Update %optflags for ARM
Add %arm macros: list of all ARM processors
2007-11-10 13:26:45 +00:00
Kirill A. Shutemov
06eb5ce9e7 Do not check STACK entry in ARM ELF files 2007-11-10 13:26:44 +00:00
a6f4e2a41e More %_target_platform tweaks: cleanup build_os filter; initialize %_gnueabi; replace %_gnu with %_gnueabi in %_target_platform 2007-11-10 13:26:21 +00:00
Kirill A. Shutemov
ddab849441 - %_gnu appended to %_target_platform
- %_gnu is -gnueabi for gnueabi targets
2007-11-10 15:45:30 +03:00
427194b25b 4.0.4-alt77.M40.1
- rpmdb/header.c (guess_category_value):
  Allowed overriding locale using $RPM_LANGUAGE_I18NSTRING for header FindI18NString.
- build.c (buildForTarget):
  Changed to pass --wildcards to tar on build from tarball (RH#206841).
- GROUPS: Added "System/Legacy libraries" (#12629).
- scripts/find-package.in (FindPackage):
  Speedup index processing order by checking binary index prior to complete index.
2007-08-28 16:59:22 +00:00
fd480b9df1 scripts/find-package.in (FindPackage): Check binary index prior to complete index 2007-08-25 15:38:42 +00:00
536e800af7 GROUPS: Add "System/Legacy libraries" (ALT#12629) 2007-08-25 15:35:20 +00:00
8c2a3da7c4 build.c (buildForTarget): Pass --wildcards to tar on build from tarball (RH#206841)
GNU tar no longer accepts globbing by default for compatibility
with traditional implementations:
http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00001.html

rpm needs to work with upstream GNU tar as well, the --wildcards option
has been supported since 2001 so older versions shouldn't suffer either.

Based on patch from http://hg.rpm.org/rpm-4.4.x?cs=1a3109298938
2007-08-12 10:31:25 +00:00
3dfa753c83 rpmdb/header.c (guess_category_value): Allow overriding locale using $RPM_LANGUAGE_I18NSTRING for headerFindI18NString
We want to abuse I18NSTRING for storing arbitrary data, e.g. GIT commit identifiers.
To achieve this, we have to bypass setlocale(3) check.
2007-06-22 11:14:39 +00:00
1105a961ca 4.0.4-alt77
- rpmio/macro.c (doFoo):
  Fixed potential buffer overflow in %%homedir macro processing.
- lib/formats.c (i18nTag):
  Fixed potential null dereference on header without RPMTAG_NAME (RH#239557).
- lib/package.c (readPackageHeaders):
  Removed insecure legacy providePackageNVR() call.
- lib/query.c (showQueryPackage):
  Fixed potential null dereference in QUERY_FOR_DEFAULT mode.
2007-05-18 12:47:58 +00:00
8440b43b3c lib/query.c (showQueryPackage): Fix potential null dereference in QUERY_FOR_DEFAULT mode 2007-05-18 00:54:19 +00:00
4c4920e2d8 lib/query.c (showQueryPackage): Check all header strings to resize buffer (CVE-2006-5466, RH#212833)
Backported from rpm-4.4.8
2007-05-18 00:33:44 +00:00
6e81fe8727 lib/package.c (readPackageHeaders): Remove insecure legacy providePackageNVR() call 2007-05-18 00:20:42 +00:00
8a189d448b lib/formats.c (i18nTag): Avoid segfault on header without RPMTAG_NAME (RH#239557)
https://lists.dulug.duke.edu/pipermail/rpm-devel/2007-May/002653.html
2007-05-16 13:20:45 +00:00
20400c24b8 rpmio/macro.c (doFoo): Fix potential buffer overflow in %homedir macro processing 2007-04-11 18:18:01 +00:00