On Wed, 2003-11-19 at 10:08, Thomas Lotterer wrote:
> On Tue, Nov 18, 2003, Tres Seaver wrote:
>
> > I have banged around a bit further on the OpenPKG specfile I wrote for
> > Zope, but still can't figure out how to use %{l_rpmtool} to get the
> > ownership / attributes set properly for the "data" directory. [...]
> >
> Tres,
> i tried the following spec and results look good and as expected.
>
> ##
> ## test.spec -- OpenPKG RPM Specification
> ##
>
> # package information
> Name: test
> Summary: Test
> URL: http://www.openpkg.org/
> Vendor: Dr. John Doe
> Packager: The OpenPKG Project
> Distribution: OpenPKG [JUNK]
> Group: Misc
> License: GPL
> Version: 0.8.15
> Release: 20031119
>
> # build information
> Prefix: %{l_prefix}
> BuildRoot: %{l_buildroot}
> BuildPreReq: OpenPKG, openpkg >= 20030718
> PreReq: OpenPKG, openpkg >= 20030718
> AutoReq: no
> AutoReqProv: no
>
> %description
> Test
>
> %prep
>
> %build
>
> %install
> rm -rf $RPM_BUILD_ROOT
> %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/test/var
> %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
> '%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/test/var'
>
> %files -f files
>
> %clean
> rm -rf $RPM_BUILD_ROOT
>
> $ rpm -ba test.spec
> $ su -
> # rpm -Uvh .../test-0.8.15-20031119.ix86-freebsd4.9-cw.rpm
> $ exit
> $ rpm2cpio <.../test-0.8.15-20031119.ix86-freebsd4.9-cw.rpm | cpio -itv
> drwxr-xr-x 3 cw cw 0 Nov 19 16:05 ./cw/var/test
> drwx------ 2 cw-r cw-r 0 Nov 19 16:05 ./cw/var/test/var
> $ ls -ld /cw/var/test/var
> drwx------ 2 cw-r cw-r 512 Nov 19 16:02 /cw/var/test/var
Odd, I don't get that when running from OpenPKG 1.3.1 (I had to modify
your spec to make the prereq work)::
$ uname -a
SunOS blade 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Blade-100
$ rpm -qa
binutils-2.14-1.3.0
zlib-1.1.4-1.3.0
readline-4.3-1.3.0
getopt-20030307-1.3.0
python-2.2.3-1.3.0
fsl-1.2.0-1.3.0
vim-6.2.57-1.3.0
openpkg-1.3.1-1.3.1
make-3.80-1.3.0
gcc-3.3-1.3.0
expat-1.95.6-1.3.0
openssl-0.9.7b-1.3.0
perl-5.8.0-1.3.0
squid3-3.0.3-1.3.0
[EMAIL PROTECTED] cat tmp/test.spec
##
## test.spec -- OpenPKG RPM Specification
##
# package information
Name: test
Summary: Test
URL: http://www.openpkg.org/
Vendor: Dr. John Doe
Packager: The OpenPKG Project
Distribution: OpenPKG [JUNK]
Group: Misc
License: GPL
Version: 0.8.15
Release: 20031119
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 1.3 # was 20030718
PreReq: OpenPKG, openpkg >= 1.3 # was 20030718
AutoReq: no
AutoReqProv: no
%description
Test
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755
$RPM_BUILD_ROOT%{l_prefix}/var/test/var
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
'%attr(700,%{l_rusr},%{l_rgrp}) %dir %{l_prefix}/var/test/var'
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT
$ rpm -ba tmp/test.spec
$ rpm2cpio <
/cw/RPM/PKG/test-0.8.15-20031119.sparc64-solaris2.8-cw.rpm | cpio -itv
drwxr-xr-x 3 cw cw 0 Nov 19 16:08 2003,
./cw/var/test
drwx------ 2 cw cw 0 Nov 19 16:08 2003,
./cw/var/test/var 1 blocks
Interestingly, if I install the test package as root, the ownership is
set correctly, which is my clue: the Zope package also installs with
correct ownership when rpm runs as root, rather than the 'cw' user
(which makes sense, I guess).
Tres.
--
===============================================================
Tres Seaver [EMAIL PROTECTED]
Zope Corporation "Zope Dealers" http://www.zope.com
______________________________________________________________________
The OpenPKG Project www.openpkg.org
Developer Communication List [EMAIL PROTECTED]