Commit Graph

94 Commits

Author SHA1 Message Date
Alexander von Gluck IV cc8f1d2ffd headers/os: Add gcc 5 to BeBuild.h
* While we still use gcc 4, the host tools won't
  build on gcc 5 systems without this.
* x86_64 compiles under gcc 5.10 successfully
2015-06-24 23:06:23 -05:00
Axel Dörfler e711e6e42f Moved BJob, and JobQueue into the support kit.
* Put it in the BSupportKit namespace, following the style introduced
  with the package kit for now.
* The BSupportKit::BJob class no longer knows about the package kit's
  Context class. However, the BPackageKit::BJob class does.
* Due to the namespace juggling, a lot of files had to be touched.
* The JobQueue class remains private.
* Due to the way Haiku is built on itself, you cannot build this change
  under Haiku with an older release.
2015-05-21 21:37:01 +02:00
Ingo Weinhold 32832cbe47 Remove BPackageKit::BDataOutput
Use BDataIO instead.
2014-06-23 22:58:15 +02:00
Ingo Weinhold dec78bb27c Add new error codes B_PARTIAL_{READ,WRITE} 2014-06-23 22:58:15 +02:00
Ingo Weinhold d2d1af830b Revert "Move ZlibDecompressor to libshared"
This reverts commit 9af2105d36.

Conflicts:
	src/kits/package/Jamfile
2014-06-18 22:13:39 +02:00
Ingo Weinhold 707f60f4e9 Revert "Fix build."
This reverts commit 00dfae0bce.
2014-06-18 22:13:39 +02:00
Ingo Weinhold 0de3219e33 package daemon: Rework error and issue propagation to client
* BDaemonClient: Move inner class BCommitTransactionResult to top level
  and make it public.
* BCommitTransactionResult:
  - Add a whole bunch of specific error code enum values. Such an error
    code is now the primary error, as opposed to before where we would
    mix status_t and enum value errors. There's a systemError property
    of type status_t which may provide additional information, though
    (depending on the primary error type).
  - Remove the errorMessage property. Due to mapping all errors to the
    specific error codes this is no longer necessary. Mixing such a
    message with another error description is also not very helpful when
    it comes to localization (still not supported, though).
  - Add several properties (paths, strings, error codes) that serve as
    arguments to the primary error and are used by FullErrorMessage().
  - Add issues property, a list of instances of new class
    BTransactionIssue. Those describe non-critical issues (e.g. failed
    update of a settings file) that occurred in the process of
    committing the transaction. Those issues should be presented to the
    user by the package management program.
* Exception: Adjust to transport the BCommitTransactionResult
  properties.
* CommitTransactionHandler, FsTransactions, Root, Volume: Adjust to
  BCommitTransactionResult/Exception changes.
* CommitTransactionHandler: Now requires a BCommitTransactionResult to
  which it adds the issues it encounters. The reply BMessage is no
  longer needed, though.
* Volume: Refactor common code from the three methods that use
  CommitTransactionHandler into new method _CommitTransaction.
2014-06-15 17:21:01 +02:00
Adrien Destugues bec7cb1006 Also move the build version of BReferenceable.
* Should fix the build, but results in an internal compiler error here
(with a gcc2 haiku host). Let's see what the buildbots think...
2014-06-11 17:53:41 +02:00
Jessica Hamilton 1e31468302 ByteOrder.h: separate host & Haiku versions.
* This avoids polluting the Haiku headers with host issues,
  as pointed out by Axel.
* Should also resolve build issues for various versions of
  host compilers that were introduced in previous commits.
2014-05-30 20:39:43 +12:00
Adrien Destugues 00dfae0bce Fix build.
Sorry, renaming headers isn't detected by Jam and not everything was
rebuilt.
2014-02-11 12:50:27 +01:00
Adrien Destugues 9af2105d36 Move ZlibDecompressor to libshared
* This will be used to implement compressed http streams
* Remove the custom BDataOutput class, and use BDataIO instead, for
easier integration with existing code.
2014-02-11 12:06:38 +01:00
Alexander von Gluck IV aa4b5749d6 runtime_loader: Detect and trigger on PE binaries
* Previously PE binaries would trigger the "incorrectly
  executable" dialog. Now we get a special message for
  B_LEGACY_EXECUTABLE and B_UNKNOWN_EXECUTABLE
* Legacy at the moment is a R3 x86 PE binary. This could
  be extended to gcc2 binaries someday far, far, down the
  road though
* The check for legacy is based on a PE flag I see
  set on every R3 binary (that isn't set on dos ones)
* Unknown is something we know *is* an executable, but
  can't do anything with (such as an MSDOS or Windows
  application)
* No performance drops as we do the PE scan last
* Tested on x86 and x86_gcc2
2014-01-07 19:38:07 -06:00
Ingo Weinhold 2b76973fa2 mimeset: Use TextSnifferAddon when using a custom MIME DB
That addresses the problem that packaged text files aren't correctly
identified (ticket #9972). All concerned packages have to be rebuilt,
of course.
2013-11-22 12:24:13 +01:00
Ingo Weinhold 98c6dfa41e Switch build system from optional package to repositories
* 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.
2013-07-05 10:51:42 +02:00
Ingo Weinhold 4489c88b61 hpkg format: Generalize user/global settings file attributes
* For all identifiers: Rename global settings file to global writable
  file. We want to use the respective attribute also for other writable
  files, not only settings files.
* User settings file/global writable file info/attribute: Add
  isDirectory property/child attribute. This allows declaring global/
  user settings directories associated with the package.
2013-06-06 00:17:02 +02:00
Ingo Weinhold 0f4e11e75c hpkg format: Add attributes for declaring users and groups 2013-05-25 01:12:37 +02:00
Ingo Weinhold a8de2761c7 Move package attribute ID definitions to a separate file
... <package/hpkg/PackageAttributes.h>, which also defines other
properties (name and type) for each attribute. It does so via a macro
that the caller can define to generate whatever code is desired.
2013-05-25 01:12:35 +02:00
Ingo Weinhold fe707a23fc hpkg format: Add attributes for declaring settings files
Global and user settings files can be declared. For global ones an
update policy can be specified. If not specified, the settings file is
not included in the package, but created by the program (or user) later.
If an update type is specified, it defines what to do with the settings
file when updating the package to a newer version.

User settings files are never included in the package; they are always
created by the program or the user. If the package contains a template/
default settings file, it can be declared, but for informative purposes
only.
2013-05-25 01:12:34 +02:00
Ingo Weinhold 0ee1651856 Rename BBlockBufferCache and friends to *Pool*
Also move BBlockBufferPoolNoLock into BHPKG namespace with the other
classes. Not sure why it wasn't there before.
2013-05-25 01:12:25 +02:00
Ingo Weinhold 7575abbca2 Clone read support functionality for HPKG format version 1
It uses sub-namespace BPackage::BHPKG::V1. Unlike the one for the
current format version, the V1 version of BPackageInfoContentHandler
lives in BHPKG(::V1) sub-namespace and is private.
2013-05-25 01:12:22 +02:00
Ingo Weinhold d0815ca03b Add private MIME DB classes to libbe_build
* This pulls in some more stuff, like libicon and agg which are also
  included in libbe_build, now.
* Update a few libbe_build classes and headers needed to get things
  building.
* This likely breaks the <build>mimeset build on Haiku.
2013-05-08 04:39:56 +02:00
Ingo Weinhold 69a53ac5b4 Add DownloadFileRequest
Downloads a file and optionally checks its checksum.
2013-04-20 21:40:11 +02:00
Oliver Tappe 74233e2c88 Re-apply cf0a957 for the build-version of libbe.
* fixes build on non-Haiku platforms
2013-04-20 15:16:00 +02:00
Ingo Weinhold d7d9497e31 Add BInstallationLocationInfo 2013-04-14 17:06:26 +02:00
Ingo Weinhold 7c29395824 Add some missing build headers 2013-04-02 17:06:56 +00:00
Ingo Weinhold 8c29f58728 Add BPackageRoster::GetActivePackages()
The implementation is temporary. Currently it reads through the packages
in the respective packages directory and checks against the package
links. Once package activation is tracked explicitly we'll use the
activation file/directory.
2011-07-17 16:55:22 +02:00
Ingo Weinhold 10b8f70276 Add class BPackageInfoContentHandler
A BPackageContentHandler subclass that initializes a BPackageInfo from
the read package attributes. Pulled out of RepositoryWriterImpl's
PackageContentHandler.
2011-07-17 16:55:21 +02:00
Ingo Weinhold db9a50a2c6 Pull class BPackageInfoSet out of BRepositoryCache 2011-07-17 16:55:21 +02:00
Ingo Weinhold 808a51161a Add a BStringList class 2011-07-17 16:55:20 +02:00
Ingo Weinhold 3e29244600 Move B_MIME_STRING_TYPE to <TypeConstants.h> 2011-07-17 16:55:09 +02:00
Ingo Weinhold 0ee9bc97d0 Build libpackage for the build platform 2011-07-17 16:54:10 +02:00
Ingo Weinhold d451f7a329 Added several APIs to libbe_build/libshared_build 2011-07-17 16:54:09 +02:00
Ingo Weinhold a7bcad8194 Updated to current Haiku version 2011-07-17 16:54:09 +02:00
Ingo Weinhold 1044b2eb82 Added missing <StorageDefs.h> include. 2011-07-17 16:54:07 +02:00
Ingo Weinhold bd9d1df3a0 Added very simple BLooper class to libbe_build. 2011-07-17 16:54:06 +02:00
Ingo Weinhold 40f4cf2aca Attempt to fix the FreeBSD build. We don't really what KernelExport.h defines,
so include OS.h instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 13:44:07 +00:00
Ingo Weinhold 4cc4f7bb18 * Added KMessage to libroot_build.
* libbe_build: Where possible we directly use the actual Haiku headers and
  sources, now. In the headers/build headers we just include the respective
  Haiku headers as needed. That still allows overrides where necessary. The
  intention is to make it easier to keep the build stuff in sync.
* Fixed a few printf() format and signed/unsigned comparison warnings.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-14 11:42:49 +00:00
Jonas Sundström 82e7ef6709 Add app filename localization catalog entry support to BAppFileInfo, registrar and mimeset. Need help to understand why the build-version of UpdateMimeInfoThread.cpp does not compile with the added code, currently commented out. Sorry about the arbitrary B_MIME_TYPE_LENGTH*3. Advice and review welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-07 15:14:46 +00:00
Oliver Tappe 8a990d5228 Part of fixing #7226:
* the libbe_build version of BString was broken, at least with respect
  to LockBuffer() on an empty string - replaced the implementation and
  header with our current version (keeping the type-related changes
  required by the build-version)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-16 10:13:12 +00:00
Ingo Weinhold 4a57f84396 Introduced types [__haiku_]generic_{addr,size}_t which are wide enough for
virtual and physical addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-02 18:22:38 +00:00
Ingo Weinhold ea021b94d8 * Moved phys_addr_t definition to SupportDefs.h.
* Added phys_size_t.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-25 11:18:38 +00:00
Ingo Weinhold a9139aa356 * FS shell: Use 64 bit [s]size_t on 64 bit platforms.
* SupportDefs.h (build platform): Define [s]size_t printf() macros correctly
  on 64 bit hosts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 21:44:16 +00:00
Ingo Weinhold d34daac82a * config/{HaikuConfig.h,types.h}:
- Added macro __HAIKU_ARCH_BITS specifying the architecture bitness (32/64)
    (might be more convenient to use than __HAIKU_ARCH_{32,64}_BIT).
  - Added macros __HAIKU_ARCH_PHYSICAL_BITS, __HAIKU_ARCH_PHYSICAL_{32,64}_BIT,
    and the types __haiku_phys_[s]addr_t. The intention is to use separate
    macros and types for virtual and physical addresses, since for some
    architectures (e.g. x86 with PAE) those actually differ.
* sys/types.h, BeBuild.h, SupportDefs.h:
  - Added types phys_[s]addr_t and respective printf() format macros.
  - Added public macros B_HAIKU_BITS, B_HAIKU_PHYSICAL_BITS,
    B_HAIKU_PHYSICAL_{32,64}_BIT.

Might break the build under older Haiku installations. Will test next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 19:55:38 +00:00
Ingo Weinhold 97eaabdfb0 Also allow gcc 3 as the host compiler.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-20 13:07:43 +00:00
Ingo Weinhold a1fb0cb3ed Renamed headers/build/config to headers/build/config_build, so it doesn't
shadow the host platform's <config/...> headers anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 10:18:13 +00:00
Ingo Weinhold 7870a9ffc7 Updated the messaging related build platform code with the current Haiku
version.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 21:34:59 +00:00
Ingo Weinhold cf844822db * Added B_PRIdTIME and B_PRIiTIME macros (for time_t).
* Added FSSH_[S]SIZE_MAX to headers/private/fs_shell/fssh_types.h.
* Fixed various 64 bit compiler warnings. Nothing too serious, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-25 12:02:20 +00:00
Ingo Weinhold 045852f952 Forgot the search and replace step after the copy and paste.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 23:01:22 +00:00
Ingo Weinhold b23206b6e4 * Fixed operator<<() versions clashing with 64 bit compilers.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 22:55:52 +00:00
Ingo Weinhold a1f8d8a11c Updated the build versions of <BeBuild.h> and <SupportDefs.h>. Copied
modified versions of the new config headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-24 22:50:55 +00:00