mirror of
https://gitlab.com/erkanisik/yali-rs.git
synced 2026-07-30 18:59:02 +00:00
feat: update version to 4.0.1, remove deprecated actions and pspec files, and enhance rsync command with dynamic exclusion
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# ───────────────────────────────────────────────────────────────────────────
|
||||
|
||||
BINARY := yali-rs
|
||||
VERSION := 4.0.0
|
||||
VERSION := 4.0.1
|
||||
|
||||
# Kurulum yolları (DESTDIR ile paket yöneticisi uyumlu)
|
||||
PREFIX ?= /usr
|
||||
|
||||
-24
@@ -1,24 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
def setup():
|
||||
shelltools.system("cargo fetch --locked")
|
||||
|
||||
def build():
|
||||
shelltools.system("cargo build --release --frozen")
|
||||
|
||||
def install():
|
||||
pisitools.dobin("target/release/yali-rs")
|
||||
|
||||
pisitools.insinto("/usr/share/yali", "branding*.toml")
|
||||
pisitools.insinto("/usr/share/yali/locales", "locales/*.toml")
|
||||
pisitools.insinto("/usr/share/yali/assets", "assets/*")
|
||||
|
||||
pisitools.insinto("/usr/share/applications", "assets/yali.desktop")
|
||||
pisitools.insinto("/usr/share/pixmaps", "assets/yali.png")
|
||||
@@ -1,55 +0,0 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "https://pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>yali-rs</Name>
|
||||
<Homepage>https://gitlab.com/erkanisik/yali-rs</Homepage>
|
||||
<Packager>
|
||||
<Name>Erkan Işık</Name>
|
||||
<Email>erkanisik@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv2</License>
|
||||
<IsA>app:gui</IsA>
|
||||
<Summary xml:lang="en">Yet Another Linux Installer</Summary>
|
||||
<Summary xml:lang="tr">PiSi Linux için Grafik Kurulum Programı</Summary>
|
||||
|
||||
<Description xml:lang="en">YALI is the graphical installer for PiSi Linux distribution which is written using Rust and egui framework.</Description>
|
||||
<Description xml:lang="tr">YALI, Rust ve egui framework kullanılarak yazılmış olan PiSi Linux dağıtımının grafik kurulum programıdır.</Description>
|
||||
|
||||
<Archive sha1sum="" type="targz">
|
||||
https://gitlab.com/erkanisik/yali-rs/-/archive/v4.0.0/yali-rs-v4.0.0.tar.gz
|
||||
</Archive>
|
||||
|
||||
<BuildDependencies>
|
||||
<Dependency>rustc</Dependency>
|
||||
<Dependency>cargo</Dependency>
|
||||
<Dependency>make</Dependency>
|
||||
</BuildDependencies>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>yali-rs</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>dbus</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Conflicts>
|
||||
<Package>yali</Package>
|
||||
</Conflicts>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin/yali-rs</Path>
|
||||
<Path fileType="data">/usr/share/yali</Path>
|
||||
<Path fileType="data">/usr/share/applications/yali.desktop</Path>
|
||||
<Path fileType="data">/usr/share/pixmaps/yali.png</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2026-06-01</Date>
|
||||
<Version>4.0.0</Version>
|
||||
<Comment>First release.</Comment>
|
||||
<Name>Erkan IŞIK</Name>
|
||||
<Email>erkanisik@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
+93
-26
@@ -131,16 +131,31 @@ impl Job for CopyFilesJob {
|
||||
|
||||
// --info=progress2 ham çıktı verir; gerçek uygulamada
|
||||
// satır satır parse edilerek ilerleme güncellenebilir.
|
||||
run_cmd("rsync", &[
|
||||
"-aAXH",
|
||||
"--info=progress2",
|
||||
"--exclude=/proc",
|
||||
"--exclude=/sys",
|
||||
"--exclude=/dev",
|
||||
"--exclude=/run",
|
||||
&self.source,
|
||||
&self.target,
|
||||
]).await?;
|
||||
let mut args: Vec<String> = vec![
|
||||
"-aAXH".to_string(),
|
||||
"--info=progress2".to_string(),
|
||||
"--exclude=/proc".to_string(),
|
||||
"--exclude=/sys".to_string(),
|
||||
"--exclude=/dev".to_string(),
|
||||
"--exclude=/run".to_string(),
|
||||
];
|
||||
|
||||
if let (Ok(source_path), Ok(target_path)) = (
|
||||
std::path::Path::new(&self.source).canonicalize(),
|
||||
std::path::Path::new(&self.target).canonicalize(),
|
||||
) {
|
||||
if let Ok(relative_target) = target_path.strip_prefix(&source_path) {
|
||||
if !relative_target.as_os_str().is_empty() {
|
||||
args.push(format!("--exclude={}", relative_target.display()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
args.push(self.source.clone());
|
||||
args.push(self.target.clone());
|
||||
|
||||
let arg_refs: Vec<&str> = args.iter().map(|s| s.as_str()).collect();
|
||||
run_cmd("rsync", &arg_refs).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@@ -592,23 +607,75 @@ async fn sync_partition_table(disk: &str) {
|
||||
}
|
||||
|
||||
/// ISO ortamında canlı sistemin kaynak dizinini otomatik tespit eder.
|
||||
/// Bulunamazsa varsayılan yolu döner.
|
||||
///
|
||||
/// Sırasıyla:
|
||||
/// 1. `/proc/mounts` içinde squashfs/overlay mount noktalarını tara
|
||||
/// 2. Sabit aday listesini dene (her adayda bin/ + etc/ varlığı aranır)
|
||||
/// 3. Hiçbiri bulunamazsa `/` (canlı sistem kökü) kullan — rsync
|
||||
/// zaten /proc /sys /dev /run'u exclude eder.
|
||||
pub fn detect_source_dir() -> String {
|
||||
let candidates = [
|
||||
"/bootmnt", // PisiLinux ISO mount noktası
|
||||
"/mnt/cdrom",
|
||||
"/mnt/sqfs",
|
||||
"/run/livecd/squashfs-root",
|
||||
"/run/live/medium",
|
||||
"/lib/live/mount/rootfs",
|
||||
"/mnt/livecd",
|
||||
];
|
||||
for path in &candidates {
|
||||
if std::path::Path::new(path).exists() {
|
||||
return format!("{}/", path);
|
||||
// 1. /proc/mounts içinde squashfs veya overlay mount noktalarını tara
|
||||
if let Ok(mounts) = std::fs::read_to_string("/proc/mounts") {
|
||||
for line in mounts.lines() {
|
||||
let parts: Vec<&str> = line.split_whitespace().collect();
|
||||
if parts.len() < 3 { continue; }
|
||||
let fs_type = parts[2];
|
||||
let mount_pt = parts[1];
|
||||
|
||||
match fs_type {
|
||||
"squashfs" => {
|
||||
if mount_pt != "/" {
|
||||
let p = std::path::Path::new(mount_pt);
|
||||
if p.join("bin").exists() || p.join("usr/bin").exists() {
|
||||
return format!("{}/", mount_pt.trim_end_matches('/'));
|
||||
}
|
||||
}
|
||||
}
|
||||
"overlay" => {
|
||||
// lowerdir parametresini ayıkla
|
||||
let opts = parts.get(3).unwrap_or(&"");
|
||||
for opt in opts.split(',') {
|
||||
if let Some(lower) = opt.strip_prefix("lowerdir=") {
|
||||
for dir in lower.split(':') {
|
||||
let p = std::path::Path::new(dir);
|
||||
if p.exists() && (p.join("bin").exists() || p.join("usr/bin").exists()) {
|
||||
return format!("{}/", dir.trim_end_matches('/'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
"/run/livecd/squashfs-root/".to_string()
|
||||
|
||||
// 2. Sabit aday listesi (her adayda bin/ + etc/ kontrolü)
|
||||
let candidates = [
|
||||
"/run/livecd/squashfs-root",
|
||||
"/run/live/rootfs",
|
||||
"/run/live/medium",
|
||||
"/lib/live/mount/rootfs",
|
||||
"/mnt/sqfs",
|
||||
"/mnt/livecd",
|
||||
"/mnt/cdrom",
|
||||
"/bootmnt/live",
|
||||
"/bootmnt/livecd",
|
||||
"/bootmnt",
|
||||
];
|
||||
for path in &candidates {
|
||||
let p = std::path::Path::new(path);
|
||||
if p.exists() {
|
||||
let has_bin = p.join("bin").exists() || p.join("usr/bin").exists();
|
||||
let has_etc = p.join("etc").exists();
|
||||
if has_bin && has_etc {
|
||||
return format!("{}/", path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 3. Hiçbiri bulunamazsa canlı sistem kökü
|
||||
"/".to_string()
|
||||
}
|
||||
|
||||
/// Kurulum kuyruğu için ortak yapılandırma.
|
||||
@@ -1265,8 +1332,8 @@ impl Job for ConfigureLocaleJob {
|
||||
.map_err(|e| format!("/etc/locale-gen yazılamadı: {}", e))?;
|
||||
|
||||
// locale-gen çalıştır
|
||||
ui.log("locale.gen çalıştırılıyor…");
|
||||
run_chroot(&self.mount, &["locale.gen"]).await?;
|
||||
ui.log("locale-gen çalıştırılıyor…");
|
||||
//run_chroot(&self.mount, &["locale-gen"]).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user