Commit Graph

53 Commits

Author SHA1 Message Date
Alexey Tourbin
9b88480ee9 Merge branch 'altlinux-4.0' 2008-06-22 16:20:33 +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
Alexey Tourbin
3a5f6ded0a build/files.c (isDoc): rewrite 2008-05-13 03:03:26 +04:00
Panu Matilainen
cb7e8900d4 Make docdir checking stricter (rhbz#246819) 2008-05-13 02:51:23 +04:00
Alexey Tourbin
cfbf60d59c build/files.c: added /usr/share/gtk-doc/html to hardcoded docDirs list 2008-05-10 04:46:58 +04:00
Alexey Tourbin
3bd864026e build/files.c: check if the same files are packaged into a few subpackages
$ rpm -bl util-linux.spec
...
warning: file /bin/taskset is packaged into both util-linux and schedutils
warning: file /usr/bin/chrt is packaged into both util-linux and schedutils
warning: file /usr/bin/ionice is packaged into both util-linux and schedutils
warning: file /usr/bin/taskset is packaged into both util-linux and schedutils
warning: file /usr/share/man/man1/chrt.1.gz is packaged into both util-linux and schedutils
warning: file /usr/share/man/man1/ionice.1.gz is packaged into both util-linux and schedutils
warning: file /usr/share/man/man1/taskset.1.gz is packaged into both util-linux and schedutils
$
2008-03-30 23:58:15 +04:00
Alexey Tourbin
a0e8d41006 Merge branch 'altlinux-4.0' 2008-03-30 03:00:44 +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
63003fbeb9 Fix typos 2008-02-25 20:07:05 +00:00
Alexey Tourbin
d98ede246c build/files.c: fixed thinko: (pkg->fileList == NULL) means no %files section at all, not empty %files list 2008-01-26 19:26:25 +03:00
Alexey Tourbin
87d7449617 build/files.c: scriptlet dependencies need their flags
When I write e.g. 'Requires(pre): /usr/bin/perl' in specfile,
I get the following flags:

$ perl -le 'printf "%16b\n", 576'
      1001000000
$

which is RPMSENSE_PREREQ|RPMSENSE_SCRIPT_PRE.

Before this change, I do not specify what flags were generated
for scriptlet dependencies.  After this change, autogenerated
flags for %pre-script are:

$ perl -le 'printf "%16b\n", 16960'
 100001001000000
$

which is RPMSENSE_PREREQ|RPMSENSE_SCRIPT_PRE|RPMSENSE_FIND_REQUIRES.
I belive it looks sane now.

PS:
alias rpmdump='perl -MData::Dumper -MRPM::Header -e "print Dumper(RPM::Header->new(@ARGV))"'
2008-01-25 23:17:01 +03:00
Alexey Tourbin
4516457883 build/files.c (generateDepends,processBinaryFiles): do %pre/%post/... scriptlet dependencies 2008-01-25 21:27:01 +03:00
Alexey Tourbin
2e8a4a1722 build/files.c: new function hasSomeInstScript(), for diagnostics 2008-01-25 20:49:02 +03:00
Alexey Tourbin
1ceb28dc6e build/files.c: new function saveInstScript(), to find dependencies in %pre/%post/... scriptlets
This is based on the first part of my eariler patch:
https://bugzilla.altlinux.org/show_bug.cgi?id=7409
2008-01-25 20:48:28 +03:00
17dd47e199 fixed rpmExpand() usage in generateDepends()a 2005-10-06 18:20:37 +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
f3023c5d3b printDepMsg: enhanced output format a bit 2004-01-27 10:53:38 +00:00
592d03045b checkFiles(): be more verbose about command being executed 2003-11-08 23:01:40 +00:00
bbbaae5c81 checkFiles(): use %__spec_autodep_template/%__spec_autodep_post 2003-11-08 22:38:11 +00:00
7fbf427f43 made it compileable 2003-11-08 22:29:43 +00:00
e9567d1274 made it compileable 2003-11-08 22:26:24 +00:00
60e3bed786 checkFiles(): use %__spec_install_template/%__spec_install_post 2003-11-08 22:10:34 +00:00
ad5afe3ba5 fixed error reporting 2003-11-08 21:30:11 +00:00
25d07065d2 checkFiles(): use %{___build_cmd} like in generateDepends() 2003-11-08 21:18:06 +00:00
14a7cd51a4 fixed compilation warning 2003-11-08 20:59:59 +00:00
04408005de spelling fixes 2003-11-08 20:50:58 +00:00
8752de9a5f checkFiles: return OK if no files packaged 2003-11-08 20:36:35 +00:00
721a03b360 made it compileable 2003-11-08 20:21:04 +00:00
fe9941aa17 Backported %%_unpackaged_files_terminate_build support. 2003-11-08 20:03:25 +00:00
62c081a169 fixed RPMTAG_SIZE calculation 2003-09-27 15:26:14 +00:00
b8f6611467 processBinaryFiles: check return code from generateDepends() 2003-06-15 21:51:54 +00:00
9446493481 fixed %{?_customdocdir} check 2002-10-07 09:00:13 +00:00
8c54052899 implemented %_customdocdir 2002-10-04 22:19:25 +00:00
0f38948b77 always dereference: cp -prL 2002-10-04 21:57:01 +00:00
128c860b4b pass NVR to script as RPM_SUBPACKAGE_* 2002-09-04 12:27:43 +00:00
e6cc940ac0 fixed typos 2002-09-04 11:39:01 +00:00
7416bf9660 pass NVR to script 2002-09-04 11:32:02 +00:00
e091e882ad fixed typos 2002-09-03 17:53:17 +00:00
a917c479b4 added glibc-devel-static requirement autogeneration 2002-09-03 17:37:41 +00:00
6cc64fa4ea updated code to snapshot 2002-06-15 of 4_0 branch 2002-08-03 16:35:14 +00:00
af0e6ef16a Support setting the BuildHost tag explicitly rather than only from what the kernel thinks the system's hostname is (Owl). 2002-06-13 11:28:05 +00:00
a2c349b652 build cleanup 2002-03-26 15:29:18 +00:00
3820ce1ace sync with rpm4 branch 2002-03-26 00:18:02 +00:00