Skip to content

Commit 0feac8d

Browse files
committed
fix: add Signed-By fields to apt sources
1 parent d16b71c commit 0feac8d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

daemon/src/release/repos.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::eol::{EolDate, EolStatus};
22
use crate::ubuntu_version::Codename;
33
use anyhow::Context;
44
use const_format::concatcp;
5-
use os_str_bytes::{OsStrBytes, OsStrBytesExt};
5+
use os_str_bytes::OsStrBytesExt;
66
use std::{
77
ffi::OsStr,
88
fs::{self, DirEntry, ReadDir},
@@ -341,8 +341,7 @@ fn ubuntu_uri() -> &'static str {
341341
}
342342

343343
fn system_sources(release: &str) -> String {
344-
let uri =
345-
if cfg!(target_arch = "aarch64") { ubuntu_uri() } else { "apt.pop-os.org/ubuntu" };
344+
let uri = if cfg!(target_arch = "aarch64") { ubuntu_uri() } else { "apt.pop-os.org/ubuntu" };
346345
format!(
347346
r#"X-Repolib-Name: Pop_OS System Sources
348347
Enabled: yes
@@ -351,6 +350,7 @@ URIs: http://{1}
351350
Suites: {0} {0}-security {0}-updates {0}-backports
352351
Components: main restricted universe multiverse
353352
X-Repolib-Default-Mirror: http://{1}
353+
Signed-By: /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg
354354
"#,
355355
release, uri
356356
)
@@ -371,6 +371,7 @@ Types: deb
371371
URIs: http://apt.pop-os.org/proprietary
372372
Suites: {0}
373373
Components: main
374+
Signed-By: /etc/apt/trusted.gpg.d/pop-keyring-2017-archive.gpg
374375
"#,
375376
release
376377
)
@@ -384,6 +385,7 @@ Types: deb deb-src
384385
URIs: http://apt.pop-os.org/release
385386
Suites: {0}
386387
Components: main
388+
Signed-By: /etc/apt/trusted.gpg.d/pop-keyring-2017-archive.gpg
387389
"#,
388390
release
389391
)
@@ -436,7 +438,9 @@ pub fn iter_files(dir: ReadDir) -> impl Iterator<Item = DirEntry> {
436438
dir.filter_map(Result::ok).filter(|entry| entry.metadata().ok().map_or(false, |m| m.is_file()))
437439
}
438440

439-
fn is_save_file(path: &Path) -> bool { path.extension() == Some(OsStr::from_bytes(b"save")) }
441+
fn is_save_file(path: &Path) -> bool {
442+
path.extension() == Some(OsStr::from_bytes(b"save"))
443+
}
440444

441445
#[cfg(test)]
442446
mod tests {

0 commit comments

Comments
 (0)