Skip to content
Commits on Source (4807)
# See https://editorconfig.org/
root = true
[*.{c,h}]
indent_style = tab
indent_size = 8
[*.ui]
indent_style = space
indent_size = 2
subprojects/appstream/
subprojects/gi-docgen.wrap
subprojects/gi-docgen/
subprojects/graphene.wrap
subprojects/graphene/
subprojects/gtk/
subprojects/libadwaita/
subprojects/libglib-testing/
subprojects/libsass.wrap
subprojects/libsass/
subprojects/libxmlb/
subprojects/malcontent/
subprojects/mutest.wrap
subprojects/mutest/
subprojects/sassc.wrap
subprojects/sassc/
subprojects/sysprof/
subprojects/wayland-protocols.wrap
subprojects/wayland-protocols/
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/HEAD/flatpak/flatpak_ci_initiative.yml'
stages:
- build
- deploy
cache:
paths:
- _ccache/
variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 4
G_MESSAGES_DEBUG: all
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --prefix /usr -Dsoup2=true -Dwebapps=true -Dhardcoded_foss_webapps=false -Dhardcoded_proprietary_webapps=false"
BUNDLE: "gnome-software-dev.flatpak"
.build:
before_script:
- cp -r $HOME/subprojects/* subprojects/
fedora-x86_64:
extends: .build
image: registry.gitlab.gnome.org/gnome/gnome-software/fedora:v10
stage: build
except:
- tags
script:
- meson ${MESON_COMMON_OPTIONS}
-Drpm_ostree=true
-Dmalcontent=true
-Dsysprof=enabled
_build
- ninja -C _build
- .gitlab-ci/run-tests.sh
--no-suite packagekit
--no-suite fwupd
--no-suite libglib-testing
--no-suite malcontent
artifacts:
reports:
junit: "_build/${CI_JOB_NAME}-report.xml"
name: "gnome-software-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
- "_build/${CI_JOB_NAME}-report.xml"
debian-stable-x86_64:
extends: .build
image: registry.gitlab.gnome.org/gnome/gnome-software/debian-stable:v9
stage: build
except:
- tags
script:
- meson ${MESON_COMMON_OPTIONS}
-Drpm_ostree=false
-Dmalcontent=false
-Dsysprof=disabled
_build
- ninja -C _build
- .gitlab-ci/run-tests.sh
--no-suite packagekit
--no-suite fwupd
--no-suite fedora-langpacks
--no-suite libxmlb
artifacts:
reports:
junit: "_build/${CI_JOB_NAME}-report.xml"
name: "gnome-software-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/meson-logs"
- "_build/${CI_JOB_NAME}-report.xml"
# Allow building a flatpak on demand to test out the gnome-software UI
flatpak bundle:
extends: '.flatpak'
stage: 'build'
dependencies: []
variables:
MANIFEST_PATH: "contrib/org.gnome.SoftwareDevel.json"
FLATPAK_MODULE: "gnome-software"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
APP_ID: "org.gnome.SoftwareDevel"
when: manual
allow_failure: true
script:
# Modified from https://gitlab.gnome.org/GNOME/citemplates/-/blob/HEAD/flatpak/flatpak_ci_initiative.yml
# to drop the unit tests, since we don’t need them
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
- flatpak-builder --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
# Generate a Flatpak bundle
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
- tar cf repo.tar repo/
# Due to the `only` clause in .publish_nightly, this will only publish on-demand
# builds to nightly.gnome.org if they are built from a commit on `main`
nightly:
extends: '.publish_nightly'
dependencies:
- 'flatpak bundle'
needs: ['flatpak bundle']
when: manual
# CI support stuff
## Docker image
GitLab CI jobs run in a Docker image, defined here. To update that image
(perhaps to install some more packages):
1. Edit `.gitlab-ci/Dockerfile` with the changes you want
1. Run `.gitlab-ci/run-docker.sh build --base=debian-stable --base-version=1` to
build the new image (bump the version from the latest listed for that `base`
on https://gitlab.gnome.org/GNOME/gnome-software/container_registry)
1. Run `.gitlab-ci/run-docker.sh push --base=debian-stable --base-version=1` to
upload the new image to the GNOME GitLab Docker registry
* If this is the first time you're doing this, you'll need to log into the
registry
* If you use 2-factor authentication on your GNOME GitLab account, you'll
need to [create a personal access token][pat] and use that rather than
your normal password
1. Edit `.gitlab-ci.yml` (in the root of this repository) to use your new
image
[pat]: https://gitlab.gnome.org/-/profile/personal_access_tokens
#!/bin/bash
set -e
git clone --depth 1 --no-tags https://gitlab.gnome.org/GNOME/gnome-software.git
meson subprojects download --sourcedir gnome-software
rm gnome-software/subprojects/*.wrap
mv gnome-software/subprojects/ .
# allow updating this one without a docker rebuild
rm -rf subprojects/gnome-pwa-list
rm -rf gnome-software
FROM debian:bookworm
RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
appstream \
clang \
clang-tools \
dbus \
desktop-file-utils \
docbook-xsl \
gcc \
g++ \
gettext \
git \
gnome-pkg-tools \
gobject-introspection \
gperf \
gsettings-desktop-schemas-dev \
gtk-doc-tools \
itstool \
lcov \
libaccountsservice-dev \
libappstream-dev \
libcairo2-dev \
libcairo-gobject2 \
libcurl4-gnutls-dev \
libepoxy-dev \
libflatpak-dev \
libfontconfig-dev \
libfwupd-dev \
libgdk-pixbuf-2.0-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libglib-testing-0-dev \
libgoa-1.0-dev \
libgraphene-1.0-dev \
libgstreamer-plugins-bad1.0-dev \
libgudev-1.0-dev \
libjpeg62-turbo-dev \
libjson-glib-dev \
liblmdb-dev \
libmalcontent-0-dev \
libpackagekit-glib2-dev \
libpam0g-dev \
libpango1.0-dev \
libpolkit-gobject-1-dev \
libsoup2.4-dev \
libstemmer-dev \
libxcursor-dev \
libxdamage-dev \
libxext-dev \
libxfixes-dev \
libxi-dev \
libxinerama-dev \
libxkbcommon-dev \
libxmlb-dev \
libxml2-utils \
libxrandr-dev \
libyaml-dev \
ninja-build \
packagekit \
pkg-config \
policykit-1 \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
sassc \
shared-mime-info \
sudo \
sysprof \
unzip \
valgrind \
wayland-protocols \
wget \
xsltproc \
xz-utils \
&& rm -rf /usr/share/doc/* /usr/share/man/*
RUN pip3 install meson==0.60.1
# Enable passwordless sudo for sudo users
RUN sed -i -e '/%sudo/s/ALL$/NOPASSWD: ALL/' /etc/sudoers
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -G sudo -ms /bin/bash user
USER user
WORKDIR /home/user
COPY cache-subprojects.sh .
RUN ./cache-subprojects.sh
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8
FROM fedora:35
RUN dnf -y install \
appstream \
accountsservice-devel \
cairo-devel \
cairo-gobject-devel \
clang \
clang-analyzer \
dbus-daemon \
dbus-devel \
desktop-file-utils \
docbook-style-xsl \
flatpak-devel \
fwupd-devel \
gcc \
gdk-pixbuf2-devel \
gettext \
git \
glib2-devel \
gobject-introspection \
gobject-introspection-devel \
gperf \
graphene-devel \
gsettings-desktop-schemas-devel \
gstreamer1-plugins-bad-free-devel \
gtk-doc \
json-glib-devel \
itstool \
lcov \
lmdb-devel \
appstream-devel \
libcurl-devel \
libdnf-devel \
libepoxy-devel \
libglib-testing-devel \
libgudev-devel \
libjpeg-turbo-devel \
liboauth-devel \
libsecret-devel \
libsoup-devel \
libstemmer-devel \
libXcursor-devel \
libXdamage-devel \
libXext-devel \
libXfixes-devel \
libXi-devel \
libXinerama-devel \
libxkbcommon-devel \
libxmlb-devel \
libXrandr-devel \
libxslt \
libyaml-devel \
malcontent-devel \
NetworkManager-libnm-devel \
ninja-build \
ostree-devel \
PackageKit \
PackageKit-glib-devel \
pam-devel \
pango-devel \
pcre-devel \
polkit-devel \
python3 \
python3-pip \
python3-wheel \
rpm-devel \
rpm-ostree-devel \
sassc \
shared-mime-info \
snapd-glib-devel \
sysprof-capture-devel \
unzip \
valgrind \
wayland-protocols-devel \
wget \
xz \
zlib-devel \
&& dnf clean all
RUN pip3 install meson==0.60.1
# Enable sudo for wheel users
RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' /etc/sudoers
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -G wheel -ms /bin/bash user
USER user
WORKDIR /home/user
COPY cache-subprojects.sh .
RUN ./cache-subprojects.sh
ENV LANG C.UTF-8
#!/usr/bin/env python3
# Turns a Meson testlog.json file into a JUnit XML report
#
# Copyright 2019 GNOME Foundation
#
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Original author: Emmanuele Bassi
import argparse
import datetime
import json
import os
import sys
import xml.etree.ElementTree as ET
aparser = argparse.ArgumentParser(description='Turns a Meson test log into a JUnit report')
aparser.add_argument('--project-name', metavar='NAME',
help='The project name',
default='unknown')
aparser.add_argument('--job-id', metavar='ID',
help='The job ID for the report',
default='Unknown')
aparser.add_argument('--branch', metavar='NAME',
help='Branch of the project being tested',
default='main')
aparser.add_argument('--output', metavar='FILE',
help='The output file, stdout by default',
type=argparse.FileType('w', encoding='UTF-8'),
default=sys.stdout)
aparser.add_argument('infile', metavar='FILE',
help='The input testlog.json, stdin by default',
type=argparse.FileType('r', encoding='UTF-8'),
default=sys.stdin)
args = aparser.parse_args()
outfile = args.output
testsuites = ET.Element('testsuites')
testsuites.set('id', '{}/{}'.format(args.job_id, args.branch))
testsuites.set('package', args.project_name)
testsuites.set('timestamp', datetime.datetime.utcnow().isoformat())
suites = {}
for line in args.infile:
data = json.loads(line)
(full_suite, unit_name) = data['name'].split(' / ')
try:
(project_name, suite_name) = full_suite.split(':')
except ValueError:
(project_name, suite_name) = (args.project_name, full_suite)
duration = data['duration']
return_code = data['returncode']
log = data['stdout']
log_stderr = data.get('stderr', '')
unit = {
'suite': suite_name,
'name': unit_name,
'duration': duration,
'returncode': return_code,
'stdout': log,
'stderr': log_stderr,
}
units = suites.setdefault(suite_name, [])
units.append(unit)
for name, units in suites.items():
print('Processing suite {} (units: {})'.format(name, len(units)))
def if_failed(unit):
if unit['returncode'] != 0:
return True
return False
def if_succeded(unit):
if unit['returncode'] == 0:
return True
return False
successes = list(filter(if_succeded, units))
failures = list(filter(if_failed, units))
print(' - {}: {} pass, {} fail'.format(name, len(successes), len(failures)))
testsuite = ET.SubElement(testsuites, 'testsuite')
testsuite.set('name', '{}/{}'.format(args.project_name, name))
testsuite.set('tests', str(len(units)))
testsuite.set('errors', str(len(failures)))
testsuite.set('failures', str(len(failures)))
for unit in successes:
testcase = ET.SubElement(testsuite, 'testcase')
testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
testcase.set('name', unit['name'])
testcase.set('time', str(unit['duration']))
for unit in failures:
testcase = ET.SubElement(testsuite, 'testcase')
testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
testcase.set('name', unit['name'])
testcase.set('time', str(unit['duration']))
failure = ET.SubElement(testcase, 'failure')
failure.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
failure.set('name', unit['name'])
failure.set('type', 'error')
failure.text = unit['stdout'] + '\n' + unit['stderr']
output = ET.tostring(testsuites, encoding='unicode')
outfile.write(output)
#!/bin/bash
read_arg() {
# $1 = arg name
# $2 = arg value
# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
read -r "$1" <<< "${BASH_REMATCH[1]}"
else
read -r "$1" <<< "$3"
# There is no way to shift our callers args, so
# return 1 to indicate they should do it instead.
return 1
fi
}
SUDO_CMD="sudo"
if docker -v |& grep -q podman; then
# Using podman
SUDO_CMD=""
# Docker is actually implemented by podman, and its OCI output
# is incompatible with some of the dockerd instances on GitLab
# CI runners.
export BUILDAH_FORMAT=docker
fi
set -e
base=""
base_version=""
build=0
run=0
push=0
list=0
print_help=0
no_login=0
while (($# > 0)); do
case "${1%%=*}" in
build) build=1;;
run) run=1;;
push) push=1;;
list) list=1;;
help) print_help=1;;
--base|-b) read_arg base "$@" || shift;;
--base-version) read_arg base_version "$@" || shift;;
--no-login) no_login=1;;
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
esac
shift
done
if [ $print_help == 1 ]; then
echo "$0 - Build and run Docker images"
echo ""
echo "Usage: $0 <command> [options] [basename]"
echo ""
echo "Available commands"
echo ""
echo " build --base=<BASENAME> - Build Docker image <BASENAME>.Dockerfile"
echo " run --base=<BASENAME> - Run Docker image <BASENAME>"
echo " push --base=<BASENAME> - Push Docker image <BASENAME> to the registry"
echo " list - List available images"
echo " help - This help message"
echo ""
exit 0
fi
cd "$(dirname "$0")"
if [ $list == 1 ]; then
echo "Available Docker images:"
for f in *.Dockerfile; do
filename=$( basename -- "$f" )
basename="${filename%.*}"
echo -e " \e[1;39m$basename\e[0m"
done
exit 0
fi
# All commands after this require --base to be set
if [ -z "${base}" ]; then
echo "Usage: $0 <command>"
exit 1
fi
if [ ! -f "$base.Dockerfile" ]; then
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
exit 1
fi
if [ -z "${base_version}" ]; then
base_version="latest"
else
base_version="v$base_version"
fi
TAG="registry.gitlab.gnome.org/gnome/gnome-software/${base}:${base_version}"
if [ $build == 1 ]; then
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
$SUDO_CMD docker build \
--build-arg HOST_USER_ID="$UID" \
--tag "${TAG}" \
--file "${base}.Dockerfile" .
exit $?
fi
if [ $push == 1 ]; then
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
if [ $no_login == 0 ]; then
$SUDO_CMD docker login registry.gitlab.gnome.org
fi
$SUDO_CMD docker push $TAG
exit $?
fi
if [ $run == 1 ]; then
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
$SUDO_CMD docker run \
--rm \
--volume "$(pwd)/..:/home/user/app" \
--workdir "/home/user/app" \
--tty \
--interactive "${TAG}" \
bash
exit $?
fi
#!/bin/bash
set +e
case "$1" in
--log-file)
log_file="$2"
shift
shift
;;
*)
log_file="_build/meson-logs/testlog.json"
esac
# Remove Flatpak triggers, to speed up the tests (specifically on Fedora,
# they could even break the tests by a deadlock or something like that).
if [ -d /usr/share/flatpak/triggers ]; then
sudo rm -rf /usr/share/flatpak/triggers
fi
# FIXME: The tests should be isolated and use mock services so they do not
# require a functioning system bus. This will have to do for now though.
sudo mkdir -p /run/dbus
sudo mkdir -p /var
sudo ln -s /var/run /run
sudo dbus-daemon --system --fork
#sudo /usr/lib/polkit-1/polkitd --no-debug &
#sudo /usr/libexec/fwupd/fwupd --verbose &
# FIXME: Running the flatpak tests as root means the system helper doesn’t
# need to be used, which makes them run a lot faster.
sudo \
dbus-run-session -- \
meson test \
-C _build \
--timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} \
--no-suite flaky \
--print-errorlogs \
"$@"
exit_code=$?
python3 .gitlab-ci/meson-junit-report.py \
--project-name=gnome-software \
--job-id "${CI_JOB_NAME}" \
--output "_build/${CI_JOB_NAME}-report.xml" \
"${log_file}"
exit $exit_code
Please describe the issue you’re experiencing:
What Linux distribution are you using, and what kind of package (RPM, deb, flatpak, etc.) are you experiencing the problem with?
Please attach a log of the issue, by running the following commands, reproducing the issue, and then attaching `gnome-software.log` here:
```sh
pkill gnome-software
gnome-software --verbose &> gnome-software.log
```
If the problem is with the user interface, please attach a screenshot or video of it. Please attach the file directly rather than linking to an external hosting service, as external files are likely to be deleted after a while.
[submodule "subprojects/gnome-pwa-list"]
path = subprojects/gnome-pwa-list
url = https://gitlab.gnome.org/mwleeds/gnome-pwa-list.git
Richard Hughes <richard@hughsie.com>
This diff is collapsed.
[![Build Status](https://gitlab.gnome.org/GNOME/gnome-software/badges/master/build.svg)](https://gitlab.gnome.org/GNOME/gnome-software/pipelines)
[![Build Status](https://gitlab.gnome.org/GNOME/gnome-software/badges/main/pipeline.svg)](https://gitlab.gnome.org/GNOME/gnome-software/pipelines)
# Software
[Software](https://wiki.gnome.org/Apps/Software) lets you install and update applications and system extensions.
[Software](https://wiki.gnome.org/Apps/Software) allows users to easily find,
discover and install apps. It also keeps their OS, apps and devices up to date
without them having to think about it, and gives them confidence that their
system is up to date. It supports popular distributions, subject to those
distributions maintaining their own distro-specific integration code.
The specific use cases that Software covers are [documented in more detail](./doc/use-cases.md).
# Features
A plugin system is used to access software from different sources.
Plugins are provided for:
- Traditional package installation via PackageKit (e.g. Debian package, RPM).
......@@ -14,16 +23,76 @@ Software supports showing metadata that closely matches the [AppStream](https://
Software runs as a background service to provide update notifications and be a search provider for [GNOME Shell](https://wiki.gnome.org/Projects/GnomeShell).
# Building
# Contact
For questions about how to use Software, ask on [Discourse](https://discourse.gnome.org/tag/gnome-software).
Bug reports and merge requests should be filed on [GNOME GitLab](https://gitlab.gnome.org/GNOME/gnome-software).
For development discussion, join us on `#gnome-software` on [irc.gnome.org](https://wiki.gnome.org/Community/GettingInTouch/IRC).
# Documentation for app developers and vendors
Specific documentation is available for application developers who wish to test
how their applications appear in GNOME Software; and for distribution vendors
who wish to customise how GNOME Software appears in their distribution:
* [Tools in GNOME Software for application developers](./doc/app-developers.md)
* [Vendor customisation of GNOME Software](./doc/vendor-customisation.md)
# Running a nightly build
A [flatpak bundle](https://docs.flatpak.org/en/latest/single-file-bundles.html)
of Software can be built on demand here by running the ‘flatpak bundle’ CI job.
It is not fully functional, but is useful for development and testing of
upcoming UI changes to Software. It may become more functional over time. It
is not an official or supported release.
The CI job saves the bundle in its artifacts list as `gnome-software-dev.flatpak`.
This can be installed and run locally by downloading it and running:
```
$ flatpak install --bundle ./gnome-software-dev.flatpak
$ flatpak run org.gnome.SoftwareDevel
```
# Building locally
Software uses a number of plugins and depending on your operating system you
may want to disable or enable certain ones. For example on Fedora Silverblue
you'd want to disable the packagekit plugin as it wouldn't work. See the list
in `meson_options.txt` and use e.g. `-Dpackagekit=false` in the `meson` command
below.
Build locally with:
```
$ meson --prefix $PWD/install build/
$ ninja -C build/ all install
$ killall gnome-software
$ XDG_DATA_DIRS=install/share:$XDG_DATA_DIRS ./install/bin/gnome-software
# On Fedora, RHEL, etc:
$ XDG_DATA_DIRS=install/share:$XDG_DATA_DIRS LD_LIBRARY_PATH=install/lib64/:$LD_LIBRARY_PATH ./install/bin/gnome-software
# On Debian, Ubuntu, etc:
$ XDG_DATA_DIRS=install/share:$XDG_DATA_DIRS LD_LIBRARY_PATH=install/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH ./install/bin/gnome-software
```
## Default branch renamed to `main`
The default development branch of gnome-software has been renamed to `main`. To
update your local checkout, use:
```sh
git checkout master
git branch -m master main
git fetch
git branch --unset-upstream
git branch -u origin/main
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
```
# Debugging
Running with `--verbose` will give detailed logging information.
# Maintainers
Software is maintained by several co-maintainers, as listed in `gnome-software.doap`.
All changes to Software need to be reviewed by at least one co-maintainer (who
can’t review their own changes). Larger decisions need input from at least two
co-maintainers.
GNOME Software Release Notes
Write release entries:
git log --format="%s" --cherry-pick --right-only 3.36.0... | grep -i -v trivial | grep -v Merge | sort | uniq
Add any user visible changes into data/appdata/org.gnome.Software.appdata.xml.in
Generate NEWS file:
appstream-util appdata-to-news ../data/appdata/org.gnome.Software.appdata.xml.in > NEWS
git commit -a -m "Release version 3.36.1"
git tag -s 3.36.1 -m "==== Version 3.36.1 ===="
<enter password>
ninja-build dist
git push --tags
git push
scp meson-dist/*.tar.xz rhughes@master.gnome.org:
ssh rhughes@master.gnome.org
ftpadmin install gnome-software-*.tar.xz
Post release version bump in meson.build
git commit -a -m "trivial: Post release version bump"
git push
GNOME Software Release Notes
===
Release schedule
---
GNOME Software releases are done on the timetable set by the [GNOME release schedule](https://wiki.gnome.org/Schedule).
Maintainers take it in turns to make releases so that the load is spread out evenly.
Making a release
---
Adapted from the [GNOME release process](https://wiki.gnome.org/MaintainersCorner/Releasing).
These instructions use the following variables:
- `new_version`: the version number of the release you are making, for example 3.38.1
- `previous_version`: the version number of the most-recently released version in the same release series, for example 3.38.0
- `branch`: the branch which the release is based on, for example gnome-40 or main
- `key_id`: the ID of your GPG key, see the output of `gpg --list-keys` and the note at the end of this file
Make sure your repository is up to date and doesn’t contain local changes:
```
git pull
git status
```
Check the version in `meson.build` is correct for this release.
Download
[gitlab-changelog](https://gitlab.gnome.org/pwithnall/gitlab-changelog) and use
it to write release entries:
```
gitlab-changelog.py GNOME/gnome-software ${previous_version}..
```
Edit this down to just the user visible changes, and list them in
`data/metainfo/org.gnome.Software.metainfo.xml.in`. User visible changes are ones
which the average user might be interested to know about, such as a fix for an
impactful bug, a UI change, or a feature change.
You can get review of your metainfo changes from other co-maintainers if you wish.
Generate `NEWS` file:
```
appstreamcli metainfo-to-news ./data/metainfo/org.gnome.Software.metainfo.xml.in ./NEWS
```
Commit the release:
```
git add -p
git commit -m "Release version ${new_version}"
```
Build the release tarball:
```
# Only execute git clean if you don't have anything not tracked by git that you
# want to keep
git clean -dfx
meson --prefix $PWD/install -Dbuildtype=release -Dsoup2=true build/
ninja -C build/ dist
```
Tag, sign and push the release (see below for information about `git evtag`):
```
git evtag sign -u ${key_id} ${new_version}
git push --atomic origin ${branch} ${new_version}
```
To use a specific key add an option `-u ${keyid|email}` after the `sign` argument.
Use `Tag ${new_version} release` as the tag message.
Upload the release tarball:
```
scp build/meson-dist/gnome-software-${new_version}.tar.xz master.gnome.org:
ssh master.gnome.org ftpadmin install gnome-software-${new_version}.tar.xz
```
Add the release notes to GitLab and close the milestone:
- Go to https://gitlab.gnome.org/GNOME/gnome-software/-/releases/new?tag_name=${new_version}
- set `Release title` to `${new_version}`
- set the Milestone of the release, if such exists
- copy the Release notes for the new release from the `NEWS` file
(replace `~~~~~~~~~~~~` with `===` (only three `=`))
- in the Links section add:
| URL | Link title | Type |
| ------ | ------ | ------ |
| `https://download.gnome.org/sources/gnome-software/${new_major_version}/gnome-software-${new_version}.tar.xz` | Release tarball | Other |
| `https://download.gnome.org/sources/gnome-software/${new_major_version}/gnome-software-${new_version}.sha256sum` | Release tarball sha256sum | Other |
- save the changes with `Create release` button
- verify the added links for the release artifacts work
- Go to https://gitlab.gnome.org/GNOME/gnome-software/-/milestones/
choose the milestone and close it, as all issues and merge requests tagged
for this release should now be complete
Post release version bump in `meson.build`:
```
# edit meson.build, then
git commit -a -m "trivial: Post release version bump"
git push
```
`git-evtag`
---
Releases should be done with `git evtag` rather than `git tag`, as it provides
stronger security guarantees. See
[its documentation](https://github.com/cgwalters/git-evtag) for more details.
In particular, it calculates its checksum over all blobs reachable from the tag,
including submodules; and uses a stronger checksum than SHA-1.
You will need a GPG key for this, ideally which has been signed by others so
that it can be verified as being yours. However, even if your GPG key is
unsigned, using `git evtag` is still beneficial over using `git tag`.
[Deployment Featured Apps]
Selector=foocorp
Title=Featured by Foo Corp.
Title[it]=Presentato da Foo Corp.
%global glib2_version 2.61.1
%global gtk3_version 3.22.4
%global json_glib_version 1.2.0
%global json_glib_version 1.6.0
%global packagekit_version 1.1.1
%global appstream_glib_version 0.7.15
%global appstream_version 0.14.0
%global libsoup_version 2.52.0
%global gsettings_desktop_schemas_version 3.12.0
%global gnome_desktop_version 3.18.0
%global fwupd_version 1.2.10
%global flatpak_version 1.1.3
%global libxmlb_version 0.1.7
......@@ -28,14 +27,11 @@ BuildRequires: docbook-style-xsl
BuildRequires: desktop-file-utils
BuildRequires: fwupd-devel >= %{fwupd_version}
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gnome-desktop3-devel
BuildRequires: gnome-online-accounts-devel
BuildRequires: gsettings-desktop-schemas-devel >= %{gsettings_desktop_schemas_version}
BuildRequires: gspell-devel
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: gtk-doc
BuildRequires: json-glib-devel >= %{json_glib_version}
BuildRequires: libappstream-glib-devel >= %{appstream_glib_version}
BuildRequires: libappstream-devel >= %{appstream_version}
BuildRequires: libdnf-devel
BuildRequires: libsoup-devel
BuildRequires: libxmlb-devel >= %{libxmlb_version}
......@@ -47,21 +43,19 @@ BuildRequires: ostree-devel
BuildRequires: rpm-devel
BuildRequires: rpm-ostree-devel
BuildRequires: libgudev1-devel
BuildRequires: valgrind-devel
Requires: appstream-data
Requires: flatpak%{?_isa} >= %{flatpak_version}
Requires: flatpak-libs%{?_isa} >= %{flatpak_version}
Requires: fwupd%{?_isa} >= %{fwupd_version}
Requires: glib2%{?_isa} >= %{glib2_version}
Requires: gnome-desktop3%{?_isa} >= %{gnome_desktop_version}
# gnome-menus is needed for app folder .directory entries
Requires: gnome-menus%{?_isa}
Requires: gsettings-desktop-schemas%{?_isa} >= %{gsettings_desktop_schemas_version}
Requires: gtk3%{?_isa} >= %{gtk3_version}
Requires: json-glib%{?_isa} >= %{json_glib_version}
Requires: iso-codes
Requires: libappstream-glib%{?_isa} >= %{appstream_glib_version}
Requires: libappstream%{?_isa} >= %{appstream_version}
# librsvg2 is needed for gdk-pixbuf svg loader
Requires: librsvg2%{?_isa}
Requires: libsoup%{?_isa} >= %{libsoup_version}
......@@ -73,7 +67,8 @@ Obsoletes: gnome-software-snap < 3.33.1
Obsoletes: gnome-software-editor < 3.35.1
# this is not a library version
%define gs_plugin_version 13
%define gs_plugin_version 16
%define gs_plugin_dir %{_libdir}/gnome-software/plugins-%{gs_plugin_version}
%description
gnome-software is an application that makes it easy to add, remove
......@@ -116,7 +111,7 @@ This package includes the rpm-ostree backend.
%meson_install
# remove unneeded dpkg plugin
rm %{buildroot}%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_dpkg.so
rm %{buildroot}%{gs_plugin_dir}/libgs_plugin_dpkg.so
# make the software center load faster
desktop-file-edit %{buildroot}%{_datadir}/applications/org.gnome.Software.desktop \
......@@ -137,54 +132,40 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%doc AUTHORS README.md
%license COPYING
%{_bindir}/gnome-software
%{_datadir}/applications/gnome-software-local-file.desktop
%{_datadir}/applications/gnome-software-local-file-flatpak.desktop
%{_datadir}/applications/gnome-software-local-file-fwupd.desktop
%{_datadir}/applications/gnome-software-local-file-packagekit.desktop
%{_datadir}/applications/org.gnome.Software.desktop
%dir %{_datadir}/gnome-software
%{_datadir}/gnome-software/*.png
%{_mandir}/man1/gnome-software.1.gz
%{_datadir}/icons/hicolor/*/apps/org.gnome.Software.svg
%{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Software-symbolic.svg
%{_datadir}/icons/hicolor/scalable/status/software-installed-symbolic.svg
%{_datadir}/gnome-software/featured-*.svg
%{_datadir}/gnome-software/featured-*.jpg
%{_datadir}/metainfo/org.gnome.Software.appdata.xml
%{_datadir}/metainfo/org.gnome.Software.metainfo.xml
%{_datadir}/metainfo/org.gnome.Software.Plugin.Epiphany.metainfo.xml
%{_datadir}/metainfo/org.gnome.Software.Plugin.Flatpak.metainfo.xml
%{_datadir}/metainfo/org.gnome.Software.Plugin.Fwupd.metainfo.xml
%{_datadir}/metainfo/org.gnome.Software.Plugin.Odrs.metainfo.xml
%dir %{_libdir}/gs-plugins-%{gs_plugin_version}
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_appstream.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_desktop-categories.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_desktop-menu-path.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_dummy.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fedora-langpacks.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fedora-pkgdb-collections.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_flatpak.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_fwupd.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_generic-updates.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-blacklist.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_hardcoded-popular.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_icons.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_key-colors-metadata.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_key-colors.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_modalias.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_odrs.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_os-release.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-history.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-local.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-offline.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-proxy.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-refine-repos.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-refine.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-refresh.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-upgrade.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit-url-to-app.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_packagekit.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_provenance-license.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_provenance.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_repos.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_rewrite-resource.so
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_systemd-updates.so
%{_sysconfdir}/xdg/autostart/gnome-software-service.desktop
%dir %{gs_plugin_dir}
%{gs_plugin_dir}/libgs_plugin_appstream.so
%{gs_plugin_dir}/libgs_plugin_dummy.so
%{gs_plugin_dir}/libgs_plugin_epiphany.so
%{gs_plugin_dir}/libgs_plugin_fedora-langpacks.so
%{gs_plugin_dir}/libgs_plugin_fedora-pkgdb-collections.so
%{gs_plugin_dir}/libgs_plugin_flatpak.so
%{gs_plugin_dir}/libgs_plugin_fwupd.so
%{gs_plugin_dir}/libgs_plugin_generic-updates.so
%{gs_plugin_dir}/libgs_plugin_hardcoded-blocklist.so
%{gs_plugin_dir}/libgs_plugin_icons.so
%{gs_plugin_dir}/libgs_plugin_modalias.so
%{gs_plugin_dir}/libgs_plugin_os-release.so
%{gs_plugin_dir}/libgs_plugin_packagekit.so
%{gs_plugin_dir}/libgs_plugin_provenance-license.so
%{gs_plugin_dir}/libgs_plugin_provenance.so
%{gs_plugin_dir}/libgs_plugin_repos.so
%{gs_plugin_dir}/libgs_plugin_rewrite-resource.so
%{_sysconfdir}/xdg/autostart/org.gnome.Software.desktop
%{_datadir}/app-info/xmls/org.gnome.Software.Featured.xml
%{_datadir}/dbus-1/services/org.freedesktop.PackageKit.service
%{_datadir}/dbus-1/services/org.gnome.Software.service
......@@ -195,7 +176,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%{_libexecdir}/gnome-software-restarter
%files rpm-ostree
%{_libdir}/gs-plugins-%{gs_plugin_version}/libgs_plugin_rpm-ostree.so
%{gs_plugin_dir}/libgs_plugin_rpm-ostree.so
%files devel
%{_libdir}/pkgconfig/gnome-software.pc
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2016 Richard Hughes <richard@hughsie.com>
*
* Licensed under the GNU General Public License Version 2
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <gnome-software.h>
/*
* Compile and install with:
*
gcc -shared -o libgs_plugin_example.so gs-plugin-example.c -fPIC \
`pkg-config --libs --cflags gnome-software` \
-DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE &&
sudo cp libgs_plugin_example.so `pkg-config gnome-software --variable=plugindir`
*/
void
gs_plugin_initialize (GsPlugin *plugin)
{
gs_plugin_add_rule (plugin, GS_PLUGIN_RULE_RUN_BEFORE, "appstream");
}
gboolean
gs_plugin_add_search (GsPlugin *plugin,
gchar **values,
GsAppList *list,
GCancellable *cancellable,
GError **error)
{
guint i;
for (i = 0; values[i] != NULL; i++) {
if (g_strcmp0 (values[i], "fotoshop") == 0) {
g_autoptr(GsApp) app = gs_app_new ("gimp.desktop");
gs_app_add_quirk (app, GS_APP_QUIRK_IS_WILDCARD);
gs_app_list_add (list, app);
}
}
return TRUE;
}