Commit Graph

197 Commits

Author SHA1 Message Date
Colin Walters
7c71fbc077 Add new "compose" builtin, rename "treecompose" -> "compose tree"
And do the same for "sign".  This way we can have the compose server
utilities cleanly separated from what most people will see, which is
the client side tools.
2014-05-26 15:05:08 -04:00
Colin Walters
9d954d433a treecompose: s/create/treecompose/ in help text 2014-05-20 21:37:51 -04:00
Colin Walters
6fd8515f2e treecompose: Look for yum repo configs in same directory as treefiles
This is significantly easier than requiring mutation of the host yum
configuration.
2014-05-18 14:13:31 -04:00
Colin Walters
2756398d84 treecompose: Honor http_proxy environment variable 2014-05-18 09:29:51 -04:00
Colin Walters
18d0d989ae treecompose: Add initial caching
The way this works is still fairly naive in that we hash in two
inputs:

1) The treefile JSON
2) The result of rpm -qa

If both of those are a hit, we reuse the existing commit.
2014-05-16 04:29:17 -04:00
Colin Walters
ce862456e3 treecompose: De-indent unnecessarily indented region 2014-05-15 17:47:47 -04:00
Colin Walters
9eff6b5951 treecompose: Remove code to delete cached packages
No longer needed now that we recommend an HTTP proxy.
2014-05-15 16:57:43 -04:00
Colin Walters
18b2121c91 Remove internal postprocessing support
It was too hacky.  If we do this it should be a higher level language
like what Lorax has.
2014-05-14 13:59:40 -04:00
Colin Walters
d048427618 treecompose: Move yum repos out of the way *after* waiting for yum completion
Otherwise it just doesn't work.  Note this hack is only necessary for
the case where some package pulls in e.g. fedora-release in the
initial transaction set when we're trying to install nss-altfiles.
2014-05-05 18:01:45 -04:00
Colin Walters
8f519a171f treecompose: Add missing space in subprocess printing 2014-05-05 17:57:16 -04:00
Colin Walters
e8cfd7a334 treecompose: Fix use-before-alloc 2014-05-05 08:34:45 -04:00
Colin Walters
6e082af2b3 treecompose: Add support for an "include" key
This greatly increases the practiality of using treefiles directly
instead of the old products.json.
2014-05-03 10:05:43 -04:00
Colin Walters
df2b355f38 core: Remove src/autobuilder
This will move to a separate repository.  This allows a clearer
separation between the core tool (which is shipped on client systems
too), and the compose infrastructure.

Furthermore, I want to make the autobuilder a Docker container.
2014-05-03 07:32:28 -04:00
Colin Walters
0ad262b2c4 treecompose: Remove internal caching, require --repo argument
It's a lot clearer if the inputs, outputs, and cache state are cleanly
separated.  At least the "lorax" tool relies on a local HTTP cache
instead of keeping around the yum repos - let's do the same.

This commit causes treecompose to require a --repo argument, and it
also gains an optional --proxy argument.
2014-05-03 06:55:35 -04:00
Colin Walters
06b766bf37 rollback: Remove unnecessary cleanup
_write_deployments() does this.
2014-04-03 18:30:36 -04:00
Colin Walters
55fe109685 upgrade: Add --allow-downgrade option
This matches the core OSTree one, and is too useful for development
purposes.
2014-04-03 18:14:34 -04:00
Colin Walters
f58a9efc29 src: Delete relabeling helper
It's now merged into the ostree sources.
2014-04-03 18:12:20 -04:00
Colin Walters
77214be079 treepkgdiff: Fix upgrade diff ordering
Oops...
2014-04-01 22:40:16 -04:00
Colin Walters
29e8505fab tasks/repoweb: Add a print message to show progress 2014-04-01 19:21:31 -04:00
Colin Walters
f7cf900f40 autobuilder: Claim ownership of command socket on startup 2014-04-01 18:36:04 -04:00
Colin Walters
9cea1c5328 treecompose: Remove some commented-out code
This bit will never really work right; the real fix is to switch to
hawkey+librepo.
2014-03-31 18:37:27 -04:00
Colin Walters
0a88e292f2 Put hawkey stuff behind --enable-patched-hawkey-and-libsolv
Right now we depend on two patches.
2014-03-28 22:04:53 -04:00
Colin Walters
50bd970791 Print treepkgdiff on rollback too
Move it to an internal API.
2014-03-28 21:55:37 -04:00
Colin Walters
441313f9ef core: Add "rollback" builtin
This is a convenient command to go back to the previous tree.
2014-03-28 20:27:35 -04:00
Colin Walters
8b32e68d41 upgrade: Add missing variable initializer 2014-03-28 20:27:35 -04:00
Colin Walters
221becaafb autobuilder: Avoid critical if there's no gpg_key 2014-03-28 20:27:35 -04:00
Colin Walters
57f8bfb63f upgrade: Print out a summary of the package delta
This requires us to link to hawkey.
2014-03-28 17:34:08 -04:00
Colin Walters
87c144269e upgrade: Consistently end status line
On error, we would append to the status line.
2014-03-27 07:59:36 -04:00
Colin Walters
cced7a74da Stop shipping yumdb entirely
We don't have the tools to read it in the host system right now, and
its one-file-per-value badly conflicts with OSTree's
one-HTTP-request-per-file.
2014-03-26 17:09:51 -04:00
Colin Walters
83fae8e058 upgrade: End status line 2014-03-25 17:38:59 -04:00
Colin Walters
bee7feb8d8 update: Print message noting reboot is required 2014-03-25 17:30:15 -04:00
Colin Walters
8fb40b75bd upgrade: Print origin description 2014-03-25 16:50:19 -04:00
Colin Walters
60a00a8544 upgrade: Fix to actually deploy on change 2014-03-25 08:21:25 -04:00
Colin Walters
c2b242f200 Add upgrade builtin
This is just the start of moving more functionality into rpm-ostree,
with the goal of more tightly binding the rpm and ostree worldviews.

For exmaple, supporting package installation on top, showing the
package-level diff between trees, etc.
2014-03-24 18:11:21 -04:00
Colin Walters
1319e1616d Rename create -> treecompose
It's just a better name.  Also matches what we already did for the
autobuilder.
2014-03-22 15:20:23 -04:00
Colin Walters
05d348528e core: Move rpm-ostree-sign to "rpm-ostree sign" 2014-03-22 15:12:31 -04:00
Colin Walters
af49603d6f core: Use generic "builtin" infrastructure for command handling
I want to have more options than just "create".
2014-03-22 15:05:41 -04:00
Colin Walters
481ce2af64 autobuilder: selinux-ensure-labeled has moved to instutil 2014-03-18 18:25:11 -04:00
Colin Walters
3ba0eb2e6e autobuilder: Rename build -> treecompose
We're not building anything from source here.
2014-03-14 22:53:32 -04:00
Colin Walters
9d2124fa55 autobuilder: Remove bdiff
It only applies in Continuous.
2014-03-14 22:44:19 -04:00
Colin Walters
e989331788 core: Add rpm-ostree-sign
This uses rpm-sign which talks to a remote server for signing.
2014-03-14 22:18:17 -04:00
Colin Walters
c73bcb5112 rpm-ostree: Remove duplicate variable definition 2014-03-14 16:03:49 -04:00
Colin Walters
6e29b92035 zdisks: Run immediately after ensure-disk-caches 2014-03-14 10:55:21 -04:00
Colin Walters
394212008a When tasks are pushed from console, schedule immediately
This is so that I can force a zdisks run.
2014-03-14 10:53:32 -04:00
Colin Walters
2e97051d74 Move internal labeling helper to ostree
This way it can more easily be reused by Anaconda:
https://git.gnome.org/browse/ostree/commit/?id=e11de9357cea643b45a2e5e3f94d33dbd84d9ca3
2014-03-13 08:52:51 -04:00
Colin Walters
7057a33859 libqa: Also update default fstab 2014-03-11 18:37:25 -04:00
Colin Walters
fbfabf8574 libqa: Switch to XFS by default for /
Docker tends to trigger kernel panics in fallocate with ext4, and XFS
is the RHEL7 default.
2014-03-11 18:02:58 -04:00
Colin Walters
8e74ce423f postprocess: Remove from_repo_{revision,timestamp}
These change every time the repo changes, and don't add a lot of
value.  We mainly just want the package URL and such.
2014-03-10 14:41:38 -04:00
Colin Walters
7f3fa0d60b Add "composeui/"
The web page previously bounced out to the "fedora-atomic" component -
but we really want a bit of web UI that's shared between products.
Like how Koji is a generic frontend.

In particular, this now comes with a start of a generic "repoweb".
2014-03-05 13:16:22 -05:00
Colin Walters
d84ccd6959 ensure-disk-caches: Don't regenerate if we have exact revision 2014-03-03 07:45:47 -05:00
Colin Walters
e694106324 smoketest: Delete .qcow2 disks after completion
They can get kind of large.
2014-03-01 12:12:52 -05:00
Colin Walters
115b781729 autobuilder: Use last completed build for tasks
We can't execute a task in a *running* build.
2014-03-01 11:00:10 -05:00
Colin Walters
a1a2953d4c core: Don't make multi-user.target.wants link if it already exists 2014-02-28 10:44:43 -05:00
Colin Walters
db22ca6e92 build: Don't append lists muliple times 2014-02-28 08:54:20 -05:00
Colin Walters
0e2c40c8a8 Move demo-treefile.json to doc/ 2014-02-27 18:18:42 -05:00
Colin Walters
a9ac9dde40 core: Create multi-user.target.wants if necessary
For some reason this doesn't seem to be created with current systemd
in EL7 Beta.
2014-02-27 18:16:13 -05:00
Colin Walters
5a6ac59e66 autobuilder: Add "console" command
Implemented in C with readline.
2014-02-26 14:54:01 -05:00
Colin Walters
56ff31418c autobuilder: Add missing space 2014-02-26 10:17:52 -05:00
Colin Walters
1e194b3c0b autobuilder: Remove leftover debug print 2014-02-26 04:49:36 -05:00
Colin Walters
cf15328768 autobuilder: Add a control socket
I've always needed a way to change what the daemon is running.
2014-02-26 04:42:22 -05:00
Colin Walters
ebf5838436 Support "repos_data" in treefiles, use it for automatic overrides/
For convenience, allow users to create an "overrides/" directory which
is a repo.  If it exists, the builder automatically adds it.

(However, we should likely disallow distributing these builds on
 the network)
2014-02-25 17:07:59 -05:00
Colin Walters
c08630f5d5 autobuilder: Move data to -autobuilder subdirectory for easy packaging 2014-02-23 17:24:05 -05:00
Colin Walters
2e21ceed91 autobuilder: Default to running "autobuilder" 2014-02-23 17:05:43 -05:00
Colin Walters
0cb346b798 postprocess: Work around SELinux cross-labeling vs PCRE issue
See http://marc.info/?l=selinux&m=139282274522388&w=2
2014-02-22 01:32:20 -05:00
Colin Walters
6985805b3a rpm-ostree: Set HARDLINK=no in environment during install
This avoids the kernel pointlessly doing its own checksum of content.
2014-02-21 14:56:12 -05:00
Colin Walters
61f3066ac6 autobuilder: Inherit comment attribute into treefiles 2014-02-21 14:05:24 -05:00
Colin Walters
cced6f6874 postprocess: Always place rpmdb into /usr/share/rpm
Remove support for the case where the tree doens't have rpm - we don't
need to go quite that small yet, and having the file -> package
mapping helps with the GPL compliance story.

See https://lists.fedoraproject.org/pipermail/legal/2014-February/002393.html
2014-02-21 13:50:40 -05:00
Colin Walters
39a7c458ef Major update to SELinux handling
We use the new unified OSTree API (OstreeSePolicy) to perform
labeling, rather than having our own here.

Also create a new rpm-ostree-relabeling-helper that is run to label
any leftover files such as /etc/fstab that we create offline, and also
to relabel the entire disk.
2014-02-20 07:59:09 -05:00
Colin Walters
9be80f1775 tmpfiles: Make /var/home a directory, not a symlink by default
Because /etc/passwd may be different between OSes, let's have
/var/home be a real directory by default.  Admins can always make it a
symlink.
2014-02-15 19:35:43 -05:00
Colin Walters
97ef560a00 libqa: Set PROMPT 1 for syslinux by default
We want people to be able to easily choose between boot entries.
2014-02-15 19:35:24 -05:00
Colin Walters
fb2c568cfb postprocess: Work around SELinux issue with cross labeling
Unfortunately when composing from RHEL7 a current rawhide tree, the
PCRE version mismatch causes none of the regexps to match...

Work around this by temporarily moving the .bin files out of the way.
This is really a hack though.

The real fix is to change libselinux to check pcre_version().
2014-02-15 18:41:22 -05:00
Colin Walters
23e42af3ac postprocess: Remove var_uuid files from yumdb
These differ each run, polluting upgrades.  James says we don't need
them anyways.postprocess: Remove var_uuid files from yumdb

These differ each run, polluting upgrades.  James says we don't need
them anyways.
2014-02-15 18:40:47 -05:00
Colin Walters
f686bb345a demo-treefile: Remove extraneous postprocessing 2014-02-12 19:58:00 -05:00
Colin Walters
ff08e35f98 tasks: Update for new products-built.json syntax 2014-02-12 19:25:42 -05:00
Colin Walters
148ca0d74e tasks/build: Automatically use override repo 2014-02-12 19:25:31 -05:00
Colin Walters
a3a65fd7b5 Switch to taking JSON as input, generate "treefile" from products.json
This is somewhat similar to what we've been doing with Continuous; we
take the manifest.json, and turn it into a "snapshot".  Except here
there is a notion of inheritance.

This gets stored into the tree as /usr/share/rpm-ostree/treefile.json.

Additionally, it goes into the autobuilder directory in
products-built.json.  Though really we should split up that file,
since it will be kind of...large.
2014-02-12 18:28:42 -05:00
Colin Walters
e5e260ff3a postprocess: Downgrade warning about files in /var to print
It's really just informative...
2014-02-12 15:29:11 -05:00
Colin Walters
e3eb4d1735 task: Clean up previous dir before executing
This is mainly useful for local builds.
2014-02-11 20:10:36 -05:00
Colin Walters
a7d2f081e5 Add image_formats parameter, default fedostree/ to qcow2
The vdi export is really only for a different use case.
2014-02-11 19:55:40 -05:00
Colin Walters
9762c20fdc core/postprocess: Move /usr/lib/yum to /usr/share/yumdb 2014-02-07 11:35:27 -05:00
Colin Walters
aaaed643af core/post: Fix detection of /usr/bin/rpm in target
We've already moved /usr, so we need to look for /usr/bin/rpm in the
target.
2014-02-06 18:37:09 -05:00
Colin Walters
7a9ea01040 autobuilder: Don't put trees which failed to compose into products-built.json
Otherwise we attempt to run ensure-disk-caches on them which won't
work.
2014-02-04 11:37:17 -05:00
Colin Walters
1cb62d25fb core/post: Warn when we fail to find a filename in the policy 2014-02-02 16:30:15 -05:00
Colin Walters
7729c682f2 zdisks: Put autogenerated images in "images/auto"
We'll then use say releases/ for official releases, so people aren't
blinded by checksums.
2014-02-01 17:26:47 -05:00
Colin Walters
7f189c326d libqa: Append root= kernel argument again
Oops.
2014-02-01 16:40:17 -05:00
Colin Walters
b1ca14333d Support adding default kernel arguments, use enforcing=0 for now
We're quite close with SELinux, but let's not wait until we are
AVC-free before shipping.  Just use enforcing=0 for now.
2014-02-01 16:20:48 -05:00
Colin Walters
64bd4fc414 zdisks: Use .bz2 for VDI files
It turns out OS X has bzip2 but not xz installed by default, so let's
use that instead.  QCOW2 stays as xz since we can assume GNU/Linux
users have it better.
2014-02-01 15:27:22 -05:00
Colin Walters
709ff9f332 Export compressed disks from cache, add VirtualBox VDI export 2014-01-31 22:45:28 -05:00
Colin Walters
5b37f7c9e5 libqa: Make use of --disable-fsync
This is way faster.
2014-01-31 22:19:27 -05:00
Colin Walters
0f4ff6c2cf autobuilder: Stick 'buildmaster' in ref names
Then later we can put 'smoketested' there, and such.
2014-01-31 17:11:43 -05:00
Colin Walters
c76cee28fc Add option to disable SELinux, use it for now
While it works during commit, it doesn't work with libguestfs/FUSE =(

Back it out until we have a way to generate images.
2014-01-31 11:59:50 -05:00
Colin Walters
8543a6108d Support SELinux
This commit labels all of the files on the server side, if a policy is
installed.
2014-01-31 10:13:18 -05:00
Colin Walters
654cb99599 Add support for enabling services by default 2014-01-30 19:56:13 -05:00
Colin Walters
194e7365a9 core: Use --setopt=cachedir rather than copying/moving
I don't know why I wasn't doing this before, it's clearly better.
2014-01-30 19:04:58 -05:00
Colin Walters
ad831af3be autobuilder: Log command invocation 2014-01-30 18:02:13 -05:00
Colin Walters
7a0676a001 Add support for GPG signing builds 2014-01-30 16:36:47 -05:00
Colin Walters
31b11a7512 build: Don't accumulate postprocessing steps 2014-01-30 12:41:06 -05:00
Colin Walters
69132953f3 libqa: Make disk generation more flexible, with an eye to single-partition layout
The Fedora cloud disk just has one ext4 partition, we should be able
to do that as well.
2014-01-30 11:17:01 -05:00
Colin Walters
9e351af1fa libqa: Generate 0.10 qcow images by default
So they can be read by EL6 era qemu.
2014-01-30 09:47:20 -05:00
Colin Walters
63cf003481 postprocessing/remove-docs: Also remove manpages 2014-01-30 06:01:03 -05:00