Commit Graph

665 Commits

Author SHA1 Message Date
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
Colin Walters
2263bb35f6 [libhif] compose: Initial port to libhif instead of yum
There are a lot of advantages to this.  See the linked issue
for more details, but briefly:

 - Lays the groundwork for package layering
 - Better caching (exit compose after depsolve if no changes)
 - Better error handling
 - Potential for unprivileged package downloads
 - Potential to better containerize installs

TODO:
 - langs handling
 - progress output

Closes: https://github.com/projectatomic/rpm-ostree/issues/53
2015-02-02 16:39:25 -05:00
Colin Walters
4511a1d8ac consoleprogress: New class for writing to the console
Some influence from both systemd and packagekit-glib2.
2015-02-02 16:39:25 -05:00
Matthew Barnes
0c39e7195e configure.ac: Fix help for --enable-patched-hawkey-and-libsolv
Make the help string agree with the actual option name.
2015-02-02 16:33:20 -05:00
Colin Walters
9ccf24a061 Merge pull request #102 from cgwalters/usergroup-docs
docs: It's ignore-*removed*, not ignore-remove
2015-01-30 20:44:09 -05:00
Colin Walters
7cb3a01887 docs: It's ignore-*removed*, not ignore-remove
See the code.  (We could change the code to match the docs, but I like
the extra `d` and it's basically ABI now anyways).
2015-01-30 18:04:11 -05:00
Colin Walters
e066834e72 Release 2015.3 2015-01-23 17:14:12 -05:00
James Antill
fa254def0a Merge pull request #101 from james-antill/master
passwd: Use check-* file json config. entries to migrate data across commits
2015-01-22 15:16:01 -05:00
James Antill
e120675b82 passwd: Use check-* file json config. entries to migrate data across commits 2015-01-22 15:13:50 -05:00
James Antill
28fb760cc8 docs: Add documentation json config. 2015-01-16 00:33:22 -05:00
James Antill
834e62826d compose: Add documentation json config. for nodocs yum/rpm transaction flag 2015-01-16 00:33:22 -05:00
Colin Walters
2cb6c08254 Merge pull request #100 from chmouel/patch-1
Fix small typo in manpage
2015-01-15 10:07:13 -05:00
Chmouel Boudjnah
a4bb11c4e1 Fix small typo in manpage 2015-01-15 15:49:07 +01:00
James Antill
b49a489f9f Merge pull request #94 from james-antill/master
compose: Add automatic_version_prefix to json config.
2015-01-12 15:14:49 -05:00
James Antill
8aeb1272f9 tests: Add tests for automatic_version_prefix 2015-01-12 15:13:55 -05:00
James Antill
f2d5369050 docs: Add documentation for automatic_version_prefix 2015-01-12 15:11:45 -05:00
Colin Walters
08b22c5788 Merge pull request #97 from cgwalters/fix-clientonly-build
passwd-util: Drop unnecessary #include
2015-01-12 11:59:58 -05:00
Colin Walters
dca6e9b1e8 passwd-util: Drop unnecessary #include
This was breaking the

    make -C packaging -f Makefile.dist-packaging dist-snapshot-without-compose-tooling

build.
2015-01-12 11:40:30 -05:00
James Antill
feb4c7ce52 compose: Create _rpmostree_util_next_version for testing 2015-01-12 00:07:33 -05:00
Colin Walters
3ea0e3fc16 Merge pull request #95 from cgwalters/empty-passwd-einval
passwd: Avoid EINVAL if previous passwd data is empty somehow
2015-01-09 12:06:20 -05:00
Colin Walters
9e9f1d0512 passwd: Avoid EINVAL if previous passwd data is empty somehow
Maybe we should make this into an explicit error, but anyways
I somehow ended up with an empty /usr/etc/passwd in the tree
contents, I think due to bugs in earlier work there.

This causes fmemopen to return EINVAL, which errors out the
compose.  Let's stumble forwards here.

Now that I think about it, it might be a valid case to have an
existant but empty /usr/etc/passwd in the tree - when we migrate to
systemd-sysusers, I think we'll want an empty file there by default.
2015-01-09 11:51:38 -05:00
James Antill
687643d2eb compose: Add automatic_version_prefix to json config. 2015-01-09 10:52:09 -05:00
Colin Walters
7858872d23 Release 2015.2 2015-01-08 13:14:57 -05:00
Colin Walters
019a0fef25 Release 2015.1 2015-01-08 13:11:36 -05:00
Colin Walters
9dc798bbcf Require ostree/libgsystem v2015.1
For the new console progress and xattr apis.
2015-01-08 13:11:36 -05:00
Colin Walters
e24f4011b3 Merge pull request #93 from cgwalters/passwd-deduplicate
Passwd deduplicate
2015-01-08 12:22:45 -05:00
James Antill
504d3885bb db: Fix version output formatting 2015-01-08 00:23:02 -05:00
Colin Walters
61a288fa0d Rework passwd/group migration to deduplicate
Due to an intersection of #79 and #69, we ended up continually
accumulating copies in /usr/lib/{passwd,group}.  The fix here is to
deduplicate when constructing the temporary /etc/passwd that the RPM
install will operate on.

Closes: https://github.com/projectatomic/rpm-ostree/issues/92
2015-01-07 17:52:22 -05:00
Colin Walters
60b279ce48 compose: Move the passwd/group migration code to passwd-util
Pure code motion; no functional changes.  Trying to get all of the
passwd/group code in the same place so I can fix bugs in the
interaction between them more easily.
2015-01-07 17:52:07 -05:00
Colin Walters
a960c6ed9d Merge pull request #91 from cgwalters/hoist-previous-tree-read
compose: Raise up the code to read the previous (OSTree) commit
2015-01-07 17:50:28 -05:00
Colin Walters
3c55021a72 compose: Raise up the code to read the previous (OSTree) commit
I'm planning to replace the caching code with something that inspects
the previous commit rather than a lookaside cache, so raise this code
up to a higher level.
2015-01-07 12:31:10 -05:00
Colin Walters
85414e4119 Merge pull request #89 from cgwalters/metadata-builder
compose: Convert metadata handling into builder
2015-01-07 10:38:32 -05:00
Colin Walters
ccd6bedac4 compose: Convert metadata handling into builder
We're going to start adding our own metadata, so take this initial
step of having the user-specified metadata accumulated into a builder.
2015-01-07 10:35:56 -05:00
Colin Walters
2e5962b6aa Merge pull request #87 from cgwalters/previous-etc-passwd-continued
compose: Fix lookup of previous /etc/passwd
2015-01-07 08:01:34 -05:00
Colin Walters
5345c85642 compose: Fix lookup of previous /etc/passwd
I swear I tested this, but anyways
https://github.com/projectatomic/rpm-ostree/pull/79
wasn't quite right.  We need to look at /usr/etc/{passwd,group}
for previous data.

We happily noticed there was no /etc/passwd in the tree, then
proceeded to do the merge and split again, with the result
of an empty /usr/etc/passwd in the new tree.

That in turn resulted in an empty /etc/passwd in an installed system,
i.e. with no "root" user, with obvious bad consequences, namely in my
case crashing Anaconda.

(Yes, I will write a testsuite for this)
2015-01-06 22:10:56 -05:00
Colin Walters
d6b692660b Merge pull request #86 from cgwalters/cleanup-cleanup-again
Cleanup cleanup again
2015-01-06 15:03:19 -05:00
Colin Walters
aefc0f99f9 Use gs_fd_close instead of internal _cleanup_close_
Another one that's now in libgsystem 2014.3.
2015-01-06 09:29:55 -05:00
Colin Walters
22ac2dfd1f Use gsystem GKeyFile cleanups
This is now in 2014.3.
2015-01-06 09:28:29 -05:00
Colin Walters
8e7c75968d Merge pull request #84 from cgwalters/fd-relative-xattrs
compose: Use *at() relative lookups for xattrs
2015-01-06 09:11:37 -05:00
Colin Walters
4875b1e8f9 compose: Use *at() relative lookups for xattrs
This matches recent work in OSTree to use *at() - it's faster and less
prone to error.  In the case of directories which are mutable by
processes in different security domains, it's more secure too.  (That's
not the case here though).
2015-01-05 08:02:07 -05:00
Colin Walters
55da2db452 Merge pull request #82 from cgwalters/version-bug
postprocess: Don't g_critical if previous commit doesn't have version
2015-01-04 13:00:39 -05:00
Colin Walters
6d9e4e08d7 postprocess: Don't g_critical if previous commit doesn't have version
I sometimes run "rpm-ostree compose tree" directly, mainly so I can
use gdb and/or nonstandard options.  In this case I don't get
version numbers injected.

That happens to trigger a bug in this code.
2015-01-03 22:19:26 -05:00
Colin Walters
526958ac85 Merge pull request #79 from cgwalters/wip/preserve-passwd
compose: Support "preserve-passwd" option (enabled by default)
2014-12-24 12:17:18 -05:00