How to exclude apps when building Haiku?

I’m now attempting to reduce the amount of software in my builds. I’d like to get rid of things like TV, CodyCam and other programs that I don’t use and foresee no reason to have for my own builds… But, when I tried just removing the source code folders to those programs, the build glitched and didn’t complete, so I put it all back. Then I tried removing the reference to the programs in the Jamfile in the src folder. That didn’t seem to break anything, but the programs were still there, so obviously that didn’t work, either. So, what combination of removals/changes will actually work? In other words, what do I need to remove/change and where?

Research build profiles.

[Please always start a new thread when your question veers from the original topic.]

I haven’t tried myself, but haiku/build/jam/images/definitions/regular appears to list all the stuff that’s added to regular images, which includes all but “minimum” and “bootstrap” images.

Sorry about that. I wasn’t sure if I should stay within the topic I started or not. You know, a sort of “stay in your own lane” kinda thing. :smiley:

However, on that thought, I’m finding that the majority of “rebuilds” are eaten up with all those other languages (.cat or catalog files?) other than English. How do I get Jam to stop compiling all those files with a dozen different languages I don’t speak/read/understand?

I tried “hashing out” (commenting out) a couple items, and it seemingly worked. However, I then tried hashing out more items and it failed (incomplete build). Some apps and drivers and such are all on one line and if I want to remove some, but not others, do I simply push a hash in front of each one I don’t want or can I safely move each one to a separate line and put a hash in front of it? I ask, because I tried the latter (each one I didn’t want, I moved to a separate line with a hash in front of it) and the build didn’t complete successfully.

Obviously there are rules to follow with these files and I apparently broke the rules and now don’t know how to get back to where I was, because I didn’t back up the file before I messed it all up. So, I’m just going to replace the entire file from a backup of the /haiku folder and start over. :frowning:

Use Git for tracking changes.

I don’t understand. I’m trying to simply modify MY personal copy/build of Haiku, on my computer, not make changes to the entire tree. I thought Git was only used for downloading the buildtools/source code or making commits (as a developer). I simply want to remove some programs/drivers/etc. out of the builds I’m doing on my computer.

When you download source code with git clone you get local git repository. You can write git diff in terminal when current directory is inside haiku source to view what is changed.

How does viewing what is changed, get rid of apps/drivers/etc. I don’t want in my builds of Haiku. When I run Jam, I wants builds that don’t have certain programs/drivers/etc. that are normally included. What file(s) do I modify (and how do I modify them), to get rid of programs like CodyCam, SerialConnect, TV, etc.?

/* This was written before you posted your last comment. */

It seems you are trying to solve your problems with shear force and if it doesnt works out (as not everything can be intuitive, and please remember we are talking about a complete OS source code here, with kernel, drivers, userland, gui, etc,) you asks on the forum.
An alternative solution would be reading the jam/git/haiku/whatever documentation first to getting know what, how and why the tools doing instead of cannibalizing the source tree, but ofc we cannot stop you if you really want to do that, we just dont understand why would you do that.
As a second alternative maybe you should explain what are you trying to accomplish (i know, excluding things from the final image, right, but what exactly and why?). Maybe there is an infrastructure already for that, like the “minimum” build profiles.
This is my 2x2 cent idea.

I happen to like only having what I want/use. There are several apps and drivers and such that have no purpose on my builds, because they take up disk space and do nothing for me and I don’t use them. It’s my own personal “project” to optimize my builds to my own liking. I just want to know exactly how to do that successfully.

I’m not trying to make a statement or anything. Just trying to accomplish something for my own sake. :smiley:

Thats clear, but how do you plan to update the system you made? Using pkgman / softwareupdater will just replace your crafted haiku package with a vanilla one with every apps what you excluded, so this is probably not what you want. Redoing the manual patching is also not sustainable because you messed with the source tree without knowing what git does and how can it help you (at least that’s what i understand, but fixme), so you cannot even update your git checkout anymore without git reset.
Care to elaborate your plan about this aspect?

I don’t plan to “update” my build. I simply want to trim it down, to those apps/drivers/etc. that I want and use, to free up diskspace, if nothing else. I have a 600Mb disk image with hardly any room left to do anything. I’d like to see how much extra space I can create within that 600Mb disk image. Sometimes things needn’t be logical… to make sense to someone. :smiley:

Then why are you building Haiku at all? Grab the current haiku hpkg, extract it to an empty folder, remove everything what you don’t need and repackage it. For more info you could read the package command help.

You need to be more specific. What did you hash out that failed?
I just tried commenting out “CodyCam” in the “regular” definitions and the built image hasn’t CodyCam in it. So it seems to work…

I’d just delete what you don’t need. You can get the original “regular” file back with git checkout haiku/build/jam/images/definitions/regular.
Or use git to create a local working branch in work in that. There are lots of git tutorials with the specifics.

Or, as X512 said, git diff shows your changes vis-á-vis the Haiku repo if you want to revert a specific change you made.

So, I can just delete the names for stuff in the regular file and it will work fine? That would be great. I wasn’t sure if they had to actually still be in the file but could be “commented out” with a hash, but when there are a couple files I want to keep, that are in the middle of a string of other files I don’t want, I can’t figure out how to hash the the ones I want out, without the others that I want getting eliminated as well. And that already just happened. And trying to put each program on a separate line seemed to break the build (the pathname prompt turned red) and never output an .iso.

you can use guitar for git gui… i think its pretty straightforward to use…

Well, if I knew it were THAT easy… but I didn’t. So, since everytime I rebuild my changes (the hard way, apparently), it creates a new haiku.hpkg, then technically, I should be able to go in that file, and see all the stuff I’ve removed and then remove whatever else I want gone and then repackage it?

That would save a lot of steps. Because right now, I’m making a single change at a time, rebuilding, copying the Anyboot.iso to a thumb drive, burning it on my Windows laptop via BalenaEtcher to the thumb drive, then rebooting my Lenovo laptop with that thumb drive and seeing my change… then repeat. :smiley:

Sometimes doing things the hard way can be a fun learning experience… but when the “fun” wears off, you’re left with just a “learning experience”… then when you’ve learned all you want to learn, it becomes just an “experience”… then when you’ve had all the “experience” you want… it’s just… drudgery. :smiley:

There is this “efficient asking”, you should try to use it.
The base principe: explain clearly at the beginning what your end-goal is, not what your current step is, because in worst case we unnecessarily guide you knee deep into troubles, what would result only to anger.

We insturcted you how to get your checkouts, how to setup your build environment, how to build haiku, even how to exclude things. Instead of this you should have tell us at the beginning what your aim is so we can recommend the most effective way wich requires the least amount of work from your side. This would spare a LOT of time for everybody.

Next trime try to explain clearly what your end-goal is.

Yes. But i fear you still not got my point:

  • Install a nightly Haiku from official source
  • Extract the installed haiku hpkg
  • Trim it down
  • Repackage it
  • Replace the original one in the /system/packages folder
  • Reboot

No messing with building necessary. Your changes will of course dissapear after the first update, but you can redo it, even script it to automatize it. You can even use the repackaged hpkg on other machines too.