Struct rpm::FileOptionsBuilder
source · pub struct FileOptionsBuilder { /* private fields */ }
Implementations§
source§impl FileOptionsBuilder
impl FileOptionsBuilder
sourcepub fn user(self, user: impl Into<String>) -> Self
pub fn user(self, user: impl Into<String>) -> Self
Indicates that the file should be owned by the specified username.
Specifying a non-root user here will direct RPM to create the user via sysusers.d at installation time.
See: %attr
from specfile syntax
sourcepub fn group(self, group: impl Into<String>) -> Self
pub fn group(self, group: impl Into<String>) -> Self
Indicates that the file should be part of the specified group.
Specifying a non-root group here will direct RPM to create the group via sysusers.d at installation time.
See: %attr
from specfile syntax
sourcepub fn symlink(self, symlink: impl Into<String>) -> Self
pub fn symlink(self, symlink: impl Into<String>) -> Self
Indicates that a file is a symlink pointing to the location provided
sourcepub fn mode(self, mode: impl Into<FileMode>) -> Self
pub fn mode(self, mode: impl Into<FileMode>) -> Self
Set the FileMode - type of file (or directory, or symlink) and permissions.
See: %attr
from specfile syntax
sourcepub fn caps(self, caps: impl Into<String>) -> Result<Self, Error>
pub fn caps(self, caps: impl Into<String>) -> Result<Self, Error>
Indicates that a file should have the provided POSIX file capabilities.
See: %caps
from specfile syntax
sourcepub fn is_doc(self) -> Self
pub fn is_doc(self) -> Self
Indicates that a file is documentation.
See: %doc
from specfile syntax
sourcepub fn is_config(self) -> Self
pub fn is_config(self) -> Self
Indicates that a file is a configuration file. When a package is updated, files marked as
configuration files will be checked for modifications compared to their default state,
and if any are present then the old configuration file will be saved with a .rpmsave
extension.
User intervention may be required to reconcile the changes between the new and old configs.
See: %config
from specfile syntax
sourcepub fn is_config_noreplace(self) -> Self
pub fn is_config_noreplace(self) -> Self
Indicates that a file is a configuration file and that it should not be replaced if it has been
modified. When a package is updated, configuration files will be checked for modifications
compared to their default state, and if any are present then the new configuration file will
be installed with a .rpmnew
extension.
User intervention may be required to reconcile the changes between the new and old configs.
See: %config(noreplace)
from specfile syntax
sourcepub fn is_ghost(self) -> Self
pub fn is_ghost(self) -> Self
Indicates that a file ought not to actually be included in the package, but that it should still be considered owned by a package (e.g. a log file). Its attributes are still tracked.
See: %ghost
from specfile syntax
sourcepub fn is_license(self) -> Self
pub fn is_license(self) -> Self
Indicates that a file is a software license. License files are always included - they are never filtered out during installation.
See: %license
from specfile syntax