Skip to main content

Source code file content

Revision: 2948

17477111 resync manpages from docs group
» Project Revision History

» Checkout URL

pkg-gate / src / svc / pkg-mirror.xml

Size: 7649 bytes, 1 line
<?xml version="1.0"?>
<!--
	CDDL HEADER START

	The contents of this file are subject to the terms of the
	Common Development and Distribution License (the "License").
	You may not use this file except in compliance with the License.

	You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
	or http://www.opensolaris.org/os/licensing.
	See the License for the specific language governing permissions
	and limitations under the License.

	When distributing Covered Code, include this CDDL HEADER in each
	file and include the License file at usr/src/OPENSOLARIS.LICENSE.
	If applicable, add the following below this CDDL HEADER, with the
	fields enclosed by brackets "[]" replaced with your own identifying
	information: Portions Copyright [yyyy] [name of copyright owner]

	CDDL HEADER END

	Copyright (c) 2013, Oracle and/or its affiliates.  All rights reserved.

	NOTE:  This service manifest is not editable; its contents will
	be overwritten by package or patch operations, including
	operating system upgrade.  Make customizations in a different
	file.
-->

<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">

<service_bundle type='manifest' name='pkg:mirror'>

<service
	name='application/pkg/mirror'
	type='service'
	version='1'>

        <!--
          Wait for network interfaces to be initialized.
        -->
        <dependency name='network'
            grouping='require_all'
            restart_on='error'
            type='service'>
            <service_fmri value='svc:/milestone/network:default'/>
        </dependency>

        <!--
          Wait for all local filesystems to be mounted.
        -->
        <dependency name='filesystem-local'
            grouping='require_all'
            restart_on='none'
            type='service'>
            <service_fmri
                value='svc:/system/filesystem/local:default'/>
        </dependency>

        <!--
          Wait for automounting to be available, as we may be
          using data from home directories or other remote
          filesystems.
        -->
        <dependency name='autofs'
            grouping='optional_all'
            restart_on='error'
            type='service'>
            <service_fmri
                value='svc:/system/filesystem/autofs:default'/>
        </dependency>

	<!--
	  Wait until the service which creates the
	  <rpool>/VARSHARE/pkg/repositories container dataset to come
	  online.
	-->
	<dependency name='varshare-repositories'
	    grouping='require_all'
	    restart_on='none'
	    type='service'>
	    <service_fmri
		value='svc:/application/pkg/repositories-setup'/>
	</dependency>

        <exec_method
                type='method'
                name='start'
                exec='/lib/svc/method/svc-pkg-mirror start'
                timeout_seconds='60'>
		<method_context>
			<method_credential
				user='pkg5srv' group='pkg5srv' />
		</method_context>
	</exec_method>

        <exec_method
                type='method'
                name='stop'
                exec='/lib/svc/method/svc-pkg-mirror stop'
                timeout_seconds='60'>
		<method_context>
			<method_credential
				user='pkg5srv' group='pkg5srv' />
		</method_context>
	</exec_method>

	<!-- Since the refresh method is what causes the service to
	perform the pkgrecv, we need an infinite timeout, as we do not
	know how long the mirroring operation will take. -->
	<exec_method
                type='method'
                name='refresh'
                exec='/lib/svc/method/svc-pkg-mirror refresh'
                timeout_seconds='0'>
		<method_context>
			<method_credential
				user='pkg5srv' group='pkg5srv' />
		</method_context>
	</exec_method>


	<property_group name='general' type='framework'>
        	<propval name='action_authorization' type='astring'
        	        value='solaris.smf.manage.pkg-mirror' />
		<propval
                	name='value_authorization'
	                type='astring'
        	        value='solaris.smf.value.pkg-mirror' />
        </property_group>

	<property_group name='startd' type='framework'>
		<propval name='duration' type='astring'
			value='transient' />
	</property_group>

        <property_group name='config' type='application'>
                <stability value='Evolving' />

		<!-- The local repository we pkgrecv to. By default,
		if we the parent directory is at the top-level of a
		zfs dataset, we attempt to create a new dataset for the
		repository. For this to happen, 'pkg5srv' must have
		appropriate zfs delegations on that dataset, eg.

		# zfs allow pkg5srv create,mount,snapshot <dataset>

		In the default configuration, a dataset is created by
		svc:/application/pkg/varshare-repositories which we
		have a dependency on.
		-->
                <propval name='repository' type='astring'
			value='/var/share/pkg/repositories/solaris' />

                <!-- A partial crontab(1) entry defining how often we
		update the repository. We allow the special value
		'random' in the 3rd (day of the month) field in order
		to even the load on busy repository servers. This gets
		replaced when the service is first started with a random
		day in the range 1-28. -->
                <propval name='crontab_period' type='astring'
			value='30 2 random * *' />

		<!-- The reference image we use to pull publisher,
		origin, proxy and ssl key/cert information from -->
		<propval name='ref_image' type='astring'
			value='/' />

		<!-- The publishers configured in the image at
		'config/ref_image' which we receive from.
		 -->
		<propval name='publishers' type='astring'
			value='solaris' />

		<!-- The cache_dir used for the -c option to pkgrecv(1M)
		-->
                <propval name='cache_dir' type='astring'
                        value='/var/cache/pkg/mirror' />

		<!-- Enable additional debugging of the service. -->
                <propval name='debug' type='boolean' value='false' />

		<propval
                	name='value_authorization'
	                type='astring'
        	        value='solaris.smf.manage.pkg-mirror' />
        </property_group>

        <!-- To work around an SMF bug, we create a default instance
	containing the 'config' property group, specifiying the
	authorizations we need to allow clients to modify values in it.
	User-created instances should create this pg with the same
	'value_authorization' property. -->
        <instance name="default" complete="true" enabled="false">
                <property_group name='config' type='application'>
                <stability value='Evolving' />
                <propval name='repository' type='astring'
			value='/var/share/pkg/repositories/solaris' />
                <propval name='crontab_period' type='astring'
			value='30 2 random * *' />
                <propval name='ref_image' type='astring' value='/' />
		<propval name='publishers' type='astring'
			value='solaris' />
                <propval name='cache_dir' type='astring'
                        value='/var/cache/pkg/mirror' />
                <propval name='debug' type='boolean' value='false' />

		<propval
                	name='value_authorization'
	                type='astring'
        	        value='solaris.smf.manage.pkg-mirror' />
                </property_group>
        </instance>
	<stability value='Evolving' />

        <template>
                <common_name>
                    <loctext xml:lang='C'>IPS Repository Mirror</loctext>
                </common_name>
                <documentation>
                        <manpage title='pkgrecv' section='1M' />
                </documentation>
        </template>

</service>

</service_bundle>
 
 
Close
loading
Please Confirm
Close