Closed flo91 closed 2 years ago
Not sure from where this is linked, but it is probably mean to link to https://www.libelektra.org/tools/pythongen. The pythongen
was called gen
before. The redirect happens probably just because gen
doesn't exist and elektrad
is the first in the list.
I can confirm all the issues.
And because it took me a while to find it, the link on the homepage to https://www.libelektra.org/tools/gen
is under
Batteries Included Automate configuration tasks with powerful tools,
Another issue, which I think is just temporary is that https://www.libelektra.org/tutorials/mount-configuration-files links to an empty page. So I'll ignore that for now.
It might be reasonable to split this issue into two smaller issues
Thank you for checking! Is fixing the redirection logic relevant after all links are fixed? I think some CI check that we don't have broken links is more important as second issue.
Yes, I'd argue that fixing the redirect logic would still be relevant, since users may have outdated bookmarks. Or worse yet, other sites might link to an Elektra documentation page.
And true, adding a CI check would also be rather useful.
I took a look at this and after trying for an hour, I couldn't quite figure out how to run the website locally. I guess I'm not used to old-fashioned tooling.
(I was hoping that I could simply check out the website, run npm install
followed by npm run start
or npm run dev
. And then debug the relevant files.)
The first thing I'd have tried out would be adding { location: 'replace' }
as the final parameter in a few places like
https://github.com/ElektraInitiative/libelektra/blob/6a8e93024f2c9e068d63757bdefd857c40db2e4d/src/tools/website/resources/assets/js/config/routes.js#L174
Essentially, the AngularJS router seems to be doing the undesirable thing there https://stackoverflow.com/questions/1865837/whats-the-difference-between-window-location-and-window-location-replace
I took a look at this and after trying for an hour, I couldn't quite figure out how to run the website locally.
You can follow the README, but the quickest way I found is actually to replace the @REST_FRONTEND_SOURCE_INSTALL_REPOSITORY@
in Gruntfile.js
with the path to your clone of the Elektra repository.
Then you can just run npm install
in src/tools/website
and then use npx grunt server
to run the server.
Note: I don't actually know if all of the website works properly this way. It might be that there are some other variable that should be replaced by CMake for example. However, it may be enough to find the bug you're looking for.
Lovely, that approach works quite fine for my use-case. PR is out :)
I did try the steps in the Readme, but got stuck several times.
You can follow the README, but the quickest way I found is actually to replace the @REST_FRONTEND_SOURCE_INSTALL_REPOSITORY@ in Gruntfile.js with the path to your clone of the Elektra repository.
Would be great if this hint can be also given in the README.md
I did try the steps in the Readme, but got stuck several times.
Which errors did you get? Please report such issues so that we can improve the documentation.
Would be great if this hint can be also given in the README.md
Not really a hint, but more of a hack. You have to be careful to undo the changes in Gruntfile.js before committing. A warning about that should definitely be added to.
However, I think before we add this hack, somebody should investigate, whether we need all the complicated stuff in the README at all. I haven't found a reason yet, why the website could only be built from the installed directory. Also, if the @REST_FRONTEND_SOURCE_INSTALL_REPOSITORY@
in Gruntfile.js is the only reason we need to run CMake, I'm sure we can find a better way to get path of the git repo inside grunt.
The current developer instructions assume a lot of familiarity with Elektra's toolchain, which I simply don't have at the moment. https://github.com/ElektraInitiative/libelektra/blob/master/src/tools/website/README.md#run-and-configure
I'll jot down the troubles I ran into as well as I can remember them here, if desired I can open a new issue "simplifying website tool development" with those notes:
To install the website, make sure
website
is included in TOOLS. You can use this guide to add the required website tool
Which links to the top of a rather large document. I just want the 2 or 3 commands to include the website and build it. Then, I read through the guide and found the relevant tools section https://github.com/ElektraInitiative/libelektra/blob/master/doc/COMPILE.md#tools
Tools are used to add extra functionality to Elektra. The flag used to specify which tools are compiled is -DTOOLS, thus flag works similarly to the -DPLUGINS flag
Which assumes that I know how and where to add flags. I don't, so I scroll up to the plugins section. Hopefully I'll find some more information there.
After not finding it there, I look through the rest of the guide, and find https://github.com/ElektraInitiative/libelektra/blob/master/doc/COMPILE.md#preparation
So after some fiddling, I end up running cmake -DTOOLS=website ..
. Seems to work as intended.
Then use
make install
to install the website.
First question, after messing up the correct directory multiple times in the past, is: But in which directory?
As for why I messed up the directory multiple times is because I expected it to be possible to run cmake -DTOOLS=website ..
in the root directory instead of in the build directory.
STEFNOTCH-PC:~/libelektra/build$ make install
make: *** No rule to make target 'install'. Stop.
STEFNOTCH-PC:~/libelektra/build$ cd ..
STEFNOTCH-PC:~/libelektra$ make install
make: *** No rule to make target 'install'. Stop.
STEFNOTCH-PC:~/libelektra/build/src/tools/website$ make install
make: *** No rule to make target 'install'. Stop.
and it was around here where I ended up trying a few more things before giving up.
I think it is rather unrealistic that someone will take the effort to improve the website build system because it involves an unusual technology stack (CMake+npm+Grunt) and has an unclear benefit (it works flawlessly on the build server since years). Improving the documentation is an obvious and much less time consuming step. The website is only relevant for contributors after all.
@stefnotch Is this the folder where you successfully execute cmake
before? Once this is done correctly, you are probably searching for DESTDIR=x make install
to install everything to path x. Please also add this to the documentation.
Is this the folder where you successfully execute
cmake
before? Once this is done correctly, you are probably searching forDESTDIR=x make install
to install everything to path x. Please also add this to the documentation.
That's the build folder where I executed cmake. I'm not sure what you mean with DESTDIR=x make install
.
That's the build folder where I executed cmake.
Please give the full sequence of commands you entered. I don't know any way to call cmake that there is no install
target at all.
DESTDIR=x make install
This allows you to install everything to the folder x, instead of what you configured via CMAKE_INSTALL_PREFIX
That's all I did:
STEFNOTCH-PC:~/libelektra$ cd build
STEFNOTCH-PC:~/libelektra/build$ cmake -DTOOLS=website ..
Please also post the output of the cmake command. Please redo with empty "build" directory.
DESTDIR is not a good idea, the webserver scripts hardcode the CMAKE_INSTALL_PREFIX. So better use a CMAKE_INSTALL_PREFIX where you can write as user.
So use, e.g. to install below "installation" in the build dir (current dir):
cmake -DTOOLS=website -DCMAKE_INSTALL_PREFIX=`pwd`/installation ..
installation/lib/elektra/tool_exec/build-website
installation/lib/elektra/tool_exec/run-website
STEFNOTCH-PC:~/libelektra$ rm -rf build
STEFNOTCH-PC:~/libelektra$ rm -rf build/*
STEFNOTCH-PC:~/libelektra$ cd build
STEFNOTCH-PC:~/libelektra/build$ cmake -DTOOLS=website -DCMAKE_INSTALL_PREFIX=`pwd`/installation ..
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- 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
-- Performing Test HAS_CXX_STD
-- Performing Test HAS_CXX_STD - Success
-- compiler/linker accepts version script? TRUE
-- compiler/linker supports symbol versioning? TRUE
-- GCC detected
-- Performing Test HAS_CFLAG_MAYBE_UNINITIALIZED
-- Performing Test HAS_CFLAG_MAYBE_UNINITIALIZED - Success
-- C flags are -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 -Wmaybe-uninitialized -Wsign-compare -Wfloat-equal
-- CXX flags are -std=c++11 -Wno-deprecated-declarations -Wold-style-cast -Wstrict-null-sentinel -D_GLIBCXX_USE_NANOSLEEP -Wno-missing-field-initializers -Woverloaded-virtual -Wsign-promo -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 -Wmaybe-uninitialized
-- You are building Elektra 0.9.11
CMake Warning at doc/CMakeLists.txt:138 (message):
Sorry, I cannot create the reference manual: I could not find Doxygen
-- Found Git: /usr/bin/git (found version "2.34.4")
Sorry, I cannot find ronn-ng (https://github.com/apjanke/ronn-ng), thus re-generating the man pages will not work. Modifying the Markdown sources in doc/help will thus not work. Instead the existing files from doc/man will be used directly.
-- Exclude plugin blockresolver because excluded by category EXPERIMENTAL
-- Exclude plugin cpptemplate because excluded by category EXPERIMENTAL
-- Exclude plugin dbusrecv because excluded by category EXPERIMENTAL
-- Exclude plugin doc because excluded by category EXPERIMENTAL
-- Exclude plugin email because excluded by category EXPERIMENTAL
-- Exclude plugin file because excluded by category EXPERIMENTAL
-- Exclude plugin gpgme because excluded by category EXPERIMENTAL
-- Exclude plugin internalnotification because excluded by category EXPERIMENTAL
-- Exclude plugin iterate because excluded by category EXPERIMENTAL
-- Exclude plugin jni because excluded by category EXPERIMENTAL
-- Exclude plugin kconfig because excluded by category EXPERIMENTAL
-- Exclude plugin length because excluded by category EXPERIMENTAL
-- Exclude plugin mozprefs because excluded by category EXPERIMENTAL
-- Exclude plugin passwd because excluded by category EXPERIMENTAL
-- Exclude plugin ruby because excluded by category EXPERIMENTAL
-- Looking for __GNU_LIBRARY__
-- Looking for __GNU_LIBRARY__ - not found
-- Exclude plugin simpleini because simpleini needs glibc to work, use the mini plugin instead
-- Exclude plugin template because excluded by category EXPERIMENTAL
-- Exclude plugin toml because excluded by category EXPERIMENTAL
-- Exclude plugin zeromqrecv because excluded by category EXPERIMENTAL
-- Exclude plugin zeromqsend because excluded by category EXPERIMENTAL
-- Exclude plugin augeas because libaugeas not found (libaugeas-dev >= 0.16 needed)
-- Include plugin backend
-- Include plugin base64
-- Include plugin blacklist
-- Include plugin c
-- Looking for nftw
-- Looking for nftw - found
-- Include plugin cache
-- Include plugin ccode
-- Include plugin conditionals
-- Include plugin constants
-- Include plugin counter
-- Exclude plugin crypto because libgcrypt development files not found
-- Include plugin csvstorage
-- Exclude plugin curlget because Curl-dev not found
-- Exclude plugin curlget because libcurl >= 7.28.0 required
-- Exclude plugin curlget because OpenSSL-dev not found
-- Include plugin date
-- Exclude plugin dbus because dbus package not found
-- Include plugin desktop
-- Include plugin directoryvalue
-- Include plugin dpkg
-- Include plugin dump
-- Include plugin error
-- Include plugin fcrypt
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- Include plugin filecheck
-- Looking for setmntent
-- Looking for setmntent - found
-- Include plugin fstab
-- Exclude plugin gitresolver because Cannot find libgit2 >= 0.24.1
-- Exclude plugin gitresolver because OpenSSL-dev not found
-- Include plugin glob
-- gopts: using gopts_procfs.h
-- Include plugin gopts
-- Include plugin hexcode
-- Include plugin hexnumber
-- Include plugin hosts
-- Include plugin iconv
-- Include plugin ipaddr
-- Exclude plugin journald because systemd-journal not found
-- Include plugin keytometa
-- Include plugin line
-- Include plugin lineendings
-- Include plugin logchange
CMake Deprecation Warning at scripts/cmake/Modules/LibAddMacros.cmake:197 (cmake_policy):
The OLD behavior for policy CMP0078 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
src/plugins/lua/CMakeLists.txt:6 (find_swig)
-- Exclude plugin lua because Lua libs (>= liblua5.1-dev) not found
-- Include plugin macaddr
-- Include plugin mathcheck
-- Include plugin mini
-- Include plugin missing
-- Exclude plugin mmapstorage_crc because zlib development files not found
-- Include plugin mmapstorage
-- Include plugin modules
-- Include plugin multifile
-- Include plugin network
-- Include plugin ni
-- Include plugin noresolver
-- Looking for euidaccess
-- Looking for euidaccess - found
-- Looking for access
-- Looking for access - found
-- Looking for geteuid
-- Looking for geteuid - found
-- Looking for getegid
-- Looking for getegid - found
-- Looking for seteuid
-- Looking for seteuid - found
-- Looking for setegid
-- Looking for setegid - found
-- Looking for getpwnam
-- Looking for getpwnam - found
-- Looking for getpwuid
-- Looking for getpwuid - found
-- Looking for getgrouplist
-- Looking for getgrouplist - found
-- Looking for getgrgid
-- Looking for getgrgid - found
-- Include plugin path
-- Include plugin process
-- Include plugin profile
-- Looking for mkfifo
-- Looking for mkfifo - found
-- Looking for fork
-- Looking for fork - found
CMake Deprecation Warning at scripts/cmake/Modules/LibAddMacros.cmake:197 (cmake_policy):
The OLD behavior for policy CMP0078 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
src/plugins/python/CMakeLists.txt:7 (find_swig)
-- Exclude plugin python because python 3 libs (libpython3-dev) not found
-- Include plugin quickdump
-- Include plugin range
-- Include plugin reference
-- Include plugin rename
-- Include plugin resolver_fm_hpu_b
-- Include plugin resolver_fm_b_b
-- Include plugin resolver_fm_pb_b
-- Include plugin resolver_fm_hb_b
-- Include plugin resolver_fm_hp_b
-- Include plugin resolver_fm_ub_x
-- Include plugin resolver_fm_xb_x
-- Include plugin resolver_fm_xp_x
-- Include plugin resolver_fm_xhp_x
-- Include plugin resolver_fm_uhb_xb
-- Include plugin rgbcolor
-- Include plugin shell
-- Include plugin spec
-- Include plugin specload
-- Include plugin sync
-- Include plugin syslog
-- Include plugin timeofday
-- Include plugin tracer
-- Include plugin type
-- Include plugin uname
-- Include plugin unit
-- Include plugin validation
-- Include plugin version
-- Include plugin wresolver
-- Exclude plugin xerces because XercesC library libxerces-c-dev not found
-- Exclude plugin xmltool because libxml2 not found
-- Exclude plugin yajl because yajl (libyajl-dev 1 or 2) not found
-- Exclude plugin yamlcpp because yaml-cpp (libyaml-cpp-dev >= 0.6) not found
-- Looking for fnmatch
-- Looking for fnmatch - found
-- Exclude Library notification because internalnotification plugin excluded
-- Include binding cpp
-- Exclude binding jna because javac (java compiler) not found, which is only included in a jdk
-- Exclude binding rust because excluded by category EXPERIMENTAL
CMake Deprecation Warning at scripts/cmake/Modules/LibAddMacros.cmake:197 (cmake_policy):
The OLD behavior for policy CMP0078 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
src/bindings/swig/CMakeLists.txt:18 (find_swig)
-- Exclude binding python because neither swig2/3/4 found. Please install swig 2/3/4 and set -DSWIG_EXECUTABLE=
-- Exclude binding lua because neither swig2/3/4 found. Please install swig 2/3/4 and set -DSWIG_EXECUTABLE=
-- Exclude binding ruby because explicitly excluded
-- Exclude binding gsettings because excluded by category EXPERIMENTAL
-- Exclude binding intercept_fs because excluded by category EXPERIMENTAL
-- Exclude binding intercept_env because intercept_env currently needs glibc
-- Exclude binding io_uv because excluded by category EXPERIMENTAL
-- Exclude binding io_ev because excluded by category EXPERIMENTAL
-- Exclude binding io_glib because excluded by category EXPERIMENTAL
-- Include tool website
-- Looking for clearenv
-- Looking for clearenv - found
-- Looking for setenv
-- Looking for setenv - found
-- Looking for futimens
-- Looking for futimens - found
-- Looking for hsearch_r
-- Looking for hsearch_r - found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for glob
-- Looking for glob - found
-- Looking for clock_gettime
-- Looking for clock_gettime - found
-- Looking for ctype.h
-- Looking for ctype.h - found
-- Looking for errno.h
-- Looking for errno.h - found
-- Looking for features.h
-- Looking for features.h - found
-- Looking for locale.h
-- Looking for locale.h - found
-- Looking for stdio.h
-- Looking for stdio.h - found
-- Looking for stdlib.h
-- Looking for stdlib.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for time.h
-- Looking for time.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of size_t
-- Check size of size_t - done
-- Check size of long long
-- Check size of long long - done
-- Check size of long double
-- Check size of long double - done
-- Check size of mode_t
-- Check size of mode_t - done
-- Check size of float
-- Check size of float - done
-- Check size of double
-- Check size of double - done
-- Check size of ((struct timeval*)0)->tv_usec
-- Check size of ((struct timeval*)0)->tv_usec - done
-- Check size of ((struct stat*)0)->st_size
-- Check size of ((struct stat*)0)->st_size - done
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
Cloning into 'googletest-src'...
HEAD is now at 58d77fa8 Updates the version number in CMakeLists.txt to 1.12.1 (#3919)
-- Found Python: /usr/bin/python3.9 (found version "3.9.13") found components: Interpreter
-- Found Threads: TRUE
-- Looking for mkdtemp
-- Looking for mkdtemp - found
-- excluding test_hooks, because elektra-notification not found
-- Exclude component libelektra5-augeas because augeas plugin excluded.
-- Exclude component libelektra5-dbus because dbus plugin excluded.
-- Exclude component libelektra5-zeromq because zeromqrecv, zeromqsend plugins excluded.
-- Exclude component libelektra5-fuse because python binding excluded.
-- Exclude component libelektra5-xmltool because xmltool plugin excluded.
-- Exclude component libelektra5-xerces because xerces plugin excluded.
-- Exclude component libelektra5-yajl because yajl plugin excluded.
-- Exclude component libelektra5-crypto because crypto plugin excluded.
-- Exclude component libelektra5-curl because curlget plugin excluded.
-- Exclude component libelektra5-journald because journald plugin excluded.
-- Exclude component libelektra5-gitresolver because gitresolver plugin excluded.
-- Exclude component libelektra5-yamlcpp because yamlcpp plugin excluded.
-- Exclude component libelektra5-java because jni plugin excluded.
-- Exclude component libelektra5-lua because lua plugin excluded.
-- Exclude component java-elektra because jna binding excluded.
-- Exclude component lua-elektra because lua binding excluded.
-- Exclude component python3-elektra because python binding excluded.
-- Exclude component libelektra5-python because python plugin excluded.
-- Exclude component ruby-elektra because ruby binding excluded.
-- Exclude component libelektra5-ruby because ruby plugin excluded.
-- Exclude component glib-elektra because glib binding excluded.
-- Exclude component io-ev-elektra because io_ev binding excluded.
-- Exclude component io-glib-elektra because io_glib binding excluded.
-- Exclude component io-uv-elektra because io_uv binding excluded.
-- Exclude component elektra-qt-gui because qt-gui tool excluded.
-- Detected unix-amd64. Use make package to build packages (TBZ2).
-- Configuring done
-- Generating done
-- Build files have been written to: /home/admin/libelektra/build
STEFNOTCH-PC:~/libelektra/build$ installation/lib/elektra/tool_exec/build-website
/bin/ash: installation/lib/elektra/tool_exec/build-website: not found
STEFNOTCH-PC:~/libelektra/build$ installation/lib/elektra/tool_exec/run-website
/bin/ash: installation/lib/elektra/tool_exec/run-website: not found
STEFNOTCH-PC:~/libelektra/build$
Anyways, I don't think I'm the right person to fix that particular piece of documentation. I avoid working with shells whenever possible (no autocomplete by default, no documentation popups, badly named commands, stringly-typed, and other UI/UX parts that I just find rather lacking in current implementations). As such, am not exactly well versed with them.
I found some broken or not correctly working links on the website of libelektra (https://www.libelektra.org/home).
Steps to Reproduce the Problem
Batteries Included
Elektrify your Application
Availability (below the video)
Expected Result
The links should lead to the correct destinations and the back-button of my mouse should take me back to the libelektra-homepage.
Actual Result
The links point to the wrong destinations and/or redirects break the functionality of the back-button (you have to go back two pages in the browser by right-clicking the back-button and selecting the entry, directly clicking on the back-button or using the button on the mouse does not work in this cases)
System Information
Related Issue
The issue #4099 mentions some broken links to Linux-packages, which are also on the homepage of libelektra.