Hi Niall,

Just a couple of comments, started with GT>

-Ghee


#
# spec file for package SUNWzfs-auto-snapshot
# includes module(s): zfs-snapshot
#
# Copyright 2008 Sun Microsystems, Inc.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Owner: Niall Power
#
%include Solaris.inc

Name:                    SUNWzfs-auto-snapshot
Summary:                 ZFS automatic snapshot service
Version:                 0.11.0
Source:                  zfs-snapshot.tar.bz2

GT> You need to upload this tarball to dlc.

SUNW_BaseDir:            /
SUNW_Copyright:          %{name}.copyright
BuildRoot:               %{_tmppath}/%{name}-%{version}-build
Prereq:                  /usr/sbin/roleadd

%include default-depend.inc

%prep
%setup -q -n zfs-snapshot

%build

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/lib
mkdir -p $RPM_BUILD_ROOT/var
cp -R src/lib $RPM_BUILD_ROOT
cp -R src/var $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT/etc/security
echo 'solaris.smf.manage.zfs-auto-snapshot:::Manage the ZFS Automatic Snapshot 
Service::' > $RPM_BUILD_ROOT/etc/security/auth_attr


%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c 
"%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date 
+%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}

%clean
rm -rf $RPM_BUILD_ROOT

%if %(test -f /usr/sadm/install/scripts/i.manifest && echo 0 || echo 1)
%iclass manifest -f i.manifest
%endif

%pre
#!/bin/sh
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# Preinstall script will check if zfssnap role already exists
# and add it if necessary
/usr/bin/grep "^zfssnap:" $BASEDIR/etc/passwd > /dev/null
if [ $? -ne 0 ]; then
    /usr/sbin/roleadd -d /export/home/zfssnap -c "ZFS Automatic Snapshots role" 
\

GT> You are making the assumption that /export/home is available on the machine
    which I don't think it is always correct. I know users-admin does use 
/export/home
    as default, not sure if it checks for its presence or not.

    -P "ZFS File System Management" \
    -A solaris.smf.manage.zfs-auto-snapshot -m zfssnap
    /usr/bin/passwd -r files -N zfssnap
    # make sure zfssnap's PATH has /usr/sbin in it
    echo "PATH=/usr/sbin:/usr/bin" >> /export/home/zfssnap/.profile
    echo "export PATH" >> /export/home/zfssnap/.profile
fi

%files
%defattr (-, root, bin)
%dir %attr (0755, root, sys) /var
%dir %attr (0755, root, sys) /var/svc
%dir %attr (0755, root, sys) /var/svc/manifest
%dir %attr (0755, root, sys) /var/svc/manifest/system
%dir %attr (0755, root, sys) /var/svc/manifest/system/filesystem
%class(manifest) %attr (0444, root, sys) 
/var/svc/manifest/system/filesystem/*.xml
%dir %attr (0755, root, bin) /lib/svc/method
%attr (0555, root, bin) /lib/svc/method/zfs-auto-snapshot
%dir %attr (0755, root, sys) /etc
%dir %attr (0755, root, sys) /etc/security
%config %class (rbac) %attr (0644, root, sys) /etc/security/auth_attr

%changelog
* Wed Sep 17 2008 - niall.power at sun.com
- Initial spec file created.










Niall Power wrote:
> Hi,
>
> I've attached 2 spec files for review for the following packages:
> SUNWzfs-auto-snapshot: Automatic snapshot scheduling framework and 
> service by Tim Foster
> SUNWgnome-time-slider: A user-friendly, desktop oriented interface for
> configuring automatic snapshots using the above (SUNWzfs-auto-snapshot)
>
> I hope to get this integrated into spec-files-other repository in time 
> for build 100
>
> Please review and provide comments.
>
> Thanks,
> Niall.


Reply via email to