Struct rpm::FileOptionsBuilder

source ·
pub struct FileOptionsBuilder { /* private fields */ }

Implementations§

source§

impl FileOptionsBuilder

source

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

source

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

Indicates that a file is a symlink pointing to the location provided

source

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

source

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

source

pub fn is_doc(self) -> Self

Indicates that a file is documentation.

See: %doc from specfile syntax

source

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

source

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

source

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

source

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

source

pub fn is_readme(self) -> Self

Deprecated (use is_doc() instead). Marks a file as a README.

See: %readme from specfile syntax

Trait Implementations§

source§

impl Debug for FileOptionsBuilder

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<FileOptionsBuilder> for FileOptions

source§

fn from(builder: FileOptionsBuilder) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V