Commit Graph

2936 Commits

Author SHA1 Message Date
Matthias Clasen
ea0fc59119 Merge pull request #939 from piotrdrag/potfiles-update-170730
Update POTFILES.in
2017-07-31 13:25:52 +01:00
Matthias Clasen
e40c736b3b Merge pull request #943 from handsome-feng/master
fix issues #942
2017-07-31 13:22:38 +01:00
handsome_feng
c9de78fe34 fix issues #942 2017-07-31 17:44:26 +08:00
Piotr Drąg
8823f9a6d3 Update POTFILES.in 2017-07-30 15:25:17 +02:00
Alexander Larsson
9c06cbb360 Add support for --extra-sources-url=URL
This makes flatpak-builder look in the specified URL for mirrored
sources before downloading the original URL.
2017-07-29 17:43:10 +02:00
Matthias Clasen
776f3b17b9 Merge pull request #922 from chergert/wip/chergert/fix-855
flatpak-enter: warn when not running as root
2017-07-14 16:03:26 -04:00
Matthias Clasen
941caede42 Merge pull request #921 from ramcq/missing-app-crash
fix crash in flatpak info when app is not present in origin
2017-07-14 13:57:20 -04:00
Robert McQueen
230e18db7b fix crash in flatpak info when app is not present in origin 2017-07-14 12:21:32 +01:00
Matthias Clasen
af95979559 Merge pull request #920 from ramcq/gh917
remote-add: also ignore resolver errors
2017-07-12 13:50:38 -04:00
Robert McQueen
5fccf0cc0d remote-add: also ignore resolver errors
Resolver errors are more likely in offline remote adds than IO
errors. Catch them first when we're downgrading metadata update
errors to a warning.

https://phabricator.endlessm.com/T17172
2017-07-12 18:43:21 +01:00
Matthias Clasen
142ae56d2c Merge pull request #919 from pwithnall/glnx-c99
build: Add -std=gnu99 to libglnx CFLAGS
2017-07-12 11:16:34 -04:00
Matthias Clasen
25449047f8 Merge pull request #918 from ramcq/gh917
allow remote add to succeed when offline
2017-07-12 11:16:08 -04:00
Philip Withnall
59e4e3f72b build: Add -std=gnu99 to libglnx CFLAGS
It uses inline for loop initialisers, which are a C99 feature. Set
-std=gnu99 like ostree.git does for its libglnx submodule.

Based on a patch by Georges Basile Stavracas Neto
<georges.stavracas@gmail.com>.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-12 15:58:50 +01:00
Robert McQueen
f2dbaecf86 allow remote add to succeed when offline
Updating the metadata at the end of adding a remote means that it fails
if we're offline, even if we have the .flatpakrepo file available.
Unlike the other error cases in the process, which mean the operation
really has messed up, the remote is actually usable even if the
metadata update fails, because future operations will grab the
summary and any new metadata - so we should change this to a warning
to allow the operation to succeed when we're offline.

https://github.com/flatpak/flatpak/issues/917
2017-07-12 11:20:26 +01:00
Matthias Clasen
eecdcbd195 Merge pull request #915 from matthiasclasen/fix-builder-run
Catch some more errors in option parsing
2017-07-10 06:26:02 -04:00
Matthias Clasen
9ef22bed1d Catch some more errors in option parsing
flatpak-builder was running into an assertion when --run was
used after a non-option. Catch this and exit with a clear error
message. Same for --show-deps
2017-07-09 23:06:00 -04:00
Christian Hergert
7bf60270fe flatpak-enter: warn when not running as root
Currently, all conceivable configurations and installations of
flatpak require root to perform this operation. That may not be
the case in the future, but until then, we should warn when the
user is not root as the operation will fail.

Fixes https://github.com/flatpak/flatpak/issues/855
2017-07-09 14:27:26 -07:00
Matthias Clasen
3259704a06 Merge pull request #913 from matthiasclasen/fix-match-subrefs
Fix flatpak_summary_match_subrefs
2017-07-09 10:53:40 -04:00
Matthias Clasen
f71655a5f8 Fix flatpak_summary_match_subrefs
We were checking the prefix twice here, instead of
checking prefix and suffix, which was obviously the
intention.

This caused extensions with non-matching architectures
to be reported as related refs.
2017-07-09 10:39:47 -04:00
Matthias Clasen
ed08538f92 Merge pull request #900 from pwithnall/lan-and-usb-preparation
LAN/USB preparation refactoring
2017-07-08 20:54:28 -04:00
Matthias Clasen
2d5a8ba86b Merge pull request #909 from matthiasclasen/install-flags
Check the right flags
2017-07-08 18:19:14 -04:00
Matthias Clasen
9463327663 Merge pull request #912 from nazgul77/patch-1
Update de.po
2017-07-08 14:00:37 -04:00
Matthias Clasen
34cd0631d9 Merge pull request #911 from piotrdrag/potfiles-update-170708
Update POTFILES.in
2017-07-08 13:57:07 -04:00
Christian
40e7bafe87 Update de.po
Change ambigious translation
2017-07-08 16:58:29 +02:00
Piotr Drąg
af744ffceb Update POTFILES.in 2017-07-08 16:42:15 +02:00
Matthias Clasen
b0a7bc70af Merge pull request #908 from matthiasclasen/typo-fix
Fix a typo in the docs
2017-07-08 07:28:20 -04:00
Matthias Clasen
75f93606c3 Check the right flags
flatpak_installation_install_full takes FlatpakInstallFlags,
but it was checking for a FlatpakUpdateFlags field.
2017-07-07 20:20:56 -04:00
Matthias Clasen
854cb841df Fix a typo in the docs 2017-07-07 20:17:32 -04:00
Matthias Clasen
261ff03b63 Merge pull request #907 from smcv/metadata
Document all metadata groups and keys
2017-07-07 17:50:15 -04:00
Matthias Clasen
d1189d6d79 Merge pull request #904 from chergert/wip/term-titles
Update terminal title with build progress
2017-07-07 17:08:29 -04:00
Christian Hergert
59c4aec237 builder: update terminal title when build progress
This tries to be similar to jhbuild in that we update the
terminal title at various stages of the build process.

This is useful for casual command line users. It is also useful
for applications automating the use of flatpak-builder as then
can display progress to the user without having to parse all
stdout content.

For build systems that support progress (such as ninja), this
allows for both a build message (the term title) and progress
bars (generated from %d/%d build system output).
2017-07-07 14:04:30 -07:00
Matthias Clasen
db0a9a0658 Merge pull request #903 from pwithnall/warning-fixes
Fix compiler warning flags and (accordingly) quite a few compiler warnings
2017-07-07 16:50:45 -04:00
Matthias Clasen
c7047ca9ed Merge pull request #905 from owtaylor/ref-name-annotation
OCI: Update org.opencontainers.ref.name to org.opencontainers.image.r…
2017-07-07 13:17:18 -04:00
Simon McVittie
33caac29d2 flatpak-metadata(5): Add very brief documentation for Policy groups
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 18:05:48 +01:00
Philip Withnall
81301f0ef4 general: Remove trailing \n from GLib log messages
The GLib logging framework automatically appends a \n to messages, so it
doesn’t need to be added by callers.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-07 17:18:24 +01:00
Philip Withnall
315edcfc41 common/utils: Use a hash table as a set in the recommended way
Use g_hash_table_add() so that GHashTable can internally optimise for
use as a set, which results in slightly simpler code for the caller, and
slightly less memory usage overall.

This introduces no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-07 17:18:24 +01:00
Simon McVittie
b5023ffe87 flatpak-metadata(5): Document the Instance group
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:08:35 +01:00
Simon McVittie
6856ca18bc flatpak-metadata(5): Document missing keys
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:08:35 +01:00
Simon McVittie
b552d8995b flatpak-metadata(5): Document /.flatpak-info
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:08:35 +01:00
Simon McVittie
6839fee009 common: Clarify what flatpak_context_load_metadata, save_metadata do
Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:08:35 +01:00
Simon McVittie
489bfddfb3 common: Add and use constants for flatpak-metadata(5) groups and keys
This makes it easier to avoid typos, and also makes it easier to see
what groups and keys are in use. In the header file, they are
clustered according to the group in which the keys are used.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2017-07-07 16:06:21 +01:00
Christian Hergert
2c6d05cf9f builder: add helper to set terminal title on TTYs
If isatty(STDOUT_FILE) is true, then we can possibly send
escape sequences to set the title of the terminal. This is
useful for both terminals like gnome-terminal as well as
programs scripting flatpak-builder such as Builder. This allows
those programs to get information about the current build
progress without having to parse the command line output which
is muxed with build information.
2017-07-06 14:22:19 -07:00
Owen W. Taylor
0853089457 OCI: Update org.opencontainers.ref.name to org.opencontainers.image.ref.name
This annotation was changed in later versions of the OCI Image specification.
(See https://github.com/projectatomic/skopeo/issues/369#issuecomment-310158211)
2017-07-06 17:07:08 -04:00
Philip Withnall
f47a696392 build: Add AM_* variables to all per-target special variables
For example, add $(AM_CFLAGS) to mumble_CFLAGS. Since $(WARN_CFLAGS) is
only added to $(AM_CFLAGS), this fixes the lack of inclusion of the
compiler warning flags in the compilation of half of flatpak.

Note that $(AM_*) variables are only used by automake if a more specific
(per-target) special variable is not defined instead. So if you define
mumble_CFLAGS, AM_CFLAGS will not be used for that target unless
explicitly included in mumble_CFLAGS.

See
https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html.

Do the same for $(AM_LIBADD), $(AM_LDFLAGS), etc. These are not
currently defined, but it’s good practice to include them in
mumble_LIBADD (etc.) just in case they’re defined in future. Hopefully
their inclusions will be cargo-culted to any new targets which are
added, retaining full coverage of the code base.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 15:05:58 +01:00
Philip Withnall
95c3c942d3 tests: Move printf format string into printf() call to silence warning
Clang otherwise complains about the printf() format string not being a
string literal, which is a bit pants.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 15:05:58 +01:00
Philip Withnall
a7f5b1c3ef builder: Remove an unused variable
Fix a compiler warning.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 15:05:58 +01:00
Philip Withnall
5771527286 builder: Add a missing function to the header file
All the similarly named functions were in the header file, but this one
was left out. Stop it feeling sad and lonely by putting it in the header
file with its friends.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 14:41:21 +01:00
Philip Withnall
548f60ebc0 general: Add missing static modifier to various local methods
The compiler warning flag which was supposed to warn about this was not
being included in the CFLAGS for these targets. That will be fixed in an
upcoming commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 14:41:21 +01:00
Philip Withnall
225e4b1e2f common/utils: Factor out code for populating the commit data cache
This introduces no functional changes. The split out function will be
reused in a later commit to additionally load commit data from the
ostree-metadata branch.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 14:41:01 +01:00
Philip Withnall
7d286a6dce common/dir: Move progress reporting setup higher in flatpak_dir_pull()
This will slightly simplify some later refactoring. It makes no real
difference to the function’s behaviour at the moment.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-06 14:41:01 +01:00