When asked to strip binaries when copying to containers we now
strip to a temporary file, copy over resources to it, copy it
to the container, then copy the attributes from the original
source.
This should allow stripping binaries while preserving attributes
and resources even when copying to images.
We now only attempt to strip binaries, by detecting the
LINKFLAGS variable on the targets.
CopySetHaikuRevision now also forwards LINKFLAGS
to revisioned binaries.
Introduce separate AppendToContainerCopyFilesScriptStripFile actions
which are used for copying and stripping, and avoids many useless
shell tests.
When asked to strip binaries, they are detected and handled
individually for simplicity.
Note we still don't keep resources and attributes when stripping.
Currently only needed for boot floppy on some platforms.
Disabled for now.
Note we do not have a mean of knowing which file is a binary
or not so we just try to strip, and silently continue when
strip fails (like on the kernel settings file).
Also note strip actually replaces the file, which means it looses
both the resources and attributes, which shouldn't be a problem
for the boot floppy drivers archive, but is not wanted for other
images, so it's not usable elsewhere as such. Patch wanted.
* rule AddPackageFilesToHaikuImage: Add "flags" parameter. The only
supported flag is "nameFromMetaInfo". It causes the packages to be
copied under their canonical file name onto the image.
* Use the new flag for all generated packages save haiku_loader.hpkg.
* Add "flags" parameter and only supported flag "computeName". When
specified the "destName" argument is the name of a shell command
or function that will be called to determine the destination file
name when the container is built.
* AddFilesToHaikuImage: Pass flags to AddFilesToContainer.
... before copying the new contents to the image. This caters to the
typical use case of updating an existing Haiku, making manual
intervention to get the new packages activated unnecessary. The downside
is that manually added packages will be removed as well.
* find_directory() and hard-coded paths use /boot/system instead of
/boot/common.
* The build system creates the writable directories in /boot/system
instead of /boot/common.
* The build system no longer installs any packages in /boot/common.
The symlink was only correct, if the container was a package. For
containers with a non-empty path to the system directory the link would
duplicate the system directory path.
* IsPackageAvailable, FetchPackage: Add flags parameter. The only
flag supported ATM is nameResolved, indicating that the specified
package name does not need to be resolved with respect to a secondary
architecture anymore.
* Add build profile action "build-package-list". As an argument the
file to which the list of all packages needed for the image is
written. The rule BuildHaikuImagePackageList implements the action.
* BuildBootstrapRepositoryConfig: Does now require the variable
HAIKU_REPOSITORY_TREE_PATH to be set on the config file target instead
of hard-coding the path. Allows reuse of the actions.
* Add rules BuildHaikuPortsSourcePackageDirectory and
BuildHaikuPortsRepositoryConfig. The former builds all HaikuPorts
source packages needed to build the packages for an alpha image. The
latter generates a haikuports.conf file for use on the bootstrap
Haiku.
* HaikuImageBootstrap: Add directory /boot/home/haikuports which
contains a subdirectory with the source packages and a
haikuports.conf.
For the secondary architecture the same specified package name means a
different package, so we need to use the mapped name IsPackageAvailable
returns.
* Add configure option --bootstrap which allows specifying the
haikuporter and HaikuPorts repository paths.
* Add rules for supporting a second repository type. The
PackageRepository rule is now private and RemotePackageRepository is
used for remote repositories. The new BootstrapPackageRepository rule
is for defining a bootstrap repository (there will probably be only
the HaikuPorts cross repository) whose packages can be built as needed
via haikuporter.
* Rename DownloadPackage to FetchPackage.
* Define repository HaikuPortsCross.
* HaikuCrossDevel package(s): There are now two sets of packages: A
"stage1" set with the same content as before and a final set
additionally containing the libraries libbe, libnetwork, libpackage.
Those are needed for building the libsolv bootstrap package while for
building them we need other bootstrap packages (ICU, libz).
This is basically all that's required to build a bootstrap Haiku
completely from sources, with a few caveats:
* There's no ICU bootstrap recipe yet (so one has to cheat and use the
prebuilt package ATM).
* Probably doesn't work on Haiku yet (tested on Linux only).
* A 32 bit environment must be used (otherwise building the gcc 2
bootstrap package fails).
* Building with multiple jobs doesn't work yet, since haikuporter uses
common directories for building different packages and there's no
explicit serialization yet.
* Haven't tested the resulting image save for booting it. So it probably
needs a bit more work before it can actually build the final
HaikuPorts packages.
* Under the base URL there are supposed to be the repository files and a
subdirectory "packages".
* Fix the repository URL related confusion introduced earlier. The URL
in
the repository info (and thus in the repository file) is supposed to
be the base URL for the repository. It is not a (potentially)
different base URL for the package files. Package and repository
files were supposed to live in the same directory. Now, by requiring
the package files to live in a subdirectory -- which can also be a
symlink -- we gain some flexibility.
The URL in the repository config is usually the same as the in the
repository info, unless it refers to a mirror site. This allows for
mirrors to copy the original repository verbatim.
* Remove the PackageURL rule and introduce a DownloadPackage rule
instead. The URL for a package file cannot be computed in the jam
parsing phase anymore, as it contains the hash value of the package
list.
* BRepositoryConfig: Add PackagesURL() for convenience.
* Build libsolv and the dependency solver part of the package kit for
the build platform.
* Add build tool get_package_dependencies. Given a list of package files
and a list of repository files it determines the additional packages
that need to be retrieved from the repositories and prints their URLs.
* Add rules to work with external repositories in the build system
(build/jam/RepositoryRules):
- PackageRepository declares an external repository with all its
packages. The URL of the repository file isn't specified. It is
computed from a given base URL and the SHA256 hash of the list of
package files.
- GeneratedRepositoryPackageList generates a file containing the file
names of all packages in a repository.
- IsPackageAvailable returns whether a package is available in any
repository.
- PackageURL returns the URL for a package.
* Declare the HaikuPorts repository for x86_gcc2
(build/jam/repositories/HaikuPorts/x86_gcc2).
* Add rule AddHaikuImagePackages to add a package to the image and rule
IsHaikuImagePackageAdded to determine whether a package has been
added.
* OptionalPackages: Remove all entries that just downloaded and
installed an external package. AddHaikuImagePackages can be used
instead and is used in the remaining entries. Also move the remaining
optional package dependency declarations from
OptionalPackageDependencies here.
* ExtractBuildFeatureArchives: Instead of the URL parameter a package
name must be specified now. This allows to simplify BuildFeatures
significantly, since there's no dealing with URLs anymore. "if" out
the entries that aren't supported yet.
* build_haiku_image: For the packages installed in system and common
resolve their dependencies and download and install them as well.
* ExpanderSettings: Use a settings directory "expander" and rename
settings file to "settings".
* ExpanderRules: Read expander rules from "rules" files in the settings
directory, then from files in expander/rules subdirectories of the
installation location data directories, and finally add the built-in
rules. This allows packages to provide expander rules (as already
done by the p7zip package).
* OptionalPackages: Remove AddExpanderRuleToHaikuImage invocations.
* ImageRules: Remove Expander rule file related rules.
* After examining MacOS toolbox roms, I think i've got
this nailed down. The MacOS Toolbox rom contains chrp
code at the top and binary code at the bottom.
* The Raw format for the chrp seemed to cause issues with the
OpenFirmware boot process on some systems. NetBSD uses a '-'
file type.
* The format of the chrp seems a lot more sensitive across machines
than described. Ensure our returns and spaces are even.
* Booting with the 'c' key is still working on my older OpenFirmware
machine with the chrp script. The bitmap logo is a half black, half
white box.
* I removed the &device; alias for now for troubleshooing. It also may
of been causing compatibility issues. More testing is needed.
* It seems like not all NewWorld OpenFirmware
versions support booting from CHRP scripts.
* Move Haiku elf bootloader into bootloader.b
type tbxi. As it is in the blessed directory
it is picked up by cd:,\\:tbxi
* Adjust bootinfo.txt to point to bootloader
&device; ensures that the image can be started
regardless of source media
* Adjust bootinfo.txt to use \\ as base. \\ is an
alias for the blessed folder on the boot media
* Rename ofboot.b to ofboot.chrp to avoid confusion
* Add .txt, .html to hfs.map to identify them properly
* The haiku-boot-cd-ppc.iso now boots on my G3 PowerBook
by holding the 'c' key at startup. The boot menu colors
are incorrect (white background) but it is a step in
the right direction.
* New chrp script. Blank icon for the moment, if someone
could figure out how to make a chrp icon that would be
neat.
* Tested working on qemu and real hardware. Need to test
on a more modern PowerPC Mac however.
* Update MimeSet rule to use the MIME DB the build system creates.
* Add CreateAppMimeDBEntries rule and call it from Link for targets that
might be applications that need to be registered with the MIME DB. For
the target the rule is invoked with it creates a directory into which
the entries for the types to be registered are written. The directory
is associated with the target via the HAIKU_MIME_DB_ENTRIES variable.
* AddFilesToContainer: If a target is added that has MIME DB entries,
also add those to the container.
* build_haiku_package: Call mimeset for the package contents.
Since the same driver can be added in more than one category, in a few
cases AddDriversToContainer was invoked twice for the same target. Avoid
adding the driver twice to add-ons/kernel/drivers/bin in such a case.
Didn't really cause any problem, but no need to copy the file twice.
Instead of the boolean alwaysUpdate, isCDPackage, and stripDebugSymbols
parameters use a uniform flags parameter which can contain any of the
respectively supported flags (alwaysUpdate, cdPackage,
stripDebugSymbols, !stripDebugSymbols).
When invoked for a hpkg only the installation location (i.e. "common"
or "system") has to be specified now and "common" is the default. The
rule uses AddPackageFilesToHaikuImage now.
Equivalent to "jam <list of all hpkgs> && jam @... <list of all hpkgs>",
i.e. it makes sure all hpkgs that are supposed to be in the image are
rebuilt respectively downloaded and copied to the image. It doesn't
remove old packages nor the activation files -- that still has to be
done manually.
Setting 'HAIKU_STRIP_DEBUG_FROM_OPTIONAL_PACKAGES = 1' will enable the
mechanism. By default all packages will be stripped. Passing anything
other than '1' or 'true' in the InstallOptionalHaikuImagePackage call
will disable it for a particular package.
Bring the changes that aren't package management related and the ones
that are but don't take effect as long as they are ignored by the build
system into the master.
Summary of changes:
* Introduce private header <directories.h> with constants for a good
deal of paths that should usually be retrieved via find_directory().
* Replace hard-coded paths by using find_directory() or the
<directories.h> constants (e.g. in drivers and the kernel).
* Add find_directory() constants needed for package management.
* Add __HAIKU_ABI_NAME and B_HAIKU_ABI_NAME macros.
* src/apps/deskbar: BeMenu.* -> DeskbarMenu.*,
DeskBarUtils.* -> DeskbarUtils.*
* Change deskbar menu settings directory from ~/config/be to
~/config/settings/deskbar.
* Other smaller cleanups, changes, and fixes.