Colin Walters
0018b6d75f
core: Drop unix::is-mountpoint from fast queryinfo flags
...
If this is present, we call access() and stat() on the parent
directory.
2011-12-22 11:07:55 -05:00
Colin Walters
d25f1bf73d
core: Use GFile for repo constructor API, and a bit more internally
...
Also, ensure that the repo directory GFile is absolute - this avoids
a getcwd() syscall every time we construct a GFile object.
2011-12-22 11:04:08 -05:00
Colin Walters
8a499c4a2a
core: Add --recompose option for compose
...
This will allow us to easily regenerate a compose without passing the
full list of components each time.
2011-12-22 10:29:16 -05:00
Colin Walters
e9fd921afe
core: Change compose to operate purely in-memory
...
This is *significantly* faster than checking out each branch into the
real filesystem, then importing it again.
2011-12-21 21:42:13 -05:00
Colin Walters
add55849ab
core: Allow specifying a previous commit tree as a basis for a new commit
...
It's pretty trivial to map a previously existing commit tree into a
mutable tree too. While we're here change the command line arguments
for commit so that we can now properly overlay any combination of
directory, commit, or tarfile.
2011-12-21 20:10:10 -05:00
Colin Walters
c8377c7c5c
core: Expose more details of commit via API
...
Rather than offering high level "commit directory", instead perform
operations on a mtree. Commits are treated more like regular objects.
Change the commit builtin to drive this all at a lower level.
2011-12-21 18:58:44 -05:00
Colin Walters
59281d5901
core: Add omitted mutable tree files
2011-12-21 18:58:27 -05:00
Colin Walters
72257bab2b
core: Rename "store" public APIs to "stage" since that's what they do
2011-12-21 17:13:04 -05:00
Colin Walters
06548f137e
core: Make OstreeRepoFile "public"
...
* "ls" used it
* It's not like our internal API is 100% stable anyways
* The _ is ugly
2011-12-21 13:41:38 -05:00
Colin Walters
2b7a83d1cc
core: Add new "mutable tree" class, use it for tar file import
...
The tar import code forced the resuscitation of a hackish "FileTree"
data type for representing an in-memory tree. Split this out
into an OstreeMutableTree class for future use by any other in-memory
tree construction.
2011-12-21 13:34:10 -05:00
Colin Walters
14d682305b
core: Remove dead code from OstreeRepoFile
...
Originally I thought it would make sense for OstreeRepoFile to be
mutable, and it probably does, but we should do it in a different way.
2011-12-21 11:01:41 -05:00
Colin Walters
0b8754d47c
ostbuild: Separate metadata discovery, kill wrapper scripts
...
Add a simple KEY=VALUE metadata file format, and rather than
assuming 'basename' at a low level, allow passing e.g. NAME=gtk3
to override "gtk+".
The wrapper scripts are annoying...for now let's just remove them.
2011-12-21 10:52:57 -05:00
Colin Walters
835e0eae59
ostbuild: In chroot build, reuse source directory basename
...
This ensures that the output artifacts are named correctly, and not
"source".
2011-12-20 18:45:20 -05:00
Colin Walters
acca018e57
ostbuild: Ensure private libraries are in runtime, and kill .la files
...
A regular libfoo.so not in one of the regular directories should go in
runtime. (Probably we should double check it's a regular file too).
Also, delete .la files unconditionally.
2011-12-20 18:42:27 -05:00
Colin Walters
bdfde03b61
core: Support committing multiple tarballs in the same transaction
...
ostbuild will generate two artifacts: foo-runtime.tar.gz and
foo-devel.tar.gz in the general case. When committing to the devel
tree, it'd be lame (i.e. slower and not atomic) to have to commit
twice.
2011-12-20 17:21:15 -05:00
Colin Walters
d444ee917d
gnomeos: Rename images to "runtime" and "devel"
...
They're just better names, and this matches what the
default artifact splitter is doing now.
2011-12-20 14:44:51 -05:00
Colin Walters
5f3b029638
ostbuild: Flesh out chroot build to use ostbuild-user-chroot
...
One thing that made this take significantly longer than it might
have otherwise is that we have to keep PWD "up to date" - otherwise
we hit bugs in glibc's getcwd() implementation.
2011-12-19 21:44:32 -05:00
Colin Walters
28a5714abd
gnomeos: Pull in ostree from working copy directly
...
We'll just try to keep it stable.
2011-12-19 21:43:51 -05:00
Colin Walters
557487b1c7
core: Install unversioned .so, and kill .la file
...
This avoids Yocto barfing on a versioned shared library symbolic link
without a -dev package.
2011-12-18 18:37:48 -05:00
Colin Walters
11d57d63e3
core: Support --owner-uid and --owner-gid options for commit
...
This allows us to more easily import user-built tarballs into
a root-owned OSTree repo.
2011-12-18 17:36:46 -05:00
Colin Walters
a287274935
tests: Ensure we quote grep pattern
...
Otherwise we fail if the pattern starts with -
2011-12-18 17:35:30 -05:00
Colin Walters
134283afbf
core: In user mode checkouts of archives, use hard links
...
Now that we've done all the gyrations to separate content from
metadata in archives, we can just hard link when doing user checkouts.
2011-12-15 16:12:31 -05:00
Colin Walters
e014b2d9c2
core: Fix a few memory leaks
2011-12-15 15:17:27 -05:00
Colin Walters
c9c4dbfb22
gnomeos: Don't make device files
...
We don't need them any more inside a chroot now that we have
ostbuild-user-chroot.
2011-12-15 15:03:29 -05:00
Colin Walters
9a71ab187d
core: INCOMPATIBLE CHANGE: Split archive files in two parts (meta and content)
...
This will allow us to have hardlink checkouts of archives. A key use
case here is an archive repo of an OS (with root-owned files etc.)
where we want to do builds in a user tree.
A positive side effect of doing things this way is that now the SHA256
checksums for a given file should be identical regardless of whether
it's stored in an archive or bare repository.
2011-12-15 13:14:06 -05:00
Colin Walters
ecbffd4915
core: Don't insert null byte in temporary file names
2011-12-15 13:10:41 -05:00
Colin Walters
8ab2296a70
core: Add utility functions to convert a OstreeObjectType to/from a string
2011-12-15 13:09:51 -05:00
Colin Walters
b8e8b58585
core: INCOMPATIBLE CHANGE: Name repo files with their type (e.g. .dirmeta)
...
This makes inspection easier. Internally the code gets simpler because
metadata and files are more unified; there is just one object type.
2011-12-12 12:29:09 -05:00
Colin Walters
db9b7b7be6
osbuild: Make a MS_NOSUID bind mount over /
...
This closes a serious issue in that we still do a uid switch to 0 when
executing a suid binary, even though we're not gaining capabilities.
2011-12-12 12:13:32 -05:00
Colin Walters
dc4164993b
core: Initialize variables in fsck
...
Otherwise we segfault on an unhandled filename.
2011-12-08 18:23:25 -05:00
Colin Walters
d3058629fd
core: Change fsck to use packfile parsing API
2011-12-08 18:04:37 -05:00
Colin Walters
f6117de8d3
core: s/pack/archived/
...
This completes the rename from the previous commit.
2011-12-08 17:45:37 -05:00
Colin Walters
d6ceb91c35
core: Make ot_transfer_out_value() take a & for the second argument
...
As Ray Strode argued, it's confusing to have something that looks like
a function be magical. And OT_TRANSFER_OUT_VALUE is uglier.
2011-12-08 17:31:45 -05:00
Colin Walters
35fa68a74c
core: INCOMPATIBLE CHANGE: Rename .packfile to .archive
...
It's too confusing that we call the mode "archive" but the actual
files ".packfile". Also, git already has a "packfile" that serves a
totally different purpose.
2011-12-08 17:15:59 -05:00
Colin Walters
30c53a967c
core: Switch is_archive to an enumeration
...
This is in preparation for adding a third mode.
2011-12-08 17:05:16 -05:00
Colin Walters
7932811fbb
core: Delete some dead code
2011-12-08 14:55:41 -05:00
Colin Walters
dccd106731
core: Clean up checkout code
...
Take a GFile * for destination. Also, we only need one recursive
function, not two.
2011-12-08 10:28:44 -05:00
Colin Walters
15d23546ff
user-chroot: Add --unshare-pid, --unshare-net, and --mount-proc
...
To use CLONE_NEWPID we have to actually call clone() because it's
not supported by unshare().
To enable CLONE_NEWPID to be useful, we have to allow creating a new
proc mount rather than binding an existing one.
2011-12-07 10:52:42 -05:00
Colin Walters
fbb09d71a6
ostbuild: Add --unshare-ipc flag for user-chroot
...
This optionally closes down more paths to the host, which is
a good thing.
2011-12-07 09:48:38 -05:00
Colin Walters
d70950e891
core: Add -U option for checkout to skip lchown() and xattrs
...
This is useful for checking out an OS filesystem tree as a regular
user, and not caring about /dev and stuff.
2011-12-06 21:38:04 -05:00
Colin Walters
a94e0b8bf8
core: Ensure we chown created directories too
2011-12-06 20:16:03 -05:00
Colin Walters
c32141c2bf
core: Remove some useless wrapping of packfile unpacking in checkout
2011-12-06 20:09:09 -05:00
Colin Walters
5c7f019580
ostbuild: Compile and install ostbuild-user-chroot
...
It still needs to be made setuid.
2011-12-06 19:37:01 -05:00
Colin Walters
fb5ecdac42
ostbuild: Also allow making directories read-only
2011-12-06 19:36:42 -05:00
Colin Walters
a4b249e333
ostbuild: Clarify "safely" for user-chroot
2011-12-06 14:39:30 -05:00
Colin Walters
d32b2cb572
ostbuild: Recursively make mount points private
...
This ensures we're not going to mutate any global state.
2011-12-06 14:36:57 -05:00
Colin Walters
3042724698
ostbuild: Allow binding arbitrary directories, don't hardcode /proc /dev
...
This is just more flexible, and eventually we want this to be a
generic user-chroot tool.
2011-12-06 14:06:45 -05:00
Colin Walters
0fb40b201f
ostbuild: Ensure user chroot mounts are not shared
...
It's possible that the root filesystem mount is global; we need
to undo that in order to be sure that our "private" bind mounts
really are private.
2011-12-06 12:18:17 -05:00
Colin Walters
e68d0d25c0
ostbuild: Update user-chroot to bind mount /proc and /dev
2011-12-06 10:43:01 -05:00
Colin Walters
ce7345d51e
core: Major cleanup to internal import API
2011-12-05 14:21:18 -05:00