Cfengine

Enrico Scholz enrico.scholz at informatik.tu-chemnitz.de
Thu Mar 10 00:29:13 UTC 2005


sheltren at cs.ucsb.edu (Jeff Sheltren) writes:

> http://www.cs.ucsb.edu/~jeff/extras/cfengine.spec

Some words about this spec file:

* macros and fixed paths are used in a mixed manner; e.g.

  | mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/%{name}
  | ...
  | mkdir -p $RPM_BUILD_ROOT/var/cfengine/bin

* %_localstatedir should not be used as it differs between rpm
  implementations (it is /var on Fedora, but /var/run on Mandrake)

* /var/cfengine should not be used; /var/lib/cfengine is a more FHS
  compliant path

* there should be a 'BuildRequires: libacl-devel'

* lots of 'Requires(...): ' are missing

* 'Group: System Environment/Daemons' sounds wrong; 'cfagent' can be
  used standalone.

* please replace

  | %setup

  with

  | %setup -q


* | for i in ppkeys inputs outputs
  | do
  |  	mkdir -m 0700 $RPM_BUILD_ROOT%{_localstatedir}/%{name}/$i
  | done

  can be written shorter as

  | mkdir -m0700 $RPM_BUILD_ROOT%_localstatedir/%name/{ppkeys,inputs,outputs}


* | for i in %{SOURCE1} %{SOURCE2} %{SOURCE3}
  | do
  | 	install -m 0755 $i $RPM_BUILD_ROOT%{_initrddir}/
  | done

  can be written shorter as

  | install -p -m755 %{SOURCE1} %{SOURCE2} %{SOURCE3}  $RPM_BUILD_ROOT%{_initrddir}/

  (notice the '-p' also which is a good style)


* | if [ -f $RPM_BUILD_ROOT%{_infodir}/dir ]; then
  |       rm -f $RPM_BUILD_ROOT%{_infodir}/dir
  | fi

  can be written shorter as

  | rm -f $RPM_BUILD_ROOT%{_infodir}/dir


* | if [ -f NEWS -a -z "`cat NEWS`" ]; then
  |       rm -f NEWS
  | fi

  does not make sense as 'NEWS' will not be packaged

* | if [ ! -d /mnt/sysimage -a ! -f %{_localstatedir}/%{name}/ppkeys/localhost.priv ]; then
  |       ...
  | 	  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/cfengine*.info* 2> /dev/null || :

  this 'install-info' statement should be moved to outside of the 'if'
  clause

* initscripts should not be marked as '%config(noreplace)'; '%config'
  suffices there




Enrico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 480 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-extras-list/attachments/20050310/9d985fdd/attachment.sig>


More information about the fedora-extras-list mailing list