Colin Walters
8792007bc1
core: Validate structure of objects in fsck
2012-04-03 08:52:58 -04:00
Colin Walters
10b2f30165
core: Make pull slightly more verbose
2012-04-03 08:52:44 -04:00
Colin Walters
9c7a47434d
core: Drop "staged" state for objects, refactor pull to split metadata/data
...
Previously we had the "staged" state to ensure we didn't add a commit
object without the associated dirtree, etc. However it's
easier/better to just ensure in the pull command that we have all
referenced objects.
Also change pull to download metadata first. This will allow adding
a progress bar later.
2012-04-02 19:52:22 -04:00
Colin Walters
56089abd43
core: Make fsck verify from commit objects
...
Rather than verifying every object, traverse all commit objects we
find. This is a better check, since primarily we care about being
able to check out trees. In the new packfile regime, this ensures
validity of packed data.
It also means we aren't checking loose objects that we most likely
don't care about.
2012-04-02 18:32:40 -04:00
Colin Walters
d8173a5125
core: Move commit/dirtree traversal into library
...
So it can more easily be reused by other builtins.
2012-04-02 18:32:40 -04:00
Colin Walters
a0b7d94cb6
core: Fix a few memory leaks
2012-04-02 18:32:40 -04:00
Colin Walters
ea4d2be39c
core: Return input stream for raw repositories too
...
This bug is more obvious when fsck is rebased on top of
ostree_repo_load_file().
2012-04-02 18:32:40 -04:00
Colin Walters
b971ce0dfa
core: Only depend on GLib 2.30
2012-04-02 13:42:09 -04:00
Colin Walters
80bdfd7f42
core: Add pack files
...
This concept is also directly inspired by git. At present, our
implementation is quite similar, except we don't have delta
compression.
2012-03-31 11:51:47 -04:00
Colin Walters
68cce01556
core: Add stream->variant helper, as well as clear macros for ptrarray/hashtable
2012-03-31 10:32:26 -04:00
Colin Walters
b221b0fdd6
core: Add a few more GIO utility functions
2012-03-31 10:32:02 -04:00
Colin Walters
70afd6011f
core: Add helper functions to convert (checksum, objtype) pair to/from string
2012-03-14 09:37:00 -04:00
Colin Walters
277843f3a2
ostbuild: Add preserve_net config option
...
This is going to be necessary for the builder.
2012-03-13 17:06:06 -04:00
Colin Walters
8e3a3c5667
ostbuild: Re-unify into one snapshot.json file
...
This is actually easier. Now add 'ostbuild query-content' which can
extract the JSON data we stuff into builds.
2012-03-13 10:39:31 -04:00
Colin Walters
4d1d6789c2
ostbuild: Rework again, split into components.json and targets.json
...
The "resolve" builtin now does a lot more heavy lifting; we expand the
manifest.json, and "build" consequently is less intelligent now, more
of a low-level implementation.
2012-03-13 10:39:31 -04:00
Colin Walters
ee49c8098c
ostbuild: Only check out source if we need to
...
When using --skip-built, we shouldn't do a checkout if we're not going
to build.
2012-03-13 10:39:31 -04:00
Colin Walters
addbdb619c
ostbuild: Stop generating git mirror config
...
Nothing's using it right now and it's a little buggy.
2012-03-13 10:39:31 -04:00
Colin Walters
87e9a29f11
ostbuild: Further work on regenerating a snapshot from a compose
2012-03-13 10:39:26 -04:00
Colin Walters
07e93bd326
ostbuild: Change to name-prefix and base-prefix in manifest
...
This makes it clearer that we're using this as a prefix, when we
generate the snapshots.
2012-03-13 10:39:26 -04:00
Colin Walters
76f7bf2060
ostbuild: Switch to composing via checkouts+commit
...
Store the compose contents as a JSON file in the filesystem tree.
This is more flexible compared to defining "compose" as just a literal
layering of filesystem trees. For example, we might want to run
prelink.
2012-03-13 10:39:26 -04:00
Colin Walters
5dd62af628
ostbuild: Stop using "compose" to make buildroots
...
It pollutes the repository with a combinatorial explosion of .dirtree
metadata files, and we don't really need to track buildroots at that
level.
2012-03-13 10:39:25 -04:00
Colin Walters
5275e8d6b2
ostbuild: Drop "commit-artifacts" builtin
...
It's long since dead.
2012-03-13 10:39:25 -04:00
Colin Walters
c11cefb99b
ostbuild: Kill "autodiscover-meta"
...
No longer needed.
2012-03-13 10:39:25 -04:00
Colin Walters
d3059d254b
ostbuild: Adapt "status" to expanded manifest
2012-03-13 10:39:25 -04:00
Colin Walters
ff81b21bcf
ostbuild: Adapt "build" to newly updated expanded manifest
2012-03-13 10:39:25 -04:00
Colin Walters
c71770c08c
ostbuild: Write out separate arch-component snapshots
2012-03-13 10:39:25 -04:00
Colin Walters
c3debe0fb6
ostbuild: 'checkout' command now also applies patches
2012-03-13 10:39:25 -04:00
Colin Walters
d8eebaa2d1
ostbuild: Pull patches from specified patches git repository
...
We need to be more formal about where we get patches from, and more
specifically what version. Let's assume they're also stored in a git
repository that we fetch, instead of copying them from "wherever the
manifest is".
This meshes nicely with splitting between manifest.json and
snapshot.json.
2012-03-13 10:39:25 -04:00
Colin Walters
6890444f28
ostbuild: Change metadata keys for artifacts
...
"ostbuild-name" is important to tie back in to the snapshot.
"ostbuild-revision" is shorter than ostbuild-artifact-version.
2012-03-13 10:39:25 -04:00
Colin Walters
12f2f8929d
ostbuild: Copy snapshot JSON into artifact trees
...
This is kind of a hack...but...
2012-03-13 10:39:25 -04:00
Colin Walters
d2f298488f
ostbuild: Sort keys in JSON snapshot
2012-03-13 10:39:25 -04:00
Colin Walters
b8e3f622f1
ostbuild: Rename build manifest to "snapshot.json"
...
It was confusing having two manifests. "snapshot" matches the
jhbuild term for the same thing.
2012-03-13 10:39:24 -04:00
Colin Walters
40aedeb7a4
ostbuild: Move more intelligence into chroot-compile-one
...
Let's have chroot-compile-one be the core logic for composing a
buildroot, etc. This allows us to use it as a developer tool by
checking out a tree, then doing a chroot build.
2012-03-13 10:39:24 -04:00
Colin Walters
db93c43255
core: Fix "cat" crashing when it should have returned ENOENT
2012-03-08 12:10:58 -05:00
Colin Walters
eb4302517f
core: Fix crasher in "rev-parse"
2012-03-08 12:10:58 -05:00
Colin Walters
76bc35186e
core: Add --union mode to checkout
...
This is another step towards ostbuild using this instead of the
"compose" builtin.
2012-03-06 11:59:06 -05:00
Colin Walters
83fb6d56e1
core: Don't call unlink() on directory if it already exists
...
If we fail to make a directory because it exists, we shouldn't call
unlink() on it.
2012-03-06 11:59:06 -05:00
Colin Walters
1513f29495
core: Pull diff functionality out into "diff" builtin
...
There's no good reason for this to be in core when it's only in use by
the diff builtin.
2012-03-06 11:59:06 -05:00
Colin Walters
4db485dd5f
core: Add "subpath" option to checkout
...
Will be used by ostbuild to extract e.g. /runtime or /devel from
artifacts.
2012-03-06 11:59:06 -05:00
Colin Walters
1f7d776a18
core: Improve checkout API
...
Expose the lower-level functionality in libostree, change checkout
builtin to be a higher level driver. This will allow us to more
easily improve the "checkout" builtin..
2012-03-06 11:59:06 -05:00
Colin Walters
f44b8aca44
core: Add ostree-types.h
...
This allows us to have circular references between the headers.
2012-03-06 11:59:06 -05:00
Colin Walters
f484665bfe
libotuil: Fix missing #define in header
2012-03-06 11:59:06 -05:00
Colin Walters
e4849ebd2b
mainloop: Don't create poll until we need to
...
This slightly optimizes the case where we speculatively create a
Mainloop we might not use.
2012-03-06 11:59:06 -05:00
Colin Walters
da00891688
core: Allow 'rev-parse' to resolve multiple revs
2012-03-06 11:59:06 -05:00
Colin Walters
eb7c3d01a3
core: Add 'cat' builtin
2012-03-06 11:59:06 -05:00
Colin Walters
9dc86d0f5e
compose: Don't print trailing (null) if we skip committing
...
If we skip a commit due to an idential content parent, we shouldn't
print the (null) commit checksum.
2012-03-01 16:08:27 -05:00
Colin Walters
6829ab2260
pull: Allow pulling multiple specific refs
2012-02-28 13:17:03 -05:00
Colin Walters
19bc7ff85f
prune: Fix two crasher bugs
2012-02-27 09:53:44 -05:00
Colin Walters
2440338968
pull: Add ability to fetch refs/summary if no ref specified
...
This allows us to fetch all refs, which is useful for ostbuild where
we do want the buildroot/ refs.
2012-02-27 08:37:51 -05:00
Colin Walters
b783ebc189
core: Add API to validate rev
2012-02-27 08:37:37 -05:00
Colin Walters
810a3dac86
core: Write a refs/summary file for archive repositories
...
This will allow us to retrieve all refs over HTTP easily.
2012-02-27 06:20:42 -05:00
Colin Walters
d3a73225b0
core: Add API to enumerate all refs
2012-02-27 05:58:42 -05:00
Colin Walters
6ff07e0b3e
pull: Print download URLs by default, rather than requiring -v
...
Let's leave verbose for more debug-type stuff.
2012-02-26 08:35:26 -05:00
Colin Walters
5329f1706b
core: Further fix fallout from archive mode files
...
Continuing from 16c0cfe9b5 , we now have
the problem that we're removing the executable bit, which obviously
breaks things when we chroot in for a build. Fix this by masking over
our bits.
2012-02-24 17:50:44 -05:00
Colin Walters
0e5919bde1
core: Disable Soup-gnome features for pull
...
Otherwise we get a dconf thread that tries to talk to the session bus.
I think this comes from the proxy settings lookup.
2012-02-24 17:26:17 -05:00
Colin Walters
ab58faefef
core: Disable Gvfs for binaries
...
Otherwise
1) Lots of unnecessary shit happens and I like my straces to be clean
2) There is no dbus session bus for system daemons or when we're run
in a root context
2012-02-24 17:24:50 -05:00
Colin Walters
51916a7002
core: Look up refs like origin/foo correctly again
...
We want to support both "bare" lookups where "foo" can be local, or in
any remote, as well as prefixed ones for a specific remote.
This fixes ostree-pull noticing that nothing has changed.
2012-02-24 16:08:34 -05:00
Colin Walters
a417ee3fed
core: Add "prune" builtin
...
This should be useful on clients to trim old refs. For example,
after an upgrade the system could do:
ostree --repo=/ostree/repo prune --depth=2 gnomeos-3.4-i686-runtime
This would remote all objects that aren't in the current build and the
previous one.
2012-02-24 10:23:35 -05:00
Colin Walters
16c0cfe9b5
core: Fix regression when committing symlinks in archive mode
...
Commit 802959f398 broke this because it
made all archived content files be S_IFREG, which is clearly wrong.
2012-02-24 10:05:26 -05:00
Colin Walters
14cda593d5
core: Correctly look up refs in remotes
2012-02-23 23:52:59 -05:00
Colin Walters
8145faecbf
pull: Don't automatically uncompress data
...
This totally breaks when the file we're trying to request was already
gzip'd. We don't want to uncompress e.g. man pages because that
breaks content-addressed storage.
2012-02-23 21:52:15 -05:00
Colin Walters
7907a853b4
pull: Incrementally write into temporary file
...
Rather than downloading into one big chunk in memory, then writing all
at once.
2012-02-23 19:20:36 -05:00
Colin Walters
b2ad353b42
core: Store "pending" objects explicitly, fix pull to use them
...
Before we were creating randomly-named temporary files in repo/tmp
when downloading via pull, but that means if the download process is
interrupted, we have to redownload everything again.
Let's still keep the concept of a "transaction" where files are
stored in the repository as atomically as possible (i.e. we
do a bunch of rename() calls), but now we also have an explicit
"tmp/pending/objects" directory that contains named objects.
This allows us to then skip redownloading things that are pending.
2012-02-23 18:19:00 -05:00
Colin Walters
802959f398
core: Ensure .archive-content files are mode 0644
...
We don't want to inherit the permissions of the actual file, otherwise
trying to fetch e.g. /etc/passwd when being served via Apache httpd
will break.
2012-02-23 12:34:43 -05:00
Colin Walters
dee30bda7c
pull: Only fetch .archive-content for regular files
...
Otherwise e.g. Apache httpd might try to follow a symbolic link to
/bin/tinylogin which clearly won't work.
2012-02-23 12:30:01 -05:00
Colin Walters
0a195e6874
ostbuild: Make resolve fully expand config-opts, delete now-unnecessary vcsconfig
...
The source manifest format allows for compression, but it's more
convenient for consuming code if it's fully expanded in one place.
2012-02-22 15:17:42 -05:00
Colin Walters
b26b981b0d
ostbuild: Use correct directory for submodule update
2012-02-22 14:17:18 -05:00
Colin Walters
9939f1861d
osbuild: Don't use linux-user-chroot for git submodules
...
On the ostree.gnome.org build server, LDAP is used for username
lookups, and git aborts if it can't look up the user.
2012-02-22 11:51:18 -05:00
Colin Walters
341096f18a
ostbuild: Drop down to Python 2.6
...
Hopefully this gets us working on RHEL6.
2012-02-20 22:31:10 -05:00
Colin Walters
21f1ca364f
triggers: Fix comparison function
2012-02-19 21:10:59 -05:00
Colin Walters
633da1e7ad
triggers: We need to order their execution
...
Otherwise we run in inode order which is unpredictable. In particular
this causes problems because we might run e.g. the gtk+ trigger before
the gdk-pixbuf one. And ldconfig should really be first.
2012-02-19 20:52:50 -05:00
Colin Walters
f1e38d6e4b
ostbuild: Add --recompose argument
...
This is necessary to run after rebuilding the Yocto base.
2012-02-16 18:30:42 -05:00
Colin Walters
8729997eab
switchroot: Bind mount /lib/modules after we mount /lib
...
Otherwise we don't ge the right /lib/modules.
2012-02-13 10:56:13 -05:00
Colin Walters
fcd70e5891
switchroot: Bind mount /lib/modules from /ostree/modules
...
Since we have kernels outside of the tree, keep modules outside
too.
2012-02-10 19:17:29 -05:00
Colin Walters
351d243ccf
ostbuild: Fix --debug-shell
...
We want to reuse an existing source tree.
2012-02-09 16:47:25 -05:00
Colin Walters
820709e791
ostbuild: When doing a fetch, call fetch before trying to mirror the branch
...
Otherwise when the manifest specifies a branch we haven't fetched, we
error out.
2012-02-09 11:19:33 -05:00
Colin Walters
feca75a930
switchroot: remount rootfs read/write
...
See rationale in comment.
2012-02-08 22:23:25 -05:00
Colin Walters
8e944cbffd
ostree-switch-root: Correctly prepend sysroot before mounts to move from dracut
2012-02-08 20:22:27 -05:00
Colin Walters
0172ab5a3a
switchroot: Further work on being dracut-only
2012-02-08 17:32:34 -05:00
Colin Walters
fef67756f9
ostbuild: Add 'status' command
...
Roughly equivalent to 'jhbuild info'.
2012-02-08 16:37:14 -05:00
Colin Walters
a904c9693b
Add ostree-switch-root here
...
Merge the code from ostree-init; now that we're back to targeting an
initramfs (dracut), we don't need to statically link the binary, so
there's no strong reason to have a separate module.
2012-02-05 16:02:44 -05:00
Colin Walters
097c1b8025
vcs: Delete temporary directory too
2012-02-02 13:56:46 -05:00
Colin Walters
73fa98694e
builtins: Fix error message if workdir doesn't exist
2012-02-02 13:56:25 -05:00
Colin Walters
845ba39a0e
ostbuild: Add 'checkout' builtin
...
This is useful for the developer to get the source code of
several things at exactly the revision specified in the manifest.
2012-02-02 09:22:44 -05:00
Colin Walters
df92b8d46f
ostbuild: Unify mirrordir lookup code
2012-02-02 08:40:18 -05:00
Colin Walters
f1930d2c99
triggers: Fix typo in gconf trigger
2012-01-31 22:59:28 -05:00
Colin Walters
a8151ac836
Add gconf trigger
2012-01-31 22:54:23 -05:00
Colin Walters
914f9ffc61
ostbuild: Actually compose devel image from devel base
...
Otherwise we don't have gcc, gdb, git etc...
2012-01-31 18:57:02 -05:00
Colin Walters
102f6a7f43
ostbuild: Make separate .lastfetch files for e.g. gtk2 and gtk3
...
This ensures we don't need to check out any git repository which is
built twice under different names.
2012-01-29 17:24:20 -05:00
Colin Walters
e048173c60
ostbuild: Fix error message for unknown builtin
2012-01-29 16:47:19 -05:00
Colin Walters
8c878ebb86
mainloop: Ensure we reset running to True when rerun
...
Otherwise we pretty much exit immediately...
2012-01-29 13:29:31 -05:00
Colin Walters
3426de05fe
ostbuild: Ensure we return the right process exit code
2012-01-27 11:09:53 -05:00
Colin Walters
1d3b9ae711
triggers: Add dconf update
...
Necessary for gdm at least.
2012-01-23 18:09:33 -05:00
Colin Walters
00ec0ddb9b
core: Add --delete option for fsck
...
Useful to clean up any broken objects.
2012-01-23 17:06:10 -05:00
Colin Walters
8e36e80896
ostbuild: Support marking files as setuid
2012-01-22 13:31:22 -05:00
Colin Walters
e8dbaa3c07
core: Add generic "commit filter" API, use it to implement statoverride
...
The builder wants the ability to mark a given file as e.g. setuid. To
implement this, the repo now has a callback-based API when importing a
directory to modify or remove items.
The commit tool accepts a "statoverride" file as input which looks like:
+mode /path/to/file
2012-01-22 13:27:38 -05:00
Colin Walters
1ca517f36f
ostbuild: chdir into source directory when launching debug shell
2012-01-20 17:52:08 -05:00
Colin Walters
dde4da9513
core: Allow cloning only certain refs for local clone
...
This is way, way faster.
2012-01-20 17:50:59 -05:00
Colin Walters
d4470a844d
ostbuild: Ensure we look in correct git repository if --fetch is specified
...
The mirrordir variable was bound from the previous iteration, which
was clearly broken.
2012-01-19 18:31:37 -05:00
Colin Walters
16f2f5f7e5
mainloop: Only delete pid watch if we found the right pid
2012-01-19 18:30:45 -05:00
Colin Walters
abfe17e2cb
ostbuild: Show cwd on failure
...
This is helpful for disambiguation.
2012-01-19 16:41:59 -05:00
Colin Walters
39fe050f04
core: Add standard::size to info we get from archives
...
This makes "ostree ls" show the file size.
2012-01-19 09:54:09 -05:00
Colin Walters
660ff7422f
ostbuild: Various cleanups
2012-01-18 17:38:31 -05:00
Colin Walters
970682a779
ostbuild: Actually do check for Makefile
...
Just kidding, we need the makefile path to check for .NOTPARALLEL
2012-01-18 17:08:30 -05:00
Colin Walters
4af64c7635
ostbuild: Don't check for a "Makefile"
...
WebKit uses GNUmakefile which is totally valid, and this check
isn't really gaining us anything.
2012-01-18 16:40:47 -05:00
Colin Walters
55f6998d37
ostbuild: Ensure we don't retrieve submodules from the network
...
This is a bit gross...we have to manually frob the submodule
URLs to point to our mirror.
2012-01-18 13:35:53 -05:00
Colin Walters
298e4957d9
ostbuild: Support rm-configure flag
...
This is easier than making git patches that delete configure.
2012-01-16 20:17:39 -05:00
Colin Walters
9d37f76a5a
ostbuild: Actually exit with error if we fail a build
2012-01-16 17:50:57 -05:00
Colin Walters
5bf4eb39e7
ostbuild: Do fetches before resolution
...
Otherwise we get the OLD revision in the manifest.
2012-01-16 09:57:40 -05:00
Colin Walters
a6e6146ab6
core: Note which artifact failed to compose
2012-01-16 09:57:24 -05:00
Colin Walters
813923943d
ostbuild: Fix documentation dir (should be 'doc')
2012-01-16 09:57:00 -05:00
Colin Walters
b1ff693ea3
Revert "ostbuild: Check for the Makefile in the correct directory"
...
I'm not sure how this made anything work...probably I was screwing
something else up.
This reverts commit aeeed8da13 .
2012-01-16 09:39:13 -05:00
Colin Walters
bff6baced8
ostbuild: Save build logs to a file, monitor output for warnings
...
This is bringing us back closer to metabuild.
2012-01-16 09:27:46 -05:00
Colin Walters
d5def94b54
ostbuild: Clean up artifact splitting, put non-symlink .so in runtime
...
We were breaking nss which just installs libnss3.so as the real
shared library.
2012-01-15 21:45:12 -05:00
Colin Walters
e34b90453c
gnomeos: Building gdm
2012-01-15 17:06:18 -05:00
Colin Walters
ef7f12f31b
ostbuild: Run triggers after constructing build root
2012-01-15 17:05:23 -05:00
Colin Walters
ebe35dbefe
core: Ensure we delete duplicate files in a transaction
...
If multiple files have the same hash, we need to ensure we're not
overwriting other tempfiles in the same transaction. Instead
just delete them, since we know they're in the repo.
2012-01-15 12:25:52 -05:00
Colin Walters
9910c0ddf4
core: Create a directory for each transaction
...
This helps ensure that we can more easily identify stale tempfiles
left over if we crash in the middle of a transaction.
2012-01-15 11:03:01 -05:00
Colin Walters
610afbd2f1
ostbuild: Make --fetch a separate option
2012-01-14 16:56:31 -05:00
Colin Walters
aeeed8da13
ostbuild: Check for the Makefile in the correct directory
2012-01-14 16:54:00 -05:00
Colin Walters
40226c2769
core: Move triggers into separate binary: ostree-run-triggers
...
I'm trying to keep ostree as being closer to just being the versioning
filesystem, so let's split out the triggers into a different binary
(although still namespaced ostree-).
2012-01-13 15:08:27 -05:00
Colin Walters
134cddaa96
ostbuild: Make explicit resolve (and fetch steps)
...
Build should only work on already-downloaded sources.
2012-01-12 23:22:39 -05:00
Colin Walters
b44afdef23
ostbuild: Lots of stuff
...
* Only create one build commit which contains multiple artifact trees,
rather than one per artifact. This is atomic. We can use the new
compose syntax like foo:/devel to slice out the /devel tree.
* Create the minimal buildroot for each component by composing the
previous components in the build order, instead of continually
updating one big tree.
* Ensure the artifact builder gets empty directories in /etc
2012-01-12 10:48:11 -05:00
Colin Walters
ef2a16525e
ostbuild: Optionally log start of commands we want output from too
...
compose is slow, but we also want output.
2012-01-11 14:33:48 -05:00
Colin Walters
1f398e001b
ostbuild: Import odict from gobject-introspection
2012-01-11 14:32:37 -05:00
Colin Walters
62821024b9
core: While walking mtrees during commit, ensure the referenced path is resolved
...
This gives us a clean error instead of an assertion.
2012-01-11 13:42:59 -05:00
Colin Walters
e693d2cfe5
core: Error out on an empty compose
2012-01-11 13:42:37 -05:00
Colin Walters
0044ff133a
core: Add from-file argument to compose
...
We don't want to have to pass a million arguments.
2012-01-10 18:55:00 -05:00
Colin Walters
46d09b1501
compile-one: Fix build of modules that don't support srcdir != builddir
...
We need to run configure and make/make install in the _build
directory.
2012-01-09 19:56:03 -05:00
Colin Walters
492f0777f2
ostbuild: Make --debug-shell not exit immediately
...
We need to keep stdin open.
2012-01-09 11:10:10 -05:00
Colin Walters
cddd58fbd8
ostbuild: Allow specifying no components to mean "all"
2012-01-08 14:20:52 -05:00
Colin Walters
888d33c943
core: Make diff accept one argument too to mean "foo^ foo"
2012-01-08 14:20:07 -05:00
Colin Walters
e21b181b4a
ostbuild: Allow specifying components to build on the command line
2012-01-07 11:47:51 -05:00
Colin Walters
8d935f46c4
core: Make local-clone handle nested refs/heads directories
2012-01-07 11:26:12 -05:00
Colin Walters
788dfe89e1
core: Ensure we abort transaction if we fail in the middle
...
Otherwise we could leave a lot of temp files lying around.
2012-01-07 11:11:51 -05:00
Colin Walters
a2fdbcbe63
ostbuild: Switch to JSON metadata, various other fixes
2012-01-06 20:02:46 -05:00
Colin Walters
732b37698e
ostbuild: Don't fail if trying to rename() across a bind mount
2012-01-06 14:07:20 -05:00
Colin Walters
5b2a5d1dd1
ostbuild: Make use of --recompose
2012-01-06 14:07:12 -05:00
Colin Walters
95d0e94370
core: Make --recompose skip passed arguments if they were already composed
...
This allows us to do "--recompose -b foo bar baz" and add bar and baz
iff they weren't already there.
2012-01-06 14:04:39 -05:00
Colin Walters
d72d6c5fb1
ostbuild: Use split out linux-user-chroot binary
...
This way other meta-build projects could use it; mainly mock/pbuilder.
Also I don't have to keep running chown root:root; chmod u+s in a
separate root terminal after every install.
2012-01-06 11:41:27 -05:00
Colin Walters
fea117cd5e
gnomeos: Move everything into JSON, start plowing through X.org
...
Also:
* Stop generating tarballs for artifacts, use plain directories
* Commit artifacts as uid/gid 0, with no xattrs
Other misc stuff
2012-01-05 23:05:49 -05:00
Colin Walters
5119cbdb7c
core: Add --no-xattrs option for commit
...
Will be used by ostbuild.
2012-01-05 19:10:26 -05:00
Colin Walters
5c3614d644
core: Error out cleanly if user attempts to commit an empty tree
2012-01-05 18:27:21 -05:00
Colin Walters
5b0084994e
gnomeos: We can now build gobject-introspection
2012-01-03 19:09:12 -05:00
Colin Walters
1ae5149a3d
core: Make compose skip commit if tree is identical
...
This was a new option for commit, but we always want to do it
for a compose.
2011-12-27 10:32:28 -05:00
Colin Walters
31ba50b809
core: Add --print-metadata-key option for show
...
Useful for tools to extract simple metadata.
2011-12-26 22:09:14 -05:00
Colin Walters
a080ff0181
ostbuild: Port chroot-compile-one to ostbuild executor
2011-12-23 12:15:57 -05:00
Colin Walters
be117edee4
ostbuild: Port commit-artifacts to ostbuild executor
2011-12-23 10:57:54 -05:00
Colin Walters
853dda39e7
ostbuild: Move autodiscover-meta to ostbuild executor
2011-12-23 10:48:57 -05:00
Colin Walters
122b31ed3b
ostbuild: Make new 'ostbuild' main entry point, and compile-one a subcommand
...
The collection of Python scripts here have gotten to the point where
we need to share code. Start refactoring things so that we have one
main command which imports subcommands as libraries.
2011-12-23 10:40:27 -05:00
Colin Walters
633477806c
ostbuild: Propagate buildroot version, finish add-artifacts
...
We need to track what buildroot each artifact was created in.
2011-12-23 07:46:08 -05:00
Colin Walters
1687f3efa8
core: Add --add-metadata-string option for commit
...
A convenience function for the common case of slapping a string into
the metadata.
2011-12-23 07:17:46 -05:00
Colin Walters
3e59cc1305
core: Add --tar-autocreate-parents option for commit
...
The tar files we're making of artifacts don't include parent
directories. Now we could change the builder to make them, but we can
also just autocreate them on import. Mode 0755 with no xattrs seems
OK here.
2011-12-23 06:49:04 -05:00
Colin Walters
4bbc99fb1d
core: Fix build with libarchive disabled
2011-12-22 19:52:30 -05:00
Colin Walters
dab4611263
core: Add --skip-if-unchanged option for commit
...
There's not much point for OS builds to have "empty" commits.
2011-12-22 18:47:30 -05:00
Colin Walters
d8ea31e24e
core: Add some more sanity checks to pull when parsing metadata
2011-12-22 17:00:58 -05:00
Colin Walters
786ce3b560
core: Preemptively error out on paths longer than PATH_MAX
...
Just noticed this while thinking like an attacker.
2011-12-22 16:50:01 -05:00
Colin Walters
3292dcb6d6
core: Allow / in ref names like git does
...
Using / is nice basically.
2011-12-22 15:59:47 -05:00
Colin Walters
9bcd4ff8aa
core: Use global random object
...
We were pointlessly creating a new rand (and thus opening /dev/random)
on every temp file creation, but still using the global rand.
2011-12-22 11:23:16 -05:00
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
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
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
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
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
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
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
654a2c295d
ostbuild: Relicense under LGPLv2+, tweak artifact generation
2011-11-29 16:15:04 -05:00
Colin Walters
84562f161f
core: Use ot_clear_checksum()
2011-11-29 14:06:54 -05:00
Colin Walters
70574c3c06
otutil: New utility functions
2011-11-29 13:42:05 -05:00
Colin Walters
b07b2f6473
core: Remove an unused variable
2011-11-28 20:45:27 -05:00
Colin Walters
cb5b3b15f5
core: checksum builtin: Actually quit main loop on error too
2011-11-28 19:34:54 -05:00
Colin Walters
7e32bc6cd7
core: Make commit always operate on directory contents, not file list
...
This simplifies things significantly, at some cost in flexibility.
We'll later add the ability to e.g. filter out files by regular
expression.
2011-11-28 12:57:25 -05:00
Colin Walters
b296dc4efc
core: Some tweaks to ls output
2011-11-28 10:17:49 -05:00
Colin Walters
86adf002ff
ostbuild: Don't run fakeroot if we are root
...
For efficiency reasons, as well as a quick shortcut to avoid pulling
fakeroot into the gnomeos yocto layer.
2011-11-27 20:31:23 -05:00
Colin Walters
2f1490f766
core: Fix a compiler warning
2011-11-27 20:15:07 -05:00
Colin Walters
87547827c8
core: Add ls builtin
2011-11-27 20:10:48 -05:00
Colin Walters
48507624c2
core: Don't default to "master" for show, there is no default branch anymore
2011-11-27 18:46:11 -05:00
Colin Walters
b0b0ffcd61
core: Add asynchronous checksum API, use it in checksum builtin
2011-11-27 17:21:04 -05:00
Colin Walters
ea858ab558
ostbuild: Split nice/logger program out, merge make/makeinstall into one executable
2011-11-27 13:07:33 -05:00
Colin Walters
6cdea44c4b
daemon: Allow running as non-root in test mode
2011-11-27 11:34:03 -05:00
Colin Walters
fd58e16a8d
core: Minor code cleanup
2011-11-25 12:01:05 -05:00
Colin Walters
fa06a4dcea
ostbuild: Rename osbuild to ostbuild, clean up old C files
2011-11-25 12:00:16 -05:00
Colin Walters
3c025e526f
core: Ad ot_clear_gvariant(), use it
...
This saves us a conditional.
2011-11-22 10:20:10 -05:00
Colin Walters
2bee1bbbdf
core: A bit more daemon work
2011-11-22 10:02:49 -05:00
Colin Walters
aa69aae94e
core: Move merge dirs code into gio utils
2011-11-21 15:04:07 -05:00
Colin Walters
c117aadc95
core: Stub out a system daemon
2011-11-20 20:55:24 -05:00
Colin Walters
1dbf134946
core: Rework argument parsing
...
Default to /sysroot/ostree/repo when run as root. Also better
handle the requires-repo flag.
2011-11-19 14:02:21 -05:00
Colin Walters
dce29a984a
core: Ensure data is properly initialized
...
Avoids a crash if we bail early.
2011-11-19 10:45:53 -05:00
Colin Walters
a042731673
core: Add local-clone builtin
...
This is useful for converting between e.g. archive and non-archive
repositories.
2011-11-18 18:50:53 -05:00
Colin Walters
b7a45b5815
core: Also chown() after unpacking objects
2011-11-18 18:50:29 -05:00
Colin Walters
7d63ad5ae8
core: Switch to GFile* for unpacking and storing objects
2011-11-18 16:14:01 -05:00
Colin Walters
c66474750b
core: Expose API to get repository tmpdir
2011-11-18 16:01:28 -05:00
Colin Walters
f6ec479f17
core: Rework object iteration API to be GFile based and pass more data
...
It makes more sense to have e.g. the details of .packfile naming
inside the repo, and pass the expected checksum and type.
2011-11-18 15:21:32 -05:00
Colin Walters
8621eb85b1
core: Skip an unnecessary unlink() call
2011-11-18 09:41:36 -05:00
Colin Walters
7276e2df43
core: Have single "overwrite" flag instead of ignore_exists+force pair
...
The default is always ignore_exists. Also port the internals here
to use more GIO code, and stop using *at syscall variants since they're
only useful if used 100%.
2011-11-18 09:37:25 -05:00
Colin Walters
860c3cf502
core: Convert public get_object_path() to GFile*
2011-11-18 09:04:25 -05:00
Colin Walters
9cf15ed151
core: More cleanup of GIO utility API
2011-11-18 08:43:47 -05:00
Colin Walters
231f7ed76c
core: Use ot_gfile_ prefix for new local GFile creation function
2011-11-18 08:10:23 -05:00
Colin Walters
6591e586ed
core: Remove last user of g_file_new()
2011-11-18 08:02:19 -05:00
Colin Walters
12f2d89174
core: Add checksum builtin
...
This necessitated reworking things so that builtins can specify no
--repo is required.
2011-11-18 07:29:13 -05:00
Colin Walters
7f64d5cec7
core: Make checksum API also operate on directories
2011-11-18 06:34:54 -05:00
Colin Walters
b8cef545d1
core: CHANGE CHECKSUM ALGORITHM, port checksum API to GFile
...
This commit originally was to port ostree_stat_and_checksum_file() to
GFile*, but I noticed that the checksum code was reading data in host
endianness. Fix that while we're here.
This invalidates all existing repositories.
2011-11-17 19:32:01 -05:00
Colin Walters
2c2b9c0e00
core: Convert metadata parsing API to GFile
2011-11-17 18:36:57 -05:00
Colin Walters
218684786d
core: Use GFile for xattr API
2011-11-17 18:33:26 -05:00
Colin Walters
a8735778f0
core: Use ot_gfile_get_path_cached() pervasively
...
This requires no free() calls and is just better.
2011-11-17 18:23:36 -05:00
Colin Walters
8e9b9c59d6
core: Fix pull to actually download files too
2011-11-17 10:40:55 -05:00
Colin Walters
ed2be6306d
core: Should write remote refs in refs/<remote>/<branch>
...
Not just refs/<branch>, otherwise multiple remotes conflict.
2011-11-17 10:40:01 -05:00
Colin Walters
db9801bff2
core: Allow resolving e.g. "origin/master" as a rev
...
Also:
* Disallow .. in revs to avoid looking outside where we should be
* Allow resolving empty revs
2011-11-17 10:36:04 -05:00
Colin Walters
aa865bbb83
core: Validate file names read from directory variants
...
In a future where we pull data from remote servers, we don't want
to allow path uplinks.
2011-11-16 23:23:30 -05:00
Colin Walters
4a26be1bef
core: diff: Correctly handle files changing type
2011-11-16 23:09:32 -05:00
Colin Walters
c33db03b4c
core: Flesh out diff a bit more
...
Now correctly notices changes to directory metadata (not just
contents).
2011-11-16 22:51:09 -05:00
Colin Walters
115626c264
core: Fix a minor memory leak
2011-11-16 22:51:09 -05:00
Colin Walters
9fb390664a
core: Implement diff command
2011-11-16 18:16:41 -05:00
Colin Walters
97e82447c6
core: Add --print-packfile argument for show
...
Just another debugging tool.
2011-11-15 15:16:38 -05:00
Colin Walters
d196a47043
core: We actually want rdev, not dev for devices
2011-11-15 15:15:46 -05:00
Colin Walters
18f0b537a4
build: Move sources into src/ again
...
This is necessary if we want to build when srcdir == builddir,
otherwise we blow up because "ostree" is a source directory and a
binary.
2011-11-14 15:39:38 -05:00
Colin Walters
21c7ff74b6
De-recursify source tree
2011-11-02 15:45:32 -04:00
Colin Walters
2b00cf3810
core: add ^ for rev-parse
2011-11-02 13:22:13 -04:00
Colin Walters
796dc7fc57
core: remove stub http backend for now
...
The plain http pull is probably good enough.
2011-11-02 12:43:25 -04:00
Colin Walters
8f877c5b65
log: Fix a crash
2011-11-01 12:24:34 -04:00
Colin Walters
bab31db7ee
core: Squash some memory leaks
2011-11-01 12:20:33 -04:00
Colin Walters
a897642315
For archive checkouts, actually unpack the packfiles
2011-11-01 10:59:07 -04:00
Colin Walters
8769f4afd8
Switch to big-endian storage for all variant data
...
This ensures the saved archives are architecture-independent.
2011-10-31 22:41:50 -04:00
Colin Walters
a160a2a5fa
Add support for pulling from remote archives
...
This necessitated a large set of changes.
We now support an "archive" mode for repositories. In this mode,
files are stored "packed" rather than hard linked. This allows one to
e.g. store an OSTree repository with root-owned files as non-root. It
is also used as the basis for serving repositories via HTTP.
While doing this I realized that GVariant is endianness-dependent; I
decided to just store all data in big endian.
2011-10-31 20:28:47 -04:00
Colin Walters
80fcb3b818
checkout: Use ot_util_new_file_for_path
2011-10-31 20:22:34 -04:00
Colin Walters
d2938ad6cc
core: Add "ostree remote add"
2011-10-28 10:25:36 -04:00
Colin Walters
ee4edf114b
Don't default to "master", require a branch
...
It doesn't really make sense to have a default branch, since we expect
people to have multiple roots. Thus, require a branch
specification always.
2011-10-27 21:42:44 -04:00
Colin Walters
dd13d172ef
core: Add rev-parse builtin
2011-10-27 15:44:08 -04:00
Colin Walters
d0222ce6c8
fsck: Kill unused variable
2011-10-27 15:41:15 -04:00
Colin Walters
7ca1c3d2e7
core: remove HEAD file, use branches instead
...
HEAD in git describes a working copy, and we don't have those.
Instead, default to a "master" branch. This also lets us support
multiple branches.
2011-10-27 14:32:05 -04:00
Colin Walters
66011a84e5
init: Add branches, tags, refs directories like git
2011-10-26 22:37:23 -04:00
Colin Walters
ac99188c23
core: Add a config file with repo version
...
This should let us expand later.
2011-10-26 22:21:00 -04:00
Colin Walters
d0b3a07cf1
core: Fix checksum for symlinks walking off into uninitialized memory
2011-10-26 18:33:33 -04:00
Colin Walters
03943c659f
Drop glib requrirement to 2.28
...
This lets it build on more currently-released systems like Fedora 15.
2011-10-26 14:12:13 -04:00
Colin Walters
4d86ee0a1d
Pile of work on parallel-debian
2011-10-24 22:02:16 -04:00
Colin Walters
5146890457
Move triggers into new builtin: ostree run-triggers
2011-10-21 09:55:39 -04:00
Colin Walters
4d39070efd
Fix up triggers and gnomeos-make-image.sh
...
Now both do something.
2011-10-20 17:24:21 -04:00
Colin Walters
a2880a6ddd
src: Squash some unused variables
2011-10-20 16:30:34 -04:00
Colin Walters
9d8522dfa1
Some initial work on triggers
2011-10-20 16:12:02 -04:00
Colin Walters
b7d45436a0
Don't use g_variant_new_from_fixed_array(), it was only added in 2.31
...
g_variant_new_from_data() works, and actually allows us to avoid
a memdup()/free().
2011-10-20 10:20:51 -04:00
Colin Walters
aa25334286
repo: Only open regular files
...
Otherwise we'll try to open device files with predictably bad
consequences.
2011-10-19 18:06:06 -04:00
Colin Walters
961b1c80db
Do "bare" repositories by default
...
Mixing the repository and checkouts is discouraged.
2011-10-19 17:45:00 -04:00
Colin Walters
b27df6fd72
"Hacktree" is now known as "OSTree"
...
It just sounds better.
2011-10-18 14:44:48 -04:00
Colin Walters
a06f724b72
src: Only use local VFS - this avoids hitting up the session bus
...
We are designed to run in the "unix model" of being forked a lot, so
startup time matters a lot, and hitting the session bus adds
unnecessary DBus traffic, shows up in strace etc.
It's a microoptimization I admit.
2011-10-17 15:55:06 -04:00
Colin Walters
97003b48da
Add log builtin
...
The "less" spawning is buggy for some reason =(
2011-10-15 15:43:43 -04:00
Colin Walters
717945814c
Save root directory permissions in commit
2011-10-15 14:20:22 -04:00
Colin Walters
c768c2a746
Support for committing files from stdin or a file list file
2011-10-15 13:07:26 -04:00
Colin Walters
36ba6e5426
Ensure we don't get duplicate '.' which leads to corruption
...
In path_split(), we squash '.' entirely, since it's redundant and if
we don't, we return an extra component which callers would then have
to handle.
In repo, ensure we're never explicitly parsing '.' either (yet).
2011-10-15 13:04:50 -04:00
Colin Walters
2bd973f645
Make file deletion work, add test
2011-10-15 09:56:31 -04:00
Colin Walters
05c35f2cf7
Actually checksum xattr values, not just names
...
We need to call lgetxattr() and not just llistxattr().
2011-10-15 03:03:51 -04:00
Colin Walters
88c9851795
repo: Fix nested tree code
2011-10-15 03:02:51 -04:00
Colin Walters
7cffd09f6d
repo: Fix format string bug
2011-10-15 02:39:47 -04:00
Colin Walters
3eb77d4ce8
Importing and checking out nested trees works!
2011-10-15 01:23:01 -04:00
Colin Walters
6f1b880377
repo: Allow empty commit bodies
2011-10-15 00:57:13 -04:00
Colin Walters
401ab27c11
checkout: New command
2011-10-15 00:45:07 -04:00
Colin Walters
3f12aa7bbd
repo: Use 'self' in headers too
2011-10-14 23:24:51 -04:00
Colin Walters
f16aad3710
We can commit multiple times now
2011-10-14 23:17:50 -04:00
Colin Walters
ce6d9ca569
repo: Add some GError guards
2011-10-14 23:13:23 -04:00
Colin Walters
72c7385295
repo: Update HEAD after a commit
2011-10-14 22:56:40 -04:00
Colin Walters
9cac933c7f
show: New builtin
2011-10-14 22:49:44 -04:00
Colin Walters
9e0e481835
repo: Fix some bugs loading variants
2011-10-14 22:49:28 -04:00
Colin Walters
0b851a743e
Store objects with an extension so we know whether they're files or metadata
2011-10-14 22:30:18 -04:00
Colin Walters
3a9e2b36b0
fsck: Not an error to have 1-linked objects, also print HEAD
2011-10-14 22:10:06 -04:00
Colin Walters
b3c556a349
repo: Add API to load variants, and get HEAD
2011-10-14 22:10:06 -04:00
Colin Walters
55b3c7ca69
repo: Ignore importing existing variants
...
It's not an error to duplicate a tree.
2011-10-14 22:07:58 -04:00
Colin Walters
98a043c671
Add probably working commits
2011-10-14 21:09:11 -04:00
Colin Walters
0808b94600
fsck: Add quiet option
2011-10-12 16:43:52 -04:00
Colin Walters
ea96d5bf89
Fix option processing, add some options to link-file
2011-10-12 13:45:19 -04:00
Colin Walters
cd3a56dd68
Don't include any timestamps in hash, add fsck command
2011-10-12 11:38:41 -04:00
Colin Walters
4dd6800389
Make link-file work
2011-10-11 22:05:16 -04:00
Colin Walters
7c1c61beb1
Write some code for importing
2011-10-11 20:58:50 -04:00
Colin Walters
a2ffbdd0a4
Switch to GLib
2011-10-11 14:26:48 -04:00
Colin Walters
73a4b1a5f1
Rename from gbuild to hacktree
2011-10-10 18:46:57 -04:00
Colin Walters
f874ac043d
Initial commit
2011-10-09 17:03:08 -04:00