#55 Files included into SPEC via %include mess-up packaging

Mikhail Teterin

We build our own packages for PHP 5.3 and 5.4 here. Most of the stuff is common to both versions and we define it in SPECS/php-common. The php53.spec and php54.spec simply declare a couple of things and then include the common file. This works fine on Linux, but on Solaris I get the following error -- after the successful compile:
ERROR in /data/home/mteterin/rpmbuild/php/PKGMAPS/proto/php54-src.proto:
no object for <SPECS php-common=""> found in root directory
pkgmk: ERROR: unable to build pkgmap from prototype file
## Packaging was not successful.
pkgbuild: No error.

The .proto file, that pkgbuild generated, contains full path for most of the files, but the %include-ed (sub)spec file is listed with only a relative path:

i pkginfo=/data/home/mteterin/rpmbuild/php/PKGMAPS/pkginfo/php54-src.pkginfo
d none share 0755 root sys
d none share/src 0755 root sys
d none share/src/php54-5.4.16/SOURCES 0755 root other
d none share/src/php54-5.4.16/SPECS 0755 root other
f none share/src/php54-5.4.16/SOURCES/macros.php=/data/home/mteterin/rpmbuild/php/SOURCES/macros.php 644 root other
f none share/src/php54-5.4.16/SOURCES/macros.pear=/data/home/mteterin/rpmbuild/php/SOURCES/macros.pear 644 root other
f none share/src/php54-5.4.16/SOURCES/php.ini=/data/home/mteterin/rpmbuild/php/SOURCES/php.ini 644 root other
f none share/src/php54-5.4.16/SOURCES/php.conf=/data/home/mteterin/rpmbuild/php/SOURCES/php.conf 644 root other
f none share/src/php54-5.4.16/SOURCES/php-5.4.16.tar.bz2=/data/home/mteterin/rpmbuild/php/SOURCES/php-5.4.16.tar.bz2 644 root other
f none share/src/php54-5.4.16/SOURCES/php-sybase_ct_version.patch=/data/home/mteterin/rpmbuild/php/SOURCES/php-sybase_ct_version.patch 644 root other
f none share/src/php54-5.4.16/SOURCES/nostdc++-patch=/data/home/mteterin/rpmbuild/php/SOURCES/nostdc++-patch 644 root other
f none share/src/php54-5.4.16/SPECS/php-common=SPECS/php-common 644 root root
f none share/src/php54-5.4.16/SPECS/php54.spec=/data/timeinc/zones/s605202nj2vz999/root/data/home/mteterin/rpmbuild/php/SPECS/php54.spec 644 root other
s none share/src/php54-5.4.16/SPECS/..main.spec=php54.spec
f none share/src/php54-5.4.16/SPECS/..pkgbuild=/data/home/pkgbuild/lib/pkgbuild-1.3.105/version-file 444 root other


  • The attached patch works for me, but may not be the most elegant solution...

    I don't really know perl very well.