Commit Graph

383 Commits

Author SHA1 Message Date
Colin Walters
03c368fec4 compose: Fix setting of default.target
This would probably be best if we invoked systemctl in the compose
tooling, but at the moment we don't have any execution of target code
on the host.  It's fine to assume that it's in /usr/lib.

We can revisit this if we start doing chrooted/containerized
execution.
2014-10-14 08:28:17 -04:00
Ralph Bean
72358ccfd3 docs: Fix a typo 2014-10-08 23:01:53 -04:00
Colin Walters
c9219181c4 status: Consistently use malloc'd() memory for status
This crashed when "atomic status" on an origin that didn't have a
refspec, which happened via my new atomic-pkglayer demo script.
2014-10-04 15:08:49 -04:00
Colin Walters
a717c59814 Release 2014.107 2014-10-03 20:18:17 -04:00
Colin Walters
d572fe84a4 packaging: Add symlink for atomic 2014-10-03 20:02:24 -04:00
Colin Walters
8dab8d551c rebase: Make use of new upgrader API to ignore unconfigured state
"atomic rebase" is mostly a copy of "ostree admin switch", so let's
also pick up the changes in ostree admin switch for the new
unconfigured state flag.

This allows a user to "atomic rebase" on an unconfigured system.

Related: #31
2014-10-03 20:02:24 -04:00
Colin Walters
466d9dbe33 packaging/make-git-snapshot.sh: Add missing file 2014-10-03 10:06:49 -04:00
Colin Walters
d8e6bd88e6 tests: Add a rebase test
This crashes for me sometimes, so let's add a test.
https://github.com/projectatomic/rpm-ostree/issues/30
2014-09-30 09:54:14 -04:00
Colin Walters
d3babd8a93 compose: Serialize treefile early
This way we don't emit a critical if we exit due to having already
cached content.
2014-09-29 16:25:36 -04:00
Colin Walters
a32ac06ce9 Import some basic testing infrastructure from OSTree
This is using the
https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests model.

In order to run the tests, you will need to:
./configure --enable-installed-tests

Then:
gnome-desktop-testing-runner -p 0 rpm-ostree/
2014-09-29 16:25:36 -04:00
Colin Walters
963f2082cc treepkgdiff: Don't require a booted deployment
For the test suite, we're doing an upgrade offline of another OS root.
What we should maybe do is print the package diff from the merge
deployment, if not the booted one.

However, I think this is OK for now.
2014-09-29 16:25:36 -04:00
Colin Walters
766c39cbd0 patches: Obsolete
We now have a different fix, see commit
827e711eb7
2014-09-26 13:42:34 -04:00
Colin Walters
0f16e2e252 Add --disable-compose-tooling build option
Some downstreams want the ability to separate the compose tooling from
the client, for e.g. support reasons.

This approach supports generating a tarball without the source for the
compose command, and requires specifying a config option to disable
it.
2014-09-16 21:45:30 -04:00
Colin Walters
a18bf1ac9f Bump OSTree requirement for new pull API 2014-09-08 17:27:15 -04:00
Colin Walters
67d8c95280 Release 2014.106 2014-09-08 16:48:20 -04:00
Colin Walters
1a8213b97b Release 2014.105 2014-09-08 16:41:28 -04:00
Colin Walters
297dbb0c73 compose: Put the expanded treefile content in /usr/share/rpm-ostree/treefile.json
Since the treefile format now supports includes, we would need to
either include the whole chain, or just the expanded portion we use in
the compose.  This patch does the latter.

This should allow a client to take the same treefile and generate a
similar tree (if they want to reproduce with the same RPMs, those can
be extracted from the RPM database inside the tree).
2014-09-07 12:48:05 -04:00
Anne LoVerso
00162a2eea upgrade: Download only /usr/share/rpm in check-diff
This improves on the check-diff option by only downloading the
/usr/share/rpm directory to do a package diff.  This prevents downloading
the whole deployment and the necessity to do a cleanup later.
2014-08-22 15:57:27 -04:00
Colin Walters
acfb219c36 Merge remote-tracking branch 'james/master' 2014-07-31 14:53:17 -04:00
James Antill
a436d47e90 rpm: Change default diff format to block, from diff 2014-07-30 02:11:36 -04:00
James Antill
e9fdbd16bb rpm: Add changelog entries to block diff. output
Diff. output in block mode is now very similar to repodiff.
2014-07-30 02:10:05 -04:00
Colin Walters
e17419b978 compose: Add a --add-override-pkg-repo argument
As a developer, a workflow I have for testing things is to create
an RPM, toss it into a local yum repository, then do a compose.

However at the moment to add the local overrides I have to edit the
treefile, which is annoying.  Let's add a commandline override for
this.

Note this also deletes the old "repos_data" code which was not being
used.
2014-07-28 17:16:09 -04:00
Dusty Mabe
48e8c126f2 compose: Delete dead code that copies aside yum repos
In 827e711 we stopped running two yum transactions. This means the
code that detects if the repodir exists in the yum installroot will
always return false and the code is dead.
2014-07-28 13:55:17 -04:00
James Antill
6ae8462398 rpm: Add --format=block mode format for diff command. 2014-07-24 23:38:51 -04:00
James Antill
9af4822bbd Split diff into algo./print functions. 2014-07-24 23:13:18 -04:00
James Antill
0b6bc7d243 Fix pkg_yumdb_strdup leaking error, and returning NULL. 2014-07-24 22:58:32 -04:00
James Antill
8fdc8fd772 Add rpm man page entries. 2014-07-24 22:55:42 -04:00
James Antill
a7e86812f2 rpm: automatically turn fsync off when using mkdtemp dirs. 2014-07-21 00:55:39 -04:00
Colin Walters
7ab2325081 ostree-nspawn: Correctly shift initial root argument 2014-07-20 07:33:47 -04:00
Colin Walters
9c81a83e14 README.md: We no longer need nss-altfiles on the host 2014-07-18 16:16:19 -04:00
James Antill
c547c8a3f6 Give the user a nice rpm init failure message. 2014-07-18 00:46:17 -04:00
James Antill
cb91fb9494 Fix the error paths for ost_get_commit_hashes.
Simplyfy the code.
 Stop leaking parent/beg_commit.
 Give a real error when a user specified range is bad, and thus. insta.
 fail from callers.
2014-07-18 00:27:28 -04:00
James Antill
23ad6c0310 Use ostree_commit_get_parent in ost_get_prev_commit. 2014-07-17 23:54:50 -04:00
Colin Walters
711745bbc6 Add: --sysroot and --os arguments
These match OSTree.  There are a variety of use cases here.  One is
for test suites; we can stand up a temporary sysroot directory, and
operate on content inside there.

Another is doing virtual machine upgrades offline from a host system,
or upgrading a different OS.

The duplication here is a bit unfortunate; if we add a lot more
commands we should revisit this and perhaps have a common option
group.
2014-07-17 12:59:38 -04:00
Colin Walters
f642512ae6 status: Don't require a booted deployment
I'm working on a patch to add --sysroot support, and for testing
OSTree stuff I often work from a "traditional" host workstation, and
then I have OSTree content in /.

This makes "atomic status" just work for that; I simply have no booted
deployment.
2014-07-16 16:17:59 -04:00
James Antill
634541f722 Allow sequence REFSPECs for version/list.
API probably needs to move to ostree library. Allows us to get a "list"
of REFSPECs, Eg.

"<newest>..<oldest>"

...as a REFSPEC will turn into a list of all the commits, inclusive.
2014-07-16 01:00:36 -04:00
James Antill
c88545d272 Fix 64bit problem when int != gsize to printf. 2014-07-16 01:00:30 -04:00
James Antill
3d85ab99dc Don't leak subtree when /usr/lib/rpm doesn't exist. 2014-07-16 00:59:57 -04:00
Colin Walters
932dbdfa67 Release 2014.104 2014-07-13 17:32:39 -04:00
James Antill
8a67101de7 Namespace and share DEFINE_TRIVIAL_CLEANUP_FUNC via. rpmostree-util.h
Conflicts:
	src/rpmostree-builtin-rpm.c
2014-07-11 16:47:05 -04:00
James Antill
b65365ac31 Move from using user commit name, to found commit checksum.
We don't want dirs. for branch names etc. so always use the checksum.
2014-07-11 02:35:34 -04:00
James Antill
60ade7d146 Add two column output for rpm list/diff, to look more like yum list. 2014-07-11 02:31:49 -04:00
James Antill
0e7ba9077f Namespace and share DEFINE_TRIVIAL_CLEANUP_FUNC via. rpmostree-util.h 2014-07-11 02:07:31 -04:00
James Antill
b7dbabe065 Add "rpm" command, for doing rpm/yum queries on commits.
It currently has the following sub-commands:

diff COMMIT COMMIT
 for rpmtree diff.
list [prefix...] COMMIT...
 for "yum list" like command.
version COMMIT...
 for "yum version" like command.

...bunch of FIXME's, UI output isn't great, needs docs.
 We also don't use the same code as the treediff on upgrade atm.
2014-07-11 02:01:41 -04:00
Colin Walters
827e711eb7 compose: Migrate content of /etc/{passwd,group} to /usr/lib more sanely
I had an epiphany today while working on
https://bugzilla.redhat.com/show_bug.cgi?id=1098304 - I realized that
I can just do an install, and then copy over everything except the
root entries from /etc/passwd into /usr/lib/passwd.

No need for a patched shadow-utils.  No need to modify the
/etc/nsswitch.conf before doing the install root.  It totally works.
I have no idea why I originally overcomplicated this.

The thing that sucks a bit about this code is that I have to drop to
the FILE * APIs so that I can use the glibc APIs for processing
group/shadow.

Also, the way I deduplicated the code paths for processing
passwd/group is crappy, but I think it's better than duplicating them
(as systemd-sysusers does).

The good: We don't need a two-step RPM transaction, we don't need
          a patch for shadow-utils, it's just saner
The bad: Code is not the most beautiful?  Not really bad.
The ugly: I didn't think of this in the first place and spent
          months beating my head against the wall of shadow-utils...
2014-07-10 18:50:54 -04:00
Colin Walters
aa5ae877de compose: Set SHADOW_USE_USRLIB
See https://bugzilla.redhat.com/show_bug.cgi?id=1098304
2014-07-09 17:29:28 -04:00
Colin Walters
fdb4724d69 compose tree: Read in security.capability xattrs
Per http://fedoraproject.org/wiki/Features/RemoveSETUID
many programs (famously /usr/bin/ping) switched to using
"file capabilities" instead of setuid.

rpm-ostree had code to specially handle SELinux labels, but was
discarding other xattrs.  Let's just whitelist reading in
security.capability.

Closes #14
2014-07-03 15:14:53 -04:00
Colin Walters
19d093a496 compose: Add --workdir-tmpfs
This ~halves the write traffic to my SSD when doing local composes.
My laptop has 12GiB of RAM, plenty for this.
2014-07-02 08:43:59 -04:00
Colin Walters
fd045ca511 Release 2014.103 2014-06-22 18:10:49 -04:00
Colin Walters
c577cb0296 packaging: Enable hawkey and usrbinatomic by default
This will break on F20 but if that starts being a problem we can work
around it with an automatic version check or so.
2014-06-22 18:03:21 -04:00