SHA256
Compare commits
3
Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
279bd30463 | ||
|
|
1bdc4547d3 | ||
|
|
e40fa95cc8 |
No files matched your search
@@ -0,0 +1,112 @@
|
||||
#
|
||||
# /etc/pacman.conf
|
||||
#
|
||||
# See the pacman.conf(5) manpage for option and repository directives
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
# The following paths are commented out with their default values listed.
|
||||
# If you wish to use different paths, uncomment and update the paths.
|
||||
#RootDir = /
|
||||
#DBPath = /var/lib/pacman/
|
||||
#CacheDir = /var/cache/pacman/pkg/
|
||||
#LogFile = /var/log/pacman.log
|
||||
#GPGDir = /etc/pacman.d/gnupg/
|
||||
#HookDir = /etc/pacman.d/hooks/
|
||||
HoldPkg = pacman glibc
|
||||
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||
#CleanMethod = KeepInstalled
|
||||
Architecture = auto
|
||||
|
||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||
#IgnorePkg =
|
||||
#IgnoreGroup =
|
||||
|
||||
#NoUpgrade =
|
||||
#NoExtract =
|
||||
|
||||
# Misc options
|
||||
#UseSyslog
|
||||
Color
|
||||
ILoveCandy
|
||||
#NoProgressBar
|
||||
CheckSpace
|
||||
#VerbosePkgLists
|
||||
ParallelDownloads = 5
|
||||
DownloadUser = alpm
|
||||
#DisableSandboxFilesystem
|
||||
#DisableSandboxSyscalls
|
||||
|
||||
# By default, pacman accepts packages signed by keys that its local keyring
|
||||
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||
SigLevel = Required DatabaseOptional
|
||||
LocalFileSigLevel = Optional
|
||||
#RemoteFileSigLevel = Required
|
||||
|
||||
# NOTE: You must run `pacman-key --init` before first using pacman; the local
|
||||
# keyring can then be populated with the keys of all official Artix Linux
|
||||
# packagers with `pacman-key --populate artix`.
|
||||
|
||||
#
|
||||
# REPOSITORIES
|
||||
# - can be defined here or included from another file
|
||||
# - pacman will search repositories in the order defined here
|
||||
# - local/custom mirrors can be added here or in separate files
|
||||
# - repositories listed first will take precedence when packages
|
||||
# have identical names, regardless of version number
|
||||
# - URLs will have $repo replaced by the name of the current repo
|
||||
# - URLs will have $arch replaced by the name of the architecture
|
||||
#
|
||||
# Repository entries are of the format:
|
||||
# [repo-name]
|
||||
# Server = ServerName
|
||||
# Include = IncludePath
|
||||
#
|
||||
# The header [repo-name] is crucial - it must be present and
|
||||
# uncommented to enable the repo.
|
||||
#
|
||||
|
||||
# kira linux base repository
|
||||
[kira-base]
|
||||
SigLevel = Required TrustedOnly
|
||||
Server = https://repos.kira-linux.org/kira-base/x86_64
|
||||
|
||||
# The gremlins repositories are disabled by default. To enable, uncomment the
|
||||
# repo name header and Include lines. You can add preferred servers immediately
|
||||
# after the header, and they will be used before the default mirrors.
|
||||
|
||||
#[system-gremlins]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[system]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[world-gremlins]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[world]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[galaxy-gremlins]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
[galaxy]
|
||||
Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# If you want to run 32 bit applications on your x86_64 system,
|
||||
# enable the lib32 repositories as required here.
|
||||
|
||||
#[lib32-gremlins]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
#[lib32]
|
||||
#Include = /etc/pacman.d/mirrorlist
|
||||
|
||||
# An example of a custom package repository. See the pacman manpage for
|
||||
# tips on creating your own repositories.
|
||||
#[custom]
|
||||
#SigLevel = Optional TrustAll
|
||||
#Server = file:///home/custompkgs
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
|
||||
const PACMAN_CONF: &str = include_str!("files/etc/pacman.conf");
|
||||
@@ -33,6 +33,7 @@ use crate::stages::welcome;
|
||||
use crate::stages::welcome::WelcomeStage;
|
||||
|
||||
rust_i18n::i18n!("src/locales", fallback = "en");
|
||||
mod kira_include;
|
||||
mod kira_color_bar;
|
||||
mod kira_disk_layout;
|
||||
mod kira_system;
|
||||
|
||||
@@ -111,7 +111,7 @@ pub fn init_disk(part_layout: &PartLayout, mnt_dir: &str) -> Result<(), ExecComm
|
||||
Some(PartRole::ROOT) => {
|
||||
if let Some(part_l) = part.partlabel_dev() {
|
||||
if let FSType::BCACHEFS(bc_par) = &part.fs_type {
|
||||
log::info!("Formating root pertition.");
|
||||
log::info!("Formating root partition.");
|
||||
kira_system::bcachefs_format(
|
||||
&part_l,
|
||||
bc_par.comp_alg.clone(),
|
||||
@@ -205,10 +205,10 @@ async fn mount_and_init_root_async(part_layout: PartLayout, mnt_dir: String) ->
|
||||
blocking::unblock(move || mount_and_init_root(&part_layout, &mnt_dir)).await
|
||||
}
|
||||
|
||||
// async fn install_base(mnt_dir: String) -> Result<(), ExecCommandError> {
|
||||
// use blocking;
|
||||
// blocking::unblock(move || init_disk(&part_layout, &mnt_dir)).await
|
||||
// }
|
||||
async fn install_base_async(mnt_dir: String) -> Result<(), ExecCommandError> {
|
||||
use blocking;
|
||||
blocking::unblock(move || kira_system::basestrap_dinit(&mnt_dir)).await
|
||||
}
|
||||
|
||||
fn do_install(
|
||||
k_config: KiraConfig,
|
||||
@@ -243,6 +243,18 @@ fn do_install(
|
||||
return;
|
||||
}
|
||||
|
||||
// installing base system
|
||||
let res = install_base_async(MNT_DIR.into()).await;
|
||||
let res_err = res.is_err();
|
||||
output
|
||||
.send(res.map(|_| (10.0f32, "Some other stuff".into())))
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
if res_err {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if send fails (receiver dropped/cancelled)
|
||||
// if output.send(res).await.is_err() {
|
||||
// return; // Exit early if UI is gone
|
||||
|
||||
+30
-29
@@ -84,40 +84,41 @@ fn get_timezones_blocking() -> Result<Vec<TimeZoneData>, kira_system::ExecComman
|
||||
Ok(tz_list
|
||||
.iter()
|
||||
.filter(|sb| sb.contains('/'))
|
||||
.filter(|sb| !sb.starts_with("posix")) //filter out posix dir that contains copies
|
||||
.filter_map(|str_t_zone| TimeZoneData::from_str(str_t_zone.trim()))
|
||||
.collect::<Vec<TimeZoneData>>())
|
||||
}
|
||||
|
||||
/// Getting list of awailable timezones from system.
|
||||
fn get_timezones_blocking_depr() -> Result<Vec<TimeZoneData>, String> {
|
||||
use std::process::Command;
|
||||
//timedatectl list-timezones --no-pager
|
||||
match Command::new("timedatectl")
|
||||
.arg("list-timezones")
|
||||
.arg("--no-pager")
|
||||
.output()
|
||||
{
|
||||
Ok(cmd_output) => {
|
||||
if cmd_output.status.success() {
|
||||
//Etc/UTC
|
||||
match String::from_utf8(cmd_output.stdout) {
|
||||
Ok(str_tz_list) => Ok(str_tz_list
|
||||
.split("\n")
|
||||
.filter(|sb| sb.contains('/'))
|
||||
.filter_map(|str_t_zone| TimeZoneData::from_str(str_t_zone.trim()))
|
||||
.collect::<Vec<TimeZoneData>>()),
|
||||
Err(ex) => Err(format!("Exception while converting to UTF8 {}", ex)),
|
||||
}
|
||||
} else {
|
||||
Err(format!(
|
||||
"Error getting timezones list: {}",
|
||||
String::from_utf8(cmd_output.stderr).unwrap_or("UNKNOWN".into())
|
||||
))
|
||||
}
|
||||
}
|
||||
Err(ex) => Err(format!("Exception while trying to list time zones {}", ex)),
|
||||
}
|
||||
}
|
||||
// fn get_timezones_blocking_depr() -> Result<Vec<TimeZoneData>, String> {
|
||||
// use std::process::Command;
|
||||
// //timedatectl list-timezones --no-pager
|
||||
// match Command::new("timedatectl")
|
||||
// .arg("list-timezones")
|
||||
// .arg("--no-pager")
|
||||
// .output()
|
||||
// {
|
||||
// Ok(cmd_output) => {
|
||||
// if cmd_output.status.success() {
|
||||
// //Etc/UTC
|
||||
// match String::from_utf8(cmd_output.stdout) {
|
||||
// Ok(str_tz_list) => Ok(str_tz_list
|
||||
// .split("\n")
|
||||
// .filter(|sb| sb.contains('/'))
|
||||
// .filter_map(|str_t_zone| TimeZoneData::from_str(str_t_zone.trim()))
|
||||
// .collect::<Vec<TimeZoneData>>()),
|
||||
// Err(ex) => Err(format!("Exception while converting to UTF8 {}", ex)),
|
||||
// }
|
||||
// } else {
|
||||
// Err(format!(
|
||||
// "Error getting timezones list: {}",
|
||||
// String::from_utf8(cmd_output.stderr).unwrap_or("UNKNOWN".into())
|
||||
// ))
|
||||
// }
|
||||
// }
|
||||
// Err(ex) => Err(format!("Exception while trying to list time zones {}", ex)),
|
||||
// }
|
||||
// }
|
||||
|
||||
impl TimeZoneStage {
|
||||
pub fn new(k_config: KiraConfig) -> Self {
|
||||
|
||||
Reference in new issue
Block a user