pub struct DebBuilder<'control> { /* private fields */ }
Expand description
A builder for a .deb
package file.
Implementations§
Source§impl<'control> DebBuilder<'control>
impl<'control> DebBuilder<'control>
Sourcepub fn new(control_file: ControlFile<'control>) -> Self
pub fn new(control_file: ControlFile<'control>) -> Self
Construct a new instance using a control file.
Sourcepub fn set_compression(self, compression: DebCompression) -> Self
pub fn set_compression(self, compression: DebCompression) -> Self
Set the compression format to use.
Not all compression formats are supported by all Linux distributions.
Sourcepub fn set_mtime(self, time: Option<SystemTime>) -> Self
pub fn set_mtime(self, time: Option<SystemTime>) -> Self
Set the modified time to use on archive members.
If this is called, all archive members will use the specified time, helping to make archive content deterministic.
If not called, the current time will be used.
Sourcepub fn extra_control_tar_file(
self,
path: impl AsRef<Path>,
entry: impl Into<FileEntry>,
) -> Result<Self, DebError>
pub fn extra_control_tar_file( self, path: impl AsRef<Path>, entry: impl Into<FileEntry>, ) -> Result<Self, DebError>
Add an extra file to the control.tar
archive.
Sourcepub fn install_file(
self,
path: impl AsRef<Path> + Clone,
entry: impl Into<FileEntry> + Clone,
) -> Result<Self, DebError>
pub fn install_file( self, path: impl AsRef<Path> + Clone, entry: impl Into<FileEntry> + Clone, ) -> Result<Self, DebError>
Register a file as to be installed by this package.
Filenames should be relative to the filesystem root. e.g.
usr/bin/myapp
.
The file content will be added to the data.tar
archive and registered with
the control.tar
archive so its checksum is computed.
Auto Trait Implementations§
impl<'control> Freeze for DebBuilder<'control>
impl<'control> RefUnwindSafe for DebBuilder<'control>
impl<'control> Send for DebBuilder<'control>
impl<'control> Sync for DebBuilder<'control>
impl<'control> Unpin for DebBuilder<'control>
impl<'control> UnwindSafe for DebBuilder<'control>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more