Commit Graph

2257 Commits

Author SHA1 Message Date
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
Colin Walters
fc7483b7bc rpmutil: Make use of libglnx console APIs
Less code duplication.
2015-03-19 21:57:00 -04:00
Colin Walters
b57da0c8ef Merge pull request #115 from cgwalters/rebase-statusline
rebase: Also end status line after pull is complete
2015-03-17 08:41:04 -04:00
Colin Walters
79a89f90d5 rebase: Also end status line after pull is complete
This is what `upgrade` does.  Otherwise we end up not printing a
newline, and the next line gets glommed on, and we look silly.
2015-03-16 21:22:26 -04:00
Colin Walters
c7e437a281 postprocess: Drop the version checking code
This breaks things when I add automatic_version_prefix and am using a
local repository - it's not buying me anything, and makes it harder to
hack.
2015-03-12 21:45:11 -04:00
Colin Walters
4aafa8d46d libglnx: Update
Fixes O_CREAT fortify-source error.
2015-03-10 20:54:04 -04:00
Jonathan Dowland
bd834f1f90 README.md: Fix minor typo 2015-03-09 11:37:56 -04:00
Giuseppe Scrivano
38d34e757a configure.ac: improve detection of hy_sack_create ABI change
Fedora 21 seems to use the old ABI with the version 0.5.3.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-06 14:30:02 +01:00
Giuseppe Scrivano
e927f90de1 Makefile.dist-packaging: fix make rpm with submodules
Makefile.dist-packaging seems to assume to be run under packaging/ as
"make -C packaging -f Makefile.dist-packaging rpm" so ensure the
srcdir is set correctly to point to the parent directory.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-06 14:30:02 +01:00
Giuseppe Scrivano
4118617666 autogen.sh: retrieve libglnx
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-03-06 14:30:02 +01:00
Colin Walters
4b19dd1266 Move the little "libcontainer" code into libglnx
I want to share it with ostree, and potentially xdg-app.
2015-03-04 18:29:55 -05:00
Matthew Barnes
deef74e7a0 compose: Sort the goal before printing 2015-02-24 10:15:20 -05:00
Colin Walters
f50e19dfd1 compose: Print the goal
It's useful to see what's going to be installed before we do it.
2015-02-19 18:42:53 -05:00
Colin Walters
9a95c0a18b libglnx: Update to get g_auto(GPtrArray) 2015-02-19 18:40:44 -05:00
Colin Walters
920a01627f libglnx: Update to latest 2015-02-19 15:53:18 -05:00
Colin Walters
491892cc11 Merge pull request #108 from cgwalters/use-libglnx
Start using libglnx
2015-02-17 17:22:06 -05:00
Colin Walters
392acdf963 Move console code to libglnx
The main goal is to be able to share this with OSTree.
2015-02-17 16:54:54 -05:00
Colin Walters
3190eff276 Start using libglnx
The high level goal is to deprecate libgsystem.  I was trying to share
code between ostree/rpm-ostree, but it was too painful to commit to
forver frozen ABI for new utility APIs.

The git submodule approach will much more easily allow breaking
API/ABI, and iterate on APIs until they either land in GLib or not.

Note that libglnx will not use GFile*, so a full port to it will
involve also not using that.  Thus, it will be necessarily
incremental; in the meantime we'll link to both libgsystem and
libglnx.
2015-02-15 14:01:13 -05:00
Colin Walters
99d3b5d792 Merge pull request #105 from cgwalters/hawkey-053
treepkgdiff: Adapt to Hawkey 0.5.3 API break
2015-02-05 11:54:54 -05:00
Colin Walters
5268cdf776 treepkgdiff: Adapt to Hawkey 0.5.3 API break
We will work on both old and new versions.

See 8ce3ce754f
2015-02-05 09:21:07 -05:00
Colin Walters
5235cc5559 doc: Delete bit about having to disable SELinux
This is only true for the libguestfs-based disk image generation.
2015-02-05 09:07:54 -05:00
Colin Walters
4fbdb3ec77 doc/treefile: Clarify repos 2015-02-04 13:59:31 -05:00
Colin Walters
3404764b31 Merge pull request #104 from giuseppe/giuseppe/fix-build
build: replace libhif/hif-context-private.h with libhif/hif-utils.h
2015-02-03 08:28:19 -05:00
Giuseppe Scrivano
6547fbc84f build: replace libhif/hif-context-private.h with libhif/hif-utils.h
The header was renamed in newer versions of libhif.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-03 11:07:54 +01:00
Colin Walters
aa285329c7 build: Require 0.2.0 libhif, drop hawkey/libsolv build option
We hard depend on 0.2.0 (which is current git master).
2015-02-02 16:44:06 -05:00
Colin Walters
fcd1b43249 compose-tree: Add --touch-if-changed
This is a convenient way for external tools to integrate rpm-ostree
better into automation.  With the caching, it's now cheaper to
just rerun rpm-ostree if you know an input yum repository changed,
or just on a timer.

Then one can use this flag to determine whether or not to launch any
further processes after rpm-ostree, such as disk image generation,
test suites, etc.
2015-02-02 16:39:26 -05:00
Colin Walters
9c8dcbe98c [libhif] Update to support "documentation" flag 2015-02-02 16:39:26 -05:00
Colin Walters
5f61945302 [libhif] Actually honor --force-nocache option 2015-02-02 16:39:26 -05:00
Colin Walters
172ff5712b [libhif] Port to new hif_error_set_from_hawkey()
And drop our internal copy.
2015-02-02 16:39:26 -05:00
Colin Walters
53f0c191ac [libhif]: Use the new proxy API to honor http_proxy
For the obvious reasons, this helps avoid redownloading packages
continuously.
2015-02-02 16:39:26 -05:00
Colin Walters
aa190edfbf [libhif] Rework compose caching with new packaging APIs
With yum, we would have had to make a custom Python app to cleanly
separate the fetch metadata/depsolve phases from installation.

Now that libhif/hawkey gives us that, make use of it by exiting after
depsolve if the previous compose has the same package set, and the
treefile is the same.  This saves a fairly substantial amount of time
and I/O, and makes it much more palatable to simply run the compose
tool on demand in response to say repo regeneration notifications.

A further important note; --cachedir is no longer used; we store the
inputhash in the OSTree commit metadata itself.
2015-02-02 16:39:26 -05:00
Colin Walters
0ff3d1de33 [libhif] Exit again on SIGINT/SIGTERM
A major (if not the biggest) point of this endeavor is to support
atomic/idempotent operation.
2015-02-02 16:39:26 -05:00
Colin Walters
7e0a55cd64 [libhif]: Add initial progress reporting
This requires open-coding the 3 steps that hif_context_run() was
doing.  Which is fine, because ultimately we want to have more control
over that.
2015-02-02 16:39:26 -05:00
Colin Walters
01772d67ad [libhif] Implement support for install-langs 2015-02-02 16:39:25 -05:00