Commit Graph

932 Commits

Author SHA1 Message Date
Matthew Barnes
d6a48feb7a daemon: Handle bus name acquisition in main.c 2015-09-09 22:00:04 -04:00
Matthew Barnes
2f5057a022 daemon: Make the Daemon instance global in main.c
Just easier than passing it around to callbacks.
2015-09-09 22:00:04 -04:00
Colin Walters
a435dea27a daemon: Flesh out new API
Peter, Matthew and I talked for a while and came up with this.
2015-09-09 22:00:04 -04:00
petervo
c0d15a66ad daemon: Start of work on daemon 2015-09-09 22:00:04 -04:00
Colin Walters
a18e85cad1 libtest: Use exit code 77 for root-requiring tests run as non-root
This is the "standard" introduced by Automake and used by g-d-t-r.
2015-09-08 12:20:28 -04:00
Colin Walters
da88e60241 spec: Drop no longer needed config arguments 2015-08-31 17:21:51 -04:00
Colin Walters
8d2787640a Release 2015.9 2015-08-26 12:21:43 -04:00
Colin Walters
60ed86228f compose: Don't do container stuff if we're in a container already
This helps avoid some failures.  See:
fbdb15cd95
2015-08-24 16:16:52 -04:00
Matthew Barnes
fb7e491dfe Bump GIO requirement to 2.40 to match ostree 2015-08-14 12:22:45 -04:00
Colin Walters
07310f4f1d Merge pull request #164 from cgwalters/composetree-requires-root
compose: Require being run as root
2015-08-03 16:11:12 -04:00
Colin Walters
2b4a90c39d Merge pull request #165 from cgwalters/cacheage
compose: Fix "too old" error for "old" file:/// repos
2015-08-03 16:10:54 -04:00
Colin Walters
53ab54db8c libglnx: Bump to pull in rhel6 container fix 2015-07-28 16:43:12 -04:00
Colin Walters
6daf713d8e compose: Fix "too old" error for "old" file:/// repos
Bodhi points rpm-ostree at the "gold" Fedora repo via `file:///`, and
libhif is brokenly checking the mtime on `file://` repos.

Work around that here by just ignoring cache ages, because at present
we don't actually cache really - we drop the RPMs in the tempdir.

(Long term having actual caching of the RPMs would be nice, but
 we can revisit this when we get there)

Closes #156
2015-07-24 16:28:52 -04:00
Colin Walters
5f8fdc7940 compose: Require being run as root
Someday we'll enhance RPM; see
https://github.com/rpm-software-management/rpm/issues/8

But anyways right now at least a few people have tried,
and we get all the way past downloading packages and then bomb
out when doing the actual transaction with a useless error
message.

So let's be up front about this.
2015-07-23 22:14:54 -04:00
Colin Walters
ebb5dbce6e Merge pull request #163 from cgwalters/repos-notfound
compose: Error out if specified repositories aren't found
2015-07-22 18:43:11 -04:00
Colin Walters
536cec3a53 compose: Error out if specified repositories aren't found
This is being friendly for configuration errors.  The failure mode
here of not finding repos and silently continuing was quite bad.
2015-07-22 16:46:09 -04:00
Colin Walters
e60a5900d3 Merge pull request #161 from miabbott/cmd_order
Sort subcommands alphabetically
2015-07-15 15:04:56 -04:00
Micah Abbott
a5a2b90dad Sort subcommands alphabetically
This change causes the subcommands to be sorted alphabetically when
'rpm-ostree' is invoked without an argument or with '--help'.  This
matches the behavior of the 'ostree' command.
2015-07-15 14:57:39 -04:00
Leandro Santiago
c689c6a439 Fix outdated documentation about boot files
RPMOSTREE_POSTPROCESS_BOOT_LOCATION_BOTH is the default option for boot_location, instead of RPMOSTREE_POSTPROCESS_BOOT_LOCATION_LEGACY.
2015-07-15 08:01:35 -04:00
Colin Walters
e512bff919 Release 2015.7 2015-07-15 08:01:35 -04:00
Colin Walters
ed345c4aa2 Merge pull request #158 from cgwalters/treecompose-no-abspaths
postprocess: Don't use absolute paths for helpers like dracut
2015-06-15 13:45:03 -04:00
Colin Walters
84d2d51576 postprocess: Don't use absolute paths for helpers like dracut
It moved from `/usr/sbin` -> `/usr/bin`, which obviously broke
rpm-ostree.

No reason to hardcode absolute paths here.
2015-06-15 13:44:52 -04:00
Colin Walters
e90c579023 Release 2015.6 2015-06-09 10:02:10 -04:00
Matthew Barnes
240e01be04 Merge pull request #154 from dustymabe/dustybugfix
Fix version number output on upgrade/rollback.
2015-06-02 10:44:13 -04:00
Dusty Mabe
4d6985c92c Fix version number output on upgrade/rollback.
Resolves #153
2015-06-02 10:34:24 -04:00
Colin Walters
385303e3f8 compose: Disable yumdb by default
This API was added to libhif a while ago.  I'm adding this now because
libhif was changed recently to write the dnf copy of the yumdb, and we
didn't have code to remove it explicitly.

It's better not to write it in the first place.
2015-05-30 15:48:17 -04:00
Matthew Barnes
e5e6081c01 Merge pull request #151 from jasonbrooks/master
remove erroneous rpm-ostree equals /usr/bin/atomic reference
2015-05-28 15:12:01 -04:00
Jason Brooks
3e4963a9e8 remove erroneous rpm-ostree equals /usr/bin/atomic reference 2015-05-28 11:51:39 -07:00
Colin Walters
4515a0f07b Merge pull request #150 from cgwalters/hif-fatal-source-unavail
compose: Make use of hif_source_set_required()
2015-05-27 16:01:15 -04:00
Colin Walters
370c5e5b63 compose: Make use of hif_source_set_required()
We noticed that tree composes failed with a missing `atomic` package,
when really what happend is Fedora 22 was released and the repo
metadata moved from `development/` to `released/`.

See https://github.com/hughsie/libhif/pull/47
2015-05-26 10:43:33 -04:00
Matthew Barnes
a3210f908c build: Update libglnx to get autocleanup backports 2015-05-25 12:10:55 -04:00
Colin Walters
b8ac0f7caf libpriv: Introduce an rpmostree_mkdtemp()
- Can also give you a file descriptor
 - Takes a constant string as input, returning a mutated string as a
   separate variable which means that one can check whether the variable
   is `NULL` to know whether or not one needs to `rm -rf` it on error
   paths.
2015-05-23 09:32:28 -04:00
Colin Walters
bfe801b77e libpriv: Fix memory leak 2015-05-23 09:32:23 -04:00
Colin Walters
1aa0e37cc9 libpriv: Teach RpmRevisionData to use new RefTs API
More code de-duplication.
2015-05-23 09:30:57 -04:00
Colin Walters
70f5b535e4 libpriv: Add RpmOstreeRefTs and API to create one from a commit
This API is intended for use by the caching framework to hold open an
rpmdb for the previous commit.
2015-05-23 09:30:57 -04:00
Colin Walters
b378386e98 Prefer rpmostree_ for internal API over _rpm_ostree
The refsack code was using the latter, and it stood out.  Now that
we're making use of explicit export markers, there's no need to uglify
internal APIs with a leading `_`.
2015-05-22 09:38:55 -04:00
Colin Walters
07871a08fd libpriv: Further centralize (commit | root) -> (sack | rpmdb) code
While `rpm-util.c` may not best describe this, it's where most
of this code is ending up.  Let's further centralize things.

We more consistently return an `RpmOstreeRefSack` instead of a
`HySack`, where the former supports refcounting and knows how to clean
up its temporary directory if it was allocated from a commit.
2015-05-22 09:32:03 -04:00
Colin Walters
3c3947564d db: Use internal rpmdb-in-tempdir API
And now, finally the actual goal is achieved.  \o/

Only one code path dealing with extracting the rpm database from an
OSTree commit.

An astute reader would notice that the `root` member of the struct was
actually only necessary as of a few commits ago.  But said astute
reader would also realize it's kind of late in the evening and not
worth rebasing it to where it would properly go.
2015-05-21 21:27:38 -04:00
Colin Walters
0756708f24 db: Create var/lib/rpm -> ../../usr/share/rpm in tempdir
hawkey and libsolv are both patched to look in `usr/share/rpm` if the
db can't be found in `/var/lib/rpm`.  However, librpm itself isn't.
One *can* override it with a macro...which is process global.  Yuck.
Needs fixing.

Anyways, we can just make a symlink.  That's a lot easier than writing
a patch for librpm and waiting a billion years to be able to use it
everywhere we care about.

This will help unify the librpm tempdir code with the hawkey tempdir
code.
2015-05-21 21:25:27 -04:00
Colin Walters
60d68f6e24 db: Make RpmRevisionData an opaque struct
This allows us to more cleanly encapsulate things.
2015-05-21 21:16:21 -04:00
Colin Walters
349dd45679 db: Remove --rpmdbdir option
As far as I can tell, this is basically a way to specify the temporary
directory.  That significantly complicates the code as it now
needs to keep track of whether or not it owns the temporary directory.

This hinders unifying this code with the hawkey query path.

Because of this, and since I'm not aware of a use case for specifying
this tempdir, let's remove it.
2015-05-21 21:16:21 -04:00
Colin Walters
bd9b9eac0a Drop root arguments from internal rpmdb API
It was only used to access the yumdb, which we don't use because:

 - It badly exacerbates the OSTree one-HTTP-request-per-object issue
 - We're assembling multiple repos on the server side, so things like
   who took the action aren't relevant.

But the reason I did this patch at the moment is because I want to
unify the code that's creating tempdirs from commits so we can feed
real files to librpm.
2015-05-21 20:34:01 -04:00
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