Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Plugin/xfconf #4396

Merged
merged 82 commits into from
Jan 2, 2023
Merged

Plugin/xfconf #4396

merged 82 commits into from
Jan 2, 2023

Conversation

eiskasten
Copy link
Contributor

@eiskasten eiskasten commented Jun 22, 2022

Basics

  • Short descriptions of your changes are in the release notes
    (added as entry in doc/news/_preparation_next_release.md which
    contains _(my name)_)
    Please always add something to the release notes.
  • Details of what you changed are in commit messages
    (first line should have module: short statement syntax)
  • References to issues, e.g. close #X, are in the commit messages.
  • The buildservers are happy. If not, fix in this order:
    • add a line in doc/news/_preparation_next_release.md
    • reformat the code with scripts/dev/reformat-all
    • make all unit tests pass
    • fix all memleaks
  • The PR is rebased with current master.

Checklist

  • I added unit tests for my code
  • I fully described what my PR does in the documentation
    (not in the PR description)
  • I fixed all affected documentation
  • I added code comments, logging, and assertions as appropriate (see Coding Guidelines)
  • I updated all meta data (e.g. README.md of plugins and METADATA.ini)
  • I mentioned every code not directly written by me in reuse syntax

Review

Labels

  • Add the "work in progress" label if you do not want the PR to be reviewed yet.
  • Add the "ready to merge" label if the basics are fulfilled and no further pushes are planned by you.

GError * err = NULL;
if (xfconf_init (&err))
{
ELEKTRA_LOG_DEBUG ("succeed initielize xfconf\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialize

# Backup-and-Restore: user:/tests/xfconf

# mount the xfwm channel
kdb mount /dev/null /test/xfwm xfconf "channel=xfwm4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plugin also needs new-backend and new-style mounting. Let us discuss this later in the meeting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I realized it is the same issue as for @flo91 has with the relational database backend

@eiskasten
Copy link
Contributor Author

I ran into an issue regarding the macOS images: xfconf is only available for macOS through macports but not homebrew so I wonder what am I supposed to do. I see multiple options:

  • I could install macports on the images and then install xfconf
  • I could exclude the xfconf-plugin from the cirrus file in the macOS images
  • I could build xfconf for the macOS images from scratch (maybe I could just curl the macports port for xfconf and build it manually if macports work the similar to the BSD ports)

Another problem I ran into is regarding the FreeBSD images: all of them refuse linking the xfconf-plugin and I am not able to recognize the exact problem here. I have installed xfconf on the FreeBSD images. Before doing that the images threw a compilation error which tells me that the FreeBSD images are able to find the xfconf library at least kind of in some cases. Here is the error log regarding the linking process:

[481/965] Linking C shared module lib/libelektra-xfconf.so
FAILED: lib/libelektra-xfconf.so 
: && /usr/local/bin/clang12 -fPIC -std=c11  -Wno-deprecated-declarations  -Wstrict-prototypes -Werror -Wno-long-long -Wpedantic -Wno-variadic-macros -Wall -Wextra -Wno-overlength-strings -Wsign-compare -Wfloat-equal -Wformat -Wformat-security -Wshadow -Wcomments -Wtrigraphs -Wundef -Wuninitialized -Winit-self -Wsign-compare -Wfloat-equal -O2 -g -DNDEBUG  -Wl,--version-script=/tmp/cirrus-ci-build/src/plugins/plugin-symbols.map -shared  -o lib/libelektra-xfconf.so src/plugins/xfconf/CMakeFiles/elektra-xfconf.dir/xfconf.c.o  -Wl,-rpath,/tmp/cirrus-ci-build/build/lib:  lib/libelektra-plugin.so.0.9.10  lib/libelektra-ease.so.0.9.10  -lxfconf-0  -lgio-2.0  -lgobject-2.0  -lglib-2.0  -lintl  lib/libelektra-core.so.0.9.10 && :
ld: error: unable to find library -lxfconf-0
ld: error: unable to find library -lgio-2.0
ld: error: unable to find library -lgobject-2.0
ld: error: unable to find library -lglib-2.0
ld: error: unable to find library -lintl
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I would be glad about any suggestions.

@markus2330
Copy link
Contributor

I could exclude the xfconf-plugin from the cirrus file in the macOS images

Sounds sensible. Using XFCE under macOS is probably a rare thing. Without actually testing if the macports xfce even works it would be a waste of (CPU) time doing regression checks.

FreeBSD

Sounds like linker path is incomplete. Where are these files (xfconf-0*.so etc.)?

@eiskasten
Copy link
Contributor Author

I could exclude the xfconf-plugin from the cirrus file in the macOS images

Sounds sensible. Using XFCE under macOS is probably a rare thing. Without actually testing if the macports xfce even works it would be a waste of (CPU) time doing regression checks.

That is right, so I will exclude it.

FreeBSD

Sounds like linker path is incomplete. Where are these files (xfconf-0*.so etc.)?

Using pkg on my local FreeBSD 13 machine they are located in the ports library directory

ls -l /usr/local/lib/*xfconf*

prints

lrwxr-xr-x  1 root  wheel      20 Jul  3 11:01 /usr/local/lib/libxfconf-0.so -> libxfconf-0.so.3.0.0
lrwxr-xr-x  1 root  wheel      20 Jul  3 11:01 /usr/local/lib/libxfconf-0.so.3 -> libxfconf-0.so.3.0.0
-rwxr-xr-x  1 root  wheel  107256 Jul  3 11:01 /usr/local/lib/libxfconf-0.so.3.0.0

@markus2330
Copy link
Contributor

Weird, /usr/local/lib is in the linker path and ldconfig was executed?

What does pkg-config --cflags libxfconf-0 say on that system?

Is something in the CMake error logs?

@eiskasten
Copy link
Contributor Author

Weird, /usr/local/lib is in the linker path and ldconfig was executed?

grep ldconfig cmake-build/CMakeFiles/CMakeOutput.log prints nothing, so I guess it is not the case?
As ldconfig -r | grep xfconf prints 172:-lxfconf-0.3 => /usr/local/lib/libxfconf-0.so.3 I assume the missing execution of ldconfig is the reason but how can I change that?

What does pkg-config --cflags libxfconf-0 say on that system?

-I/usr/local/include/xfce4/xfconf-0 -I/usr/local/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -pthread

Is something in the CMake error logs?

Nothing useful for this issue. Unfortunately, I am unable to build it on my local FreeBSD machine too because of:

[2/146] Linking C executable bin/testmod_iconv
FAILED: bin/testmod_iconv 
: && /usr/bin/cc -std=gnu99  -Wno-deprecated-declarations  -Wstrict-prototypes  -Wno-long-long -Wpedantic -Wno-variadic-macros -Wall -Wextra -Wno-overlength-strings -Wsign-compare -Wfloat-equal -Wformat -Wformat-security -Wshadow -Wcomments -Wtrigraphs -Wundef -Wuninitialized -Winit-self -Wsign-compare -Wfloat-equal -O2 -g -DNDEBUG  tests/cframework/CMakeFiles/cframework.dir/tests.c.o src/plugins/iconv/CMakeFiles/elektra-iconv-objects.dir/iconv.c.o src/plugins_tests/CMakeFiles/testmod_iconv.dir/iconv/testmod_iconv.c.o -o bin/testmod_iconv  -Wl,-rpath,/home/richi/libelektra/cmake-build/lib:  lib/libelektra-kdb.so.0.9.10  lib/libelektra-plugin.so.0.9.10  -lc  lib/libelektra-core.so.0.9.10 && :
ld: error: undefined symbol: libiconv_open
>>> referenced by iconv.c:0 (/home/richi/libelektra/src/plugins/iconv/iconv.c:0)
>>>               src/plugins/iconv/CMakeFiles/elektra-iconv-objects.dir/iconv.c.o:(kdbbUTF8Engine)

ld: error: undefined symbol: libiconv
>>> referenced by iconv.c:123 (/home/richi/libelektra/src/plugins/iconv/iconv.c:123)
>>>               src/plugins/iconv/CMakeFiles/elektra-iconv-objects.dir/iconv.c.o:(kdbbUTF8Engine)

ld: error: undefined symbol: libiconv_close
>>> referenced by iconv.c:0 (/home/richi/libelektra/src/plugins/iconv/iconv.c:0)
>>>               src/plugins/iconv/CMakeFiles/elektra-iconv-objects.dir/iconv.c.o:(kdbbUTF8Engine)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
[4/146] Linking C executable bin/testmod_filecheck
FAILED: bin/testmod_filecheck 
: && /usr/bin/cc -std=gnu99  -Wno-deprecated-declarations  -Wstrict-prototypes  -Wno-long-long -Wpedantic -Wno-variadic-macros -Wall -Wextra -Wno-overlength-strings -Wsign-compare -Wfloat-equal -Wformat -Wformat-security -Wshadow -Wcomments -Wtrigraphs -Wundef -Wuninitialized -Winit-self -Wsign-compare -Wfloat-equal -O2 -g -DNDEBUG  tests/cframework/CMakeFiles/cframework.dir/tests.c.o src/plugins/filecheck/CMakeFiles/elektra-filecheck-objects.dir/filecheck.c.o src/plugins_tests/CMakeFiles/testmod_filecheck.dir/filecheck/testmod_filecheck.c.o -o bin/testmod_filecheck  -Wl,-rpath,/home/richi/libelektra/cmake-build/lib:  lib/libelektra-kdb.so.0.9.10  lib/libelektra-plugin.so.0.9.10  -lc  lib/libelektra-core.so.0.9.10 && :
ld: error: undefined symbol: libiconv_open
>>> referenced by filecheck.c:0 (/home/richi/libelektra/src/plugins/filecheck/filecheck.c:0)
>>>               src/plugins/filecheck/CMakeFiles/elektra-filecheck-objects.dir/filecheck.c.o:(checkFile)

ld: error: undefined symbol: libiconv
>>> referenced by filecheck.c:188 (/home/richi/libelektra/src/plugins/filecheck/filecheck.c:188)
>>>               src/plugins/filecheck/CMakeFiles/elektra-filecheck-objects.dir/filecheck.c.o:(checkFile)

ld: error: undefined symbol: libiconv_close
>>> referenced by filecheck.c:301 (/home/richi/libelektra/src/plugins/filecheck/filecheck.c:301)
>>>               src/plugins/filecheck/CMakeFiles/elektra-filecheck-objects.dir/filecheck.c.o:(checkFile)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
[7/146] Linking C executable bin/testmod_ni
ninja: build stopped: subcommand failed.

despite iconv-2.0_5 and libiconv-1.16 being installed on that system.

@eiskasten
Copy link
Contributor Author

I managed to reproduce the same error on my local FreeBSD machine. I let clang output the ld invocation which was:
"/usr/local/llvm12/bin/ld" --eh-frame-hdr -Bshareable --hash-style=both --enable-new-dtags -o lib/libelektra-xfconf.so /usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/lib --version-script=/home/richi/libelektra/src/plugins/plugin-symbols.map src/plugins/xfconf/CMakeFiles/elektra-xfconf.dir/xfconf.c.o -rpath /home/richi/libelektra/cmake-build/lib: lib/libelektra-plugin.so.0.9.10 lib/libelektra-ease.so.0.9.10 -lxfconf-0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl lib/libelektra-core.so.0.9.10 -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtendS.o /usr/lib/crtn.o. However, I wondered why -L/usr/local/lib was not included as a parameter which is quite important for FreeBSD - when I invoke the linker manually and add this parameter, ld does not fail anymore. Do you have any suggestions how to add /usr/local/lib to the linker path (globally)? I am wondering how it was possible for other plugins to pass the FreeBSD stages whose libraries are located at /usr/local/lib such as yajl or yaml.

@markus2330
Copy link
Contributor

Please disable your plugin/binding if PkgConfig is not found (see e.g. src/bindings/gsettings/CMakeLists.txt). As you probably want to reuse the xfconf detection code, it also makes sense to create a xfconf module in scripts/cmake/Modules/. First check if something like this was already written by someone else, this might actually solve the whole problem we face, as this module might work perfectly with FreeBSD.

If it does not help: There is probably some FreeBSD-specific solution I do not know. In two modules (scripts/cmake/Modules/FindLibJWT.cmake and FindMySqlCppConn.cmake ) we have /usr/local/lib in PATHS of find_library (this would be an alternative way not using pkgconfig). But as many other modules also seem to work for you, this might not be needed. I also would need a local FreeBSD setup to find out the differences of why also other modules link correctly (if they do?).

@eiskasten
Copy link
Contributor Author

Please disable your plugin/binding if PkgConfig is not found (see e.g. src/bindings/gsettings/CMakeLists.txt). As you probably want to reuse the xfconf detection code, it also makes sense to create a xfconf module in scripts/cmake/Modules/. First check if something like this was already written by someone else, this might actually solve the whole problem we face, as this module might work perfectly with FreeBSD.

Thank you for the tip. I created a cmake module for xfconf based on scripts/cmake/Modules/FindLibJWT.cmake.
It now works and pkgconfig is no longer required. The FreeBSD stages are still failing but at least they are now able to build the project.

@eiskasten
Copy link
Contributor Author

Now, the FreeBSD machines throw /usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found during the run_all target. I can find

  • examples/codegen/tree/src/application.c
  • examples/codegen/econf/src/application.c
  • examples/codegen/menu/src/application.c
  • examples/external/pkgconfig/application.c
  • examples/external/cmake/application.c
  • examples/highlevel/pkgconfig/application.c
  • examples/highlevel/cmake/application.c
    within the project, but after building, I cannot find the application binary anywhere on my local machine. It seems to me that it does not get compiled. Do you know something about that?

@markus2330
Copy link
Contributor

We probably need build logs to find anything out about it. Imho it is a bug, it should be possible to build test cases which cannot be run afterwards.

@kodebach Do you have an idea?

@kodebach
Copy link
Member

Looks like the codegen-based examples cannot be built. The build logs also show

/bin/sh: gcc: not found

So I guess that's the issue. No idea why it would've worked before, but not now.

@markus2330
Copy link
Contributor

Looks like gcc is hardcoded somewhere where actually the compiler detected by cmake should be used.

@kodebach
Copy link
Member

detected by cmake

This was in one of the pkgconfig examples that should run without CMake. But maybe replacing gcc with just cc works.

@markus2330
Copy link
Contributor

In doc/TESTING.md we actually require gcc to be installed. This is probably only because of pythongen, which should be removed anyway.

The proper C compiler is "CMAKE_C_COMPILER" (or CMAKE_CXX_COMPILER for C++), not cc, which we do not require to exist (see doc/TESTING.md).

@eiskasten
Copy link
Contributor Author

I still have this issue with freebsd and I compared the output from the ci log of this PR with the current master (this PR is ahead of master). The first difference I can find is:

ELEKTRA CHECK EXTERNAL EXAMPLE
/usr/local/bin/pkg-config
Check if script tests the correct version
Testing build with cmake
realpath: /usr/local/lib/elektra/tool_exec/../../scripts/cmake/Elektra: No such file or directory
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

May this be the root cause of the problem? If yes, does anybody know how to generate /usr/local/lib/elektra/tool_exec/../../scripts/cmake/Elektra?

@markus2330
Copy link
Contributor

I still have this issue with freebsd and I compared the output from the ci log of this PR with the current master (this PR is ahead of master). The first difference I can find is:

I think this is a different problem. I wonder why this test is even executed in the installed Elektra?

cmake ../cmake -DElektra_DIR:PATH="$(realpath $(dirname $0)/../../scripts/cmake/Elektra)"

But your approach sounds promising: which other differences are there?

@kodebach
Copy link
Member

I think this is related #2523. The test in question is one of the ones in tests/shell/external. Those tests only work with an installed version of Elektra.

@eiskasten
Copy link
Contributor Author

eiskasten commented Oct 19, 2022

But your approach sounds promising: which other differences are there?

This is the complete output what this branch produces but not the master.

Click to expand
ELEKTRA CHECK EXTERNAL EXAMPLE
/usr/local/bin/pkg-config
Check if script tests the correct version
Testing build with cmake
realpath: /usr/local/lib/elektra/tool_exec/../../scripts/cmake/Elektra: No such file or directory
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Elektra 0.9.11 found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cirrus-ci-build/examples/external/build
[ 50%] Building C object CMakeFiles/application.dir/application.c.o
[100%] Linking C executable application
[100%] Built target application
Did not find the key
Did not find the key
Create a new key system:/test/myapp/key with string "Hello World"
Hello World
Hello World
Create a new key user:/test/myapp/key with string "More world"
More world
More world
Did not find the key
Did not find the key
Create a new key system:/test/myapp/key with string "Hello World"
Hello World
Hello World
Create a new key user:/test/myapp/key with string "More world"
More world
More world
Testing build with pkgconfig
gcc application.c `pkg-config --cflags --libs elektra` -o application -Wl,-rpath `pkg-config --variable=libdir elektra`
/bin/sh: gcc: not found
*** Error code 127
Stop.
make: stopped in /tmp/cirrus-ci-build/examples/external/pkgconfig
error: could not build pkgconfig project
Did not find the key
Did not find the key
Create a new key system:/test/myapp/key with string "Hello World"
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
error: application did not output Hello World
Create a new key user:/test/myapp/key with string "More world"
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
error: application did not prefer user:/test/myapp/key with More world
Did not find the key
Did not find the key
Create a new key system:/test/myapp/key with string "Hello World"
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
error: application did not output Hello World
Create a new key user:/test/myapp/key with string "More world"
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
/usr/local/lib/elektra/tool_exec/check_external_example: ./application: not found
error: application did not prefer user:/test/myapp/key with More world
rm: application: No such file or directory
check_external_example RESULTS: 21 test(s) done 5 error(s).
error: check_external_example
Running check_external_example_codegen_econf
ELEKTRA CHECK EXTERNAL CODEGEN ECONF
/usr/local/bin/pkg-config
Check if script tests the correct version
Testing build with cmake
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Elektra 0.9.11 found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cirrus-ci-build/examples/codegen/econf/build
[ 25%] Generating genelektra.c, genelektra.h, genelektra.mount.sh
[ 50%] Building C object CMakeFiles/application.dir/tmp/cirrus-ci-build/examples/codegen/econf/src/application.c.o
[ 75%] Building C object CMakeFiles/application.dir/genelektra.c.o
[100%] Linking C executable application
[100%] Built target application
Mountpoint spec:/sw/example/econf/#0/current does not exist
Mountpoint user:/sw/example/econf/#0/current does not exist
root = false
Create a new key user:/sw/example/econf/#0/current/root with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/pattern with string "*.txt"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/size with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#0/eol with string "native"
Create a new key user:/sw/example/econf/#0/current/format/#0/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#0/trim with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#1/pattern with string "*.c"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/style with string "space"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#1/tabwidth with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#1/eol with string "lf"
Create a new key user:/sw/example/econf/#0/current/format/#1/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#1/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#2/pattern with string "*.cpp"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#2/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#2/eol with string "crlf"
Create a new key user:/sw/example/econf/#0/current/format/#2/charset with string "utf-16le"
Create a new key user:/sw/example/econf/#0/current/format/#2/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#2/eofnewline with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#2/linelength with string "80"
root = true
[*.txt]
indent_style = tab
indent_size = tab
tab_width = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
max_line_length = 120
[*.c]
indent_style = space
indent_size = 8
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
[*.cpp]
indent_style = tab
indent_size = 8
tab_width = 4
end_of_line = crlf
charset = utf-16le
trim_trailing_whitespace = true
insert_final_newline = false
max_line_length = 80
Mountpoint user:/sw/example/econf/#0/current does not exist
Mountpoint spec:/sw/example/econf/#0/current does not exist
Mountpoint user:/sw/example/econf/#0/current does not exist
root = false
Create a new key user:/sw/example/econf/#0/current/root with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/pattern with string "*.txt"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/size with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#0/eol with string "native"
Create a new key user:/sw/example/econf/#0/current/format/#0/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#0/trim with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#1/pattern with string "*.c"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/style with string "space"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#1/tabwidth with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#1/eol with string "lf"
Create a new key user:/sw/example/econf/#0/current/format/#1/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#1/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#2/pattern with string "*.cpp"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#2/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#2/eol with string "crlf"
Create a new key user:/sw/example/econf/#0/current/format/#2/charset with string "utf-16le"
Create a new key user:/sw/example/econf/#0/current/format/#2/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#2/eofnewline with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#2/linelength with string "80"
root = true
[*.txt]
indent_style = tab
indent_size = tab
tab_width = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
max_line_length = 120
[*.c]
indent_style = space
indent_size = 8
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
[*.cpp]
indent_style = tab
indent_size = 8
tab_width = 4
end_of_line = crlf
charset = utf-16le
trim_trailing_whitespace = true
insert_final_newline = false
max_line_length = 80
Mountpoint user:/sw/example/econf/#0/current does not exist
Testing build with pkgconfig
/usr/local/bin/kdb gen -F ni=../spec.ini highlevel spec:/sw/example/econf/#0/current genelektra
gcc ../src/application.c genelektra.c -std=c99 `pkg-config --cflags --libs elektra-codegen` -I. -o application -Wl,-rpath `pkg-config --variable=libdir elektra-codegen`
/bin/sh: gcc: not found
*** Error code 127
Stop.
make: stopped in /tmp/cirrus-ci-build/examples/codegen/econf/pkgconfig
error: could not build pkgconfig project
Mountpoint spec:/sw/example/econf/#0/current does not exist
Mountpoint user:/sw/example/econf/#0/current does not exist
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_econf: ./application: not found
error: application could not read default config (spec)
Create a new key user:/sw/example/econf/#0/current/root with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/pattern with string "*.txt"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/size with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#0/eol with string "native"
Create a new key user:/sw/example/econf/#0/current/format/#0/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#0/trim with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#1/pattern with string "*.c"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/style with string "space"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#1/tabwidth with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#1/eol with string "lf"
Create a new key user:/sw/example/econf/#0/current/format/#1/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#1/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#2/pattern with string "*.cpp"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#2/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#2/eol with string "crlf"
Create a new key user:/sw/example/econf/#0/current/format/#2/charset with string "utf-16le"
Create a new key user:/sw/example/econf/#0/current/format/#2/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#2/eofnewline with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#2/linelength with string "80"
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_econf: ./application: not found
error: application could not read test tree
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_econf: ./application: not found
error: application did not read test config correctly
Mountpoint user:/sw/example/econf/#0/current does not exist
Mountpoint spec:/sw/example/econf/#0/current does not exist
Mountpoint user:/sw/example/econf/#0/current does not exist
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_econf: ./application: not found
error: application could not read default config (spec)
Create a new key user:/sw/example/econf/#0/current/root with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/pattern with string "*.txt"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#0/indent/size with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#0/eol with string "native"
Create a new key user:/sw/example/econf/#0/current/format/#0/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#0/trim with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#0/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#0/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#1/pattern with string "*.c"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/style with string "space"
Create a new key user:/sw/example/econf/#0/current/format/#1/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#1/tabwidth with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#1/eol with string "lf"
Create a new key user:/sw/example/econf/#0/current/format/#1/charset with string "utf-8"
Create a new key user:/sw/example/econf/#0/current/format/#1/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/eofnewline with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#1/linelength with string "120"
Create a new key user:/sw/example/econf/#0/current/format/#2/pattern with string "*.cpp"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/style with string "tab"
Create a new key user:/sw/example/econf/#0/current/format/#2/indent/size with string "8"
Create a new key user:/sw/example/econf/#0/current/format/#2/tabwidth with string "4"
Create a new key user:/sw/example/econf/#0/current/format/#2/eol with string "crlf"
Create a new key user:/sw/example/econf/#0/current/format/#2/charset with string "utf-16le"
Create a new key user:/sw/example/econf/#0/current/format/#2/trim with string "1"
Create a new key user:/sw/example/econf/#0/current/format/#2/eofnewline with string "0"
Create a new key user:/sw/example/econf/#0/current/format/#2/linelength with string "80"
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_econf: ./application: not found
error: application could not read test tree
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_econf: ./application: not found
error: application did not read test config correctly
Mountpoint user:/sw/example/econf/#0/current does not exist
rm -f genelektra.c
rm -f genelektra.h
rm -f genelektra.mount.sh
rm -f application
check_external_example_codegen_econf RESULTS: 17 test(s) done 7 error(s).
error: check_external_example_codegen_econf
Running check_external_example_codegen_menu
ELEKTRA CHECK EXTERNAL
/usr/local/bin/pkg-config
Check if script tests the correct version
Testing build with cmake
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Elektra 0.9.11 found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cirrus-ci-build/examples/codegen/menu/build
[ 25%] Generating genelektra.c, genelektra.h, genelektra.mount.sh
[ 50%] Building C object CMakeFiles/application.dir/tmp/cirrus-ci-build/examples/codegen/menu/src/application.c.o
[ 75%] Building C object CMakeFiles/application.dir/genelektra.c.o
[100%] Linking C executable application
[100%] Built target application
Mountpoint spec:/sw/example/menu/#0/current does not exist
Mountpoint /sw/example/menu/#0/current does not exist
Did not find any key
Did not find any key
no menu found
Create a new key user:/sw/example/menu/#0/current/menu/#0/name with string "Main Menu"
Create a new key user:/sw/example/menu/#0/current/menu/#1/name with string "Menu 1"
Create a new key user:/sw/example/menu/#0/current/menu/#2/name with string "Menu 2"
Create a new key user:/sw/example/menu/#0/current/menu/#3/name with string "Menu 2.1"
Create a new key user:/sw/example/menu/#0/current/menu/#4/name with string "Menu 2.2"
Create a new key user:/sw/example/menu/#0/current/menu/#1/command with string "echo "Hello from Menu 1""
Create a new key user:/sw/example/menu/#0/current/menu/#2/command with string "echo "Hello from Menu 2""
Create a new key user:/sw/example/menu/#0/current/menu/#3/command with string "echo "Hello from Menu 2.1""
Create a new key user:/sw/example/menu/#0/current/menu/#4/command with string "echo "Hello from Menu 2.2""
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#0 with string "@/menu/#1"
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#1 with string "@/menu/#2"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#0 with string "@/menu/#3"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#1 with string "@/menu/#4"
Create a new key user:/sw/example/menu/#0/current/main with string "@/menu/#0"
Main Menu:
  [1] Menu 1
  [2] Menu 2
Please select what to do (Ctrl-D = quit): 
Mountpoint spec:/sw/example/menu/#0/current does not exist
Mountpoint /sw/example/menu/#0/current does not exist
Did not find any key
Did not find any key
no menu found
Create a new key user:/sw/example/menu/#0/current/menu/#0/name with string "Main Menu"
Create a new key user:/sw/example/menu/#0/current/menu/#1/name with string "Menu 1"
Create a new key user:/sw/example/menu/#0/current/menu/#2/name with string "Menu 2"
Create a new key user:/sw/example/menu/#0/current/menu/#3/name with string "Menu 2.1"
Create a new key user:/sw/example/menu/#0/current/menu/#4/name with string "Menu 2.2"
Create a new key user:/sw/example/menu/#0/current/menu/#1/command with string "echo "Hello from Menu 1""
Create a new key user:/sw/example/menu/#0/current/menu/#2/command with string "echo "Hello from Menu 2""
Create a new key user:/sw/example/menu/#0/current/menu/#3/command with string "echo "Hello from Menu 2.1""
Create a new key user:/sw/example/menu/#0/current/menu/#4/command with string "echo "Hello from Menu 2.2""
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#0 with string "@/menu/#1"
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#1 with string "@/menu/#2"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#0 with string "@/menu/#3"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#1 with string "@/menu/#4"
Create a new key user:/sw/example/menu/#0/current/main with string "@/menu/#0"
Main Menu:
  [1] Menu 1
  [2] Menu 2
Please select what to do (Ctrl-D = quit): 
Testing build with pkgconfig
/usr/local/bin/kdb gen -F ni=../spec.ini highlevel spec:/sw/example/menu/#0/current genelektra
gcc ../src/application.c genelektra.c -std=c99 `pkg-config --cflags --libs elektra-codegen` -I. -o application -Wl,-rpath `pkg-config --variable=libdir elektra-codegen`
/bin/sh: gcc: not found
*** Error code 127
Stop.
make: stopped in /tmp/cirrus-ci-build/examples/codegen/menu/pkgconfig
error: could not build pkgconfig project
Mountpoint spec:/sw/example/menu/#0/current does not exist
Mountpoint /sw/example/menu/#0/current does not exist
Did not find any key
Did not find any key
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
error: application could not read default config (spec)
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
error: application didn't read empty menu correctly
Create a new key user:/sw/example/menu/#0/current/menu/#0/name with string "Main Menu"
Create a new key user:/sw/example/menu/#0/current/menu/#1/name with string "Menu 1"
Create a new key user:/sw/example/menu/#0/current/menu/#2/name with string "Menu 2"
Create a new key user:/sw/example/menu/#0/current/menu/#3/name with string "Menu 2.1"
Create a new key user:/sw/example/menu/#0/current/menu/#4/name with string "Menu 2.2"
Create a new key user:/sw/example/menu/#0/current/menu/#1/command with string "echo "Hello from Menu 1""
Create a new key user:/sw/example/menu/#0/current/menu/#2/command with string "echo "Hello from Menu 2""
Create a new key user:/sw/example/menu/#0/current/menu/#3/command with string "echo "Hello from Menu 2.1""
Create a new key user:/sw/example/menu/#0/current/menu/#4/command with string "echo "Hello from Menu 2.2""
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#0 with string "@/menu/#1"
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#1 with string "@/menu/#2"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#0 with string "@/menu/#3"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#1 with string "@/menu/#4"
Create a new key user:/sw/example/menu/#0/current/main with string "@/menu/#0"
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
error: application could not read test menu
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
--- /tmp/tmp.41tjdJLD	2022-10-12 21:04:29.139997000 +0000
+++ /tmp/tmp.GswOOl0A	2022-10-12 21:04:29.295504000 +0000
@@ -1,7 +0,0 @@
-Main Menu:
-
-  [1] Menu 1
-  [2] Menu 2
-
-Please select what to do (Ctrl-D = quit): 
-
error: application did not read test menu correctly
Mountpoint spec:/sw/example/menu/#0/current does not exist
Mountpoint /sw/example/menu/#0/current does not exist
Did not find any key
Did not find any key
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
error: application could not read default config (spec)
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
error: application didn't read empty menu correctly
Create a new key user:/sw/example/menu/#0/current/menu/#0/name with string "Main Menu"
Create a new key user:/sw/example/menu/#0/current/menu/#1/name with string "Menu 1"
Create a new key user:/sw/example/menu/#0/current/menu/#2/name with string "Menu 2"
Create a new key user:/sw/example/menu/#0/current/menu/#3/name with string "Menu 2.1"
Create a new key user:/sw/example/menu/#0/current/menu/#4/name with string "Menu 2.2"
Create a new key user:/sw/example/menu/#0/current/menu/#1/command with string "echo "Hello from Menu 1""
Create a new key user:/sw/example/menu/#0/current/menu/#2/command with string "echo "Hello from Menu 2""
Create a new key user:/sw/example/menu/#0/current/menu/#3/command with string "echo "Hello from Menu 2.1""
Create a new key user:/sw/example/menu/#0/current/menu/#4/command with string "echo "Hello from Menu 2.2""
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#0 with string "@/menu/#1"
Create a new key user:/sw/example/menu/#0/current/menu/#0/children/#1 with string "@/menu/#2"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#0 with string "@/menu/#3"
Create a new key user:/sw/example/menu/#0/current/menu/#2/children/#1 with string "@/menu/#4"
Create a new key user:/sw/example/menu/#0/current/main with string "@/menu/#0"
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
error: application could not read test menu
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_menu: ./application: not found
--- /tmp/tmp.g02YJu1K	2022-10-12 21:04:29.399863000 +0000
+++ /tmp/tmp.rCM8xDR8	2022-10-12 21:04:29.540818000 +0000
@@ -1,7 +0,0 @@
-Main Menu:
-
-  [1] Menu 1
-  [2] Menu 2
-
-Please select what to do (Ctrl-D = quit): 
-
error: application did not read test menu correctly
rm -f genelektra.c
rm -f genelektra.h
rm -f genelektra.mount.sh
rm -f application
check_external_example_codegen_menu RESULTS: 21 test(s) done 9 error(s).
error: check_external_example_codegen_menu
Running check_external_example_codegen_tree
ELEKTRA CHECK EXTERNAL CODEGEN TREE
/usr/local/bin/pkg-config
Check if script tests the correct version
Testing build with cmake
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Elektra 0.9.11 found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cirrus-ci-build/examples/codegen/tree/build
[ 25%] Generating genelektra.c, genelektra.h, genelektra.mount.sh
[ 50%] Building C object CMakeFiles/application.dir/tmp/cirrus-ci-build/examples/codegen/tree/src/application.c.o
[ 75%] Building C object CMakeFiles/application.dir/genelektra.c.o
[100%] Linking C executable application
[100%] Built target application
Mountpoint spec:/sw/example/tree/#0/current does not exist
Mountpoint /sw/example/tree/#0/current does not exist
Did not find any key
Did not find any key
(empty)
Create a new key user:/sw/example/tree/#0/current/tree/root with string ""
Create a new key user:/sw/example/tree/#0/current/tree/root/text with string "root"
Create a new key user:/sw/example/tree/#0/current/tree/child1 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child1/text with string "child1"
Create a new key user:/sw/example/tree/#0/current/tree/child2 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child2/text with string "child2"
Create a new key user:/sw/example/tree/#0/current/tree/child4 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child4/text with string "child4"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/text with string "grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/leafA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafA/text with string "leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/text with string "grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/leafB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafB/text with string "leafB"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#0 with string "../../../child1"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#1 with string "../../../child2"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#3 with string "../../../child4"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#0 with string "../../../grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#1 with string "../../../grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/children/#0 with string "../../../leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/children/#0 with string "../../../leafB"
Create a new key user:/sw/example/tree/#0/current/root with string "../tree/root"
root
  child1
  child2
  (empty)
  child4
    grandchildA
      leafA
    grandchildB
      leafB
Mountpoint spec:/sw/example/tree/#0/current does not exist
Mountpoint /sw/example/tree/#0/current does not exist
Did not find any key
Did not find any key
(empty)
Create a new key user:/sw/example/tree/#0/current/tree/root with string ""
Create a new key user:/sw/example/tree/#0/current/tree/root/text with string "root"
Create a new key user:/sw/example/tree/#0/current/tree/child1 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child1/text with string "child1"
Create a new key user:/sw/example/tree/#0/current/tree/child2 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child2/text with string "child2"
Create a new key user:/sw/example/tree/#0/current/tree/child4 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child4/text with string "child4"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/text with string "grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/leafA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafA/text with string "leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/text with string "grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/leafB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafB/text with string "leafB"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#0 with string "../../../child1"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#1 with string "../../../child2"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#3 with string "../../../child4"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#0 with string "../../../grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#1 with string "../../../grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/children/#0 with string "../../../leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/children/#0 with string "../../../leafB"
Create a new key user:/sw/example/tree/#0/current/root with string "../tree/root"
root
  child1
  child2
  (empty)
  child4
    grandchildA
      leafA
    grandchildB
      leafB
Testing build with pkgconfig
/usr/local/bin/kdb gen -F ni=../spec.ini highlevel spec:/sw/example/tree/#0/current genelektra
gcc ../src/application.c genelektra.c -std=c99 `pkg-config --cflags --libs elektra-codegen` -I. -o application -Wl,-rpath `pkg-config --variable=libdir elektra-codegen`
/bin/sh: gcc: not found
*** Error code 127
Stop.
make: stopped in /tmp/cirrus-ci-build/examples/codegen/tree/pkgconfig
error: could not build pkgconfig project
Mountpoint spec:/sw/example/tree/#0/current does not exist
Mountpoint /sw/example/tree/#0/current does not exist
Did not find any key
Did not find any key
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application could not read default config (spec)
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application didn't read empty tree correctly
Create a new key user:/sw/example/tree/#0/current/tree/root with string ""
Create a new key user:/sw/example/tree/#0/current/tree/root/text with string "root"
Create a new key user:/sw/example/tree/#0/current/tree/child1 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child1/text with string "child1"
Create a new key user:/sw/example/tree/#0/current/tree/child2 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child2/text with string "child2"
Create a new key user:/sw/example/tree/#0/current/tree/child4 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child4/text with string "child4"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/text with string "grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/leafA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafA/text with string "leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/text with string "grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/leafB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafB/text with string "leafB"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#0 with string "../../../child1"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#1 with string "../../../child2"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#3 with string "../../../child4"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#0 with string "../../../grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#1 with string "../../../grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/children/#0 with string "../../../leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/children/#0 with string "../../../leafB"
Create a new key user:/sw/example/tree/#0/current/root with string "../tree/root"
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application could not read test tree
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application did not read test tree correctly
Mountpoint spec:/sw/example/tree/#0/current does not exist
Mountpoint /sw/example/tree/#0/current does not exist
Did not find any key
Did not find any key
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application could not read default config (spec)
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application didn't read empty tree correctly
Create a new key user:/sw/example/tree/#0/current/tree/root with string ""
Create a new key user:/sw/example/tree/#0/current/tree/root/text with string "root"
Create a new key user:/sw/example/tree/#0/current/tree/child1 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child1/text with string "child1"
Create a new key user:/sw/example/tree/#0/current/tree/child2 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child2/text with string "child2"
Create a new key user:/sw/example/tree/#0/current/tree/child4 with string ""
Create a new key user:/sw/example/tree/#0/current/tree/child4/text with string "child4"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/text with string "grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/leafA with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafA/text with string "leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/text with string "grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/leafB with string ""
Create a new key user:/sw/example/tree/#0/current/tree/leafB/text with string "leafB"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#0 with string "../../../child1"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#1 with string "../../../child2"
Create a new key user:/sw/example/tree/#0/current/tree/root/children/#3 with string "../../../child4"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#0 with string "../../../grandchildA"
Create a new key user:/sw/example/tree/#0/current/tree/child4/children/#1 with string "../../../grandchildB"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildA/children/#0 with string "../../../leafA"
Create a new key user:/sw/example/tree/#0/current/tree/grandchildB/children/#0 with string "../../../leafB"
Create a new key user:/sw/example/tree/#0/current/root with string "../tree/root"
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application could not read test tree
/usr/local/lib/elektra/tool_exec/check_external_example_codegen_tree: ./application: not found
error: application did not read test tree correctly
rm -f genelektra.c
rm -f genelektra.h
rm -f genelektra.mount.sh
rm -f application
check_external_example_codegen_tree RESULTS: 21 test(s) done 9 error(s).
error: check_external_example_codegen_tree
Running check_external_example_highlevel
ELEKTRA CHECK EXTERNAL HIGHLEVEL
/usr/local/bin/pkg-config
Check if script tests the correct version
Testing build with cmake
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Elektra 0.9.11 found
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/cirrus-ci-build/examples/highlevel/build
[ 50%] Building C object CMakeFiles/application.dir/application.c.o
[100%] Linking C executable application
[100%] Built target application
Mountpoint spec:/sw/example/highlevel/#0/current does not exist
Mountpoint /sw/example/highlevel/#0/current does not exist
Did not find any key
Did not find any key
successfully read configuration
Create a new key user:/sw/example/highlevel/#0/current/mystring with string "Hello World"
Create a new key user:/sw/example/highlevel/#0/current/myint with string "29"
Create a new key user:/sw/example/highlevel/#0/current/mydouble with string "4.4242"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#0 with string "3.14"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#1 with string "15"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#2 with string "9265.359"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#3 with string "2.718282"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#4 with string "1.4142"
successfully read configuration
Create a new key user:/sw/example/highlevel/#0/current/print with string "1"
successfully read configuration
mystring: Hello World
myint: 29
mydouble: 4.424200
sizeof(myfloatarray): 5
myfloatarray[0]: 3.140000
myfloatarray[1]: 15.000000
myfloatarray[2]: 9265.359375
myfloatarray[3]: 2.718282
myfloatarray[4]: 1.414200
mystring: Hello World
myint: 29
mydouble: 4.424200
sizeof(myfloatarray): 5
myfloatarray[0]: 3.140000
myfloatarray[1]: 15.000000
myfloatarray[2]: 9265.359375
myfloatarray[3]: 2.718282
myfloatarray[4]: 1.414200
Mountpoint spec:/sw/example/highlevel/#0/current does not exist
Mountpoint /sw/example/highlevel/#0/current does not exist
Did not find any key
Did not find any key
successfully read configuration
Create a new key user:/sw/example/highlevel/#0/current/mystring with string "Hello World"
Create a new key user:/sw/example/highlevel/#0/current/myint with string "29"
Create a new key user:/sw/example/highlevel/#0/current/mydouble with string "4.4242"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#0 with string "3.14"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#1 with string "15"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#2 with string "9265.359"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#3 with string "2.718282"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#4 with string "1.4142"
successfully read configuration
Create a new key user:/sw/example/highlevel/#0/current/print with string "1"
successfully read configuration
mystring: Hello World
myint: 29
mydouble: 4.424200
sizeof(myfloatarray): 5
myfloatarray[0]: 3.140000
myfloatarray[1]: 15.000000
myfloatarray[2]: 9265.359375
myfloatarray[3]: 2.718282
myfloatarray[4]: 1.414200
mystring: Hello World
myint: 29
mydouble: 4.424200
sizeof(myfloatarray): 5
myfloatarray[0]: 3.140000
myfloatarray[1]: 15.000000
myfloatarray[2]: 9265.359375
myfloatarray[3]: 2.718282
myfloatarray[4]: 1.414200
Testing build with pkgconfig
gcc application.c `pkg-config --cflags --libs elektra-highlevel` -o application -Wl,-rpath `pkg-config --variable=libdir elektra-highlevel`
/bin/sh: gcc: not found
*** Error code 127
Stop.
make: stopped in /tmp/cirrus-ci-build/examples/highlevel/pkgconfig
error: could not build pkgconfig project
Mountpoint spec:/sw/example/highlevel/#0/current does not exist
Mountpoint /sw/example/highlevel/#0/current does not exist
Did not find any key
Did not find any key
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application could not read default config (spec)
Create a new key user:/sw/example/highlevel/#0/current/mystring with string "Hello World"
Create a new key user:/sw/example/highlevel/#0/current/myint with string "29"
Create a new key user:/sw/example/highlevel/#0/current/mydouble with string "4.4242"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#0 with string "3.14"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#1 with string "15"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#2 with string "9265.359"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#3 with string "2.718282"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#4 with string "1.4142"
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application could not read changed config
Create a new key user:/sw/example/highlevel/#0/current/print with string "1"
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application could not read changed config
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print mystring
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myint
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print mydouble
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print size of myfloatarray
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[0]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[1]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[2]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[3]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[4]
Mountpoint spec:/sw/example/highlevel/#0/current does not exist
Mountpoint /sw/example/highlevel/#0/current does not exist
Did not find any key
Did not find any key
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application could not read default config (spec)
Create a new key user:/sw/example/highlevel/#0/current/mystring with string "Hello World"
Create a new key user:/sw/example/highlevel/#0/current/myint with string "29"
Create a new key user:/sw/example/highlevel/#0/current/mydouble with string "4.4242"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#0 with string "3.14"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#1 with string "15"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#2 with string "9265.359"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#3 with string "2.718282"
Create a new key user:/sw/example/highlevel/#0/current/myfloatarray/#4 with string "1.4142"
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application could not read changed config
Create a new key user:/sw/example/highlevel/#0/current/print with string "1"
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application could not read changed config
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print mystring
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myint
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print mydouble
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print size of myfloatarray
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[0]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[1]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[2]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[3]
/usr/local/lib/elektra/tool_exec/check_external_example_highlevel: ./application: not found
error: application did not print myfloatarray[4]
rm: application: No such file or directory
check_external_example_highlevel RESULTS: 53 test(s) done 25 error(s).
error: check_external_example_highlevel

and

Following test cases failed: 
check_external_example
check_external_example_codegen_econf
check_external_example_codegen_menu
check_external_example_codegen_tree
check_external_example_highlevel

But I am not able why this problem only exist on this branch and not on the master. I cannot see anything related to the xfconf plugin. The only problem seems to be the missing gcc command.

@kodebach
Copy link
Member

I don't think this really can be related to xfconf. If you look at the logs of the "main" step for the failing "FreeBSD 13" job on Cirrus you can see that the xfconf plugin isn't even included:

-- Could NOT find Xfconf (missing: XFCONF_INCLUDE_DIR) 
-- Exclude plugin xfconf because libxfconf not found

This doesn't answer why the job fails, but I'm pretty sure it is not related to xfconf. Interestingly, AFAICT gcc is not installed as part of the install_script in the Cirrus config

libelektra/.cirrus.yml

Lines 49 to 62 in cf4b6f3

install_script:
- pkg update -f
- pkg upgrade -y
- >
pkg install -y
bison
cmake
flex
git
libgit2
llvm12
ninja
yajl
yaml-cpp

Maybe just adding it will fix this. It doesn't explain why it works on master, but if it works it doesn't really matter.

Even better would be to use the same compiler in the tests that we use to actually compile Elektra (so clang in this case). You should be able to use the CMAKE_C_COMPILER from CMake to find the compiler that is used. The test testscr_check_gen already uses this (via
e.g. tests/shell/gen/highlevel/simple.check.sh).

An easy way to keep the scripts also working as an example would be using $(CC) in the Makefiles and setting the CC env-var from the test scripts to the value of CMAKE_C_COMPILER.

@eiskasten
Copy link
Contributor Author

@markus2330 finally, from my side it can be merged now

Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, clean and nice PR. Docu&Tests need some improvements, though.

.cirrus.yml Show resolved Hide resolved
.cirrus.yml Show resolved Hide resolved

## Examples

```zsh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use (also) shell recorder for a few tests.


## Introduction

This is a storage plugin to mount the xfconf configuration settings.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain what this plugin can do, how to use it, what works, ... E.g. see src/plugins/augeas/README.md for a similar plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a much better introduction with 56e94e4.


## Dependencies

xfconf from the XFCE project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please tell which versions you tested, how the package might be called etc.

According to your changes, dbus also seem to be important here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have extended this section in the commit 0f5f854

## Limitations

- usage of a dummy file such as `/dev/null`
- xfconf locks can only be read but not set as this is not possible in xfconf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain what xfconf locks are.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with b135305.

printf ("open plugin...\n");
PLUGIN_OPEN ("xfconf");

KeySet * ks = ksNew (0, KS_END);
Copy link
Contributor

@markus2330 markus2330 Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only very basic tests.

src/plugins/xfconf/testmod_xfconf.c Outdated Show resolved Hide resolved
@@ -46,6 +46,10 @@ for PLUGIN in $ACTUAL_PLUGINS; do
# output on open/close
continue
;;
"xfconf")
# dbus is not enable on internal checks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# dbus is not enable on internal checks
# dbus is not enabled on internal checks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with 49cd309.

- infos/provides = storage/xfconf
- infos/recommends =
- infos/placements = postgetstorage presetstorage
- infos/status = maintained libc configurable experimental unfinished concept limited memleak
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why unfinished, what is missing? What do you mean with limited? The limitations below seem to be general limitations of xfconf. If you do everything that xfconf can do, you don't need to declare your plugin limited. Please clarify in the README.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still open.

@markus2330 markus2330 mentioned this pull request Dec 22, 2022
Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update! Some clarifications in README.md still needed.


### Property

A property in xfconf is the same as a key in libelektra i.e. it has a name and can hold one or more values.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A key only has one value (or none). Can you please give an example of how a property in xfconf would be represented in Elektra.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely, this was may fault. I corrected this with d1e4892.


The list of all channels is stored in the `system:/elektra/modules/xfconf/channels` which is an array of all channel names.
Channel cannot be explicitly created or removed.
They only exist in an implicit manner when you pass the `channel=...` argument.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this sentence. Do you mean "plugin configuration" when you say argument? Please describe how channels are used within xfce4, and how they map to Elektra.

Copy link
Contributor Author

@eiskasten eiskasten Dec 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope the commit e282a32 makes it more clear.

xfconf from the XFCE project
The xfconf library from the XFCE project is the main dependency of this plugin.
Usually, this library is called something such as `xfconf` (Arch, Fedora, `xfconf-devel` for compiling), `libxfconf-0` (Debian, `libxfconf-0-dev` for compmiling) or `xfce4-conf` (FreeBSD) in the package manager.
As xfconf itself depends on dbus and glib, these are dependecies too but should be installed with the package manager automatically.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also write that dbus must be running.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with 1b1307a.

@eiskasten
Copy link
Contributor Author

@markus2330 finally, from my side it can be merged now

Thank you for your feedback! Excepted for a few comments, the most things should be corrected or improved. I will clarify the limitation within this PR. Also thank you for opening #4790 this should be definitely migrated to the new backend which will also allow much more detailed tests.

@eiskasten
Copy link
Contributor Author

So, may I merge this now, @markus2330?

Copy link
Contributor

@markus2330 markus2330 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We avoid self-merging except for emergencies (e.g. a PR that fixes CI builds of master). Simply rerequest my review to get the PR eventually merged.

- infos/provides = storage/xfconf
- infos/recommends =
- infos/placements = postgetstorage presetstorage
- infos/status = maintained libc configurable experimental unfinished concept limited memleak
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still open.

As usual, this allows the plugin to read and write to the XFCE configuration.

You can refer to the [official XFCE documentation of xfconf](https://docs.xfce.org/xfce/xfconf/start) to learn more about it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template has ## Installation here, please add this information.

# Backup-and-Restore: user:/tests/xfconf

# mount the xfwm channel
kdb mount /dev/null /test/xfwm xfconf "channel=xfwm4"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be tests, see doc/TESTING.md line 196:

Suggested change
kdb mount /dev/null /test/xfwm xfconf "channel=xfwm4"
kdb mount /dev/null /tests/xfconf/xfwm xfconf "channel=xfwm4"

@flo91 flo91 merged commit 4f6f28d into ElektraInitiative:master Jan 2, 2023
@mpranj mpranj added this to the 0.9.12 milestone Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants