Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "policykit-1,libappstream-dev,bison,meson,attr,autopoint,bubblewrap,debhelper,desktop-file-utils,dh-autoreconf,dh-exec,dh-strip-nondeterminism,docbook,docbook-to-man,docbook-xml,docbook-xsl,dwz,fuse,gir1.2-appstreamglib-1.0,gir1.2-freedesktop,gir1.2-gcab-1.0,gir1.2-gdkpixbuf-2.0,gir1.2-json-1.0,gir1.2-ostree-1.0,gir1.2-polkit-1.0,gir1.2-soup-2.4,gobject-introspection,gtk-doc-tools,intltool-debian,libappstream-glib-dev,libappstream-glib8,libarchive-dev,libarchive-zip-perl,libassuan-dev,libattr1-dev,libavahi-glib1,libbrotli-dev,libcap-dev,libdconf-dev,libdebhelper-perl,libdw-dev,libelf-dev,libfile-stripnondeterminism-perl,libfuse-dev,libfuse2,libgcab-1.0-0,libgcab-dev,libgdk-pixbuf2.0-bin,libgdk-pixbuf2.0-dev,libgirepository1.0-dev,libglib2.0-doc,libgpgme-dev,libgpgme11,libjson-glib-dev,libosp5,libostree-1-1,libostree-dev,libostree-doc,libpolkit-agent-1-dev,libpolkit-gobject-1-dev,libpsl-dev,libseccomp-dev,libsoup2.4-dev,libsub-override-perl,libsystemd-dev,libxml2-utils,opensp,ostree,po-debconf,python3-lxml,python3-mako,python3-markdown,python3-markupsafe,python3-packaging,python3-pyparsing,sgml-base,sgml-data,socat,xdg-dbus-proxy,xml-core,xmlto,xsltproc"
}
},
"runArgs": ["--privileged"]
}
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*]
charset = utf-8
end_of_line = lf

[*.[ch]]
indent_size = 2
indent_style = space
insert_final_newline = true
# For any stray tabs that may sneak in:
tab_width = 8

[meson.build]
indent_size = 2
indent_style = space

1,282 changes: 0 additions & 1,282 deletions ABOUT-NLS

This file was deleted.

84 changes: 84 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Code of Conduct

## 1. Purpose

A primary goal of Flatpak is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof).

This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior.

We invite all those who participate in Flatpak to help us create safe and positive experiences for everyone.

## 2. Open Source Citizenship

A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community.

Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.

If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.

## 3. Expected Behavior

The following behaviors are expected and requested of all community members:

* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.

## 4. Unacceptable Behavior

The following behaviors are considered harassment and are unacceptable within our community:

* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other people’s personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someone’s consent before touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.

## 5. Consequences of Unacceptable Behavior

Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated.

Anyone asked to stop unacceptable behavior is expected to comply immediately.

If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).

## 6. Reporting Guidelines

If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. alexander.larsson@gmail.com.



Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, organizers will also provide escorts as desired by the person experiencing distress.

## 7. Addressing Grievances

If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify Flatpak with a concise description of your grievance. Your grievance will be handled in accordance with our existing governing policies.



## 8. Scope

We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.

This code of conduct and its related procedures also applies to unacceptable behavior occurring outside the scope of community activities when such behavior has the potential to adversely affect the safety and well-being of community members.

## 9. Contact info

alexander.larsson@gmail.com

## 10. License and attribution

This Code of Conduct is distributed under a [Creative Commons Attribution-ShareAlike license](http://creativecommons.org/licenses/by-sa/3.0/).

Portions of text derived from the [Django Code of Conduct](https://www.djangoproject.com/conduct/) and the [Geek Feminism Anti-Harassment Policy](http://geekfeminism.wikia.com/wiki/Conference_anti-harassment/Policy).

Retrieved on November 22, 2016 from [http://citizencodeofconduct.org/](http://citizencodeofconduct.org/)
145 changes: 145 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
## Compiling Flatpak

If you need to build Flatpak from source, you can do so with Meson or
with GNU Autotools. The recommended build system for this version of
Flatpak is Meson, and the Autotools build system is likely to be removed
from a future version of Flatpak.

The exact steps required depend on your distribution. Below are some
steps that should work on Debian and Fedora, based on the configure
options used to build those distributions' packages, These options will
install into `/usr`, which will overwrite your distribution-provided
system copy of Flatpak.
**You should only do this if you understand the risks of it to the
stability of your system, and you probably want to do it in a VM or on
a development machine that's expected to break sometimes!**

### On Debian

```
git clone https://github.com/flatpak/flatpak
cd flatpak
sudo apt build-dep flatpak
git submodule update --init
meson setup --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dselinux_module=disabled -Dinstalled_tests=true -Ddbus_config_dir=/usr/share/dbus-1/system.d -Dprivileged_group=sudo -Drun_media_dir=/media -Dsystem_bubblewrap=bwrap -Dsystem_dbus_proxy=xdg-dbus-proxy -Dsystemdsystemunitdir=/lib/systemd/system -Dsystemdsystemenvgendir=/lib/systemd/system-environment-generators -Dsystem_helper_user=_flatpak -Dgtkdoc=disabled _build
meson compile -C _build
meson test -C _build
sudo meson install -C _build
```

### On Fedora

```
git clone https://github.com/flatpak/flatpak
cd flatpak
sudo dnf builddep flatpak
sudo dnf install gettext-devel socat
git submodule update --init
meson setup --prefix=/usr --sysconfdir=/etc --localstatedir=/var -Dinstalled_tests=true -Dselinux_module=enabled -Dsystem_bubblewrap=bwrap -Dsystem_dbus_proxy=xdg-dbus-proxy _build
meson compile -C _build
meson test -C _build
sudo meson install -C _build
```

## Building with Autotools

Older branches of Flatpak used GNU Autotools. See
https://github.com/flatpak/flatpak/blob/flatpak-1.14.x/CONTRIBUTING.md
for more details of that build system.

The Autotools build system is likely to be removed from a future version
of Flatpak, leaving Meson as the only build system supported.

Newer releases of Flatpak do not include Autotools-generated files in
the source archive. If it is necessary to build these releases with
Autotools for some reason, the build system must be set up by running:

./autogen.sh

before proceeding as if for any other Autotools project.

## How to run a specified set of tests

Sometimes you don't want to run the whole test suite but just one you're
working on. This can be accomplished with a command like:

```
meson test -C _build test-info@user.wrap test-info@system.wrap
```

## More info
Dependencies you will need include: meson, bison,
gettext, gtk-doc, gobject-introspection, libcap, libarchive, libxml2, libsoup,
gpgme, polkit, libXau, ostree, json-glib, appstream, libseccomp (or their devel
packages).

Most configure arguments are documented in `meson_options.txt`. However,
there are some options that are a bit more complicated.

Flatpak relies on a project called
[Bubblewrap](https://github.com/containers/bubblewrap) for the low-level
sandboxing. By default, an in-tree copy of this is built (distributed in the
tarball or using git submodules in the git tree). This will build a helper
called flatpak-bwrap. If your system has a recent enough version of Bubblewrap
already, you can use `-Dsystem_bubblewrap=bwrap` to use that instead.

Bubblewrap can run in two modes, either using unprivileged user
namespaces or setuid mode. This requires that the kernel supports this,
which some distributions disable. For instance, Debian and Arch
([linux](https://www.archlinux.org/packages/?name=linux) kernel v4.14.5
or later), support user namespaces with the `kernel.unprivileged_userns_clone`
sysctl enabled.

If unprivileged user namespaces are not available, then Bubblewrap must
be built as setuid root. This is believed to be safe, as it is
designed to do this. Any build of Bubblewrap supports both
unprivileged and setuid mode, you just need to set the setuid bit for
it to change mode. The Meson build does not do this automatically.

There are some complications when building Flatpak to a different
prefix than the system-installed version. First of all, the newly
built Flatpak will look for system-installed flatpaks in
`$PREFIX/var/lib/flatpak`, which will not match existing installations.
You can use `-Dsystem_install_dir=/var/lib/flatpak` to make both
installations use the same location.

Secondly, Flatpak ships with a root-privileged PolicyKit helper for
system-wide installation, called `flatpak-system-helper`. It is D-Bus
activated (on the system bus) and if you install in a non-standard
location it is likely that D-Bus will not find it and PolicyKit
integration will not work. However, if the system installation is
synchronized, you can often use the system installed helper instead—
at least if the two versions are close enough.

## This repository

The Flatpak project consists of multiple pieces, and it can be
a bit challenging to find your way around at first. Here is a
quick intro to each of the important subdirectories:
* `app`: the commandline client. Each command has a `flatpak-builtins-` source file
* `common`: contains the library, libflatpak. It also contains various pieces
of code that are shared between the library, the client and the services.
Non-public code can be recognized by having a `-private.h` header file.
* `completion`: commandline auto completion support
* `data`: D-Bus interface definition files and GVariant schemas
* `doc`: The sources for the documentation, both man pages and library documentation
* `icon-validator`: A small utility that is used to validate icons
* `oci-authenticator`: service used for authenticating the user for installing
from oci remotes (e.g. for paid apps)
* `po`: translations
* `portal`: The Flatpak portal service, which lets sandboxed apps request the
creation of new sandboxes
* `revokefs`: A FUSE filesystem that is used to transfer files downloaded by
the user to the system-helper without copying
* `session-helper`: The flatpak-session-helper service, which provides various
helpers for the sandbox setup at runtime
* `tests`: The testsuite
* `subprojects/bubblewrap`: Flatpak's unprivileged sandboxing tool which is
developed separately and exists here as a submodule
* `subprojects/libglnx`: a small utility library for projects that use GLib on
Linux, as a submodule
* `subprojects/dbus-proxy`: a filtering proxy for D-Bus connections, as a submodule
* `subprojects/variant-schema-compiler`: a tool for generating code to
efficiently access data encoded using GVariant, as a submodule
* `system-helper`: The flatpak-system-helper service, which runs as root on the
system bus and allows non-root users to modify system installations
Empty file removed INSTALL
Empty file.
Loading
Loading