#
a22fa0c9 |
|
04-Jun-2019 |
Alexander G. M. Smith <agmsmith@ncf.ca> |
package kit: Add pre-uninstall scripts feature. Just like post-install scripts which run shortly after a package is installed, pre-uninstall scripts are run just before a package is removed. Implements enhancement #13427 * Fix script exit code handling vs script launch errors. * Bump package and repo file version numbers due to new attribute, unfortunately makes new .hpkg files not backwards compatible. * Add pre-uninstall functionality, mostly cloning the post-install except in a few places. * Discover that _RunQueuedScripts() is never called, a future TODO:? * Update package documentation for pre-uninstall scripts, and use of the boot/post-install directory. Change-Id: I45596255ce74bc102f6e5b606cbf83e4e4347a17 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1504 Reviewed-by: Alexander G. M. Smith <agmsmith@ncf.ca> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
81375d4f |
|
11-Jul-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
Package Kit: add Zstd compression. Change-Id: Idbdb7cf1bde659046a88ea69a76e3b5fc4cd7013 Reviewed-on: https://review.haiku-os.org/323 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
a8de2761 |
|
23-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
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.
|
#
fe707a23 |
|
23-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
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.
|
#
47039b85 |
|
21-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Package/repository file format: Add a minor version header field * Add minor_version to hpkg_header and hpkg_repo_header and make heap_compression uint16. * If the minor version of a package/repository file is greater than the current one unknown attributes are ignored without error. This allows introducing new harmless attributes without making the resulting files unreadable for older package kit versions.
|
#
d59e0feb |
|
20-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
package: Suppress version mismatch errors where V1 is supported * Add flags parameter to Init() of BPackageReader and friends. * Introduce flag B_HPKG_READER_DONT_PRINT_VERSION_MISMATCH_MESSAGE and don't print a version mismatch error when given. * package extract/list: Use the new flag.
|
#
796343ed |
|
18-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Allow specifying the compression level for package creation * Introduce BPackageWriterParameters which comprises all parameters for package creation, currently flags and compression level. Such an object can be passed to BPackageWriter::Init() and is passed on to PackageWriterImpl and WriterImplBase. * PackageFileHeapWriter: Add compressionLevel property and pass the value on to ZlibCompressor. * package add/create: Add options -0 ... -9 to specify the compression level to be used.
|
#
1f633814 |
|
17-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
hpkg format: compress the whole heap Instead of handling compression for individual file/attribute data we do now compress the whole heap where they are stored. This significantly improves compression ratios. We still divide the uncompressed data into 64 KiB chunks and use a chunk offset array for the compressed chunks to allow for quick random access without too much overhead. The tradeoff is a limited possible compression ratio -- i.e. we won't be as good as tar.gz (though surprisingly with my test archives we did better than zip). The other package file sections (package attributes and TOC) are no longer compressed individually. Their uncompressed data are simply pushed onto the heap where the usual compression strategy applies. To simplify things the repository format has been changed in the same manner although it doesn't otherwise use the heap, since it only stores meta data. Due to the data compression having been exposed in public and private API, this change touches a lot of package kit using code, including packagefs and the boot loader packagefs support. The latter two haven't been tested yet. Moreover packagefs needs a new kind of cache so we avoid re-reading the same heap chunk for two different data items it contains.
|
#
7adfd76b |
|
13-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add "base package" package attribute
|
#
df295396 |
|
13-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Remove resolvable provides type * Remove BPackageResolvableType and respective property from BPackageResolvable. * Remove package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE_PROVIDES_TYPE.
|
#
fc0cec53 |
|
12-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Bump HPKG format version
|
#
171fd58c |
|
12-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
package kit: some fixes for multi-version support * Use enums/constants/functions instead of preprocessor macros. * Missing include in PackageInfoAttributeValue.h. * PackageReaderImpl::Init(): Check version before header size and return B_MISMATCHED_VALUES instead of B_BAD_DATA, if the version doesn't match. This allows callers to determine the condition and try a reader for a different version. A more flexible interface for that case would be nice, but since we want to support the old package version only temporarily, the current solution should be good enough.
|
#
202c1daa |
|
15-Apr-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
BPackageVersion: Rename property release to revision * ... to avoid confusion with the preRelease property. It's also called "revision" in the HaikuPorts recipes. * Update libsolv package. Was necessary due to the BPackageVersion change, but also includes a few more changes.
|
#
6ae0ecd4 |
|
11-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add a package info "install-path" attribute The attribute is intended for simplifying package building. The package's install path will be used for the package's .self package symlink, allowing installation to a temporary directory when building the package.
|
#
00bc8e9c |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
f9caa05c |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Define IDs for package section
|
#
3a802b3d |
|
28-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add URL/source URL hpkg package attributes
|
#
622ca02b |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add package attribute for compatible version
|
#
8f314372 |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Introduce a pre-release version component * The version string pattern is now: <major>[.<minor>[.<micro>]][-<pre>][-<release>] * Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package attribute. * Add "preRelease" field to BPackageVersionData. * Add "preRelease" property to BPackageVersion and packagefs's Version. * Adjust package reader and writer code accordingly.
|
#
f19957b8 |
|
11-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add a package info "install-path" attribute The attribute is intended for simplifying package building. The package's install path will be used for the package's .self package symlink, allowing installation to a temporary directory when building the package.
|
#
327b38d6 |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
b3211314 |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Define IDs for package section
|
#
8b684dd3 |
|
28-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add URL/source URL hpkg package attributes
|
#
22e1ec0e |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add package attribute for compatible version
|
#
ed6d59a9 |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Introduce a pre-release version component * The version string pattern is now: <major>[.<minor>[.<micro>]][-<pre>][-<release>] * Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package attribute. * Add "preRelease" field to BPackageVersionData. * Add "preRelease" property to BPackageVersion and packagefs's Version. * Adjust package reader and writer code accordingly.
|
#
33bc4425 |
|
12-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Largish adjustments to PackagerReaderImpl and package attribute handling: * package attributes are now compatible with the low level attribute handling of other HPKG attributes (such that 'package dump' now shows package attributes, too) * dropped type names from hpkg format, the attributes were identified by IDs already and this simplifies the code considerably. Type names are now handled in BLowLevelPackageHandler only. * instead of rolling their own mechanism, high-level package attributes handling is now implemented via a corresonding set of AttributeHandler-subclasses * adjusted package writer to only write package attributes that are needed (empty ones are left out) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40466 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
aaf05784 |
|
07-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* some rearrangements and renames with respect to public/private types and defines of HPKG * added header, magic and version for haiku repository format git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40370 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6f0278cd |
|
04-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Implemented reading of package info attributes from hpkg file * added kernel-compatible datatypes for reading package info attribute values (PackageInfoAttributeValue.h) - these will be used at a later stage by the package-fs to transport those attributes to userland when asked to do so (by ioctl) * implemented parsing of package info attributes in PackageReaderImpl * added support for compressed package attribute section to PackageReaderImpl * completed the writing of package info attributes in PackageWriterImpl and fixed a couple of bugs exposed by parsing * adjusted 'package list' to show the package info attributes as they are found git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40354 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
95d84e41 |
|
30-Jan-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* attributed copyright in all public HPKG headers to Haiku, Inc. * added my own copyright to a couple of files that I changed git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40321 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5fb1c6ff |
|
30-Jan-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Refactored hpkg implementation to provide some separation between public and private API (still far from ideal, but a start): * moved several HPKG-classes into the public namespace BPackageKit::HPKG * added fImpl-wrappers around PackageReader and PackageWriter to hide most of the gory details * adjusted 'package'-binary and packagefs accordingly git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40320 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8de2761c70d71d57ee17373eafac58bfd6ac8b8 |
|
23-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
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.
|
#
fe707a23fc6dc0bccb3e80201bf3e4146dcde74e |
|
23-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
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.
|
#
47039b852eeebb91396d19e0f9313cf23bf535ee |
|
21-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Package/repository file format: Add a minor version header field * Add minor_version to hpkg_header and hpkg_repo_header and make heap_compression uint16. * If the minor version of a package/repository file is greater than the current one unknown attributes are ignored without error. This allows introducing new harmless attributes without making the resulting files unreadable for older package kit versions.
|
#
d59e0feb59b92ca19ecda2935369fd0fcc5a4f56 |
|
20-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
package: Suppress version mismatch errors where V1 is supported * Add flags parameter to Init() of BPackageReader and friends. * Introduce flag B_HPKG_READER_DONT_PRINT_VERSION_MISMATCH_MESSAGE and don't print a version mismatch error when given. * package extract/list: Use the new flag.
|
#
796343ed73b1707ed97e91e22b72b8ca81bcdbad |
|
18-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Allow specifying the compression level for package creation * Introduce BPackageWriterParameters which comprises all parameters for package creation, currently flags and compression level. Such an object can be passed to BPackageWriter::Init() and is passed on to PackageWriterImpl and WriterImplBase. * PackageFileHeapWriter: Add compressionLevel property and pass the value on to ZlibCompressor. * package add/create: Add options -0 ... -9 to specify the compression level to be used.
|
#
1f633814fa347b0bd822f683af731615df600347 |
|
17-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
hpkg format: compress the whole heap Instead of handling compression for individual file/attribute data we do now compress the whole heap where they are stored. This significantly improves compression ratios. We still divide the uncompressed data into 64 KiB chunks and use a chunk offset array for the compressed chunks to allow for quick random access without too much overhead. The tradeoff is a limited possible compression ratio -- i.e. we won't be as good as tar.gz (though surprisingly with my test archives we did better than zip). The other package file sections (package attributes and TOC) are no longer compressed individually. Their uncompressed data are simply pushed onto the heap where the usual compression strategy applies. To simplify things the repository format has been changed in the same manner although it doesn't otherwise use the heap, since it only stores meta data. Due to the data compression having been exposed in public and private API, this change touches a lot of package kit using code, including packagefs and the boot loader packagefs support. The latter two haven't been tested yet. Moreover packagefs needs a new kind of cache so we avoid re-reading the same heap chunk for two different data items it contains.
|
#
7adfd76b17adc78b0646a835711d3cd935bfb02b |
|
13-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add "base package" package attribute
|
#
df29539688df25133e4f9decc5da7b1045dc1850 |
|
13-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Remove resolvable provides type * Remove BPackageResolvableType and respective property from BPackageResolvable. * Remove package attribute B_HPKG_ATTRIBUTE_ID_PACKAGE_PROVIDES_TYPE.
|
#
fc0cec5396a712166c6184010e2dba2e501abb35 |
|
12-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Bump HPKG format version
|
#
171fd58c4b47c2da9cf13b7e501d3661d4a98e42 |
|
12-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
package kit: some fixes for multi-version support * Use enums/constants/functions instead of preprocessor macros. * Missing include in PackageInfoAttributeValue.h. * PackageReaderImpl::Init(): Check version before header size and return B_MISMATCHED_VALUES instead of B_BAD_DATA, if the version doesn't match. This allows callers to determine the condition and try a reader for a different version. A more flexible interface for that case would be nice, but since we want to support the old package version only temporarily, the current solution should be good enough.
|
#
202c1daaed2556eaccea80643e58d498594f2506 |
|
15-Apr-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
BPackageVersion: Rename property release to revision * ... to avoid confusion with the preRelease property. It's also called "revision" in the HaikuPorts recipes. * Update libsolv package. Was necessary due to the BPackageVersion change, but also includes a few more changes.
|
#
6ae0ecd49a584abd81f3fa0fb0c0dd5b7a3ddb71 |
|
11-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add a package info "install-path" attribute The attribute is intended for simplifying package building. The package's install path will be used for the package's .self package symlink, allowing installation to a temporary directory when building the package.
|
#
00bc8e9cbd92f6a812d75ad75ca91c34beb67e72 |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
f9caa05c2a7a251cc11ec09df4b10bf24d387d00 |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Define IDs for package section
|
#
3a802b3d7f6e4aee6eb5de225a5eadec74c9ba55 |
|
28-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add URL/source URL hpkg package attributes
|
#
622ca02bc1452ef99001d685b9190049ca221c88 |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add package attribute for compatible version
|
#
8f314372a8b317a4d9e2ebeccc0d5bf6e237fec7 |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Introduce a pre-release version component * The version string pattern is now: <major>[.<minor>[.<micro>]][-<pre>][-<release>] * Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package attribute. * Add "preRelease" field to BPackageVersionData. * Add "preRelease" property to BPackageVersion and packagefs's Version. * Adjust package reader and writer code accordingly.
|
#
f19957b8e5311ffc5b802032e4f24cdda81f9b50 |
|
11-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add a package info "install-path" attribute The attribute is intended for simplifying package building. The package's install path will be used for the package's .self package symlink, allowing installation to a temporary directory when building the package.
|
#
327b38d69c8d9a128c64d0535f15b0274b51c51b |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add support for adding/updating package entries Add flags parameter to BPackageWriter::Init() (and the private implementation classes) to indicate that an existing package file shall be updated instead of created. Currently that always happens in-place.
|
#
b3211314fce9f0147e7743259826ce062bac9b02 |
|
02-Jul-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Define IDs for package section
|
#
8b684dd3630305ea03495f39e3a1bf62a94ba6d6 |
|
28-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add URL/source URL hpkg package attributes
|
#
22e1ec0e3064a91643db5e4a62a2e35ffb3a9f11 |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add package attribute for compatible version
|
#
ed6d59a9a983cb031077b6d541576fc8efec1cfd |
|
26-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Introduce a pre-release version component * The version string pattern is now: <major>[.<minor>[.<micro>]][-<pre>][-<release>] * Introduce B_HPKG_ATTRIBUTE_ID_PACKAGE_VERSION_PRE_RELEASE package attribute. * Add "preRelease" field to BPackageVersionData. * Add "preRelease" property to BPackageVersion and packagefs's Version. * Adjust package reader and writer code accordingly.
|
#
33bc4425be0b545ed3d0b7e7a9a873d31e5a0330 |
|
12-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Largish adjustments to PackagerReaderImpl and package attribute handling: * package attributes are now compatible with the low level attribute handling of other HPKG attributes (such that 'package dump' now shows package attributes, too) * dropped type names from hpkg format, the attributes were identified by IDs already and this simplifies the code considerably. Type names are now handled in BLowLevelPackageHandler only. * instead of rolling their own mechanism, high-level package attributes handling is now implemented via a corresonding set of AttributeHandler-subclasses * adjusted package writer to only write package attributes that are needed (empty ones are left out) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40466 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
aaf05784d48abf7b2a24609ea200b29bc144a752 |
|
07-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* some rearrangements and renames with respect to public/private types and defines of HPKG * added header, magic and version for haiku repository format git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40370 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6f0278cdc9a22a1e22c3ac3f480beffd6bb5fcff |
|
04-Feb-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Implemented reading of package info attributes from hpkg file * added kernel-compatible datatypes for reading package info attribute values (PackageInfoAttributeValue.h) - these will be used at a later stage by the package-fs to transport those attributes to userland when asked to do so (by ioctl) * implemented parsing of package info attributes in PackageReaderImpl * added support for compressed package attribute section to PackageReaderImpl * completed the writing of package info attributes in PackageWriterImpl and fixed a couple of bugs exposed by parsing * adjusted 'package list' to show the package info attributes as they are found git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40354 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
95d84e41761622cc71312fa8012a4ceb36836856 |
|
30-Jan-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
* attributed copyright in all public HPKG headers to Haiku, Inc. * added my own copyright to a couple of files that I changed git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40321 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5fb1c6ff1f55fe4094a761b653041b3a0b9abf1d |
|
30-Jan-2011 |
Oliver Tappe <zooey@hirschkaefer.de> |
Refactored hpkg implementation to provide some separation between public and private API (still far from ideal, but a start): * moved several HPKG-classes into the public namespace BPackageKit::HPKG * added fImpl-wrappers around PackageReader and PackageWriter to hide most of the gory details * adjusted 'package'-binary and packagefs accordingly git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40320 a95241bf-73f2-0310-859d-f6bbb57e9c96
|