* doiggl@velocitynet.com.au (doiggl@velocitynet.com.au) [20091027 01:04]:
Philipp wrote:
You don't. I'd install into a directory under /opt and make that direcory and all files below it belong to the user cricket in the spec file.
I changed the line in the spec file to
/usr/sbin/useradd -r -o -c "Cricket SNMP Monitor" -s /bin/false -d %{_libdir}/%{name} %{name} 2> /dev/null || :
Question: What syntax do I use for the following commands in the specfile ? , and in which section should these commands be in ?
# cd /opt # gunzip -c cricket-1.0.5.tar.gz| tar xopf - # /bin/ln -s cricket-1.0.5 cricket # cd cricket # /bin/cp -v cricket-conf.pl.sample cricket-conf.pl
No, do it differently. Simply name the cricket tarball As source and let rpm unpack it. I'd recommend repacking it as bz2 with bznew as that would save space. And then do in %install: mkdir -p %{buildroot}/opt cd .. cp -a %{name}-%{version} %{buildroot}/opt/%{name} pushd %{buildroot}/opt/%{name} cp cricket-conf.pl.sample cricket-conf.pl Remember to mark cricket-conf.pl as a configuration file in the %files section by doing either %config /opt/%{name}/cricket-conf.pl or %config(noreplace) /opt/%{name}/cricket-conf.pl
Also how do you change the ownership of the files /opt/cricket Have you got an example please.
By simply packaging them with said owner, eg. by changing %defattr(-,root,root) to %defattr(-,cricket,root) or %defattr(-,cricket,cricket) In the latter case you'd have to create the group cricket in the spec file. See mysql.spec for an example. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org