Commit Graph

3350 Commits (master)
 

Author SHA1 Message Date
Alexander Larsson baf8d4630b git: Explicitly pull all refs when doing full pull
Older versions of git default to only tags when you do --tags instead
of tags + all. So, we force everything with --tags *:*.

Closes: #62
Approved by: alexlarsson
2017-11-06 12:42:36 +00:00
Alexander Larsson 3afbb5a6d2 Fix bundling of git sources specifying a tag object
When pulling the commit we need to also pull the tags so we have them
locally, and then we need to peel the ref when we commit it so that we
don't try to create a ref pointing to a non-commit (tag) object.

Closes: #62
Approved by: alexlarsson
2017-11-06 12:42:36 +00:00
Alexander Larsson c5cd6f50f6 Fix crashes on git errors
We returned FALSE but error was unset, leading to a crash printing
the error message.

Closes: #62
Approved by: alexlarsson
2017-11-06 12:42:36 +00:00
Alexander Larsson 202dcf7e9d Release 0.10.3 2017-10-31 13:45:42 +01:00
Alexander Larsson cb11d421f6 --from-git: Allocate builddir before mirroring 2017-10-31 12:50:51 +01:00
Alexander Larsson 0fed4a6433 --from-git: Drop origin/ now that we're not mirroring on checkout 2017-10-31 11:24:20 +01:00
Alexander Larsson 4c0b9ae0e3 git: Use cp -al instead of git clone when checking out git mirror
This fixes older versions of git not supporting clones from shallow
repos.
2017-10-31 11:22:44 +01:00
Alexander Larsson 7d532f5125 git: Disable fsck when doing shallow clones on git < 1.8.3.2
The git 1.8.3.2 release notes say:

 * Cloning with "git clone --depth N" while fetch.fsckobjects (or
   transfer.fsckobjects) is set to true did not tell the cut-off
   points of the shallow history to the process that validates the
   objects and the history received, causing the validation to fail.

So, on versions prior to this, we always disable fsck when you're
pulling shallowly. If you need fsck validation, use a newer git.
2017-10-31 10:22:52 +01:00
Alexander Larsson bf7aeacded git: Don't clone refs that is not under refs/
HEAD gives all sorts of problems
2017-10-31 09:05:59 +01:00
Alexander Larsson 0a03de929d Release 0.10.2 2017-10-30 15:12:36 +01:00
Matthias Clasen 7fc1a5a821
Merge pull request #56 from larchunix/typo-fix
Fix a typo in the docs
2017-10-30 08:57:48 -04:00
larchunix 1af81b799e
Fix a typo in the docs 2017-10-30 12:23:30 +01:00
Alexander Larsson a39f727adf git: Never do shallow pulls if we once had a deep one
This seems to break on old versions of git. For example:

$ git --version
git version 1.8.3.1
$ git clone --mirror https://github.com/divVerent/s2tc.git
Cloning into bare repository 's2tc.git'...
remote: Counting objects: 740, done.
remote: Total 740 (delta 0), reused 0 (delta 0), pack-reused 740
Receiving objects: 100% (740/740), 1.47 MiB | 0 bytes/s, done.
Resolving deltas: 100% (493/493), done.
$ cd s2tc.git/
$ git fetch -p --no-recurse-submodules --no-tags --depth=1 -f origin '+HEAD:HEAD'
fatal: git fetch-pack: expected shallow list

Closes: #55
Approved by: alexlarsson
2017-10-30 10:57:35 +00:00
Alexander Larsson 17f659ee71 git: --unshallow if we do a full pull where we were previously shallow
Closes: #55
Approved by: alexlarsson
2017-10-30 10:57:35 +00:00
Alexander Larsson ac6a25c981 Add option to disable shallow clone for git sources
Closes: #55
Approved by: alexlarsson
2017-10-30 10:57:35 +00:00
Alexander Larsson fb2612ea02 Release 0.10.1 2017-10-27 12:43:46 +02:00
Alexander Larsson 7e124f0e91 Work around issues with older versions of git
It turns out older versions of git cannot properly check out a commit
if the ref that points to it was not a normal one (branch or tag).
So, we work around this case by detecting it add adding a fake
tag. Also, we change the fake ref we use for commit-only references
to be a regular branch and not a special one for the same reason.

This fixes https://github.com/flatpak/flatpak/issues/1133

Closes: #52
Approved by: alexlarsson
2017-10-27 10:41:20 +00:00
Alexander Larsson f5693ab5de run: Don't pass --die-with-parent when we --run
In this case we will exec rather than fork + exec, so we don't
want to use prctl, as that can cause the app to die if any
*thread* in the parent dies (rather then the whole process).

In particular, this caused issues for gnome-builder starting
a newly built flatpak:ed app.

Closes: #51
Approved by: alexlarsson
2017-10-27 06:43:23 +00:00
Alexander Larsson 122ab653e8 Make tests work on debian
The regular ldconfig is some bash wrapper over /sbin/ldconfig.real
2017-10-26 13:57:18 +02:00
Alexander Larsson 188b835627 Update version to 0.10.0 2017-10-26 11:46:47 +02:00
Alexander Larsson f222a18dec Require flatpak 0.10.0 and corresponding ostree version 2017-10-26 11:46:32 +02:00
Alexander Larsson 726dbc4bd9 Update NEWS 2017-10-26 11:45:59 +02:00
Alexander Larsson 15f3582e40 Fix checkout of shallow repo.
Some manifest (cx.ring.RingGnome) had a git commit id that
was only tip of a non-branch ref (refs/changes/51/8051/8), which
was not cloned by a regular clone, so we need to switch to
a clone --mirror.

Closes: #50
Approved by: alexlarsson
2017-10-19 20:39:08 +00:00
Alexander Larsson 9453867333 Store the deletes in the cache metadata too
Closes: #49
Approved by: alexlarsson
2017-10-19 15:18:19 +00:00
Alexander Larsson 32f6722c1d Change the way the cache works
Previously we chained all the state via the internal sha256
checksum, extracting periodic checksums. We now reset
the checksum for each state and instead feed it the previous
stage checksum to chain things.

This means we have different cache checksum values, but the same
chaining behaviour. The advantage being that the checksum is
re-startable from any point, if we know the parent checksum.

Closes: #49
Approved by: alexlarsson
2017-10-19 15:18:19 +00:00
Alexander Larsson be8597f346 git: Try to do shallow mirrors when downloading
When downloading a git repo we try to do a shallow (depth=1) fetch of
only the specified target. This normally works fine for branches and
tags, but if the commit is a raw SHA1 then it fails, because we can
only request refs from the remote.

We handle this by doing an ls-remote and seeing if the specified
target is either a (possilby partial) ref, or a commit id that a
remote ref is pointing at. If it is, we pull that ref only. If not,
then we fall back to a full fetch.

I believe this is the best we can do to fix
 https://github.com/flatpak/flatpak-builder/issues/6

Closes: #47
Approved by: alexlarsson
2017-10-17 10:31:28 +00:00
Alexander Larsson 42da157c47 git: Create fake refs that are not branches when doing shallow mirrors
When doing a shallow clone when bundling git sources we sometimes need
to create a ref in the source repo. This changes the ref used from
refs/heads/flatpak-builder/ref-$REF to refs/flatpak/ref-$REF.
In other words, it uses a custom ref rather than a branch, which has
less chance of conflicting with some existing branch.

Closes: #47
Approved by: alexlarsson
2017-10-17 10:31:28 +00:00
Alexander Larsson 04cf19083e git: Add GSubprocessFlags to git()
Closes: #47
Approved by: alexlarsson
2017-10-17 10:31:28 +00:00
Alexander Larsson 039a24aeb4 utils: Add flags argument to flatpak_spawn
This allows you to e.g. silence STDERR

Closes: #47
Approved by: alexlarsson
2017-10-17 10:31:28 +00:00
Alexander Larsson a912f119d6 Bump version to 0.9.99 2017-10-09 13:51:02 +02:00
Alexander Larsson 271f0af212 Update NEWS 2017-10-09 13:50:42 +02:00
Alexander Larsson 3b14684464 Drop _compat_ things we added
We want a clean slate for 0.10, and it actually makes sense to rebuild
now, because the debuginfo compression will change everything (for
the better).
2017-10-09 13:32:41 +02:00
Alexander Larsson 1a4240eacc platform: Delete from base the things that were deleted in the sdk.
This fixes the issue in:
    https://github.com/flatpak/flatpak/issues/1024#issuecomment-333321323
Where we removed the base platform gstreamer plugins in the the
sdk, but they were not removed in the platform.
2017-10-09 13:29:19 +02:00
Alexander Larsson 01eb5dc945 Add prepare-platform-commands property
This allows you to modify the base platform, before applying the
new files. For instance, this is one way to fix
https://github.com/flatpak/flatpak/issues/1024#issuecomment-333321323
where we need to remove old gstreamer plugins from the base.
2017-10-09 13:29:19 +02:00
Alexander Larsson fb71c99ffb Accept .metainfo.xml appdata extensions
We find these either in the appdata or the metainfo directory.
However, we always move it to the appdata dir with the appdata
extension, because that means older versions of appstream-compose
will always pick it up.

Closes: #44
Approved by: alexlarsson
2017-10-06 12:48:58 +00:00
Alexander Larsson c7784cbde3 Fix tests
We need an ldconfig these days

Closes: #43
Approved by: alexlarsson
2017-10-05 18:11:21 +00:00
Alexander Larsson 34710550ef Automatically compress debug info unless no-debuginfo-compression is set
This uses eu-elfcompress to compress the debuginfo. We use the older
zlib-gnu compression format which is older and has more widespread
support.

Closes: #43
Approved by: alexlarsson
2017-10-05 18:11:21 +00:00
Alexander Larsson 5818790510 Add extra-data source type
All this does is construct a finish arg, but it makes it a lot nicer
to create extra-data using manifest. Additionally, it allows you to
create per-arch extra data if you set only-arches on the source.

Closes: #40
Approved by: alexlarsson
2017-09-29 07:01:53 +00:00
Alexander Larsson 1f57553d20 Add builder_cache_checksum_uint64
Closes: #40
Approved by: alexlarsson
2017-09-29 07:01:53 +00:00
Alexander Larsson 9f3e786c29 Add appdata-license field
This lets you modify the project_license field in the appdata file.
This is useful because appdata files from upstream generally only
contain license information for the app itself, whereas the
bundled app may contain other code with additional licenses.

Closes: #41
Approved by: alexlarsson
2017-09-29 07:01:40 +00:00
Alexander Larsson 14df2dfc9a Fix CI
This builds flatpak master before building flatpak-builder and installs
ostree 2017.11 from fedora.
Also it adds gettext-devel which is used for autopoint.

Closes: #39
Approved by: alexlarsson
2017-09-28 09:12:10 +00:00
Alexander Larsson 3e65d29fac Remove unused variables
These were reported by clang

Closes: #39
Approved by: alexlarsson
2017-09-28 09:12:10 +00:00
Alexander Larsson 10a89bff2a Fix up docs link
Closes: #39
Approved by: alexlarsson
2017-09-28 09:12:10 +00:00
Alexander Larsson 6294fafcc4 git: Fix problems bundling git repos on older git versions
It seems we have to specify

git fetch --depth 1 origin $ref:$ref

instead of

git fetch --depth 1 origin $ref

because on older versions of git (1.8.3 at least) this otherwise just
sets FETCH_HEAD, rather than $ref in the fetching repo.
2017-09-26 19:36:09 +02:00
Alexander Larsson 7e0619a4de Update for release 2017-09-25 17:44:24 +02:00
Alexander Larsson ef07c3f2fd Update version to 0.9.98 2017-09-25 17:44:24 +02:00
handsome-feng bede3d19b0 add the missing '[]' around AC_MSG_ERROR 2017-09-25 16:54:52 +02:00
Alexander Larsson d768afabfe Drop all compat from the checksum in preparation of new stable release
This means a lot of caches will rebuild, but we're then in a
stage where we can start adding new things in a compat way in the
stable series.
2017-09-22 17:10:06 +02:00
Alexander Larsson 38f409a041 Add make-args and make-install-args to build-options
This lets you override these on a per-arch level.

Fixes https://github.com/flatpak/flatpak/issues/1029
2017-09-22 17:07:22 +02:00
Alexander Larsson 2c86d53b63 Add locale-subset support to add-extension 2017-09-21 17:06:16 +02:00