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
Colin Walters
b8000c00d5
core: Further unify code for importing from local FS and libarchive
...
Note this change makes it so we no longer call link() from an import
filesystem tree to the repository. This is a Good Thing really; it
makes local FS commits slower, but also less prone to corruption.
2011-12-05 11:20:14 -05:00
Colin Walters
267bf8ef4a
core: Ensure we initialize checksum in FIFO case too
2011-12-05 11:15:12 -05:00
Colin Walters
9d39517554
core: Add _from_input variant of checksum API
2011-12-05 10:28:42 -05:00
Colin Walters
7093ed4c57
ostbuild: ostbuild-user-chroot: New Linux-specific utility for safe chroots
2011-12-04 17:09:03 -05:00
Colin Walters
f812720fc6
gnomeos: Make run script transparently update existing FS image
...
This is noticeably faster.
2011-12-04 14:56:21 -05:00
Colin Walters
26de73ea55
gnomeos: commit-yocto-build.sh: Directly import tar files
...
Oh wow...this is fast.
2011-12-04 14:55:33 -05:00
Colin Walters
78f435d245
core: Fix handling of hardlinks for tar commits
...
We were creating files with the wrong name. Add a test.
2011-12-04 14:38:30 -05:00
Colin Walters
17cc772cf3
core: Support for committing from any libarchive-supported format
...
We really want the ability to take a .tar.gz and directly import
it into a repository, without creating a temporary filesystem tree.
First, doing it this way is significantly faster. Also, this allows
us to handle importing tar files with e.g. uid 0 files into packed
repositories as non-root, which is very useful for tests and builds.
2011-12-04 14:08:55 -05:00
Colin Walters
f9315e8f82
core: Fix a memory leak in checkout
2011-12-04 14:08:55 -05:00
Colin Walters
45addeadf0
core: Handle NULL xattrs in packfile generation, throw error on invalid mode
2011-12-04 13:12:06 -05:00
Colin Walters
56e0f231b5
core: Correctly map S_ISDIR to G_FILE_TYPE_DIRECTORY
2011-12-04 13:12:06 -05:00
Colin Walters
ae3a5e3c07
core: Clean up filename utility API
...
Remove more unused functions, and change pathname splitting to handle
more cases like duplicate //, and to throw an error on .. as a filename.
2011-12-04 12:12:34 -05:00
Colin Walters
1f6d49cdb9
core: Initialize checksums for non-regular files, handle NULL xattrs
2011-12-04 12:11:29 -05:00
Colin Walters
7545405b73
core: Delete some dead utility code
2011-12-02 19:54:53 -05:00
Colin Walters
0003e101f6
core: New ot_transfer_out_value() macro
...
This makes out values considerably less typing.
2011-12-02 18:17:06 -05:00
Colin Walters
32c8166b25
core: Ensure we clean up leftover directories during merge
...
(Not sure why this regressed)
2011-12-02 17:58:45 -05:00
Colin Walters
3ab69101f7
core: Fix packed file creation
...
We were calculating the wrong checksum, and also mistakenly
not using packed files in archive mode for non-regular files.
2011-12-02 17:49:57 -05:00
Colin Walters
b5ce760678
core: Don't use g_file_delete(), it calls into g_vfs_get_default()
...
For some (probably crazy) reason. Skipping this and calling
unlink() directly makes 'strace' MUCH smaller.
2011-12-02 14:32:25 -05:00
Colin Walters
0d4df5b3fe
core: Avoid reading regular file data twice when archiving
2011-12-02 14:23:01 -05:00
Colin Walters
d1950da1a0
core: Further unify API to create files
...
We now have just one place which writes to the filesystem. Wrap a
temporary file allocation API on top of that.
2011-12-02 13:42:25 -05:00
Colin Walters
c7235182a4
core: Use g_io_error_from_errno() to ensure we have more useful error codes
2011-12-02 11:40:06 -05:00
Colin Walters
7fc625c967
core: Move pack file parsing into core, add ostree_create_file_from_input() API
...
This moves us closer to consistently passing around a triple of:
(GFileInfo *info, GVariant *xattrs, GInputStream *content)
Which will help the libarchive work.
2011-12-02 10:11:09 -05:00
Colin Walters
f98e2a2ddb
core: Tweak dir metadata importing code for libarchive work
...
This will allow us to share a bit more code.
2011-12-01 19:45:00 -05:00
Colin Walters
177d845f5b
core: Modify pack file importer to also optionally checksum
...
For future work on importing from an archive.
2011-12-01 19:25:35 -05:00
Colin Walters
bb0867aeb8
core: Add ot_gfile_create_tmp_symlink()
...
In some cases we'll need the ability to create a symbolic link, then
actually import it.
2011-12-01 19:25:02 -05:00
Colin Walters
23d01d97dd
core: Propagate GCancellable a bit from the import APIs
2011-11-30 22:20:25 -05:00
Colin Walters
702c38739e
core: Drop some dead code from packfile writing, expose GInputStream API too
...
We never actually dropped into the bits to write metadata as packfiles,
because such a thing doesn't exist.
Also add a GInputStream-based API for writing packfiles.
2011-11-30 22:15:05 -05:00
Colin Walters
556662b24c
core: Extract stage_and_checksum() internal API
...
This will be used for staging both metadata and data consistently
before actually importing it.
2011-11-30 21:20:15 -05:00
Colin Walters
99bf19314e
core: Add ot_gfile_create_tmp() to utils, use it
2011-11-30 20:32:06 -05:00
Colin Walters
247e027125
repo: Don't call g_hash_table_destroy on a NULL hash
2011-11-30 20:23:54 -05:00
Colin Walters
e8865af09e
core: Split pull functionality into separate ostree-pull binary
...
This is to avoid everything depending on libsoup.
2011-11-30 09:21:14 -05:00
Colin Walters
3ac841d931
core: Make libostree.so an installed library
...
This will make it easier to have multiple binaries.
2011-11-29 18:25:07 -05:00
Colin Walters
654a2c295d
ostbuild: Relicense under LGPLv2+, tweak artifact generation
2011-11-29 16:15:04 -05:00