Commit Graph

141 Commits

Author SHA1 Message Date
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
Colin Walters
fe53891d6c core/postprocess: If there's no /usr/bin/rpm, add rpm-manifest.txt
We really want people using these trees to know what went in it.  If
the tree doesn't actually have /usr/bin/rpm inside it, then do an
"rpm -qa | sort" and dump that into: /usr/share/rpm-manifest.txt

This will help our story with GPL compliance too.
2014-01-29 18:37:54 -05:00
Colin Walters
87bdf29192 core: Fix rpmqa-sorted script to operate on $(pwd)
I'm not sure why it needs $(pwd) over ".", but oh well.
2014-01-29 18:37:26 -05:00
Colin Walters
f6076b13a0 core: Add an environment variable to breakpoint post-yum 2014-01-29 18:37:05 -05:00
Colin Walters
f07f054efb Add postprocessing infrastructure
We remove the root password from all images.  The core/docker tree
also gets docs and some kernel drivers removed.
2014-01-29 18:12:50 -05:00
Colin Walters
802cace05f Unify rpm-ostree into one binary
And start making an internal library.
2014-01-29 14:37:44 -05:00
Colin Walters
f8ddf38aa2 postprocess: Synthesize tmpfiles.d from /var RPM content
OSTree really wants /var to come empty; it's not going to be practical
to change every RPM right now though.  So, let's dynamically turn the
content from /var into systemd-tmpfiles.d snippets.
2014-01-28 11:37:11 -05:00
Colin Walters
be0b25c493 testbase: Fix updating a non-exact disk image 2014-01-26 17:13:42 -05:00
Colin Walters
f8444e6638 Resolve dependencies before building
This allows us to skip the whole install process if the
RPMs haven't changed, which is a rather large win.

Part of this commit involves some code to attempt to talk to "yum
shell" for dependency resolution, in an attempt to avoid depsolving
twice, which just isn't really going to work, since "yum shell" isn't
an API as it turns out.

The only other real alternative is doing something PackageKit-like,
which is ~4000 lines of very nontrivial Python.
2014-01-26 17:07:09 -05:00
Colin Walters
f4952a0c4f testbase: Put overlay qcow2 in working directory, not toplevel 2014-01-26 10:15:52 -05:00
Colin Walters
14fe66e01d libqa: Also look for qemu-system-x86_64
This is unfortunate, but the current rpm-ostree.cloud.fp.org instance
is in OpenStack, so we're in nested virt land =(
2014-01-26 09:51:54 -05:00
Colin Walters
1fac73c484 build: Write a modified.json
This ensures we don't trigger smoketest/etc. if the trees haven't
changed.
2014-01-26 05:02:01 -05:00
Colin Walters
8fa595cca7 build: Fix exception if we don't have a previous build 2014-01-26 05:01:42 -05:00
Colin Walters
06a6c2878a testbase: Fix successful return value 2014-01-25 21:36:27 -05:00
Colin Walters
c2c7756336 testbase: Test each disk in serial, don't abort if one fails 2014-01-25 21:28:19 -05:00
Colin Walters
eb8c4483dc Make smoketest work 2014-01-25 21:25:27 -05:00
Colin Walters
1ea30df70c Make disk image creation work 2014-01-25 20:22:54 -05:00
Colin Walters
90eca9c7c2 libqa: Fix extlinux installation 2014-01-25 20:20:48 -05:00
Colin Walters
58d75e65ca core: Fix packageset diff comparison 2014-01-25 19:19:20 -05:00
Colin Walters
141bc3406e Drop last leftover bit of Python code 2014-01-25 09:22:46 -05:00
Colin Walters
05872052b1 Rewrite core utilities in C
There are two major reasons:
1) I want to do things like process SELinux labels here, and that
   type of thing is best done in C.
2) There are presently 3 languages in this code, and this takes us
   down to just two.
2014-01-25 09:19:18 -05:00
Colin Walters
7718a22bc5 libqa: Port disk construction to introspection
Hooray for g-i!
2014-01-23 19:34:04 +00:00
Colin Walters
0891d38975 builddisks: Implement disk building
This is a bit raw, but functions.
2014-01-23 00:23:12 +00:00
Colin Walters
7345f2b9f5 autobuilder: Ensure timeout really runs, drop it to every hour 2014-01-22 14:02:02 +00:00
Colin Walters
587a97121c rpmostree: Cache rpm -qa between runs, don't commit if packageset is unchanged
At the moment, a lot of RPM content has files whose content derives
from timestamps (like .pyc files).  We really don't need to do another
commit to the repository if it's just these files which changed.

Fix this by caching the package list at the rpm-ostree level, and
don't commit if it hasn't changed.
2014-01-20 15:18:07 -05:00
Colin Walters
f2b4ea425d rpmostreepost: Support env var to preserve root that we committed
I'll be using this to test SELinux support.
2014-01-20 12:10:24 -05:00
Colin Walters
bf0acf54ed autobuilder: Add onlyTreesMatching parameter to build
This is a convenient way to test, run:

$ rpm-ostree-autobuilder make -n build onlyTreesMatching=\"20/x86_64/base/minimal"
2014-01-20 12:10:24 -05:00
Colin Walters
84d6f10495 autobuilder: Implement basic autobuilder which does build every 3 hours 2014-01-18 16:29:36 -05:00
Colin Walters
99c11cb374 rpmostree: Use workdir/cache instead of /var
We're moving more towards the autobuilder model; this allows us to
keep all of the data in one place.  Important for the
cloud.fedoraproject.org instance since /mnt/ostree is the large
filesystem.
2014-01-18 16:27:23 -05:00
Colin Walters
cad6760b6a build: Move copr repo into products.json 2014-01-16 16:35:59 -05:00
Colin Walters
7333091db4 Split out postprocess+commit to separate script
As this logic is of most interest to potential other consumers; it's
not entangled with yum for example.
2014-01-16 11:43:17 -05:00
Colin Walters
df1db5f85b build: Correctly inherit base packages 2014-01-16 06:48:09 -05:00
Colin Walters
94bf3c731d autobuilder: Mostly functional operation on products.json 2014-01-16 06:23:35 -05:00
Colin Walters
1c4262d273 rpmostree: Fix typo in error path 2014-01-16 06:23:26 -05:00
Colin Walters
e8633e4e6e Add some stub code to build from a "products.json" 2014-01-14 18:04:21 -05:00
Colin Walters
8250481b46 Accept arbitrary refname instead of using os/version/name
I want to use "fedostree" for now, so let's allow the caller to
specify whatever refname they want.
2014-01-12 13:46:49 -05:00
Colin Walters
a593335ce3 Install shadow-utils in root, move breakpoint to post-NSS
For more easily debuging nss-altfiles; one can set a breakpoint here,
and then chroot in to test things.
2014-01-08 14:56:25 -05:00
Colin Walters
66a19b6475 Import lots of code from gnome-continuous
This doesn't really do anything yet, but the idea is to start doing
Continuous-like things (such as actually booting the result).
2014-01-03 17:14:10 -05:00
Colin Walters
a1e5ee0a9c Flush log messages immediately
Otherwise we end up with desynchronized stdout/stderr which is
confusing.
2013-12-23 15:00:48 -05:00
Colin Walters
453667e41e Add --gpg-sign argument
Can't quite use it yet, but will be able to with the next OSTree
release.
2013-12-23 14:22:43 -05:00
Colin Walters
02b85c0885 Use "yum shell" to execute group add and package install as one unit
The two transaction thing is bad for multiple reasons, but what bit me
specifically was something in the group transaction pulling in
'kernel-debug', and then installing 'kernel' later.
2013-12-23 10:10:35 -05:00
Colin Walters
3b975343d4 Include kernel version in initramfs filename 2013-12-23 10:10:01 -05:00
Colin Walters
cc0922e655 Move/restore ${sysroot}/etc/yum.repos.d to work around yum bug
We really want it to use the *host*'s yum repos, even after the chroot
is constructed.
2013-12-22 10:59:17 -05:00
Colin Walters
02c2e619d7 README.md: Move to toplevel 2013-12-22 10:59:00 -05:00
Colin Walters
3362b7da4b Fix name of installed tmpfiles 2013-12-22 10:58:38 -05:00
Colin Walters
f578eeba9d Fix missing argument 2013-12-21 22:21:48 -05:00
Colin Walters
8ecc47ac87 Various fixes to finish import from pkgsys-ostree 2013-12-21 22:15:57 -05:00
Colin Walters
958dfa435e Initial import from pkgsys-ostree 2013-12-21 19:41:30 -05:00