diff --git a/debian/changelog b/debian/changelog index ab8bb2c8a..c2f89cd7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +open5gs (1.3.0) unstable; urgency=medium + + * Release-16 + + -- Sukchan Lee Fri, 10 Jul 2020 17:29:33 -0400 + open5gs (1.3.0~eoan1) eoan; urgency=medium * Release-16 @@ -16,12 +22,6 @@ open5gs (1.3.0~bionic1) bionic; urgency=medium -- Sukchan Lee Fri, 10 Jul 2020 17:30:57 -0400 -open5gs (1.3.0) unstable; urgency=medium - - * Release-16 - - -- Sukchan Lee Fri, 10 Jul 2020 17:29:33 -0400 - open5gs (1.2.4~eoan) eoan; urgency=medium * Bug Fixed diff --git a/meson.build b/meson.build index 8b4919410..f658e49a3 100644 --- a/meson.build +++ b/meson.build @@ -35,6 +35,7 @@ localstatedir = join_paths(prefix, get_option('localstatedir')) cc = meson.get_compiler('c') host_system = host_machine.system() +git = find_program('git', required: false) #python = import('python') #python3 = python.find_installation('python3') python3 = find_program('python3', 'python') diff --git a/src/amf/meson.build b/src/amf/meson.build index 62fe73395..85214eb18 100644 --- a/src/amf/meson.build +++ b/src/amf/meson.build @@ -80,6 +80,6 @@ executable('open5gs-amfd', sources : amf_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/amf.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libamf_dep], + dependencies : libamf_dep, install_rpath : libdir, install : true) diff --git a/src/ausf/meson.build b/src/ausf/meson.build index 96ae45b0c..97271e84b 100644 --- a/src/ausf/meson.build +++ b/src/ausf/meson.build @@ -58,6 +58,6 @@ executable('open5gs-ausfd', sources : ausf_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/ausf.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libausf_dep], + dependencies : libausf_dep, install_rpath : libdir, install : true) diff --git a/src/hss/meson.build b/src/hss/meson.build index d9a537121..9051adc24 100644 --- a/src/hss/meson.build +++ b/src/hss/meson.build @@ -43,6 +43,6 @@ executable('open5gs-hssd', sources : hss_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/hss.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libhss_dep], + dependencies : libhss_dep, install_rpath : libdir, install : true) diff --git a/src/main.c b/src/main.c index 840219c49..3e9d11149 100644 --- a/src/main.c +++ b/src/main.c @@ -24,7 +24,7 @@ #include "ogs-app.h" #include "version.h" -static const char *version = "Open5GS daemon v" OPEN5GS_VERSION; +static const char *version = "Open5GS daemon " OPEN5GS_VERSION; static void show_version(void) { diff --git a/src/meson.build b/src/meson.build index 1774e3726..dcd5a48ca 100644 --- a/src/meson.build +++ b/src/meson.build @@ -17,20 +17,17 @@ srcinc = include_directories('.') -#version_conf = configuration_data() -#version_conf.set_quoted('OPEN5GS_VERSION', meson.project_version()) -#configure_file(output : 'version.h', configuration : version_conf) +package_version = 'v' + meson.project_version() +if git.found() + git_version = run_command('git', ['describe', '--abbrev=7', '--dirty=+']) + if git_version.returncode() == 0 + package_version = git_version.stdout().strip() + endif +endif -version_data = configuration_data() -version_data.set_quoted('OPEN5GS_VERSION', '@VCS_TAG@') - -version_h = vcs_tag( - input : configure_file( - output : 'version.h.in', - configuration : version_data), - output : 'version.h') - -versiondep = declare_dependency(sources: version_h) +version_conf = configuration_data() +version_conf.set_quoted('OPEN5GS_VERSION', package_version) +configure_file(output : 'version.h', configuration : version_conf) subdir('mme') subdir('hss') diff --git a/src/mme/meson.build b/src/mme/meson.build index b41591ede..ca6a5edf1 100644 --- a/src/mme/meson.build +++ b/src/mme/meson.build @@ -103,6 +103,6 @@ executable('open5gs-mmed', sources : mme_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/mme.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libmme_dep], + dependencies : libmme_dep, install_rpath : libdir, install : true) diff --git a/src/mme/mme-init.c b/src/mme/mme-init.c index ce5a41432..31c641817 100644 --- a/src/mme/mme-init.c +++ b/src/mme/mme-init.c @@ -92,30 +92,19 @@ static void mme_main(void *data) ogs_pollset_poll(mme_self()->pollset, ogs_timer_mgr_next(mme_self()->timer_mgr)); - /* Process the MESSAGE FIRST. + /* + * After ogs_pollset_poll(), ogs_timer_mgr_expire() must be called. * - * For example, if UE Context Release Complete is received, - * the MME_TIMER_UE_CONTEXT_RELEASE is first stopped */ - for ( ;; ) { - mme_event_t *e = NULL; - - rv = ogs_queue_trypop(mme_self()->queue, (void**)&e); - ogs_assert(rv != OGS_ERROR); - - if (rv == OGS_DONE) - goto done; - - if (rv == OGS_RETRY) - break; - - ogs_assert(e); - ogs_fsm_dispatch(&mme_sm, e); - mme_event_free(e); - } - + * The reason is why ogs_timer_mgr_next() can get the corrent value + * when ogs_timer_stop() is called internally in ogs_timer_mgr_expire(). + * + * You should not use event-queue before ogs_timer_mgr_expire(). + * In this case, ogs_timer_mgr_expire() does not work + * because 'if rv == OGS_DONE' statement is exiting and + * not calling ogs_timer_mgr_expire(). + */ ogs_timer_mgr_expire(mme_self()->timer_mgr); - /* AND THEN, process the TIMER. */ for ( ;; ) { mme_event_t *e = NULL; diff --git a/src/nrf/meson.build b/src/nrf/meson.build index dee051a43..57ac0377b 100644 --- a/src/nrf/meson.build +++ b/src/nrf/meson.build @@ -53,6 +53,6 @@ executable('open5gs-nrfd', sources : nrf_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/nrf.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libnrf_dep], + dependencies : libnrf_dep, install_rpath : libdir, install : true) diff --git a/src/pcrf/meson.build b/src/pcrf/meson.build index d190d05cc..e265e8730 100644 --- a/src/pcrf/meson.build +++ b/src/pcrf/meson.build @@ -50,6 +50,6 @@ executable('open5gs-pcrfd', sources : pcrf_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/pcrf.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libpcrf_dep], + dependencies : libpcrf_dep, install_rpath : libdir, install : true) diff --git a/src/pgw/meson.build b/src/pgw/meson.build index 8bfacb960..e5ce833a4 100644 --- a/src/pgw/meson.build +++ b/src/pgw/meson.build @@ -80,6 +80,6 @@ executable('open5gs-pgwd', sources : pgw_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/pgw.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libpgw_dep], + dependencies : libpgw_dep, install_rpath : libdir, install : true) diff --git a/src/pgw/pgw-init.c b/src/pgw/pgw-init.c index acbc58145..c3ee0e542 100644 --- a/src/pgw/pgw-init.c +++ b/src/pgw/pgw-init.c @@ -88,30 +88,19 @@ static void pgw_main(void *data) ogs_pollset_poll(pgw_self()->pollset, ogs_timer_mgr_next(pgw_self()->timer_mgr)); - /* Process the MESSAGE FIRST. + /* + * After ogs_pollset_poll(), ogs_timer_mgr_expire() must be called. * - * For example, if UE Context Release Complete is received, - * the MME_TIMER_UE_CONTEXT_RELEASE is first stopped */ - for ( ;; ) { - pgw_event_t *e = NULL; - - rv = ogs_queue_trypop(pgw_self()->queue, (void**)&e); - ogs_assert(rv != OGS_ERROR); - - if (rv == OGS_DONE) - goto done; - - if (rv == OGS_RETRY) - break; - - ogs_assert(e); - ogs_fsm_dispatch(&pgw_sm, e); - pgw_event_free(e); - } - + * The reason is why ogs_timer_mgr_next() can get the corrent value + * when ogs_timer_stop() is called internally in ogs_timer_mgr_expire(). + * + * You should not use event-queue before ogs_timer_mgr_expire(). + * In this case, ogs_timer_mgr_expire() does not work + * because 'if rv == OGS_DONE' statement is exiting and + * not calling ogs_timer_mgr_expire(). + */ ogs_timer_mgr_expire(pgw_self()->timer_mgr); - /* AND THEN, process the TIMER. */ for ( ;; ) { pgw_event_t *e = NULL; diff --git a/src/sgw/meson.build b/src/sgw/meson.build index 84d79d818..21121f672 100644 --- a/src/sgw/meson.build +++ b/src/sgw/meson.build @@ -50,6 +50,6 @@ executable('open5gs-sgwd', sources : sgw_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/sgw.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libsgw_dep], + dependencies : libsgw_dep, install_rpath : libdir, install : true) diff --git a/src/sgw/sgw-init.c b/src/sgw/sgw-init.c index da47fb8be..583c535d6 100644 --- a/src/sgw/sgw-init.c +++ b/src/sgw/sgw-init.c @@ -78,30 +78,19 @@ static void sgw_main(void *data) ogs_pollset_poll(sgw_self()->pollset, ogs_timer_mgr_next(sgw_self()->timer_mgr)); - /* Process the MESSAGE FIRST. + /* + * After ogs_pollset_poll(), ogs_timer_mgr_expire() must be called. * - * For example, if UE Context Release Complete is received, - * the MME_TIMER_UE_CONTEXT_RELEASE is first stopped */ - for ( ;; ) { - sgw_event_t *e = NULL; - - rv = ogs_queue_trypop(sgw_self()->queue, (void**)&e); - ogs_assert(rv != OGS_ERROR); - - if (rv == OGS_DONE) - goto done; - - if (rv == OGS_RETRY) - break; - - ogs_assert(e); - ogs_fsm_dispatch(&sgw_sm, e); - sgw_event_free(e); - } - + * The reason is why ogs_timer_mgr_next() can get the corrent value + * when ogs_timer_stop() is called internally in ogs_timer_mgr_expire(). + * + * You should not use event-queue before ogs_timer_mgr_expire(). + * In this case, ogs_timer_mgr_expire() does not work + * because 'if rv == OGS_DONE' statement is exiting and + * not calling ogs_timer_mgr_expire(). + */ ogs_timer_mgr_expire(sgw_self()->timer_mgr); - /* AND THEN, process the TIMER. */ for ( ;; ) { sgw_event_t *e = NULL; diff --git a/src/smf/meson.build b/src/smf/meson.build index af6a26647..8f1911a44 100644 --- a/src/smf/meson.build +++ b/src/smf/meson.build @@ -123,6 +123,6 @@ executable('open5gs-smfd', sources : smf_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/smf.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libsmf_dep], + dependencies : libsmf_dep, install_rpath : libdir, install : true) diff --git a/src/udm/meson.build b/src/udm/meson.build index 50034b6c8..cdab3e909 100644 --- a/src/udm/meson.build +++ b/src/udm/meson.build @@ -58,6 +58,6 @@ executable('open5gs-udmd', sources : udm_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/udm.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libudm_dep], + dependencies : libudm_dep, install_rpath : libdir, install : true) diff --git a/src/udr/meson.build b/src/udr/meson.build index e26e1e5ed..c1782f6ec 100644 --- a/src/udr/meson.build +++ b/src/udr/meson.build @@ -54,6 +54,6 @@ executable('open5gs-udrd', sources : udr_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/udr.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libudr_dep], + dependencies : libudr_dep, install_rpath : libdir, install : true) diff --git a/src/upf/init.c b/src/upf/init.c index dc17ef809..e604de139 100644 --- a/src/upf/init.c +++ b/src/upf/init.c @@ -86,30 +86,19 @@ static void upf_main(void *data) ogs_pollset_poll(upf_self()->pollset, ogs_timer_mgr_next(upf_self()->timer_mgr)); - /* Process the MESSAGE FIRST. + /* + * After ogs_pollset_poll(), ogs_timer_mgr_expire() must be called. * - * For example, if UE Context Release Complete is received, - * the MME_TIMER_UE_CONTEXT_RELEASE is first stopped */ - for ( ;; ) { - upf_event_t *e = NULL; - - rv = ogs_queue_trypop(upf_self()->queue, (void**)&e); - ogs_assert(rv != OGS_ERROR); - - if (rv == OGS_DONE) - goto done; - - if (rv == OGS_RETRY) - break; - - ogs_assert(e); - ogs_fsm_dispatch(&upf_sm, e); - upf_event_free(e); - } - + * The reason is why ogs_timer_mgr_next() can get the corrent value + * when ogs_timer_stop() is called internally in ogs_timer_mgr_expire(). + * + * You should not use event-queue before ogs_timer_mgr_expire(). + * In this case, ogs_timer_mgr_expire() does not work + * because 'if rv == OGS_DONE' statement is exiting and + * not calling ogs_timer_mgr_expire(). + */ ogs_timer_mgr_expire(upf_self()->timer_mgr); - /* AND THEN, process the TIMER. */ for ( ;; ) { upf_event_t *e = NULL; diff --git a/src/upf/meson.build b/src/upf/meson.build index f43ae7a47..05cdfa846 100644 --- a/src/upf/meson.build +++ b/src/upf/meson.build @@ -85,6 +85,6 @@ executable('open5gs-upfd', sources : upf_sources, c_args : '-DDEFAULT_CONFIG_FILENAME="@0@/upf.yaml"'.format(open5gs_sysconfdir), include_directories : srcinc, - dependencies : [versiondep, libupf_dep], + dependencies : libupf_dep, install_rpath : libdir, install : true) diff --git a/tests/app/meson.build b/tests/app/meson.build index 9c9d92988..f56279dc2 100644 --- a/tests/app/meson.build +++ b/tests/app/meson.build @@ -56,7 +56,7 @@ executable('epc', sources : [testepc_sources], c_args : libtestepc_cc_args, include_directories : srcinc, - dependencies : [versiondep, libtestepc_dep]) + dependencies : libtestepc_dep) libtest5gc_cc_args = '-DDEFAULT_CONFIG_FILENAME="@0@/configs/5gc.yaml"'.format(meson.build_root()) @@ -85,4 +85,4 @@ executable('5gc', sources : [test5gc_sources], c_args : libtest5gc_cc_args, include_directories : srcinc, - dependencies : [versiondep, libtest5gc_dep]) + dependencies : libtest5gc_dep)