Skip to content

arch variants and better signing - #29

Open
TheJJ wants to merge 6 commits into
SFTtech:mainfrom
TheJJ:sign-in-container
Open

arch variants and better signing#29
TheJJ wants to merge 6 commits into
SFTtech:mainfrom
TheJJ:sign-in-container

Conversation

@TheJJ

@TheJJ TheJJ commented Aug 27, 2026

Copy link
Copy Markdown
Member
  • add host_arch_variant building for amd64v3 architecture variant of amd64
  • fix gpg agent forwarding inside lxd
  • color printing support
  • default container driver selection in config

Comment thread packages/debmagic/src/driver/driver_docker.rs
BuildTarget::Source(source_args) => (&source_args.build, None, None, true),
};

let config_driver = load_config(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks somewhat as if we will be loading the config twice now. Initially here and then another time down the line when e.g. resolving the settings for the drivers themselves.

Probably the BuildIntentInput should already receive a fully resolved config object instead of the config file path (other subcommands should be handled similarly). That way we can avoid that duplication where we might resolve configs differently in different places.

Comment on lines 150 to 167
#[arg(
long,
action = clap::ArgAction::SetTrue,
help = "Sign the resulting .changes/.dsc with debsign after building. Defaults to the 'sign_package' setting in the config file (false if unset)."
num_args = 0..=1,
default_missing_value = "true",
action = clap::ArgAction::Set,
overrides_with = "no_sign",
help = "Sign the resulting .changes/.dsc with debsign after building. Defaults to the 'sign.source' setting in the config file (false if unset)."
)]
pub sign: Option<bool>,

#[arg(
long,
action = clap::ArgAction::SetFalse,
help = "Do not sign the resulting .changes/.dsc, overriding a 'sign_package = true' default in the config file."
num_args = 0..=1,
default_missing_value = "true",
action = clap::ArgAction::Set,
help = "Do not sign the resulting .changes/.dsc, overriding a 'sign.source = true' default in the config file."
)]
pub no_sign: Option<bool>,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defining these cli options this way looks a bit weird, is there no other way with clap creating these --no-sign / --sign pairs automatically?

Also we should not be passing both flags to further program stages as that is a very weird api. This combination is something specific to the cli. Any signing logic should just see one boolean, whether to sing or not to sign.

@TheJJ TheJJ Sep 6, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tried, but i couldn't find a better way to have tristate flags: no value, and 2 override values - no value is used so we can keep the config setting. also this supports sign=false, which for me is more intuitive than no-sign

Comment thread packages/debmagic/src/cli.rs
Comment thread packages/debmagic/src/cli.rs
@TheJJ TheJJ changed the title arch variants and fix signing in container arch variants and better signing Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants