-
-
Notifications
You must be signed in to change notification settings - Fork 6
Build packages without installing them #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Lukas-Heiligenbrunner
merged 13 commits into
Lukas-Heiligenbrunner:master
from
gyscos:build_not_install
Apr 24, 2026
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
72fe274
Build packages without installing them in builders
gyscos 7b94eb9
Directly hit aurcache container from archlinux client test container
gyscos 274f86c
Remove privileged mode for e2e test and add to CI github action
gyscos 4d79714
Add migration
gyscos b6d16e0
Revert to non-git paru for builder
gyscos 16dc755
Fix builder script
gyscos cfa90de
Fmt
gyscos e7af5f4
Fix setup-docker-action version
gyscos 13e4255
Use fork of paru in builder
gyscos 12e15ff
Merge branch 'master' into build_not_install
Lukas-Heiligenbrunner 529dfba
use PAT to push images
Lukas-Heiligenbrunner bdb22ba
use pull_request_target which should allow PRs to push images
Lukas-Heiligenbrunner 3e247fc
fix landlock errors for arm64 container builds
Lukas-Heiligenbrunner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /backend/target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,13 @@ | ||
| use crate::build_mode::{BuildMode, get_build_mode}; | ||
| use std::env; | ||
| use std::fs; | ||
| use std::fs::Permissions; | ||
| use std::os::unix::fs::PermissionsExt; | ||
| use std::path::PathBuf; | ||
|
|
||
| /// create the build directory of the package to newly build (as path view of aurcache) | ||
| pub fn create_active_build_path(pkg_name: String) -> anyhow::Result<PathBuf> { | ||
| let path = match get_build_mode() { | ||
| BuildMode::DinD(v) => { | ||
| let mut build_path = PathBuf::from(v.build_path); | ||
| build_path.push(pkg_name); | ||
| build_path | ||
| } | ||
| BuildMode::Host(v) => { | ||
| let mut build_path = PathBuf::from(v.build_artifact_dir_aurcache); | ||
| build_path.push(pkg_name); | ||
| build_path | ||
| } | ||
| }; | ||
|
|
||
| fs::create_dir_all(path.clone())?; | ||
| fs::set_permissions(path.clone(), Permissions::from_mode(0o777))?; | ||
| pub fn create_active_build_path(pkg_name: &str) -> anyhow::Result<PathBuf> { | ||
| let path = env::current_dir()?.join("builds").join(pkg_name); | ||
| fs::create_dir_all(&path)?; | ||
| fs::set_permissions(&path, Permissions::from_mode(0o777))?; | ||
|
|
||
| Ok(path) | ||
| } |
69 changes: 69 additions & 0 deletions
69
backend/aurcache-db/src/migration/m20251107_000000_build_flags_no_install.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| use crate::helpers::dbtype::database_type; | ||
| use sea_orm::DbBackend; | ||
| use sea_orm_migration::prelude::*; | ||
|
|
||
| #[derive(DeriveMigrationName)] | ||
| pub struct Migration; | ||
|
|
||
| #[async_trait::async_trait] | ||
| impl MigrationTrait for Migration { | ||
| async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { | ||
| let db = manager.get_connection(); | ||
|
|
||
| match database_type() { | ||
| DbBackend::Sqlite => { | ||
| db.execute_unprepared( | ||
| r" | ||
| UPDATE packages | ||
| SET build_flags = REPLACE(build_flags, '-S', '-B') | ||
| WHERE build_flags LIKE '%-S%'; | ||
| ", | ||
| ) | ||
| .await?; | ||
| } | ||
| DbBackend::Postgres => { | ||
| db.execute_unprepared( | ||
| r" | ||
| UPDATE public.packages | ||
| SET build_flags = REGEXP_REPLACE(build_flags, '-S', '-B', 'g') | ||
| WHERE build_flags ~ '-S'; | ||
| ", | ||
| ) | ||
| .await?; | ||
| } | ||
| _ => Err(DbErr::Migration("Unsupported database type".to_string()))?, | ||
| } | ||
|
|
||
| Ok(()) | ||
| } | ||
|
|
||
| async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { | ||
| let db = manager.get_connection(); | ||
|
|
||
| match database_type() { | ||
| DbBackend::Sqlite => { | ||
| db.execute_unprepared( | ||
| r" | ||
| UPDATE packages | ||
| SET build_flags = REPLACE(build_flags, '-B', '-S') | ||
| WHERE build_flags LIKE '%-B%'; | ||
| ", | ||
| ) | ||
| .await?; | ||
| } | ||
| DbBackend::Postgres => { | ||
| db.execute_unprepared( | ||
| r" | ||
| UPDATE public.packages | ||
| SET build_flags = REGEXP_REPLACE(build_flags, '-B', '-S', 'g') | ||
| WHERE build_flags ~ '-B'; | ||
| ", | ||
| ) | ||
| .await?; | ||
| } | ||
| _ => Err(DbErr::Migration("Unsupported database type".to_string()))?, | ||
| } | ||
|
|
||
| Ok(()) | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.