GCC Code Coverage Report


Directory: cvmfs/
File: cvmfs/publish/cmd_mkfs.h
Date: 2025-06-22 02:36:02
Exec Total Coverage
Lines: 0 30 0.0%
Branches: 0 180 0.0%

Line Branch Exec Source
1 /**
2 * This file is part of the CernVM File System.
3 */
4
5 #ifndef CVMFS_PUBLISH_CMD_MKFS_H_
6 #define CVMFS_PUBLISH_CMD_MKFS_H_
7
8 #include <string>
9
10 #include "publish/command.h"
11
12 namespace publish {
13
14 class CmdMkfs : public Command {
15 public:
16 virtual std::string GetName() const { return "mkfs"; }
17 virtual std::string GetBrief() const {
18 return "Create a new, empty repository";
19 }
20 virtual ParameterList GetParams() const {
21 ParameterList p;
22 p.push_back(Parameter::Optional(
23 "stratum0", 'w', "stratum0 url",
24 "HTTP endpoint of the authoritative storage if not localhost"));
25
26 p.push_back(Parameter::Optional(
27 "storage", 'u', "upstream storage",
28 "Upstream storage definition if other than local file system"));
29
30 p.push_back(Parameter::Optional(
31 "owner", 'o', "user name",
32 "User account that should own the published files"));
33
34 p.push_back(Parameter::Switch(
35 "replicable", 'm',
36 "Enable to mark the repository as source for stratum 1 copies"));
37
38 p.push_back(
39 Parameter::Optional("unionfs", 'f', "aufs | overlayfs",
40 "Enforce aufs or overlayfs if both are available"));
41
42 p.push_back(Parameter::Optional(
43 "s3config", 's', "s3 config file",
44 "Settings for an S3 bucket, use with -w and -u flags"));
45
46 p.push_back(Parameter::Switch(
47 "no-autotags", 'g',
48 "Disable automatic creation of timestamp tags, useful with --gc"));
49
50 p.push_back(Parameter::Optional(
51 "autotag-span", 'G', "timespan",
52 "Specify a `date` compatible time windows for keeping auto tags"));
53
54 p.push_back(Parameter::Optional("hash", 'a', "algorithm",
55 "Select a secure hash algorithm: sha1 "
56 "(default) or rmd160 or shake128"));
57
58 p.push_back(Parameter::Switch("gc", 'z',
59 "Make the repository garbage-collectable"));
60
61 p.push_back(Parameter::Switch(
62 "volatile", 'v',
63 "Mark the repository contents as volatile for client caches"));
64
65 p.push_back(Parameter::Optional(
66 "compression", 'Z', "algorithm",
67 "Select the compression algorithm: zlib (default) or none"));
68
69 p.push_back(
70 Parameter::Optional("import-keychain", 'k', "directory",
71 "Use existing keys instead of creating new ones"));
72
73 p.push_back(Parameter::Optional("export-keychain", 'K', "directory",
74 "Write repository keychain to directory "
75 "different from /etc/cvmfs/keys"));
76
77 p.push_back(Parameter::Switch(
78 "no-apache", 'p',
79 "Disable creation of Apache config files, e.g. for S3 backend"));
80
81 p.push_back(Parameter::Switch(
82 "no-publisher", 'P',
83 "Only create repository but do not configure node as a publisher"));
84
85 p.push_back(Parameter::Switch(
86 "keycard", 'R',
87 "Require a master key card for the whitelist signature"));
88
89 p.push_back(Parameter::Optional(
90 "auth", 'V', "auth spec",
91 "Set the membership requirement to access the repository"));
92
93 p.push_back(Parameter::Switch(
94 "external", 'X', "Enable to use this repository for external data"));
95 return p;
96 }
97 virtual std::string GetUsage() const {
98 return "[options] <fully qualified repository name>";
99 }
100 virtual unsigned GetMinPlainArgs() const { return 1; }
101
102 virtual int Main(const Options &options);
103 };
104
105 } // namespace publish
106
107 #endif // CVMFS_PUBLISH_CMD_MKFS_H_
108