| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
It's up to the user of libsamsung-ipc to
(1) setup the client structure
(2) setup the log backends
=> We can't fix it unless we setup the log backend first but that
require a structure...
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
| |
This enables to spot issues that prevents build or tests from working
when using tarballs, like when required files not tracked by automake
are added to git but not to EXTRA_DIST.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using python instead of python3 has several issues:
- Distributions and users can choose python2 as their default python
interpreter. For users this can be done by making a symlink in
/usr/local for instance.
- Guix doesn't have python but has python3 in the PATH. Changing to
python3 makes tests work for Guix system users that use the
scripts/manifest.scm file with guix shell / guix environment.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
Without that fix, the file being created isn't deleted at the end of
the test, so over time the leftover files accumulate in /tmp.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
Without that fix, the file being created isn't deleted at the end of
the test, so over time the leftover files accumulate in /tmp.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
Without that fix, the file being created isn't deleted at the end of
the test, so over time the leftover files accumulate in /tmp.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
| |
In the netdevice(7) manual we have a character array of a fixed size:
struct ifreq {
char ifr_name[IFNAMSIZ]; /* Interface name */
[...]
};
so we don't need a terminating null byte ('\0').
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
Tabs were added by the commit 43983cdb532303224be896ec37e67fa515d87e3e
("Android.mk: fix missing files and build local-modules in guix.scm").
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, we don't ship any of the python test programs:
$ make dist
$ tar tf libsamsung-ipc-0.7.0.tar.xz | grep "\.py$"
so 'make check' fail with the following error when building from a
tarball:
make[4]: Leaving directory
'/tmp/libsamsung-ipc/libsamsung-ipc-0.7.0/samsung-ipc/tests'
fatal: making test-suite.log: failed to create libsamsung-ipc-test.trs
fatal: making test-suite.log: failed to create libsamsung-ipc-test.log
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
Having installation instructions should make it easier to install
libsamsung-ipc.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
| |
Replicant (the Replicant project) is third-person singular.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
While contributing requires to use the git repository (for up to date
code), having a file that mentions that in the tarballs is useful.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
| |
While Android mainly use git, it still enables users to drop a tarball
in an Android tree to build libsamsung-ipc.
In addition Android.mk is mentioned in CONTRIBUTING, so it is useful
to ship along with CONTRIBUTING.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, nv_data-imei compiles fine in git, but if we build
from a tarball, nv_data-imei.h is missing from the tarball:
$ make dist
$ tar tf libsamsung-ipc-0.7.0.tar.xz | grep "ipc-modem.*\.[ch]"
libsamsung-ipc-0.7.0/tools/ipc-modem/ipc-modem-sms.c
libsamsung-ipc-0.7.0/tools/ipc-modem/ipc-modem-log.c
libsamsung-ipc-0.7.0/tools/ipc-modem/ipc-modem.c
libsamsung-ipc-0.7.0/tools/ipc-modem/tests/ipc-modem-sms-test.c
libsamsung-ipc-0.7.0/tools/ipc-modem/tests/ipc-modem-sms-fuzz.c
which then results in a compilation failure:
ipc-modem-log.c:28:10: fatal error: ipc-modem-log.h:
No such file or directory
28 | #include "ipc-modem-log.h"
| ^~~~~~~~~~~~~~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, nv_data-imei compiles fine in git, but if we build
from a tarball, nv_data-imei.h is missing from the tarball:
$ make dist
$ tar tf libsamsung-ipc-0.7.0.tar.xz | grep nv_data-imei
libsamsung-ipc-0.7.0/tools/nv_data-imei.c
which then results in a compilation failure:
CC nv_data-imei.o
nv_data-imei.c:39:10: fatal error: nv_data-imei.h:
No such file or directory
39 | #include "nv_data-imei.h"
| ^~~~~~~~~~~~~~~~
compilation terminated.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
This should help us catch more issues as the PKGBUILD doesn't
necessarily use the same compiler versions than in the guix.scm.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, when compiling libsamsung-ipc with
--enable-strict-cflags, we have the following error:
gprs.c: In function 'ipc_gprs_pdp_context_request_set_setup':
gprs.c:59:17: error:
'strncpy' specified bound 32 equals destination size
[-Werror=stringop-truncation]
59 | strncpy((char *) data->username, username,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60 | sizeof(data->username));
| ~~~~~~~~~~~~~~~~~~~~~~~
gprs.c:61:17: error:
'strncpy' specified bound 32 equals destination size
[-Werror=stringop-truncation]
61 | strncpy((char *) data->password, password,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 | sizeof(data->password));
| ~~~~~~~~~~~~~~~~~~~~~~~
It comes from the fact that the size of the username and password
fields are fixed (to 32) in include/gprs.h:
struct ipc_gprs_pdp_context_request_set_data {
unsigned char enable;
unsigned char cid;
unsigned char magic1[4];
unsigned char username[32];
unsigned char password[32];
unsigned char unknown[32];
unsigned char magic2;
} __attribute__((__packed__));
The issue is that in ipc_gprs_pdp_context_request_set_setup we had the
following code:
int ipc_gprs_pdp_context_request_set_setup(
struct ipc_gprs_pdp_context_request_set_data *data,
unsigned char enable,
unsigned char cid,
const char *username,
const char *password)
{
[...]
strncpy((char *) data->username, username,
sizeof(data->username));
strncpy((char *) data->password, password,
sizeof(data->password));
[...]
return 0;
}
And in the strcpy(3) manual we have:
The strncpy() function is similar, except that at most n bytes of
src are copied. Warning: If there is no null byte among the first
n bytes of src, the string placed in dest will not be
null-terminated.
So if we have a username and/or password of 32 or more characters, the
copied data will not be null terminated hence the warning.
Since username and passwords fields are character array and not
strings, and that the field is padded with zeros anyway we can use
memcpy instead.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, when compiling libsamsung-ipc with
--enable-strict-cflags, we have the following error:
gprs.c: In function 'ipc_gprs_define_pdp_context_setup':
gprs.c:38:9: error:
'strncpy' specified bound 124 equals destination size
[-Werror=stringop-truncation]
38 | strncpy((char *) data->apn, apn, sizeof(data->apn));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It comes from the fact that the size of data->apn is fixed (to 124) in
include/gprs.h:
struct ipc_gprs_define_pdp_context_data {
unsigned char enable;
unsigned char cid;
unsigned char magic;
unsigned char apn[124];
} __attribute__((__packed__));
The issue is that in ipc_gprs_define_pdp_context_setup we had the
following code:
int ipc_gprs_define_pdp_context_setup(
struct ipc_gprs_define_pdp_context_data *data,
unsigned char enable,
unsigned char cid,
const char *apn)
{
[...]
strncpy((char *) data->apn, apn, sizeof(data->apn));
[...]
return 0;
}
And in the strcpy(3) manual we have:
The strncpy() function is similar, except that at most n bytes of
src are copied. Warning: If there is no null byte among the first
n bytes of src, the string placed in dest will not be
null-terminated.
So if we have an apn of 124 or more characters, the copied data will
not be null terminated hence the warning.
Since apn is a character array and not a string, and that the field is
padded with zeros anyway we can use memcpy instead.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that change, Emacs temporary files appear as untracked files
when running git status:
Untracked files:
(use "git add <file>..." to include in what will be committed)
scripts/#guix.scm#
This is because a dot('.') will not match "any character" but will
instead match for dots in files names.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the commit 5f97bb60091a1c4d4335fd02eff2b01e27e7a881 ("tools:
ipc-modem: Move log functions in their own file"), we added new files
for ipc-modem.
That commit was then tested with scripts/guix.scm, which at the time
didn't build ipc-modem, so the issue slipped through the automatic
tests.
So in addition of adding back these missing files in Android.mk, this
commit also makes guix.scm actually build all the local modules.
This was not done before as it required some extensive work.
That work consisted in adding code to retrieve the LOCAL_MODULEs from
the Android.mk, and passing that to the package build and install
procedures (which had to be converted into Guix's G-Expressions
(gexp)[1] to be able to more cleanly get that data). In addition,
making contributions to android-make-stub was needed as well.
Having some of the parsing done in the guix.scm file instead of
android-make-stub is needed because otherwise the android-make-stub
design would probably need to be redone: android-make-stub consists of
some Makefiles that are passed to make via -f, and that in turn
these Makefiles include the Android.mk in the local directory.
This doesn't make it possible to handle dependencies cleanly, as to do
that, the Android.mk would need to first be parsed through another
mean to understand the dependencies tree, and then to build the local
modules in order.
And that would need to be done in some compatible way not to break
existing users of android-make-stub (like Guix that builds some
Android packages with it).
[1]https://guix.gnu.org/en/manual/devel/en/guix.html#G_002dExpressions
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The CFLAGS that are in the %common-strict-cflags in scripts/guix.scm
have been validated with both GCC and CLANG and they are useful to
find potential issues in the code or code that won't compile on
Android.
However while the scripts/guix.scm script is really useful to test
commits once they are ready, it is less convenient to use it when
fixing issues in commits that are still being worked on.
This is because it is not as fast as building libsamsung-ipc directly
because:
- it requires a clean source directory to work (this can be done with
make distclean) so we can't reuse the current build output
- libsamsung-ipc source code is copied and built 5 times (in different
configurations)
As for the implementation, AM_CFLAGS was used instead of appending to
the default CFLAGS as CFLAGS is meant to be a variable for users. The
effect is that both are independent, so if users don't want strict
CFLAGS, they would need to not use --enable-strict-cflags.
And it was implemented as a shell script to at the same time:
- Enable to have comments, and good formating of the flags.
- Enable to share the cflags between guix.scm and the autotools.
- Keep the complexity low to keep it working in most situations.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
| |
This helps avoiding including twice the same header by accident.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
| |
If the following fails:
data.client = ipc_client_create(IPC_CLIENT_TYPE_DUMMY);
then we cannot use ipc_modem_log, but we can use printf instead.
This bug was introduced in commit aa738074f34c ("tools: ipc-modem:
convert to sysexits.h").
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, when running the following commands:
$ cd tools
$ makepkg
we have:
../../../tools/nv_data-imei.c: In function ‘write_imei’:
../../../tools/nv_data-imei.c:769:9: warning:
ignoring return value of ‘asprintf’
declared with attribute ‘warn_unused_result’ [-Wunused-result]
769 | asprintf(&md5_path, "%s.md5", nv_data_path);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix we have the following warning:
CC modems/xmm626/xmm626_kernel_smdk4412.lo
../../../samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c:
In function 'xmm626_kernel_smdk4412_gprs_get_iface':
../../../samsung-ipc/modems/xmm626/xmm626_kernel_smdk4412.c:589:9:
warning: ignoring return value of 'asprintf' declared with attribute
'warn_unused_result' [-Wunused-result]
589 | asprintf(&iface, "%s%d", XMM626_[...]_IFACE_PREFIX, cid - 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC modems/xmm626/xmm626_mipi.lo
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix we have the following warning:
../../../samsung-ipc/devices/aries/aries.c:
In function 'aries_gprs_get_iface':
../../../samsung-ipc/devices/aries/aries.c:826:9: warning:
ignoring return value of 'asprintf' declared with attribute
'warn_unused_result' [-Wunused-result]
826 | asprintf(&iface, "%s%d", ARIES_GPRS_IFACE_PREFIX, cid - 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix we have the following warning:
../../../samsung-ipc/devices/crespo/crespo.c:
In function 'crespo_gprs_get_iface':
../../../samsung-ipc/devices/crespo/crespo.c:587:9: warning:
ignoring return value of 'asprintf' declared with attribute
'warn_unused_result' [-Wunused-result]
587 | asprintf(&iface, "%s%d", CRESPO_GPRS_IFACE_PREFIX, cid - 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix we have the following warning:
../../../samsung-ipc/devices/crespo/crespo.c:
In function 'crespo_gprs_get_iface_single':
../../../samsung-ipc/devices/crespo/crespo.c:562:9: warning:
ignoring return value of 'asprintf' declared with attribute
'warn_unused_result' [-Wunused-result]
562 | asprintf(&iface, "%s%d", CRESPO_GPRS_IFACE_PREFIX, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, we have the following warning:
../../../../samsung-ipc/tests/partitions/android.c:
In function ‘create_dummy_modem_image’:
[...]
../../../../samsung-ipc/tests/partitions/android.c:53:9: warning:
ignoring return value of ‘system’ declared with attribute
‘warn_unused_result’ [-Wunused-result]
53 | system("touch /tmp/libsamsung-ipc.[...]/modem.img");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CCLD libsamsung-ipc-test
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, we have the following warning:
CC partitions/android.o
../../../../samsung-ipc/tests/partitions/android.c:
In function ‘create_dummy_modem_image’:
../../../../samsung-ipc/tests/partitions/android.c:52:9: warning:
ignoring return value of ‘system’ declared with attribute
‘warn_unused_result’ [-Wunused-result]
52 | system("mkdir -p /tmp/libsamsung-ipc.55f4731d2e11e85bd889/");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the Android.mk we have the following:
ifneq ($(TARGET_DEVICE),)
libsamsung_local_cflags += -DIPC_DEVICE_NAME=\"$(ipc_device_name)\"
endif # ifneq ($(TARGET_DEVICE),)
This makes libsamsung-ipc assume that it runs on a specific device.
It can for instance be useful to test libsamsung-ipc on a device very
similar to one that is already supported, or during development.
The issue is that, with autotools and without this patch, this feature
is not easy to use as to force the i9300 device we would have to run
configure in this way:
./configure CFLAGS='-DIPC_DEVICE_NAME=\"i9300\"'
And we had no feedback that could indicate if it worked or not.
Note that even now, the only feedback we have is the output of
./configure because the autodetection of the device is done in
ipc_device_detect.
And ipc_device_detect is called by ipc_transport_client_create which
setups the ipc_client struct. And without a valid ipc_client struct,
we cannot use ipc_client_log, so we can't print in ipc_device_detect.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, ./configure --enable-debug doesn't change the
default CFLAGS as it should.
This bug was introduced in the commit 6d394a3f9629 ("Makefile.am: move
-ggdb and -O0 CFLAGS to configure.ac").
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Some ./configure options like --enable-valgrind-tests and
--enable-debug do change the default CFLAGS.
As CFLAGS is a variable reserved for the user, it is a good idea to
tell the people building libsamsung-ipc that we are changing the
CFLAGS defaults behind the scenes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
| |
This handles documented return codes.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
| |
CURLU_ALLOW_SPACE is available since curl 7.78.0, and not using it
could enable us to be compatible with curl 7.62.0.
Since Replicant 11 has curl 7.67.0, this should enable to run
https-send-sms on Replicant 11.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This can then be used during automatic tests, but the downside is that
for now this tool only works with one provider.
The following symbols from (lib)curl (along with their corresponding
minimal (lib)curl version) have been used:
+------------------------+---------------------------+
| curl symbols | minimum (lib)curl version |
+------------------------+---------------------------+
| CURL_HTTP_VERSION_2TLS | 7.47.0 |
| CURLUPART_URL | 7.62.0 |
| CURLUPART_QUERY | 7.62.0 |
| CURLU_URLENCODE | 7.62.0 |
| CURLU_APPENDQUERY | 7.62.0 |
| CURLU | 7.62.0 |
| CURLU_ALLOW_SPACE | 7.78.0 |
+------------------------+---------------------------+
So we need to depend on curl 7.78.0.
And we currently have the following curl version:
+----------------------------+--------------------+------------+
| Distribution | (lib)curl version | Compatible |
+----------------------------+--------------------+------------+
| Replicant 4.2 | Doesn't have curl | No |
| Guix 6b9105e557 | 7.28.1 | No |
| Trisquel 7 x86_64 | 7.35.0-1ubuntu2.20 | No |
| Replicant 6 | 7.43.0 | No |
| Debian stretch x86_64 | 7.52.1-5+deb9u10 | No |
| Replicant 11 | 7.67.0 | No |
| Parabola i686 (07/04/2022) | 7.79.0-3.0 | Yes |
| Guix i686 (07/04/2022) | 7.79.1 | Yes |
+----------------------------+--------------------+------------+
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
This enables to break long lines and it also handles the formatting
automatically.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
With this patch, running the following command in a clean git tree:
$ ./configure && make && make check
$ git status
doesn't show any untracked files or directories anymore.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running makepkg in the scripts directory creates some packages and
temporary directories. As these files and directories are not in
gitignore, they appear in the list of untracked files and directories
in git status.
Note that as the PKGBUILD is also modified in the process: it retrieve
the local libsamsung-ipc git revision and then updates the PKGBUILD
with that information.
For instance if locally we made some local commits and that we have
the 113695fa7d455af5ff01457e5b8bb05591534711 git revision, the
PKGBUILD will be modified as follows:
-pkgver=0.3.1.r703.7c5e96a
+pkgver=0.3.1.r743.113695f
This enables to precisely track the git revision being used which is a
good thing for development and testing (this PKGBUILD is meant for
that) as users or developers can then know which version they are
running.
The issue is that if this modification is added to a git commit, then
the revision changes again and the next time makepkg is run, the
revision will change again.
However as far as I know it's not really possible to fix that (without
doing bruteforce computations) so the PKGBUILD will still end up in
the list of untracked files in git status.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When running the tests with --enable-valgrind-tests, many
valgrind.*.log files are produced in several directories.
As the '*' is replaced by the pid of the process being monitored, over
time the number of valgrind log files keep increasing at each 'make
check' run, so without this patch, git status shows many
valgrind.*.log in the list of untracked files.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
| |
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
| |
This has several advantages:
- This makes the code cleaner as we now have a more abstract logging
and less code in the main c file.
- If new files are added, this will enable to use logging functions in
the new files.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
| |
This enables to then split ipc-modem in several files in a clean way.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables contributors to run Valgrind when running 'make check'
for instance before sending patches.
The --enable-valgrind option was used instead of using
--enable-checking=valgrind like GCC uses as the code for that is much
easier to get right.
As Valgrind is very slow, I had to increase the timeouts in the
ipc-modem tests. For now I settled on 60 seconds to have some margin
for machines or setups that are potentially slower than the one I use.
For the guix.scm, with Guix 1.3.0, Valgrind needs the ld.so .symtab to
work, so as Valgrind doesn't know where to find them, so we had to use
--extra-debuginfo-path for that.
This is also why we pass '-v' to valgrind as it prints message
explaining the issue when it doesn't find the required symbols.
And we also needed a trick mentioned in the Guix mailing list[1] to
find the right path for the debug information as the glibc being used
by packages isn't exported publicly.
[1]https://lists.gnu.org/archive/html/help-guix/2022-03/msg00036.html
The proper fix will be merged in the next Guix release (merging it now
is not possible since it would require to rebuild everything, and that
is only possible with new releases).
A temporary workaround with 4d1a88312cbebb10d47905d6d023953ac85bcd04
(gnu: valgrind: Allow ld.so symbols to be found.) was also merged in
the current Guix so it is possible to get it with guix pull, but here
it's probably better to stick with a workaround in the guix.scm for
now as this also enables to use older guix revisions for testing.
Thanks to the people on #guix on Liberachat for helping me to solve
this Valgrind issue.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
| |
This makes sure that all the program and libraries being built have
the same obtimization level and debug CFLAGS.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
| |
Replicant 6.0 is currently the main project using libsamsung-ipc and
it uses --enable-debug to show the hexadecimal dump of the samsung-ipc
packets, so it's a good idea to do compilation tests with it.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
| |
In the definitions of all the other part of this Makefile.am and in
all other Makefile.am, the leading whitespaces are tabs.
This makes sure that AM_CFLAGS also use leading tabs.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without that fix, the --enable-debug is missaligned with the other
help that is around it:
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
--enable-static[=PKGS] build static libraries [default=no]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-debug Enable debug build (default=disabled)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
--with-aix-soname=aix|svr4|both
shared library versioning (aka "SONAME") variant to
provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|