Commit Graph

74 Commits

Author SHA1 Message Date
Harald Welte 3dfabb1494 Add README.md to explain what this is all about
Change-Id: Idb8b7ac9ee93e93971376644444e434c41aa18fa
2024-03-26 08:09:33 +00:00
Pau Espin 7965ac7a2e Bump version: 0.9.35.7-a1a8 → 0.9.36
Change-Id: I34d172f7aa73c4e9b83ac553403b9ca248ee0aed
2023-09-12 12:34:29 +02:00
Oliver Smith a1a8861cdf INTEGER: ignore warning for all GCC versions
The warning appears again with GCC 12 in Debian 12, causing the build to
fail with --enable-werror. GCC 11 did not complain about it. As there
are numerous bug reports about this in GCC's bug tracker, just disable
it for all GCC versions.

Related: adaa1c62e1
Related: OS#6057
Change-Id: I48d9d423df47f23a0ef3ea727a40b53d70aec48b
2023-07-13 13:46:27 +02:00
Pau Espin 3e483e5950 Disable _ASN_STACK_OVERFLOW_CHECK if building with Asan enabled
Related: OS#6025
Change-Id: I2dda4720f3ea5a023d340863db177e6334beeaa3
2023-05-05 13:15:54 +02:00
Pau Espin 5cdcaffc15 .gitignore: Add configure~
Change-Id: Ie46723fe3ad5b27813c102e068f433215692271f
2023-05-04 18:37:33 +02:00
Oliver Smith 02b349dd79 debian: set compat level to 10
Related: OS#5958
Change-Id: I393d7e1211e6f9ace420a874a0582208c939bbc2
2023-04-25 16:48:16 +02:00
Oliver Smith adaa1c62e1 INTEGER: ignore invalid -Warray-bounds from GCC-10
GCC 10.2.1 20210110 from Debian 11 generates an invalid Warray-bounds
error. It was fixed in future GCC versions, I verified it with GCC
11.3.0. Ignore the warning, so we can build on Debian 11 with -Werror.

Fix for:
  INTEGER.c: In function ‘asn_int642INTEGER’:
  INTEGER.c:1340:34: error: array subscript 0 is outside array bounds of ‘int64_t[1]’ {aka ‘long int[1]’} [-Werror=array-bounds]
   1340 |  for(pstart = p, bp = buf, pend1 += add; p != pend1; p += add)
        |                            ~~~~~~^~~~~~
  INTEGER.c:1296:42: note: while referencing ‘value’
   1296 | asn_int642INTEGER(INTEGER_t *st, int64_t value) {
        |                                  ~~~~~~~~^~~~~

Related: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93582
Change-Id: Ic10407e6d484ae29dc39edbdc6fcd0145e17e773
2023-03-21 15:24:37 +00:00
Vadim Yanitskiy d762965f77 src/Makefile.am: libraries shall not be in LDFLAGS but in LIBADD
Change-Id: I53dd51ab1f4666c42851a6cbdf1ee970530edee1
2023-03-13 04:35:16 +07:00
Oliver Smith be3a5105d0 debian/control: replace, conflict: osmo-libasn1c
In debian, this Osmocom fork of libasn1c is packaged as osmo-libasn1c.
Add related Replaces: and Conflicts: to debian/control, so there is no
error when installing osmo-libasn1c from Debian first, then configuring
the Osmocom package repositories and trying to install libasn1c from
there.

Fix for:
  Preparing to unpack .../08-libasn1c1_0.9.34.1.71cb.202302010006_amd64.deb ...
  Unpacking libasn1c1:amd64 (0.9.34.1.71cb.202302010006) ...
  dpkg: error processing archive /tmp/apt-dpkg-install-8zK3sm/08-libasn1c1_0.9.34.1.71cb.202302010006_amd64.deb (--unpack):
   trying to overwrite '/usr/lib/x86_64-linux-gnu/libasn1c.so.1.0.1', which is also in package osmo-libasn1c1:amd64 0.9.32-1+b1
  dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

Related: OS#5318
Related: https://salsa.debian.org/debian-mobcom-team/osmo-libasn1c/-/blob/master/debian/control
Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Binary_Packages
Change-Id: I5116df35b5819c22a184057cdf6ed756974d6388
2023-02-08 16:11:32 +01:00
Pau Espin 40bd9bd0b0 Bump version: 0.9.34.1-71cb → 0.9.35
Change-Id: I83f1eb903ea083382451eb82d155ae59195c985e
2023-02-07 14:09:41 +01:00
Neels Hofmeyr 71cb3d49a8 fix 3 indents to avoid build failure with -Werror
The build failures complain about misleading indentation:

 ../../../src/libasn1c/src/per_decoder.c:161:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
  161 |         if(!td->aper_decoder)
      |         ^~
 ../../../src/libasn1c/src/per_decoder.c:163:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  163 |                 rval = td->aper_decoder(opt_codec_ctx, td, 0, sptr, &pd);
      |                 ^~~~

Change-Id: I9ebd0de9135722bb718e2a5067f9b8238d0483dc
2022-07-19 14:04:21 +02:00
Pau Espin de641e557f Bump version: 0.9.33.1-3bbf → 0.9.34
Change-Id: Iff6d90fa291eea2dab06d21a8a91618acd622553
2022-06-28 16:03:31 +02:00
Eric Wild 3bbf20f17c configure.ac: fix libtool issue with clang and sanitizer
As pointed out at https://github.com/libexpat/libexpat/issues/312
libtool does not play nice with clang sanitizer builds at all. For those
builds LD shoud be set to clang too (and LDFLAGS needs the sanitizer
flags as well), because the clang compiler driver knows how linking to
the sanitizer libs works, but then at a later stage libtool fails to
actually produce the shared libraries and the build fails. This is fixed
by this patch.

Addtionally LD_LIBRARY_PATH has no effect on conftest runs during
configure time, so the rpath needs to be set to the asan library path to
ensure the configure run does not fail due to a missing asan library,
i.e.:

SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan' export
CC=clang-10 ASANPATH=$(dirname `$CC
-print-file-name=libclang_rt.asan-x86_64.so`) export
LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS"

Change-Id: Ie38fa9985187c76b4e456d8b0a83006ef341b97e
2022-05-23 23:57:56 +02:00
Pau Espin 97ae853ef5 Bump version: 0.9.32.4-c0d4 → 0.9.33
Change-Id: I8643f527238202149ef2fceb7c7c98cfe8dc9563
2021-02-23 16:52:29 +01:00
Pau Espin c0d470b9bb contrib/jenkins: Enable parallel make in make distcheck
Change-Id: Ife6c5b37ce34923a3379703bc6460a5760a815e8
Related: OS#4421
2020-10-12 19:23:15 +02:00
Vadim Yanitskiy a6778f4494 debian/control: change maintainer to the Osmocom team / mailing list
Change-Id: Ib039e0f4a8bfd713ed1df99119c21471af8fc00c
2020-08-13 16:09:02 +07:00
Oliver Smith 4241320034 contrib: integrate RPM spec
Remove OpenSUSE bug report link, set version to @VERSION@, make it build with CentOS 8 etc.

Related: OS#4550
Change-Id: Ic075dd5a53cc76cf1b6aeca5c31db495882db915
2020-05-19 15:21:17 +02:00
Oliver Smith 1665f595fc contrib: import RPM spec
Copy the RPM spec file from:
https://build.opensuse.org/project/show/home:mnhauke:osmocom:nightly

Related: OS#4550
Change-Id: I7f20905413877c5b94cf0526dbef914a8148585f
2020-05-14 11:37:35 +02:00
Pau Espin 19205a38c3 Bump version: 0.9.31.4-cd14-dirty → 0.9.32
Change-Id: Id7d60b7d7f4fa50d980c7636041eb36810c748ac
2019-08-07 13:26:11 +02:00
Pau Espin 8ca552813c Fix LIBVERSION not applied
Change-Id: I232c2fdcc5e9dc821fbea6e7dc498b6ed5b460a9
2019-08-07 13:25:49 +02:00
Oliver Smith cd145f87be contrib/jenkins.sh: run "make maintainer-clean"
Related: OS#3047
Change-Id: If91b10d37cb4c940e009c12b232d042305d57886
2019-07-10 11:53:57 +02:00
Oliver Smith 5e00d6fd80 Revert "jenkins.sh: disable parallel build"
This reverts commit a352642587d8835deb3c6f55da7986f427835157.

I've confused the libasn1c and asn1c repositories. libasn1c does not
need this workaround, asn1c does.

Related Change-Id: I80eecc60b96e87710218089dfdd1a3f87b40a8b1 (asn1c)
Change-Id: I73eac905524688939e133b6f91ad85514dc0393a
2018-12-21 16:58:30 +01:00
Oliver Smith f0eeca5cb3 jenkins.sh: disable parallel build
Avoid a race condition that causes the build to fail on Jenkins with:

asn1p_y.y: In function 'asn1p_parse':
asn1p_y.y:357:13: error: 'param' undeclared (first use in this function)
   *(void **)param = $1;
             ^~~~~

Change-Id: Ib853a93bffc4cd78d4f08624fb1e56772ce68ce5
2018-12-07 11:05:18 +01:00
Pau Espin 6d2cea2d1d debian/rules: Don't overwrite .tarball-version
The .tarball-version file should contain the *source version* uniquely
identifying the git commit, and not the Debian package name.

With https://gerrit.osmocom.org/#/c/osmo-ci/+/10343/ there is a correct
.tarball-version file in the .tar.xz of the nightly source packages.

Related: OS#3449
Change-Id: I61a7995edf9fbc06db88ab391d32a988c3760c19
2018-09-17 10:45:38 +02:00
Pau Espin d36012fb02 Bump version: 0.9.30.1-3dc5 → 0.9.31
Change-Id: I8d192b1d29a47729a7c728dc35448e2daf6b9743
2018-05-04 12:15:34 +02:00
Alexander Couzens 3dc50c737d debian: set VERSION to fix version in .pc files
The pkgconf file contains an unknown version which result in failure
of other packages which depend on a minimum version (osmo-iuh)

Change-Id: I65401786cf9eb63d3445f548dc13c1d3f9f4c1ea
2018-05-04 02:07:51 +02:00
Pau Espin 7dd8376c8f Bump version: 0.9.29.1-42b1 → 0.9.30
Change-Id: I5e4817c04a980d099c146f977adf6f15f7bd56b0
2018-05-03 18:23:35 +02:00
Pau Espin 42b18e2bb8 configure.ac: Use git-version-gen to set VERSION
We updated to 0.9.29 tag, but configure.ac was locked to 0.9.28, which
means release 0.9.29 is going to generated an old version and thus is
broken. A new release will follow this commit.

Change-Id: I8e1665f21d1bc76922423cabad3df72a2502f559
2018-05-03 18:21:05 +02:00
Pau Espin 671fef29c1 Bump version: 0.9.28 → 0.9.29
Change-Id: Ib7cc5d297496b7f7235145602f98d6aef614e531
2018-05-03 17:18:02 +02:00
Pau Espin 10d1ab4936 debian/changelog: Set previous versions to unstable
Otherwise make rlease overwrittes the latest UNRELEASED one.

Change-Id: Ic6a9b1d6c7724b15c69e780d562007b22af141e6
2018-05-03 17:17:36 +02:00
Pau Espin 96ef99e700 build: Support make release target
Change-Id: I04b9ff47f55df0e19d8e93530fb6ccf8bdb0660b
2018-05-03 17:15:26 +02:00
Pau Espin 2745372f00 .gitignore: add compile
Change-Id: I27a8663cc48ca7a76fb1cdf4ad103a854febc812
2018-05-03 17:12:10 +02:00
Neels Hofmeyr 202022eaa9 jenkins.sh: use --enable-werror configure flag, not CFLAGS
Change-Id: I4791c6a32d983869692df36172f93adee819debb
2018-03-05 20:50:26 +01:00
Neels Hofmeyr 6e152f2582 configure: add --enable-werror
Provide a sane means of adding the -Werror compiler flag.

Currently, some of our jenkins.sh add -Werror by passing 'CFLAGS="-Werror"',
but that actually *overwrites* all the other CFLAGS we might want to have set.

Maintain these exceptions from -Werror:
a) deprecation (allow upstream to mark deprecation without breaking builds);
b) "#warning" pragmas (allow to remind ourselves of errors without breaking
   builds)

As a last configure step before generating the output files, print the complete
CFLAGS and CPPFLAGS by means of AC_MSG_RESULT.

Change-Id: Ibcc8238584a585434b39a046cd2d7e18ddaf7f8c
2018-03-05 20:40:21 +01:00
Neels Hofmeyr bd2173796d add --enable-sanitize config option
Change-Id: I8f641c4bce361dcef5d8c149b8b81b21f12cbadf
2017-11-17 02:05:32 +01:00
Neels Hofmeyr 0a43310182 jenkins: use osmo-clean-workspace.sh before and after build
See osmo-ci change I2409b2928b4d7ebbd6c005097d4ad7337307dd93 for rationale.

Depends: I2409b2928b4d7ebbd6c005097d4ad7337307dd93
Change-Id: If5d252dc679e47a8375361d0ff278b7b98768f26
2017-10-28 16:21:02 +00:00
Neels Hofmeyr d5ee1ed734 jenkins: add missing set -e to catch build errors
Change-Id: I9f6b015b09c60c18d213dde5bbdcfc527096a10f
2017-10-28 15:40:50 +00:00
Neels Hofmeyr 551e9c94b3 fix compiler warning: drop dead code from BIT_STRING_fromBuf()
The warning is, on FreeBSD,

  CC       asn1helpers.lo
asn1helpers.c:68:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare]
        if (len < 0)
            ~~~ ^ ~

Change-Id: I80867da697d744d7ef4d70c8f24031f5781fb11a
2017-10-28 15:09:05 +00:00
Harald Welte 0e1a6450a4 link libasn1c against libmath, don't ask users to do it
libasn1c is using libm[ath] symbols from REAL.c and hence should be
linked using '-lm' to carry a dynamic linker dependency itself.

We shouldn't use a pkg-config hack to ask applications to do this on
our behalf.

Change-Id: Ie107f7252eeed90233468deaef57d3cee36abdf4
2017-10-28 13:58:23 +02:00
Harald Welte a4d72b02e2 Sync debian package version (0.9.28) with acversion
All of this code is from asn1c 0.9.28, so let's make sure
autoconf + debian packaging agree on the version numbering

Change-Id: Ie8dc8f5df7123d4bf7579f6f4e84b7cc33d49607
2017-10-27 20:09:16 +00:00
Harald Welte 8d9147a764 Fix compiler warning
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~

Change-Id: I442e60413b3bee6d365cd5df672a558d68998670
2017-10-27 22:05:31 +02:00
Harald Welte b7c145daa4 Fix compiler warning
In file included from asn1helpers.c:14:0:
../include/asn1c/asn1helpers.h: In function ‘OCTET_STRING_noalloc’:
../include/asn1c/asn1helpers.h:26:9: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  s->buf = str;
         ^

Change-Id: Ie2fefe710090de779137c36b98239ef4a097b6dd
2017-10-27 22:05:13 +02:00
Harald Welte aaae8c7649 debian/copyright: Code in this repository is under BSD-2-Clause
The license is not a 3-clause BSD, but a 2-clause BSD.  Couldn't
find any trace to a 3rd clause anywhere.

Change-Id: I4f908ce4f670e062e6808ac7966d0e52bfe6b4f9
2017-08-14 06:15:31 +00:00
Harald Welte c8512b1510 Re-license asn1helper.c under identical license as upstream
asn1helpers.c originally existed in the repository of an application
(osmo-hnbgw, IIRC), and hence was under AGPLv3.  When moving it to
this repository, it should have been relicensed but wasn't.  The
intention was never to "contaminate" (lib)asn1c with AGPLv3 code.

Change-Id: I8e714d4c51d771b1eabec7aa06e7daae73f48b15
2017-08-14 06:14:38 +00:00
Harald Welte f1b77d9b58 add contrib/jenkins.sh script for jenkins build testing
Change-Id: I22fc707814e87b50e956d3b4fda6e5e31f0b62a7
2017-08-14 08:12:41 +02:00
Alexander Couzens bce896fadb add /debian to build a package
debian files need a release so start with release 0.1.0

Change-Id: I135d975b84027d51cb1dc534e04dd314bbd20289
2017-08-12 04:16:44 +02:00
Alexander Couzens 4151e593e1 add .gitreview to support git review plugin
Change-Id: Ia197da1614a8cbec5f177368ca9e25946059c68a
2017-08-08 13:56:42 +02:00
Harald Welte 20d668cbd3 aper fix for decoding constrained integer with lower boundary
When decoding a constrained integer with a lower boundary, we need
to make sure the lower bound is added after decoding the raw offset
inside the range.

Before this change, RANAP_CauseMisc_unspecified_failure (115) would be
encoded as 2 (115 - 113 = 2), but would be decoded as 2, rather than
113+2 = 115.

Code for this was taken from
openairinterface5g/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 which
unfortunately doesn't carry much of a revision history :/
2016-05-01 01:05:34 +02:00
Harald Welte c867ddeb30 fix APER encoding of integer (backport from openairinterface)
The number of bytes used by an APER encoded integer depends on its
actually encoded value, not on the maximum value that could be possibly
encoded.

The old code would e.g. always use 24 bits if the maximum encoded value
would require 24 bits.

To give an example RANAP MaxBitrate (INTEER 1 .. 16000000) value 64000
was previously encoded as "80 00 f9 ff", while it is now the correct
representation "40 f9 ff".

Thanks to Dieter Spaar for detecting this problem in the Osmo-IUH
generated RANAP output, and thanks to openairinterface for fixing the
bug in their code (sadly not contributed to upstream asn1c, though).
2016-04-30 17:39:04 +02:00
Holger Hans Peter Freyther f3c3049e75 misc: Replace libosmocore with talloc
The libosmocore depedency is used for talloc and OSMO_ASSERT.
Reduce the depedencies by using libtalloc directly and replace
the ASSERT with a local one (without backtrace support).
2016-04-05 16:43:39 +02:00