Upload built source packages over SFTP with host-key verification (Launchpad fingerprints pinned in host_keys.yml, ask-to-accept otherwise), Launchpad account discovery (git config lp.user), and pre-flight checks the upload queue itself never does: changes file discovery/validation, PPA existence via the Launchpad API, target series validity, and debian/control Section validity (sections bundled in distro_info.yml). Upload log prevents duplicate uploads unless --force.
27 lines
1.2 KiB
Rust
27 lines
1.2 KiB
Rust
//! Generic upload target vocabulary for `pkh put`. Concrete targets are
|
|
//! built by their service modules (Launchpad — [`crate::launchpad`] —
|
|
//! today, archive targets later); this module only defines what any upload
|
|
//! target looks like and how the SSH username resolves when the service
|
|
//! does not pin one.
|
|
|
|
/// A concrete SFTP upload destination.
|
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
pub struct UploadTarget {
|
|
/// Hostname to connect to.
|
|
pub fqdn: String,
|
|
/// TCP port (always 22 for now; SFTP only).
|
|
pub port: u16,
|
|
/// Default SSH username, when the service has one; `None` means the
|
|
/// username resolves per machine (service-specific discovery — git
|
|
/// configuration for Launchpad — then SSH configuration `User`, then
|
|
/// the local user name).
|
|
pub login: Option<String>,
|
|
/// Incoming directory on the server, relative to the SFTP root. For
|
|
/// Launchpad targets this is a literal `~user/...` path: the upload
|
|
/// queue is write-only, so the path names the destination rather than a
|
|
/// browsable directory.
|
|
pub incoming: String,
|
|
/// Human-readable target name for logs and the upload record.
|
|
pub label: String,
|
|
}
|