Colin Walters
9ba968a5f4
otutil: Add a few more helper functions
...
To be used by wip/etc-writable branch.
2012-09-03 10:43:42 -07:00
Colin Walters
cf31942a69
core: Refactor diff to be an internal API
...
For future use by other code.
2012-08-31 17:39:04 -07:00
Colin Walters
38d62d79a2
ostadmin: Also ensure /ostree/modules exists
...
We depend on host kernel for now.
2012-08-30 17:42:36 -07:00
Colin Walters
c690416b72
build: Add dist-snapshot
...
Take the current git HEAD and make a tarball from it; should be useful
for putting snapshots into Poky.
2012-08-28 10:14:11 -04:00
Colin Walters
60368fae76
Use correct libgsystem
...
Accidentally pushed a local patch.
2012-08-28 09:58:07 -04:00
Colin Walters
2527f81abc
Merge remote-tracking branch 'aperezdc/fixes'
2012-08-28 09:45:39 -04:00
Colin Walters
a17a8e1f4e
Update libgsystem
2012-08-27 18:48:14 -04:00
Colin Walters
4d2f770748
core: Use O_NOATIME to open metadata
...
We really don't need atime for metadata, it's just a speed hit.
2012-08-27 16:07:39 -04:00
Colin Walters
2396608754
repo: Call fdatasync() before adding objects to the repo
...
I run builds on my laptop, but it also crashes about 1/4 of the time
while suspending. It's definitely undesrirable to get e.g. empty
.dirtree objects because they corrupt builds. Concretely, I was
getting empty contents committed for xorg-util-macros.
Now, we used to write out temporary files using g_file_replace() which
does a fsync() during close, but then switched to a more "manual"
g_file_append_to().
We could switch back to g_file_replace(), but the problem is, we don't
want to call fsync() on temporary files in the case where we already
have the object. Attempting to add an object we already have is a
*very* common case.
This is both the old and new code sequence for the case where an
object is already stored:
open(temp, O_WRONLY)
write() write() write()
close()
lstat(objects/3a/9fe332...) = 0
unlink(temp)
In the *new* code, here's the case where an object *isn't* stored:
open(temp, O_WRONLY)
write() write() write()
close()
lstat(objects/3a/9fe332...) = -1
open(temp, O_RDONLY)
fdatasync()
close()
rename(temp, objects/3a/9fe332)
Compare with the *old* code path for when an object isn't stored:
open(temp, O_WRONLY)
write() write() write()
close()
lstat(objects/3a/9fe332...) = -1
link(temp, objects/3a/9fe332)
unlink(temp)
The problem with this is we really need to fdatasync(). Also doing
just rename() instead of the weird link()/unlink() helps us express to
the filesystem that we want atomic semantics. For example, BTRFS has
special handling for rename().
2012-08-27 15:35:40 -04:00
Colin Walters
5038a1930f
traverse: Set an explicit error when loading a corrupted commit
...
I had a empty files for a .commit and .dirmeta, and previously we were
segfaulting.
2012-08-27 11:39:44 -04:00
Colin Walters
7b977beec8
ostadmin: Cosmetic change for option defaults
2012-08-26 17:34:32 -04:00
Colin Walters
e9d23befd0
ostadmin: Add --ostree-dir option to init
...
Matches the option for deploy.
2012-08-26 17:34:25 -04:00
Colin Walters
8f6f3623c3
repo: Ensure all stored files are readable
...
We really don't have a sane story for private files. This is a
defensive step ensuring that with old versions of gnome-ostree,
components that mistakenly have un-world-readable files don't break
pulls.
2012-08-26 16:35:44 -04:00
Colin Walters
4b9faa421e
Release 2012.9
2012-08-26 13:58:23 -04:00
Colin Walters
c63cca53d7
build: Add --enable-triggers-only
...
For bootstrapping gnome-ostree, we need to install the triggers early
on, before we actually build the real ostree binary.
2012-08-26 13:58:23 -04:00
Colin Walters
e2aabce708
prune: Don't fail if an object isn't found
...
We expect most people to have partial repositories.
2012-08-25 16:02:38 -04:00
Colin Walters
9d58bad7ca
repo: Also traverse remote refs when enumerating objects
...
Otherwise ostree --repo=repo prune will delete everything =/
2012-08-25 16:02:38 -04:00
Colin Walters
7087d28ec3
libostree: Quiet compiler warning with --disable-libarchive
...
This function is only used if compiling with it.
2012-08-24 16:47:31 -04:00
Colin Walters
419965e6e3
build: Make /etc/kernel scripts default to automatic
...
When not cross compiling, we can test for /etc/kernel. This fixes the
build automatically on RHEL6 for example.
2012-08-23 15:19:41 -04:00
Colin Walters
344a7b3fd3
packages: Add files that should have been in previous commit
...
These were intended to be with the embedded-dependencies commit.
2012-08-23 08:52:23 -04:00
Colin Walters
79f993beb4
pull: Only fetch pack files if we want more than 66% of their objects
...
This avoids some pathologically bad cases where we would fetch a 25MiB
pack file only to extract one 5KiB object from it.
2012-08-22 19:45:01 -04:00
Colin Walters
b36b19eaf8
pull: Exit mainloop immediately if we encounter an error
...
Otherwise we'll just hang.
2012-08-22 19:45:00 -04:00
Colin Walters
f115a8943a
pack: Support --content-only
...
This should be useful for implementing more sophisticated packing
strategies.
Also clean up the pack size default handling.
2012-08-22 19:45:00 -04:00
Colin Walters
ece71b22c5
pull: Set an error when we get an unsuccessful HTTP response
...
Otherwise we'll e.g. try to parse 404 HTML as an object which will
fail.
2012-08-22 19:45:00 -04:00
Colin Walters
a571c83d82
embedded-dependencies: Fix ACLOCAL_FLAGS, update for libgsystem
...
* Handle the libgsystem submodule
* ACLOCAL_FLAGS was broken
* Add srpm-embedded
2012-08-19 15:05:01 -04:00
Colin Walters
22aa38a7da
configure: Fix libsoup detection
...
* The configure arg was named incorrectly; we don't rely on
libsoup-gnome, just libsoup.
* We need to use AS_IF
2012-08-14 13:11:45 -04:00
Colin Walters
05bf1fed99
autogen: Fetch submodules before running automake
...
Otherwise automake can't find src/libgsystem.
2012-08-14 12:52:46 -04:00
Colin Walters
179fc65947
triggers: Print execution time for each trigger
2012-08-05 16:39:57 -04:00
Colin Walters
36b6ad41cb
ostadmin: Use g_spawn_check_exit_status()
...
Just code cleanup.
2012-08-05 16:39:57 -04:00
Colin Walters
a6c19aa00c
ostadmin: Change command line for qemu deploy helper
...
The qemu helper really wants to copy kernel modules, but not
update the system bootloader. Allow it to reuse ostadmin for
this.
Note that our previous path of shelling out to "cp -al" broke because
it refused to make cross-device links.
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: src/libotutil/ot-gio-utils.c
# modified: src/libotutil/ot-gio-utils.h
# modified: src/ostadmin/ot-admin-builtin-deploy.c
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# embedded-dependencies/glib/
# embedded-dependencies/libsoup/
2012-08-05 16:39:57 -04:00
Colin Walters
09707780b9
ostadmin: Add --ostree-dir directory
...
This will be used by the qemu deployment script.
2012-08-05 16:39:57 -04:00
Colin Walters
1804d944d2
TODO: update
2012-07-31 00:15:02 -04:00
Colin Walters
5284d21f8d
ostadmin: Print an error message if run as non-root
...
See https://bugzilla.gnome.org/show_bug.cgi?id=680823
2012-07-30 10:29:45 -04:00
Colin Walters
a179138a23
ostadmin: [incompat syntax change] Allow deploying any revision
...
The old command line syntax assumed you wanted the latest from
a given revision, but to bisect, you really want the ability
to deploy any given one.
Old:
$ ostadmin deploy gnomeos-3.6-i686-{runtime,devel}
New:
$ ostadmin deploy trees/gnomeos-3.6-i686-runtime
$ ostadmin deploy trees/gnomeos-3.6-i686-devel
And note that the deploy directory now changes to:
/ostree/trees/gnomeos-3.6-i686-devel
And now it's possible to:
$ ostadmin deploy trees/gnomeos-3.6-i686-devel trees/gnomeos-3.6-i686-devel^^^
2012-07-26 10:56:32 -04:00
Colin Walters
5bbdce2c06
pull: When --depth is specified, ensure we have all requested objects
...
We were previously optimizing by skipping object traversal if the refs
were unchanged, but if the user specifies a deeper depth than they did
before.
2012-07-26 10:17:41 -04:00
Colin Walters
a310eb861b
core: Add context when we fail to chmod()/chown()
...
This helps make things less confusing when we try to create a file not
owned by our uid, such as running ostree-pull as non-root on a
repository owned by root.
2012-07-19 11:01:39 -04:00
Colin Walters
0d86702115
core: Drop ot_clear_hashtable for g_clear_pointer()
2012-07-17 08:18:43 -04:00
Colin Walters
43a2fec6a8
core: Drop ot_clear_ptrarray in favor of g_clear_pointer
2012-07-17 08:16:54 -04:00
Colin Walters
2ced4abf11
core: Drop ot_clear_gvariant() in favor of g_clear_pointer
2012-07-17 08:14:33 -04:00
Colin Walters
57fcafd1ab
core: Remove ot_clear_checksum() in favor of g_clear_pointer()
2012-07-17 08:08:57 -04:00
Colin Walters
c8d7fc216d
core: Use g_spawn_check_exit_status()
2012-07-17 08:06:20 -04:00
Colin Walters
6b31c580ca
pull: Only take up one terminal line for status output
...
And print total bytes transferred at the end.
2012-07-16 22:35:18 -04:00
Colin Walters
b2c2bf7e04
Fix libgsystem submodule
2012-07-15 18:29:15 -04:00
Colin Walters
da43fb6db5
Hard require GLib 2.34
...
Anyone wanting to build against an earlier version can use the
embedded-dependencies system.
2012-07-15 18:22:41 -04:00
Colin Walters
464f4a81c9
Add libgsystem as git external
...
Don't replace ot_lfree and stuff yet though...to much code churn.
2012-07-15 11:59:05 -04:00
Colin Walters
95921bcbf0
pull: Correctly display concurrent libsoup requests
...
The "status text" code was assuming that libsoup was only doing one
thing at a time, but that's never been the case. Change the code to
display the status of all active requests.
2012-07-12 11:19:15 -04:00
Colin Walters
664e9b404d
core: drop dead/unused code
...
The daemon is a nice idea but needs a lot more thought. Let's just
delete the unused code for now and come back to it later.
2012-06-30 13:49:25 -04:00
Colin Walters
311493338e
core: Drop ot_gfile_new_for_path
...
Not necessary anymore since we switched to GIO_USE_VFS=local in the
binaries.
2012-06-30 13:42:24 -04:00
Colin Walters
d5a1f1deda
pull: Fix a memory leak
2012-06-28 15:18:10 -04:00
Colin Walters
a98ca05676
pull: Fix use-after-free in async fetcher
...
Refcount the pending data structure.
2012-06-28 15:06:18 -04:00
Colin Walters
31b439b84c
Release 2012.8
2012-06-27 22:38:12 -04:00
Colin Walters
6bfbb8b239
build: Use LDADD libraries to link with, not LDFLAGS
...
This should fix the build with embedded glib.
2012-06-27 22:38:12 -04:00
Colin Walters
667c3bcb10
Make more compiler warnings into errors
...
In particular, I want -Werror=format=2 to catch format string bugs.
2012-06-27 22:26:16 -04:00
Colin Walters
d596615bab
main: Fix a format string error
2012-06-27 22:26:16 -04:00
Colin Walters
671303d1ab
embedded deps: Properly quote/handle PATH/LDFLAGS
2012-06-27 20:16:36 -04:00
Colin Walters
a7b917c856
core: Check out asynchronously
...
This can be a large performance win in certain circumstances:
* Cold buffer cache (we don't block the whole process)
* Requiring a copy instead of hardlink
2012-06-21 18:05:13 -04:00
Colin Walters
eba0ff75cc
tests: Just use OT_TESTS_DEBUG to say "save test data"
2012-06-21 11:42:45 -04:00
Colin Walters
7cce6e5ba1
pull: Properly propagate errors
2012-06-20 15:42:41 -04:00
Colin Walters
0cb4fe66f8
build: Fix syntax error in non-embedded build case
2012-06-20 15:42:19 -04:00
Colin Walters
33ee6e2fa4
build: Various bugfixes for embedded-dependencies
2012-06-20 10:37:36 -04:00
Colin Walters
ee98a0b4f7
core: Don't silence output of ostree-run-triggers
...
We want to see which triggers are being run by default.
2012-06-19 16:14:31 -04:00
Colin Walters
4d59080f46
triggers: Quiet GConf trigger
...
The default is just way, way too verbose.
2012-06-19 15:03:16 -04:00
Colin Walters
10bf223f0a
Support building with embedded libsoup
2012-06-14 19:34:28 -04:00
Colin Walters
78b0d99238
Support building with embedded glib
2012-06-14 13:45:59 -04:00
Colin Walters
f3c15a9ba7
triggers: Fix previous commit
2012-06-13 22:09:24 -04:00
Colin Walters
35a80c8e39
core: Fall back to copying checkouts on EMLINK/EXDEV
...
The previous fix to just ignore symbolic links for hard linking isn't
really good enough, since it can happen for empty files too.
Since this is an optimization, when we get EMLINK, let's instead just
fall back to copying. This also applies to EXDEV.
2012-06-12 14:50:41 -04:00
Colin Walters
270dc05176
ostbuild: Move to gnome-ostree module
...
Since we want to keep "ostree" buildsystem-independent, let's move
ostbuild out into the gnome-ostree module.
http://git.gnome.org/browse/gnome-ostree/commit/?id=04ba1926e33b442af1e357460e4415d4c0311e87
2012-06-08 19:01:25 -04:00
Colin Walters
6aaa2089f0
ostbuild: Fix previous commit (this should have been amended)
2012-06-08 16:51:51 -04:00
Colin Walters
f4b6d88254
ostbuild: Fix -k option to git-mirror
2012-06-08 16:47:23 -04:00
Colin Walters
13b37ddaa2
ostbuild: Allow specifying components to git fetch
2012-06-07 10:19:28 -04:00
Colin Walters
2df5294ce8
build: Actually, we need bleeding edge libsoup
...
The stable version compiles, but just hangs =/
2012-06-06 22:12:51 -04:00
Colin Walters
a496c464b9
build: Bump libsoup dependency
2012-06-06 22:06:30 -04:00
Colin Walters
210fbc3daf
ostbuild: Add rootdir argument to deploy-qemu
2012-06-06 15:43:42 -04:00
Colin Walters
2c385c0078
ostbuild: Fix circular dependency between resolve and git-mirror
...
git-mirror was looking for the latest snapshot, which we don't
have until we resolve.
This leads to some code duplication.
2012-06-06 12:56:48 -04:00
Colin Walters
a14ff0aeab
core: Fix mkdtemp invocation
2012-06-06 10:03:15 -04:00
Colin Walters
c436f8ac61
ostbuild: Add -k option to git-mirror
...
libwacom's sourceforge git server was down...
2012-06-05 22:55:53 -04:00
Colin Walters
e485bace01
pull: Download and checksum asynchronously
...
This is quite a noticeable speedup when downloading loose objects.
2012-06-05 22:38:17 -04:00
Colin Walters
df54408e5d
core: Fix memory leak
2012-06-05 22:32:03 -04:00
Colin Walters
8f2dda3e25
core: Just require libsoup, not libsoup-gnome
2012-05-31 10:25:41 -04:00
Colin Walters
58f6537c6a
TODO: Update
2012-05-31 10:10:13 -04:00
Colin Walters
cbd4ade053
core: Switch to using mkdtemp() so we only depend on GLib 2.28
...
We claim to build against 2.28, let's actually make it work.
2012-05-29 22:34:11 -04:00
Colin Walters
f438d9aaa6
core: Drop some dead temporary file code
2012-05-29 22:09:31 -04:00
Colin Walters
d3b063cec0
ostbuild: Have resolve use git-mirror rather than duplicating code
...
This also brings us back to a sensible world of:
ostbuild resolve --fetch
Doing both fetch *and* writing out the updated revisions.
2012-05-26 12:10:51 -04:00
Colin Walters
9582effb8d
core: Don't checkout symbolic links via hardlink
...
Doing so can easily get us up to the maximum ext4 hardlink count.
2012-05-26 11:55:12 -04:00
Colin Walters
1ef6bb0ef6
ostbuild: add --diffstat option for source-diff
2012-05-25 15:01:41 -04:00
Colin Walters
5a0af44131
core: use GLIB_VERSION_MAX_ALLOWED=2.28
...
We want to build/run even on relatively old OSes, so that we can
be used to bootstrap and maintain newer builds.
2012-05-25 15:00:45 -04:00
Colin Walters
9c27f1de99
core: Remove leftover debug print
2012-05-25 09:55:10 -04:00
Colin Walters
14a597131b
Release 2012.7
2012-05-24 21:17:43 -04:00
Colin Walters
88b3440eef
core: ostree-pull: Add --depth option
...
This is useful for getting say the last 10 builds.
2012-05-24 20:58:20 -04:00
Colin Walters
fb71519cd6
core: Attempt direct link() and fallback on EEXIST
...
Rather than always doing:
1) make temporary link
2) unlink() target
3) rename()
Just try making the link, and only do the second two if the file
already exists. This reduces system call traffic a lot.
2012-05-24 20:14:51 -04:00
Colin Walters
f7bbf41132
ostbuild: Add 'tag' concept to manifest, improve git mirroring
...
We should explicitly distinguish between the case where we have a git
branch we're following, versus an immutable tag. In the latter case,
we can entirely avoid running 'git fetch' for it once we have it.
This is a noticeable speedup in our current scenario of pinning WebKit
to a tag.
The git mirroring code now has a --fetch-skip-secs=X option which
allows us to basically run it in a loop, without hitting remote git
repositories too often.
2012-05-24 19:54:36 -04:00
Colin Walters
0d1ba45c73
ostbuild: git-mirror: Also fetch patches git
2012-05-24 18:11:06 -04:00
Colin Walters
1a5ea54aff
core: Make OstreeRepo struct private
2012-05-23 18:08:52 -04:00
Colin Walters
6c006815ce
ostbuild: Fix --debug-shell option
2012-05-23 18:02:08 -04:00
Colin Walters
893774aab5
core: Make device/inode loose object cache work for parent repos too
...
Otherwise ostbuild suddenly becomes significantly slower when using a
shadow repo.
2012-05-23 07:48:16 -04:00
Colin Walters
b45a0803fe
ostbuild: Few more misc fixes
2012-05-22 08:26:17 -04:00
Colin Walters
95f66e1157
ostbuild: Fix typos in component lookup path
2012-05-21 18:41:59 -04:00
Colin Walters
9bd36f9bff
ostbuild: Enhance source-diff with --log and --logp options
2012-05-18 20:25:02 -04:00
Colin Walters
6d59b4077c
ostbuild: Add source-diff builtin
...
OMG OMG OMG
2012-05-18 20:12:35 -04:00
Colin Walters
58d28ad5a6
core: Rearrange code for clarity (doesn't actually fix leaks)
2012-05-18 20:12:17 -04:00