Skip to content

Commit

Permalink
create gnome-desktop (44.1-1) unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
Woomeeme committed Dec 19, 2024
1 parent a8e272f commit 64b57e7
Show file tree
Hide file tree
Showing 356 changed files with 155,938 additions and 26 deletions.
117 changes: 117 additions & 0 deletions .ci/check-abi
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/usr/bin/python3


import argparse
import contextlib
import os
import shutil
import subprocess
import sys


def format_title(title):
box = {
'tl': '╔', 'tr': '╗', 'bl': '╚', 'br': '╝', 'h': '═', 'v': '║',
}
hline = box['h'] * (len(title) + 2)

return '\n'.join([
f"{box['tl']}{hline}{box['tr']}",
f"{box['v']} {title} {box['v']}",
f"{box['bl']}{hline}{box['br']}",
])


def rm_rf(path):
try:
shutil.rmtree(path)
except FileNotFoundError:
pass


def sanitize_path(name):
return name.replace('/', '-')


def get_current_revision():
revision = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
encoding='utf-8').strip()

if revision == 'HEAD':
# This is a detached HEAD, get the commit hash
revision = subprocess.check_output(['git', 'rev-parse', 'HEAD']).strip().decode('utf-8')

return revision


@contextlib.contextmanager
def checkout_git_revision(revision):
current_revision = get_current_revision()
subprocess.check_call(['git', 'checkout', '-q', revision])

try:
yield
finally:
subprocess.check_call(['git', 'checkout', '-q', current_revision])


def build_install(revision):
build_dir = '_build'
dest_dir = os.path.abspath(sanitize_path(revision))
print(format_title(f'# Building and installing {revision} in {dest_dir}'),
end='\n\n', flush=True)

with checkout_git_revision(revision):
rm_rf(build_dir)
rm_rf(revision)

subprocess.check_call(['meson', 'setup', build_dir,
'--prefix=/usr', '--libdir=lib',
'-Ddesktop_docs=false',
'-Ddebug_tools=false',
'-Dudev=disabled',
'-Dbuild_gtk4=false'])
subprocess.check_call(['ninja', '-v', '-C', build_dir])
subprocess.check_call(['ninja', '-v', '-C', build_dir, 'install'],
env={'DESTDIR': dest_dir})

return dest_dir


def compare(old_tree, new_tree):
print(format_title(f'# Comparing the two ABIs'), end='\n\n', flush=True)

old_headers = os.path.join(old_tree, 'usr', 'include')
old_lib = os.path.join(old_tree, 'usr', 'lib', 'libgnome-desktop-3.so')

new_headers = os.path.join(new_tree, 'usr', 'include')
new_lib = os.path.join(new_tree, 'usr', 'lib', 'libgnome-desktop-3.so')

subprocess.check_call([
'abidiff', '--headers-dir1', old_headers, '--headers-dir2', new_headers,
'--drop-private-types', '--fail-no-debug-info', '--no-added-syms', old_lib, new_lib])


if __name__ == '__main__':
parser = argparse.ArgumentParser()

parser.add_argument('old', help='the previous revision, considered the reference')
parser.add_argument('new', help='the new revision, to compare to the reference')

args = parser.parse_args()

if args.old == args.new:
print("Let's not waste time comparing something to itself")
sys.exit(0)

old_tree = build_install(args.old)
new_tree = build_install(args.new)

try:
compare(old_tree, new_tree)

except Exception:
sys.exit(1)

print(f'Hurray! {args.old} and {args.new} are ABI-compatible!')

63 changes: 63 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml

image: fedora:latest

variables:
LAST_ABI_BREAK: 0da1fcac914ad4c67f016bda7864c4b153cbfbaa
DEPENDENCIES: gtk3-devel gtk4-devel gsettings-desktop-schemas-devel gettext
gtk-doc libxkbcommon-devel xkeyboard-config-devel itstool
gobject-introspection-devel systemd-devel iso-codes-devel
libseccomp-devel gcc gcc-c++ glibc-devel
meson redhat-rpm-config
TEST_DEPENDENCIES: gnome-desktop-testing xorg-x11-server-Xvfb glibc-langpack-en glibc-langpack-he glibc-langpack-ja abattis-cantarell-fonts libabigail git

build_stable:
before_script:
# Undo delangification present in the Fedora Docker images
- rm -f /etc/rpm/macros.image-language-conf
- echo "reinstall glib2" >> translist.txt
# Work-around https://bugzilla.redhat.com/show_bug.cgi?id=1607172#c4
- echo "update dnf gdbm" >> translist.txt
- echo "remove python3-modulemd" >> translist.txt
- dnf shell -y --nogpgcheck translist.txt
- dnf update -y --nogpgcheck
- dnf install -y --nogpgcheck $DEPENDENCIES
- dnf install -y --nogpgcheck $TEST_DEPENDENCIES
script:
- meson --prefix=/usr -Dinstalled_tests=true build
- pushd build
- ninja
- ninja install
- ninja dist
- G_MESSAGES_DEBUG=all xvfb-run -a -s "-screen 0 1024x768x24" ninja test
- G_MESSAGES_DEBUG=all xvfb-run -a -s "-screen 0 1024x768x24"
gnome-desktop-testing-runner --report-directory=test-results gnome-desktop
- popd
- .ci/check-abi ${LAST_ABI_BREAK} $(git rev-parse HEAD)
artifacts:
paths:
- build/meson-logs/
- build/test-results/
when: on_failure
paths:
- build/meson-dist/
when: on_success

do_gitlab_release:
stage: deploy
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo 'Running release_job'
release:
tag_name: '$CI_COMMIT_TAG'
description: 'See NEWS file'
Empty file added .gitmodules
Empty file.
19 changes: 19 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
libgnome-desktop authors
------------------------

Elliot Lee <sopwith@redhat.com>
George Lebl <jirka@5z.com>
John Ellis <johne@bellatlantic.net>
Havoc Pennington <hp@redhat.com>
Vincent Untz <vuntz@gnome.org>
Federico Mena Quintero <federico@gnome.org>

new gnome-about authors
-----------------------

Guillaume Seguin <guillaume@segu.in>
Vincent Untz <vuntz@gnome.org>

original gnome-about authors
----------------------------
Anders Carlsson <andersca@gnu.org>
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Please don't report issues against gnome-desktop unless you really know what
you're doing. This repository contains the libgnome-desktop library. It's not
the right place to report bugs affecting GNOME's desktop.

[Report desktop bugs here instead.](https://gitlab.gnome.org/GNOME/gnome-shell/issues)
Loading

0 comments on commit 64b57e7

Please sign in to comment.