Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Live Build: Dynamic/Generated package list ideas?

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
mrjpaxton
Posts: 18
Joined: 2021-07-09 02:35
Been thanked: 2 times

Live Build: Dynamic/Generated package list ideas?

#1 Post by mrjpaxton »

I have a question that relates to Live Build. Sorry if this isn't the right forum for this, but since this will likely include POSIX sh scripting, I thought it might fit here.

Been thinking of how to best approach this. After reading this section - https://live-team.pages.debian.net/live ... on.en.html

It mentioned the use of script and command running with a beginning bang "!" symbol on a line, which seems useful, but not sure how exactly I can put this into practice yet. And then secondly, there's the conditionals. They seem very limited, but they can match multiple options. No nesting and no regex however.

Here are my current package lists, I haven't specified the ".list.chroot_live" and ".list.chroot_install" extensions yet:

Code: Select all

apps-gui.list.chroot.bak
apps-terminal.list.chroot
desktop-lxqt.list.chroot.bak
dm-sddm.list.chroot.bak
live-installer.list.chroot
live.list.chroot
utils-fonts.list.chroot.bak
utils-lxqt.list.chroot.bak
wm-i3.list.chroot.bak
wm-sway.list.chroot.bak
The optional ones are named ".bak" as for now, so ignore that. That's what I do right now when I don't want certain package lists in the Live Build. This is okay, but what I would rather want to do is set variables or conditionals to include and exclude package lists. What I mean is that lets say I set a variable in my "auto/config" (the one lb config uses), something like INCL_APPS=true, just as an example, then it should include the "apps-gui" and "apps-terminal" lists, and also maybe ONLY include "apps-gui" if INCL_DESKTOP=lxqt is true, which should also include "dm-sddm", "live-installer", "utils-lxqt" and "utils-fonts". Does that make any sense? And maybe if INCL_DESKTOP="i3 sway", then it will include "apps-gui"/"apps-terminal" (ONLY if INCL_APPS=true), "utils-fonts" "wm-i3" "wm-sway"

So in other words it would help make the package lists more dynamic instead of having to comment out package lists that I don't want to include.

So what would be the quote-on-quote best way to do this for Live Build? Or is there an even better way to generate more dynamic package lists?

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Live Build: Dynamic/Generated package list ideas?

#2 Post by Head_on_a_Stick »

Perhaps try a wrapper script around live-build? I don't think the `lb config` options can do what you want, unless I've missed something.

Or manage the configuration using version control (eg, git[1]) with separate branches for each type of ISO image you want to make.

[1] Note that "git" is not synonymous with "GitHub"; the latter should be avoided whenever possible because Microsoft are using Co-Pilot to launder GPL code on an industrial scale, and it is also evil.
deadbang

mrjpaxton
Posts: 18
Joined: 2021-07-09 02:35
Been thanked: 2 times

Re: Live Build: Dynamic/Generated package list ideas?

#3 Post by mrjpaxton »

Head_on_a_Stick wrote: 2023-08-06 11:15 Perhaps try a wrapper script around live-build? I don't think the `lb config` options can do what you want, unless I've missed something.

Or manage the configuration using version control (eg, git[1]) with separate branches for each type of ISO image you want to make.

[1] Note that "git" is not synonymous with "GitHub"; the latter should be avoided whenever possible because Microsoft are using Co-Pilot to launder GPL code on an industrial scale, and it is also evil.
Git branches? That's a good idea. I don't know too much about using Git, so I don't rely on it yet. Now is a good time to learn I suppose.

I already have a shell script that runs "lb clean", "lb config", and "lb build" all in one step, so I might put in some options using getopts or a menu system. That was another thing I thought of after posting this.

Post Reply