5 #include "cvmfs_config.h"
25 std::string fqrn = options.
plain_args()[0].value_str;
28 throw EPublish(
"malformed repository name: " + fqrn);
33 if (options.
HasNot(
"owner")) {
35 fqrn.c_str(), user_name.c_str());
38 while ((c = getchar()) != EOF) {
42 if (!input.empty()) user_name = input;
47 if (options.
Has(
"no-autotags") && options.
Has(
"autotag-span")) {
49 "options 'no-autotags' and 'autotag-span' are mutually exclusive");
51 if (options.
HasNot(
"no-autotags") && options.
HasNot(
"autotag-span") &&
55 "Note: Autotagging all revisions impedes garbage collection");
59 if (options.
Has(
"no-publisher")) {
65 if (options.
Has(
"storage")) {
66 if (options.
Has(
"s3config")) {
68 "options 'storage' and 's3config' are mutually exclusive");
71 }
else if (options.
Has(
"s3config")) {
76 bool configure_apache =
78 options.
HasNot(
"no-apache");
82 bool can_unprivileged =
83 options.
Has(
"no-publisher") && !configure_apache &&
85 if (!can_unprivileged)
throw EPublish(
"root privileges required");
89 if (options.
Has(
"stratum0")) {
94 options.
HasNot(
"no-publisher");
96 throw EPublish(
"repository stratum 0 URL for non-local storage "
102 if (options.
HasNot(
"no-publisher")) {
103 if (options.
Has(
"unionfs")) {
109 if (options.
Has(
"unionfs")) {
111 "options 'no-publisher' and 'unionfs' are mutually exclusive");
115 if (configure_apache) {
125 publisher->signature_mgr()->GetActivePubkeys().c_str());
127 publisher->signature_mgr()->GetCertificate().c_str());
130 publisher->manifest()->ExportString().c_str());
void SetUnionFsType(const std::string &union_fs)
SettingsTransaction * GetTransaction()
SettingsKeychain * GetKeychain()
static Publisher * Create(const SettingsPublisher &settings)
std::string GetUserName()
void SetKeychainDir(const std::string &keychain_dir)
bool Has(const std::string &key) const
std::string GetString(const std::string &key) const
const SettingsPublisher & settings() const
const std::vector< Argument > & plain_args() const
virtual int Main(const Options &options)
void SetUrl(const std::string &url)
const SettingsSpoolArea & spool_area() const
const SettingsTransaction & transaction() const
void SetLocator(const std::string &locator)
SettingsStorage * GetStorage()
const SettingsStorage & storage() const
std::string tmp_dir() const
bool HasNot(const std::string &key) const
SettingsSpoolArea * GetSpoolArea()
upload::SpoolerDefinition::DriverType type() const
void SetOwner(const std::string &user_name)
void MakeS3(const std::string &s3_config, const std::string &tmp_dir)
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)