1417 Commits

Author SHA1 Message Date
Colin Walters
b600ae5939 repo: Fix object storage size API to be 64 bit
This fixes a pointer size warning on 32-bit builds.

https://bugzilla.gnome.org/show_bug.cgi?id=706235
2013-08-25 15:19:54 -04:00
Colin Walters
3aa8f86b4a doc: Minor tweaks 2013-08-25 10:32:40 -04:00
Colin Walters
b06e10ebf9 doc/adapting-existing: Elaborate a bit more on FS layout and links 2013-08-25 10:23:19 -04:00
Colin Walters
1ab01a6b35 doc/adapting-existing: A bit more elaboration and a typo fix 2013-08-24 19:18:57 -04:00
Colin Walters
84f2cd249a doc: Add some docs about adapting existing package managers 2013-08-24 11:35:42 -04:00
Colin Walters
db4aecee44 pull: Update comment to better reflect current reality 2013-08-23 17:31:24 -04:00
Colin Walters
7751d3d9cd doc/repo: Describe object types 2013-08-23 17:21:31 -04:00
Colin Walters
0e60912155 doc/overview: Add a note about the GPL 2013-08-23 17:21:19 -04:00
Colin Walters
2b6d7d8d93 doc: Add a section about how atomic upgrades work
Migrating some content from
https://live.gnome.org/OSTree/DeploymentModel2
2013-08-23 13:18:07 -04:00
Vivek Dasmohapatra
14c9f88e9c trivial-httpd: Handle the autoexit case when the docroot is a symlink 2013-08-23 12:39:24 -04:00
Vivek Dasmohapatra
3dc6cedba5 trivial-httpd: Close stdout & stdin so $() can capture output when daemonized
Will be used by tests.
2013-08-23 12:28:37 -04:00
Vivek Dasmohapatra
4f127b2d7d trivial-httpd: Handle -p - as meaning write-port-to-stdout
This is convenient to use from tests.
2013-08-23 12:28:33 -04:00
Vivek Dasmohapatra
b6d77f6ad6 fetcher: Return NOT_FOUND when the HTTP code is 410 or 404
This will be used by the pull code to download optional data.
2013-08-23 12:15:49 -04:00
Colin Walters
fe5dd07772 main: Drop --archive option from init, now that the code is removed
Commit 1ec7c304086c14fe0540d9c371b66f64a7a81b2e removed archive mode,
so this bit needs to be removed too.

https://bugzilla.gnome.org/show_bug.cgi?id=706327
2013-08-23 09:55:09 -04:00
Colin Walters
032f1316ad doc: Split overview into chapters, expand a bit 2013-08-22 09:17:08 -04:00
Colin Walters
d58d6a6ef2 doc: Add a section on deployments 2013-08-22 09:09:05 -04:00
Javier Martinez Canillas
695621db05 admin: notify detected bootloader configuration
OSTree now supports multiple bootloader backends so
notify which bootloader configuration was detected.

https://bugzilla.gnome.org/show_bug.cgi?id=706548

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
2013-08-22 07:37:21 -04:00
Colin Walters
000dd5add3 admin: Add API to OtBootloader to get name
https://bugzilla.gnome.org/show_bug.cgi?id=706548
2013-08-22 07:37:21 -04:00
Javier Martinez Canillas
6f6c87877e admin: Don't fail to deploy if there isn't a bootloader config
Currently, when deploying an OSTree that does not contain a
bootloader configuration it fails with the following message:

"No known bootloader configuration detected"

A bootloader configuration is not strictly necessary if the
bootloader used is able to parse /boot/loader/entries on boot.

So, failing to deploy seems to be a little harsh. It is better
to just not write the bootloader configuration if a previous
one was not found but still swap the bootversion.

https://bugzilla.gnome.org/show_bug.cgi?id=706477

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
2013-08-22 05:52:16 -04:00
Colin Walters
8abad0b452 admin: Write out correct version fields in boot/loader/entries files
Before, we were writing the "bootversion", which is either 0 or 1, for
all entries.  This is completely wrong; the idea of the "version"
field is to compare between entries.

Fix this by writing out the inverted index - internally, index 0 is
the *first* boot entry, so we give it the highest version number, and
index N is the last, so give it version 0.

Then fix the deployment sorting code to correctly reverse the version
number comparison, so we read back the right order.

In practice before this bug didn't matter because "normally" you only
have at most two deployments.

https://bugzilla.gnome.org/show_bug.cgi?id=706546
2013-08-22 05:46:11 -04:00
Colin Walters
7e2e072ad4 doc: Add repo docs 2013-08-21 09:29:04 -04:00
Colin Walters
caf6be331b libostree: Check out directories depth-first in serial, switch to sync API
The way we recurse into subdirectories in parallel makes it far too
easy to hit up against the arbitrary Linux fd limit of 1024.

Since the fix here is about dropping parallelism, let's just go all
the way for now and make a plain old synchronous API =(

This does simplify both internal callers which wanted a sync API
anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=706380
2013-08-21 09:22:37 -04:00
Javier Martinez Canillas
750a60d3aa main: Add U-Boot bootlader backend support
This patch adds support to generate files that
can be used by Universal Bootloader (U-Boot).

U-Boot allows to modify boards default boot commands by
reading and executing a bootscript file or importing a
plain text file that contains environment variables that
could parameterize the boot command or a bootscript.

OSTree generates a uEnv.txt file that contains booting
information that is taken from Boot Loader Specification
snippets files as defined in the new OSTree deployment model:

https://wiki.gnome.org/OSTree/DeploymentModel2

On deploy or upgrade an uEnv.txt env var file is created
in the path /boot/loader.${bootversion}/uEnv.txt. Also, a
/boot/uEnv.txt symbolic link to loader/uEnv.txt is created
so U-Boot can always import the file from a fixed path.

Since U-Boot does not support a menu to list a set of
Operative Systems, the most recent bootloader configuration
from the list is used.

To boot an OSTree using the generated uEnv.txt file, a
board has to parameterize its default boot command using the
following variables defined by OSTree:

${kernel_image}:  path to the Linux kernel image
${ramdisk_image}: path to the initial ramdisk image
${bootargs}:      parameters passed to the kernel command line

Alternatively, for boards that don't support this scheme,
a bootscript that overrides the default boot command can be used.

An example of such a bootscript could be:

setenv scriptaddr 40008000
setenv kernel_addr 0x40007000
setenv ramdisk_addr 0x42000000
ext2load mmc 0:1 ${scriptaddr} uEnv.txt
env import -t ${scriptaddr} ${filesize}
ext2load mmc 0:1 ${kernel_addr} ${kernel_image}
ext2load mmc 0:1 ${ramdisk_addr} ${ramdisk_image}
bootm ${kernel_addr} ${ramdisk_addr}

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=706370
2013-08-20 13:00:46 -04:00
Javier Martinez Canillas
cf14b398da admin: Extract ot_admin_join_config_lines() helper function
ot-bootloader-syslinux.c has a join_lines() function that is rather
generic and can be used in other places. Let's add it as a helper
function.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=706370
2013-08-20 13:00:19 -04:00
Javier Martinez Canillas
2033edc658 test: fix a trivial typo in libtests.sh
When running the test-admin-deploy-1.sh unit test,
cat shows the following error:

cat: boot/vmlinuz-3-6.0: No such file or directory

due a trivial typo in the kernel image file name.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>

https://bugzilla.gnome.org/show_bug.cgi?id=706371
2013-08-20 06:46:52 -04:00
Colin Walters
871be4b75a libostree: Extend gtk-doc coverage for refs and prune APIs 2013-08-19 10:32:08 -04:00
Colin Walters
6a8e9d7151 ostree.doap: Update description based on docs. 2013-08-19 10:32:08 -04:00
Colin Walters
16c36fbc34 main: Use macro to reduce duplication among builtin prototypes
Just less code.
2013-08-19 10:32:08 -04:00
Colin Walters
326be41d12 Revert "libotutil: Make use of GBytes in ot_variant_read()"
This reverts commit c77908bf514d61e75798932f61b5b414d9e36a3c; we can't
do this since g_variant_get_data_as_bytes() is a GLib 2.36 API.
2013-08-18 07:51:25 -04:00
Colin Walters
b35840e1b8 libotutil: Drop accidental use of GLib 2.36 API
Sticking with 2.34 for a while longer.
2013-08-18 07:50:50 -04:00
Colin Walters
eaee309112 Use { 0, } for structure initialization rather than memset()
It's cleaner, safer, and I had a totally wrong idea stuck in my head
about why memset() should be used.

https://bugzilla.gnome.org/show_bug.cgi?id=705968
2013-08-18 07:20:46 -04:00
Colin Walters
5f90502482 Release 2013.5 v2013.5 2013-08-17 17:05:17 -04:00
Colin Walters
12ccbffad7 build: Fix and prettify build option output
The documentation one was broken by the gtk-doc changes, and let's
align things.
2013-08-17 15:21:31 -04:00
Sjoerd Simons
e5d9bd97aa ostree init: Fix mode list help string
It's archive-z2, not archive-z.

https://bugzilla.gnome.org/show_bug.cgi?id=705849
2013-08-17 15:05:04 -04:00
Sjoerd Simons
d1babde95e Fix make distcheck
make distcheck was unhappy for various reasons:
  * headers aren't data, so use _HEADERS otherwise compilation fails
  * Mark the gir & typelib data as cleanfiles so they aren't left around
    after make clean
  * Don't nuke the .la file. This breaks make uninstall, leave it up to
    distributions to not install .la files if they don't want them.

https://bugzilla.gnome.org/show_bug.cgi?id=705850
2013-08-17 14:57:05 -04:00
Colin Walters
00c352ba67 libostree: Delete some leftover remnant API for archive files 2013-08-17 14:08:04 -04:00
Colin Walters
35d7b9cdbf libostree: Increase gtk-doc coverage of ostree-repo.[ch] 2013-08-17 13:57:22 -04:00
Colin Walters
1fea88e64b libostree: Add gtk-doc section for ostree-repo.c 2013-08-17 13:22:58 -04:00
Colin Walters
0f9d7d2179 libostree: More gtk-doc updates for ostree-core 2013-08-17 10:54:00 -04:00
Colin Walters
75cd17d9d9 docs: Add an overview section, migrate some content from the wiki 2013-08-17 10:16:02 -04:00
Colin Walters
abe2320039 libostree: Fix many gtk-doc warnings 2013-08-17 08:41:31 -04:00
Colin Walters
06d1a56bc9 core: Drop duplicated type declarations
3 fewer gtk-doc warnings, 99 still left on the wall...
2013-08-17 08:23:28 -04:00
Colin Walters
c3121b52bc libostree: Document more core macros 2013-08-17 08:21:04 -04:00
Stef Walter
349d7958f3 Fix use of uninitialized memory in ostree_builtin_checksum()
https://bugzilla.gnome.org/show_bug.cgi?id=705968
2013-08-17 07:07:54 +02:00
Colin Walters
aecac2fd8e TODO: Tweak 2013-08-16 23:19:30 -04:00
Colin Walters
9c79b352a1 build: Fix the build without documentation
Just key everything of gtk-doc.
2013-08-16 23:14:30 -04:00
Colin Walters
1ec7c30408 core: Remove old "archive" mode
We'll always have "bare" mode for keeping files-as-hardlinks as root.
But "archive" was my second attempt at a format for non-root file
storage, used by the gnome-ostree buildsystem which runs as non-root.

It was really handy to have a "tar" like mode where I can create
tarballs as a user, that contain files owned by root for example.

The "archive" mode stored content files as two pieces in the
filesystem; ".file" contained metadata, and ".filecontent" was the
actual content, uncompressed.  The nice thing about this was that to
check out a tree as non-root, you could just hardlink into the repo.

However, archive was fairly bad for serving via HTTP; it required
*two* HTTP requests per content object, greatly magnifing the already
inefficient fetch process.  So "archive-z2" was introduced.

To allow gnome-ostree to still check out trees as a user, the
"uncompressed-object-cache" was introduced, and that's how things have
been working for a while.

So we should just be able to kill this code.  Specifically note just
how much better the stage_object() function became.

https://bugzilla.gnome.org/show_bug.cgi?id=706057
2013-08-16 22:56:42 -04:00
Colin Walters
17560a57bf Add gtk-doc support
Yes, it's really me.  Colin Walters.  Writing documentation.  You
don't need to do a DNA test.
2013-08-16 22:56:12 -04:00
Stef Walter
f9b2c45fc0 Add 'ostree reset' command to undo a bad commit
Accepts the following arguments: ref checksum

Checks that the checksum is a parent of the ref before rewriting
the ref.

https://bugzilla.gnome.org/show_bug.cgi?id=705979
2013-08-16 17:28:43 +02:00
Colin Walters
5a4b7d708f configure: Use AS_IF() consistently
See https://bugzilla.gnome.org/show_bug.cgi?id=681413
2013-08-15 18:33:19 -04:00