Skip to content

Commit a38eb17

Browse files
committed
Merge branch 'bbhtt/libglnx-subtree-2'
2 parents 4e23835 + 7ba88e0 commit a38eb17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+9369
-4
lines changed

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Changes in 1.5.0
33

44
TBD
55

6+
* Drop libglnx submodule and convert it to a subtree
67
* Drop autotools, the project now only supports building with meson
78
* Prevent writing duplicate groups to metadata file
89
* Disable all filesystem access in flatpak-builder --run sandbox

subprojects/libglnx

Lines changed: 0 additions & 1 deletion
This file was deleted.

subprojects/libglnx/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2015 Colin Walters
2+
# SPDX-License-Identifier: LGPL-2.1-or-later
3+
4+
# A path ostree writes to work around automake bug with
5+
# subdir-objects
6+
Makefile-libglnx.am.inc
7+
8+
libglnx-config.h
9+
10+
# Some standard bits
11+
.deps
12+
.libs
13+
.dirstamp
14+
*.typelib
15+
*.la
16+
*.lo
17+
*.o
18+
*.pyc
19+
*.stamp
20+
*~
21+

subprojects/libglnx/.gitlab-ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright 2019 Endless OS Foundation LLC
2+
# SPDX-License-Identifier: LGPL-2.0-or-later
3+
4+
image: registry.fedoraproject.org/fedora:30
5+
6+
stages:
7+
- build
8+
9+
before_script:
10+
- dnf install -y gcc git meson ninja-build "pkgconfig(gio-2.0)" "pkgconfig(gio-unix-2.0)" "pkgconfig(glib-2.0)" xz
11+
12+
build:
13+
stage: build
14+
script:
15+
- meson _build .
16+
- ninja -C _build
17+
- meson test -C _build
18+
# Run it again! This previously did not work.
19+
- meson test -C _build
20+
# Ensure that we can build as a subproject
21+
- rm -fr _build/meson-dist
22+
- meson dist -C _build
23+
- mkdir -p tests/use-as-subproject/subprojects/libglnx
24+
- tar --strip-components=1 -C tests/use-as-subproject/subprojects/libglnx -xf _build/meson-dist/*.tar.xz
25+
- meson tests/use-as-subproject/_build tests/use-as-subproject
26+
- ninja -C tests/use-as-subproject/_build
27+
- meson test -C tests/use-as-subproject/_build
28+
artifacts:
29+
when: on_failure
30+
name: "libglnx-${CI_COMMIT_REF_NAME}-${CI_JOB_NAME}"
31+
paths:
32+
- "${CI_PROJECT_DIR}/_build/meson-logs"
33+
34+
reuse:
35+
stage: build
36+
image:
37+
name: fsfe/reuse:latest
38+
entrypoint: [""]
39+
before_script: []
40+
script:
41+
- reuse lint

subprojects/libglnx/COPYING

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This project's licensing is REUSE-compliant <https://reuse.software/>.
2+
See individual files for full details of copyright and licensing,
3+
and see LICENSES/*.txt for the license text.

subprojects/libglnx/LICENSES/LGPL-2.0-or-later.txt

Lines changed: 174 additions & 0 deletions
Large diffs are not rendered by default.

subprojects/libglnx/LICENSES/LGPL-2.1-or-later.txt

Lines changed: 502 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
This work is provided "as is"; redistribution and modification
2+
in whole or in part, in any medium, physical or electronic is
3+
permitted without restriction.
4+
5+
This work is distributed in the hope that it will be useful,
6+
but WITHOUT ANY WARRANTY; without even the implied warranty of
7+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
8+
9+
In no event shall the authors or contributors be liable for any
10+
direct, indirect, incidental, special, exemplary, or consequential
11+
damages (including, but not limited to, procurement of substitute
12+
goods or services; loss of use, data, or profits; or business
13+
interruption) however caused and on any theory of liability, whether
14+
in contract, strict liability, or tort (including negligence or
15+
otherwise) arising in any way out of the use of this software, even
16+
if advised of the possibility of such damage.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Copyright (C) 2015 Colin Walters <walters@verbum.org>
2+
# SPDX-License-Identifier: LGPL-2.0-or-later
3+
#
4+
# This library is free software; you can redistribute it and/or
5+
# modify it under the terms of the GNU Lesser General Public
6+
# License as published by the Free Software Foundation; either
7+
# version 2 of the License, or (at your option) any later version.
8+
#
9+
# This library is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
# Lesser General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Lesser General Public
15+
# License along with this library; if not, write to the
16+
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17+
# Boston, MA 02111-1307, USA.
18+
19+
EXTRA_DIST += \
20+
$(libglnx_srcpath)/README.md \
21+
$(libglnx_srcpath)/COPYING \
22+
$(libglnx_srcpath)/LICENSES/LGPL-2.0-or-later.txt \
23+
$(libglnx_srcpath)/LICENSES/LGPL-2.1-or-later.txt \
24+
$(libglnx_srcpath)/libglnx.m4 \
25+
$(NULL)
26+
27+
BUILT_SOURCES += $(top_builddir)/libglnx-config.h
28+
CLEANFILES += $(top_builddir)/libglnx-config.h
29+
$(top_builddir)/libglnx-config.h: Makefile.am
30+
echo '#include "config.h"' > $@
31+
32+
libglnx_la_SOURCES = \
33+
$(libglnx_srcpath)/glnx-macros.h \
34+
$(libglnx_srcpath)/glnx-backport-autocleanups.h \
35+
$(libglnx_srcpath)/glnx-backport-autoptr.h \
36+
$(libglnx_srcpath)/glnx-backport-testutils.h \
37+
$(libglnx_srcpath)/glnx-backport-testutils.c \
38+
$(libglnx_srcpath)/glnx-backports.h \
39+
$(libglnx_srcpath)/glnx-backports.c \
40+
$(libglnx_srcpath)/glnx-local-alloc.h \
41+
$(libglnx_srcpath)/glnx-local-alloc.c \
42+
$(libglnx_srcpath)/glnx-errors.h \
43+
$(libglnx_srcpath)/glnx-errors.c \
44+
$(libglnx_srcpath)/glnx-console.h \
45+
$(libglnx_srcpath)/glnx-console.c \
46+
$(libglnx_srcpath)/glnx-dirfd.h \
47+
$(libglnx_srcpath)/glnx-dirfd.c \
48+
$(libglnx_srcpath)/glnx-fdio.h \
49+
$(libglnx_srcpath)/glnx-fdio.c \
50+
$(libglnx_srcpath)/glnx-lockfile.h \
51+
$(libglnx_srcpath)/glnx-lockfile.c \
52+
$(libglnx_srcpath)/glnx-missing-syscall.h \
53+
$(libglnx_srcpath)/glnx-missing.h \
54+
$(libglnx_srcpath)/glnx-xattrs.h \
55+
$(libglnx_srcpath)/glnx-xattrs.c \
56+
$(libglnx_srcpath)/glnx-shutil.h \
57+
$(libglnx_srcpath)/glnx-shutil.c \
58+
$(libglnx_srcpath)/libglnx.h \
59+
$(libglnx_srcpath)/tests/libglnx-testlib.h \
60+
$(NULL)
61+
62+
libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir)
63+
libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic
64+
libglnx_la_LIBADD = $(libglnx_libs)
65+
66+
libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil
67+
TESTS += $(libglnx_tests)
68+
69+
libglnx_testlib_sources = $(libglnx_srcpath)/tests/libglnx-testlib.c
70+
71+
check_PROGRAMS += $(libglnx_tests)
72+
test_libglnx_xattrs_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-xattrs.c
73+
test_libglnx_xattrs_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
74+
test_libglnx_xattrs_LDADD = $(libglnx_libs) libglnx.la
75+
76+
test_libglnx_fdio_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-fdio.c
77+
test_libglnx_fdio_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
78+
test_libglnx_fdio_LDADD = $(libglnx_libs) libglnx.la
79+
80+
test_libglnx_errors_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-errors.c
81+
test_libglnx_errors_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
82+
test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la
83+
84+
test_libglnx_macros_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-macros.c
85+
test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
86+
test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la
87+
88+
test_libglnx_shutil_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-shutil.c
89+
test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
90+
test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la

0 commit comments

Comments
 (0)