Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document cvmfs helper functions #74

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions features/cvmfs/client.pan
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function cvmfs_add_key = {
pubkey_name = ARGV[0];
pubkey_file = ARGV[1];

SELF[escape('/etc/cvmfs/keys/' + pubkey_name + '.pub')]=nlist(
SELF[escape('/etc/cvmfs/keys/' + pubkey_name)]=nlist(
'config', file_contents(pubkey_file),
'owner', 'root',
'perms', '0644',
Expand Down Expand Up @@ -290,7 +290,7 @@ variable CVMFS_DESY_DOMAIN_ENABLED = {
this = SELF;

this = cvmfs_add_server('desy.de', CVMFS_SERVER_URL_DESY);
this = cvmfs_add_key('desy.de', 'features/cvmfs/keys/desy.de.pub');
this = cvmfs_add_key('desy.de.pub', 'features/cvmfs/keys/desy.de.pub');

return(this);
};
Expand All @@ -316,7 +316,7 @@ variable CVMFS_RAL_DOMAIN_ENABLED = {
this = SELF;

this = cvmfs_add_server('gridpp.ac.uk', CVMFS_SERVER_URL_RAL);
this = cvmfs_add_key('gridpp.ac.uk', 'features/cvmfs/keys/gridpp.ac.uk.pub');
this = cvmfs_add_key('gridpp.ac.uk.pub', 'features/cvmfs/keys/gridpp.ac.uk.pub');

return(this);
};
Expand All @@ -341,7 +341,7 @@ variable CVMFS_EGI_DOMAIN_ENABLED = {
this = SELF;

this = cvmfs_add_server('egi.eu', CVMFS_SERVER_URL_EGI);
this = cvmfs_add_key('egi.eu', 'features/cvmfs/keys/egi.eu.pub');
this = cvmfs_add_key('egi.eu.pub', 'features/cvmfs/keys/egi.eu.pub');

return(this);
};
Expand All @@ -352,6 +352,18 @@ variable CVMFS_EGI_DOMAIN_ENABLED = {
# Create user-defined CVMFS repositories and domains
#

#
# Add custom domains through predefinition of variable CVMFS_EXTRA_DOMAINS
#
# It should be defined as in this example:
# variable CVMFS_EXTRA_DOMAINS ?= nlist('example.org',
# nlist('server_urls', nlist('URL-NAME1', 'http://cvmfs1.example.org/cvmfs/@[email protected]',
# 'URL-NAME2', 'http://cvmfs2.example.org/cvmfs/@[email protected]'),
# 'pubkeys_file', 'cvmfs/keys/example.org.pub' # cvmfs/keys/example.org.pub is a local file in your template source distribution
# ),
# );


variable CVMFS_EXTRA_DOMAINS ?= undef;

function cvmfs_configure_extra_domains = {
Expand All @@ -363,12 +375,24 @@ function cvmfs_configure_extra_domains = {

foreach (domain_name; domain_def; CVMFS_EXTRA_DOMAINS) {
this = cvmfs_add_server(domain_name, domain_def['server_urls']);
this = cvmfs_add_key(domain_name, domain_def['pubkeys_file']);
this = cvmfs_add_key(domain_name + '.pub', domain_def['pubkeys_file']);
};

return(this);
};


#
# Add custom domains through predefinition of variable CVMFS_EXTRA_REPOSITORIES
#
# It should be defined as in this example:
# variable CVMFS_EXTRA_REPOSITORIES ?= nlist('vo.example.org',
# nlist('server_urls', nlist('URL-NAME1', 'http://cvmfs1.example.org/cvmfs/vo.example.org',
# 'URL-NAME2', 'http://cvmfs2.example.org/cvmfs/vo.example.org'),
# 'pubkeys_file', 'cvmfs/keys/vo.example.org.pub' # cvmfs/keys/vo.example.org.pub is a local file in your template source distribution
# ),
# );

variable CVMFS_EXTRA_REPOSITORIES ?= undef;

function cvmfs_configure_extra_repos = {
Expand All @@ -380,7 +404,7 @@ function cvmfs_configure_extra_repos = {

foreach (repo_name; repo_def; CVMFS_EXTRA_REPOSITORIES) {
this = cvmfs_add_repo(repo_name, repo_def['server_urls']);
this = cvmfs_add_key(repo_name, repo_def['pubkeys_file']);
this = cvmfs_add_key(repo_name + '.pub', repo_def['pubkeys_file']);
};

return(this);
Expand Down