Compare commits

...

4 Commits

Author SHA1 Message Date
Lucy
df777c63fe fix type for query params (#2611) 2024-04-23 20:02:11 +00:00
Lucy
e9c9a67365 update registry upload to take id for new admin permissions (#2605) 2024-04-18 11:35:38 -06:00
Aiden McClelland
ac080edb02 automatically accept clearing the log tree on btrfs repair (#2580) 2024-03-29 20:03:36 +00:00
Aiden McClelland
5e580f9372 Update firmware.json 2024-03-06 22:30:18 +00:00
3 changed files with 6 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
"semver-prefix": "PureBoot-Release-",
"semver-range": "<28.3"
},
"url": "https://source.puri.sm/firmware/releases/-/raw/master/librem_mini_v2/custom/pureboot-librem_mini_v2-basic_usb_autoboot_blob_jail-Release-28.3.rom.gz",
"url": "https://source.puri.sm/firmware/releases/-/raw/98418b5b8e9edc2bd1243ad7052a062f79e2b88e/librem_mini_v2/custom/pureboot-librem_mini_v2-basic_usb_autoboot_blob_jail-Release-28.3.rom.gz",
"shasum": "5019bcf53f7493c7aa74f8ef680d18b5fc26ec156c705a841433aaa2fdef8f35"
}
]

View File

@@ -1,3 +1,4 @@
use std::io::Cursor;
use std::path::Path;
use tokio::process::Command;
@@ -23,8 +24,8 @@ pub async fn btrfs_check_repair(logicalname: impl AsRef<Path>) -> Result<Require
Command::new("btrfs")
.arg("check")
.arg("--repair")
.arg("--force")
.arg(logicalname.as_ref())
.input(Some(&mut Cursor::new(b"y\n")))
.invoke(crate::ErrorKind::DiskManagement)
.await?;

View File

@@ -71,12 +71,14 @@ async fn do_upload(
mut url: Url,
user: &str,
pass: &str,
pkg_id: &str,
body: Body,
) -> Result<(), Error> {
url.set_path("/admin/v0/upload");
let req = httpc
.post(url)
.header(header::ACCEPT, "text/plain")
.query(&[("id", pkg_id)])
.basic_auth(user, Some(pass))
.body(body)
.build()?;
@@ -178,6 +180,7 @@ pub async fn publish(
registry.clone(),
&user,
&pass,
&pkg.id,
Body::wrap_stream(file_stream),
)
.await?;