Commit Graph

590 Commits

Author SHA1 Message Date
Colin Walters
5de58aae9c libpriv: Split out an internal API to get a tempdir with just the rpmdb
For a future patch, I want to add an API to get an rpmts for a commit,
instead of a hawkey Sack, because libsolv doesn't expose some
optimized queries that we can get by just going directly to librpm,
such as package file owners.
2015-05-21 20:15:08 -04:00
Alexander Larsson
5331eeccc0 Merge pull request #148 from alexlarsson/container
Support container=true in treefile
2015-05-21 16:17:04 +02:00
Alexander Larsson
25d073d044 Add docs for container=true 2015-05-21 16:15:43 +02:00
Alexander Larsson
79cdcd1817 Support container: true in treefile
If this is set we don't do anything special for kernel or /boot, as
such things are not needed when running in a container.
2015-05-21 12:00:20 +02:00
Colin Walters
cf89acb74c (cleanup): Move the refsack and root loading code into libpriv
We had `src/lib` having its own little private library; I wanted to
use some of it inside `src/libpriv`, so let's consistently have all
private utility code in `src/libpriv`.

Closes: https://github.com/projectatomic/rpm-ostree/pull/147
2015-05-20 20:51:42 -04:00
Matthew Barnes
f420167dba Merge pull request #144 from mbarnes/package-cmp 2015-05-13 11:33:43 -04:00
Matthew Barnes
03b886dae0 lib: Add rpm_ostree_package_cmp()
Equivalent to hy_package_cmp(), but works for comparing packages from
different memory pools.

This a stop gap measure in light of
https://github.com/rpm-software-management/hawkey/pull/90

If and when that pull request gets merged, then this function could at
some later point simply call hy_package_cmp().
2015-05-13 11:31:30 -04:00
Colin Walters
1c3a549ef9 postprocess: Handle Fedora rawhide kernel installation
The vmlinuz binary has moved to /usr/lib/modules, which is a change
mostly for the better, but we need to adapt.

Closes: https://github.com/projectatomic/rpm-ostree/pull/143
2015-05-12 13:51:12 -04:00
Colin Walters
95fc6eb395 Release 2015.5 2015-05-11 16:05:51 -04:00
Colin Walters
f115d0276f db: Remove query parameter to diff
Matthew argues we can add this at a later time.
2015-04-23 16:30:18 -04:00
Colin Walters
8bf8d71f99 db: Remove query argument, rename to query_all()
Matthew argues that we can add this later.

https://github.com/projectatomic/rpm-ostree/pull/139#issuecomment-95327428
2015-04-23 16:30:18 -04:00
Colin Walters
c16058b66a libpriv: Move rpm/hawkey util functions into -rpm-util
`treepkgdiff` no longer describes the function of the file; as a baby
step towards unifying the db and hawkey code, move the functions into
that file.
2015-04-23 16:30:18 -04:00
Colin Walters
e414be8ae2 Move diff printing code into client
This is a step forward to deduplicating; the client tooling now calls
into the public API for diffs, rather than using the older internal
function.

Note: this patch also links the client against the public library.
2015-04-23 16:30:18 -04:00
Colin Walters
3326e13481 lib: Add diff API
This is a *third* implementation of rpm database diffs in the code,
but it is now a public introspectable shared library API.

Further commits will change the command line tools to use this, and
then after that we'll further deduplicate the `db diff` from this
code.
2015-04-23 16:30:18 -04:00
Colin Walters
28ab27caf7 db: Refactor internal helpers in preparation for diff API
This will make it easier to query two commits at once.  Note that
`RpmOstreeRefSack` now can hold a reference to a temporary directory.
2015-04-23 16:30:18 -04:00
Colin Walters
7b45f13a62 Link lib/ against libpriv/, use it to share sack loading function
On the plus side, we share some code between the library and the
binary now.  On the downside, because `librpmostreepriv.la` is a
noinst library, its code text is duplicated between the shared library
and binary, at least until we either:

 - Have the binary solely use the public shared library (like ostree does)
 - Install `librpmostreepriv.so` to e.g. `/usr/lib64/rpm-ostree/librpmostreepriv.so`
   without the headers being public
2015-04-23 16:30:17 -04:00
Colin Walters
f3600e922e libpriv: Adjust internal package diff API to be fd-relative
We presently have 3 internal code paths that are doing rpmdb
inspection.  This conversion to fd-relative for one of them is a
generic cleanup preparatory to de-duplicating.

Note this bumps libglnx to include
381ca54ee3
2015-04-23 16:30:17 -04:00
Giuseppe Scrivano
3bf7926adc postprocess: do not hardcode /etc/machine-id
The file is automatically populated by systemd when it is empty.

Apparently it doesn't work when the file is missing (as of
systemd-219-9.fc22).

https://bugzilla.redhat.com/show_bug.cgi?id=1198700

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-23 11:37:50 +02:00
Giuseppe Scrivano
ad30a790de Makefile-tests.am: clean generated files
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-22 11:41:03 +02:00
Colin Walters
5842741dd4 build: Update libglnx to get latest progress API changes 2015-04-17 14:13:23 -04:00
Matthew Barnes
347a5003e0 status: Print any GPG signatures for deployments
In pretty mode (--pretty), print signatures for each listed deployment.

Otherwise, just print signatures for the booted deployment at the end to
preserve the tabular formatting of the deployment list.
2015-04-17 12:32:35 -04:00
Matthew Barnes
750a8889f0 upgrade: Print any GPG signatures while upgrading 2015-04-17 12:30:04 -04:00
Colin Walters
3e6f877282 lib: Add RpmOstreePackage
The `QueryResult` class ended up being too awkward; having NEVRA
strings meant for example that clients would have to parse them.  It
would be harder to present something like the current `rpm-ostree
upgrade` package diff output.

Now...I debated quite a while before doing this patch.  The thing
that's really awful about creating this library is there are *SO MANY*
layers.  rpm-ostree → libhif → hawkey → libsolv → librpm.  It's enough
to make one question whether one is actually accomplishing anything or
just contributing to a collective insanity...

Let's pretend for now it's the former.

Closes: https://github.com/projectatomic/rpm-ostree/pull/136
2015-04-16 13:26:58 -04:00
Matthew Barnes
3578c446b5 Merge pull request #134 from swordphilic/docscodequote
Adds quotes for atomic commands in doc/administrator-handbook.md
2015-04-15 09:24:27 -04:00
Matthew Barnes
b04b08d6fa Merge pull request #133 from swordphilic/docstypofix
Fixes minor typo in doc/compose-server.md
2015-04-15 09:24:08 -04:00
Matthew Barnes
91d99e66ab Merge pull request #132 from swordphilic/docsfix
Fixed typo in doc/background.md
2015-04-15 09:23:52 -04:00
Navid Shaikh
f656eda800 Fixes minor typo in doc/compose-server.md 2015-04-15 18:32:58 +05:30
Navid Shaikh
6329f1c946 Adds quotes for atomic commands in doc/administrator-handbook.md 2015-04-15 18:14:14 +05:30
Navid Shaikh
736227a7e2 Fixed typo in doc/background.md 2015-04-15 13:25:21 +05:30
Colin Walters
be9de3a7df Merge pull request #130 from cgwalters/lib
build: Use -fvisibility=hidden and explicit exports
2015-04-14 16:28:40 -04:00
Giuseppe Scrivano
cab58e37ea compose: honor --proxy again
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-14 14:57:14 +02:00
Colin Walters
792da457db build: Use -fvisibility=hidden and explicit exports
This avoids symbol leakage.  Previously we were at risk of exporting
other random API from libpriv, as well as libglnx.
2015-04-13 21:25:05 -04:00
Colin Walters
de47c23450 doc: Add gtk-doc for new library 2015-04-13 14:39:06 -04:00
Colin Walters
8a5730525e Add a public shared library, with "rpm -qa" for commit functionality
This will help build release engineering and other types of tools;
for example, rather than parsing the output of `db diff`, one
should be able to call an API.

Initially, this adds the generic infrastructure for a public shared
library, with a new function call to do the equivalent of `rpm -qa` on
a particular OSTree commit.

Closes: https://github.com/projectatomic/rpm-ostree/issues/117
Closes: https://github.com/projectatomic/rpm-ostree/pull/124
2015-04-13 14:39:06 -04:00
Giuseppe Scrivano
7d86f72c79 do not crash when no selinux tag is present
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-13 10:43:24 +02:00
Giuseppe Scrivano
27008e402a tests: Add test for compose
A local yum repository, which contains a dummy .rpm package adding
support for programs needed by the post-process phase, is created as
part of the test.

Since no libc is present, the empty.c program (which is a no-op)
directly invokes the interrupt 0x80 to exit.

The test works only on x86_64, it is skipped on other architectures.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-13 10:43:24 +02:00
Giuseppe Scrivano
b2c3e8a264 make check: add note to run installed tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-13 10:43:24 +02:00
Giuseppe Scrivano
01cb587161 tests: add a check if tests requiring it are run by root
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-13 10:43:23 +02:00
Giuseppe Scrivano
3360b2a404 tests/test-basic.sh: run only as part of installed tests
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-13 09:59:32 +02:00
Colin Walters
e1c54341bc Release 2015.4 2015-04-10 16:51:25 -04:00
Colin Walters
f051d8f2b8 compose: Drop internal containerization for now
It breaks at least `/etc/resolv.conf` inside Docker.  The right thing
here is to run all things involving networking (librepo) as an
unprivileged process with different constraints than the rpm installs.
2015-04-10 16:48:36 -04:00
Colin Walters
7dc17b9369 libglnx: Update 2015-04-10 16:28:23 -04:00
Colin Walters
a8a2049443 build: Split up src into app/ and libpriv/
We currently have an internal-only library, but the sources for it are
in the same dir as the app.  For future work on a public shared
library, we'll need a clearer source structure.

Start by just renaming the app files into `src/app/`, and the internal
private library into `src/libpriv/`, with the appropriate
`Makefile.am` changes.

Closes: https://github.com/projectatomic/rpm-ostree/pull/123
2015-04-08 16:17:06 -04:00
Colin Walters
4ee4e0f994 Merge pull request #127 from stefwalter/autogen-builddir
Fix running autogen.sh from outside the source directory
2015-04-08 05:56:12 -04:00
Stef Walter
095d430015 Fix running autogen.sh from outside the source directory
Otherwise the git submodule invocations produce errors.
2015-04-08 09:16:17 +02:00
devop-mmcgrath
b93c64a7d5 rollback: Fix spelling of 'successfully'
Closes: https://github.com/projectatomic/rpm-ostree/pull/125
2015-04-07 17:35:47 -04:00
Giuseppe Scrivano
98d35b953a man/rpm-ostree.xml: fix XML tag
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-28 13:33:50 +01:00
Colin Walters
21585d51c2 man: Document the db --diff option 2015-03-27 14:45:52 -04:00
Colin Walters
e79c73de20 build: Remove last vestiges of hawkey/libsolv compat
We can assume the versions we care about have propagated everywhere
that supports the libhif version we support.
2015-03-20 14:55:32 -04:00
Colin Walters
ddf2227ae9 compose: Optionally make use of rpmsqSetInterruptSafety
See http://lists.rpm.org/pipermail/rpm-maint/2015-February/003863.html
2015-03-19 22:25:04 -04:00