There exists a website of the FSF with more information and contacts regarding GPL violations:
gpl-violations.org/
and even a wikipedia page linking also to the website:
en.wikipedia.org/wiki/Gpl-violations.org
Read More...
Hi Jasem,
I think it should work and one could integrate it into the github CI process. It actually works as follows:
For demonstration I ill-formatted:
diff --git a/examples/tutorial_one/simpledevice.cpp b/examples/tutorial_one/simpledevice.cpp
index cbb68f65e..82e5d76eb 100644
--- a/examples/tutorial_one/simpledevice.cpp
+++ b/examples/tutorial_one/simpledevice.cpp
@@ -30,15 +30,14 @@ std::unique_ptr<SimpleDevice> simpleDevice(new SimpleDevice());
***************************************************************************************/
bool SimpleDevice::Connect()
{
- IDMessage(getDeviceName(), "Simple device connected successfully!");
- return true;
+IDMessage(getDeviceName(), "Simple device connected successfully!");
+return true;
}
/**************************************************************************************
** Client is asking us to terminate connection to the device
***************************************************************************************/
-bool SimpleDevice::Disconnect()
-{
+bool SimpleDevice::Disconnect() {
IDMessage(getDeviceName(), "Simple device disconnected successfully!");
return true;
}
diff --git a/examples/tutorial_one/simpledevice.h b/examples/tutorial_one/simpledevice.h
index 0b0dbf709..b02ac03c0 100644
--- a/examples/tutorial_one/simpledevice.h
+++ b/examples/tutorial_one/simpledevice.h
@@ -25,7 +25,7 @@
class SimpleDevice : public INDI::DefaultDevice
{
- public:
+public:
SimpleDevice() = default;
protected:
$ for f in `git diff --name-only origin/master`; do .circleci/check-codestyle.sh "${f}"; done
***************************************************************************************/
bool SimpleDevice::Connect()
{
[STYLE WARNING] IDMessage(getDeviceName(), "Simple device connected successfully!");
[STYLE WARNING] return true;
}
/**************************************************************************************
** Client is asking us to terminate connection to the device
***************************************************************************************/
[STYLE WARNING] bool SimpleDevice::Disconnect()
[STYLE WARNING] {
IDMessage(getDeviceName(), "Simple device disconnected successfully!");
return true;
}
File examples/tutorial_one/simpledevice.cpp has style warning(s), see https://github.com/indilib/indi/blob/master/README.md
class SimpleDevice : public INDI::DefaultDevice
{
[STYLE WARNING] public:
SimpleDevice() = default;
protected:
File examples/tutorial_one/simpledevice.h has style warning(s), see https://github.com/indilib/indi/blob/master/README.md
Hello Benjamin,
one can quickly check files for compilation in e.g. the DEB package libindi-dev
$ dpkg-query -L libindi-dev
/.
/usr
/usr/include
/usr/include/libindi
/usr/include/libindi/abstractbaseclient.h
/usr/include/libindi/alignment
/usr/include/libindi/alignment/AlignmentSubsystemForDrivers.h
/usr/include/libindi/alignment/AlignmentSubsystemForMathPlugins.h
...
/usr/include/libindi/v4l2_decode.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libindiAlignmentClient.a
/usr/lib/x86_64-linux-gnu/libindiclient.a
/usr/lib/x86_64-linux-gnu/libindidriver.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/libindi.pc
/usr/share
/usr/share/doc
/usr/share/doc/libindi-dev
/usr/share/doc/libindi-dev/AUTHORS
/usr/share/doc/libindi-dev/NEWS.gz
/usr/share/doc/libindi-dev/README.gz
/usr/share/doc/libindi-dev/changelog.gz
/usr/share/doc/libindi-dev/copyright
/usr/lib/libindiclient.so
/usr/lib/libindidriver.so
/usr/lib/libindilx200.so
/usr/lib/x86_64-linux-gnu/libindiAlignmentDriver.so
/usr/lib/x86_64-linux-gnu/libindiclient.so
/usr/lib/x86_64-linux-gnu/libindidriver.so
/usr/lib/x86_64-linux-gnu/libindilx200.so
$ g++ simpleccd.cpp -o simpleccd -I/usr/include/libindi -lindiclient -lindidriver && file simpleccd
simpleccd: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=94b50e8cba51f2f174afab03cc6e7a986f3606e4, for GNU/Linux 3.2.0, not stripped
indi/examples/tutorial_seven
$g++ simple_telescope_simulator.cpp -o simple_telescope_simulator -I/usr/include/libindi -lindiclient -lindidriver && file simple_telescope_simulator
/usr/bin/ld: /tmp/ccESuSgI.o: undefined reference to symbol 'ln_get_julian_from_sys'
/usr/bin/ld: /lib/x86_64-linux-gnu/libnova-0.16.so.0: error adding symbols: DSO missing from command line
/usr/lib/x86_64-linux-gnu/libindiAlignmentDriver.so
$ g++ simple_telescope_simulator.cpp -o simple_telescope_simulator -I/usr/include/libindi -lindiAlignmentDriver -lnova -lindiclient -lindidriver && file simple_telescope_simulator
simple_telescope_simulator: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=13d9b3c7720caec9ea05288289ee79c28e915b43, for GNU/Linux 3.2.0, not stripped
Sticking with astyle is probably a simpler approch and it is already documented in README.md as you mentioned.
With astyle one could also hook into github's CI
steps:
- script: sudo apt-get install -y astyle
displayName: 'Install extra package'
- bash: for f in `git diff --name-only origin/master`; do check_cstyle.sh "${f}"; done
displayName: 'C style check'
#!/bin/bash
FILE_TO_CHECK=${1}
RC=0
# Make sure file exists and has proper suffix.
if [[ ! -f "${FILE_TO_CHECK}" ]] || [[ ! "${FILE_TO_CHECK##*\.}" =~ ^[cpp,cxx,c,h,C,H]$ ]]; then
exit ${RC}
fi
TMP_FILE_DIFF=$(mktemp /tmp/indi.diff.XXXXXXXXX)
TMP_FILE_ASTYLE=$(mktemp /tmp/indi.astyle.XXXXXXXXX)
TMP_FILE_WARNINGS=$(mktemp /tmp/indi.warning.XXXXXXXXX)
ASTYLE_OPTIONS="--style=allman
--align-reference=name
--indent-switches
--indent-modifiers
--indent-classes
--pad-oper
--indent-col1-comments
--lineend=linux
--max-code-length=124"
git diff --function-context --unified=1 HEAD ${FILE_TO_CHECK} | sed -e '/diff --git/,+3d;/^@@/d;/^-/d;s/^+/ /' | cut -d' ' -f2- > ${TMP_FILE_DIFF}
astyle ${ASTYLE_OPTIONS} -n < ${TMP_FILE_DIFF} > ${TMP_FILE_ASTYLE}
diff -u ${TMP_FILE_DIFF} ${TMP_FILE_ASTYLE} | tail -n +3 | sed -e '/^-/d;/^@@/d;s/^+/[STYLE WARNING] /' > ${TMP_FILE_WARNINGS}
if [[ -s ${TMP_FILE_WARNINGS} ]]; then
cat ${TMP_FILE_WARNINGS}
RC=1
fi
if [[ ${RC} -eq 1 ]]; then
echo -e "File ${FILE_TO_CHECK} has style warning(s), see" \
"https://github.com/indilib/indi/blob/master/README.md"
fi
rm -f ${TMP_FILE_DIFF} ${TMP_FILE_ASTYLE} ${TMP_FILE_WARNINGS}
exit ${RC}
Hi there,
is there an official INDI code style (e.g. clang-format) file?
In the core INDI repo exists only the style file
./drivers/spectrograph/shelyak/.clang-format
./.clang-format
./indi-libcamera/libcamera-apps/.clang-format
CMakeLists.txt
# Clang Format support
if(UNIX OR APPLE)
set(FORMAT_CODE OFF CACHE BOOL "Enable Clang Format")
...
Hello Daniel,
the INDI Gphoto driver uses the libgphoto2 library to communicate with the DSLR.
Setting the camera's SD card is basically the same as e.g. using the command line tool and setting:
gphoto2 --set-config capturetarget=1
Hmm that is strange. I just booted by RPi and checked the version and installed it without any problems:
[indi@indiberry ~]$ lsb_release -a && apt info libev-dev && sudo apt install -y libev-dev
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Package: libev-dev
Version: 1:4.25-1
Priority: optional
Section: libdevel
Source: libev
Maintainer: Boyuan Yang <byang@debian.org>
Installed-Size: 214 kB
Depends: libev4 (= 1:4.25-1)
Homepage: http://software.schmorp.de/pkg/libev.html
Download-Size: 125 kB
APT-Sources: http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
Description: static library, header files, and docs for libev
Static library, header files, and documentation for libev.
.
libev provides a full-featured and high-performance event loop that is
loosely modelled after libevent. It includes relative timers, absolute
timers with customized rescheduling, synchronous signals, process status
change events, event watchers dealing with the event loop itself, file
watchers, and even limited support for fork events. It uses a priority
queue to manage timers and uses arrays as fundamental data structure. It
has no artificial limitations on the number of watchers waiting for the
same event.
.
libev supports select, poll, epoll, kqueue, and inotify.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libev4
The following NEW packages will be installed:
libev-dev libev4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 160 kB of archives.
After this operation, 292 kB of additional disk space will be used.
Get:1 http://ftp.halifax.rwth-aachen.de/raspbian/raspbian buster/main armhf libev4 armhf 1:4.25-1 [34.5 kB]
Get:2 http://mirror.de.leaseweb.net/raspbian/raspbian buster/main armhf libev-dev armhf 1:4.25-1 [125 kB]
Fetched 160 kB in 0s (357 kB/s)
Selecting previously unselected package libev4:armhf.
(Reading database ... 289593 files and directories currently installed.)
Preparing to unpack .../libev4_1%3a4.25-1_armhf.deb ...
Unpacking libev4:armhf (1:4.25-1) ...
Selecting previously unselected package libev-dev.
Preparing to unpack .../libev-dev_1%3a4.25-1_armhf.deb ...
Unpacking libev-dev (1:4.25-1) ...
Setting up libev4:armhf (1:4.25-1) ...
Setting up libev-dev (1:4.25-1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1) ...
[indi@indiberry ~]$
wget http://ftp.cz.debian.org/debian/pool/main/libe/libev/libev-dev_4.25-1_armhf.deb && sudo dpkg --install ./libev-dev_4.25-1_armhf.deb
What Debian version are you running?
[tstibor@apollo ~]$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
The header file is in package libev-dev (on Debian bullseye, and probably also in earlier Debian versions)
[tstibor@apollo ~]$ apt-file search /usr/include/ev.h
libev-dev: /usr/include/ev.h