Since FS-8788, this error is printed to the journal:
[/lib/systemd/system/freeswitch.service:22] Failed to parse resource value, ignoring: 240K
It turns out that suffixes are only introduced in systemd 228 which is
not available in Debian Jessie. Use 240*1024, rounded up to a nice
human-readable number.
We were missing mod_smpp; mod_json_cdr needed to be placed differently
in the file such that it matches the output of the automated generator
we use to check the completeness of this file.
the freeswitch-all package should be operationally the same as
freeswitch-meta-all it should not conflict with any other freeswitch
pacakge it should install them all via dependancy. This patch does just
that... There is probably a better way to do it, but this is needed to
avoid issues where a dep may have been added to a sub-module (say
mod_av, but it was not added to the freeswitch-all package. This will
also allow for someone to install freeswitch-all or any part there of
without forcing a deinstall of other parts of the over all FreeSWITCH
software package.
When the "freeswitch" package was installed directly on Debian, i.e.
without one of the meta packages pulling in the vanilla configuration
(freeswitch-conf-vanilla), the "postinst" script failed:
$ apt-get install freeswitch
…
Setting up freeswitch (1.6.6~13~d2d0b32-1~jessie+1) ...
cp: cannot stat ‘/usr/share/freeswitch/conf/vanilla/*’: No such file
or directory
…
With this change the code tests for "freeswitch.xml" before attempting
to copy the configuration files.
This change makes it so that event_handlers/mod_amqp is avoided when building
debian packages for Ubuntu 14.04 (Trusty). If this module is packaged there is
a dependency issue related to the rabbitmq libraries.
Avoiding the module was the simplest solution to achieve debian packaging on the
Ubuntu 14.04 OS.
debian/bootstrap.sh:
* only build one of freeswitch-sysvinit or freeswitch-systemd
* squeeze is removed from supported releases
* added stretch to supported releases
* avoid_mods_wheezy extended to modules which fail to build on wheezy
* use systemd by default for future distros
* new command-line option -v to enforce sysvinit
* added dependency on dh-systemd for systemd-powered distros
* freeswitch-init is now a virtual package
* freeswitch-sysvinit and freeswitch-systemd are set to conflict with each other
debian/freeswitch.postinst:
* no need to call systemctl explicitly. dh-systemd does it in a standard way
debian/rules:
* integrated dh-systemd in override_dh_installinit
debian/freeswitch-systemd.freeswitch.default renamed to
freeswitch-sysvinit.freeswitch.default:
* /etc/default/freeswitch is not installed by freeswitch-systemd, but still
respected if there is a need to modify the startup options
debian/freeswitch-systemd.freeswitch.service:
* proper expansion of DAEMON_OPTS
freeswitch-systemd.freeswitch.service:
* starting the daemon as root and switchig to freeswitch user
* respecting the options in /etc/default/freeswitch
* RuntimeDirectory parameter is replaced with a tmpfiles.d entry
because /run/freeswitch has to be owned by freeswitch user
* instructions how to start it as non-root
debian/freeswitch-systemd.freeswitch.tmpfile:
* this defines the PID directory with correct permissions
debian/bootstrap.sh, debian/rules:
* proper handling of freeswitch.service
* deleted debian/freeswitch-systemd.install because it caused an error
in dh_install because it's run before dh_installinit
* renamed: freeswitch-sysvinit.freeswitch.default -> freeswitch-systemd.freeswitch.default
because sysvinit support will eventually die out
debian/freeswitch.postinst:
* run "systemctl enable freeswitch" if systemctl is available
CAVEAT: only one option is supported in /etc/default/freeswitch because the
variable ${DAEMON_OPTS} is expanded as a single token. This will be fixed
as soon as freeswitch-sysvinit is removed from freeswitch-all.
In the systemd unit for FS/debian, if the WorkingDirectory is not set
then it defaults to '/'. This is fine for FS, and is a common and
expected chdir choice for daemons.
We had previously set this to /run/freeswitch. Due to Debian having
systemd-coredump(8) disabled, this was causing core files to be
written to /run/freeswitch, which is a bad place for them as it's
mounted on tmpfs. So in commit cd68e0f we changed this to the log
directory /var/log/freeswitch. That choice is a bit usual as well on
Debian.
It's better to leave FS as running on '/'. This will prevent core
files from being written unless the user adjusts `sysctl
kernel.core_pattern`, which is a reasonable thing to expect if the
user wants these files. Core files can be huge, and even having them
go to /var/log unexpectedly can be a problem.
When Debian adds the systemd-coredumps support this will all work
nicely and automatically.
ref: http://www.freedesktop.org/software/systemd/man/coredump.conf.html
ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744964
References-commit: cd68e0fe1b
FS-7909
Doing a chown of something in /etc/ as part of a systemd service file
is totally broken. It's far too large a sledgehammer to point at /etc
here. Someone may legitimately not be using /etc/freeswitch/tls in
his configuration, in which case this chown would fail and cause FS to
fail to start. Or someone may legitimately need /etc/freeswitch/tls
to have different ownership, in which case we would clobber it here.
The right thing to do is to create this directory in the
postinst (which we already are, assuming there is not an existing
configuration) and then perform the chown of it at the same time.
FS-7697
This changes how we create the temporary directory /run/freeswitch
when starting FS with systemd. The /run directory starts empty after
a system reboot, so we need to ensure this directory is present.
Originally for the FS systemd unit we created /run/freeswitch using
ExecStartPre and mkdir. With commit adb5f0d this was changed to use
the tmpfiles.d(5) mechanism (but the ExecStartPre/mkdir code was not
removed).
As part of systemd.exec(5), systemd provides a mechanism to
automatically manage these directories under /run and to bind their
lifetime to the lifetime of the process. This is actually what we
want here as compared to the more general tmpfiles.d(5) mechanism.
This commit moves to using the RuntimeDirectory= mechanism and removes
the obsolete ExecStartPre/mkdir code.
References-commit: adb5f0d278
Commit e5d247d (packaging python-esl) added trailing whitespace to the
package definition. Our trivial parser in the bootstrap script is
sensitive to this, so the change rather broke debian/bootstrap.sh.
This fixes commit e5d247df29.
In Jessie, pbuilder disables the network by default, and we need it
to build our packages. Also currently only Jessie debs are built successfully,
and building for wheezy fails because of missing video libraries.
Fixed the handling of -T and -t, and added debian/apt_sources.list
that needs to build 1.7 master. The following commands need to be
used to build Jessie packages:
apt-get update && apt-get install -y git curl
mkdir -p /usr/src/freeswitch
cd /usr/src/freeswitch/
git clone https://stash.freeswitch.org/scm/fs/freeswitch.git /usr/src/freeswitch/src
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
cd /usr/src/freeswitch/src
./debian/util.sh build-all -i -z1 -aamd64 -cjessie -T /usr/src/freeswitch/src/debian/apt_sources.list
When the debian/control-modules file is properly ordered and
formatted, running (cd debian && ./bootstrap.sh) will result in no
changes to the debian/control-modules file and the
debian/control-modules.gen file being automatically deleted. If there
is a debian/control-modules.gen file there, it should be used as a
start for a new debian/control-modules file after cleaning up the the
descriptions and adding long descriptions for each item.
FS-7338: remove libsilk from tree, use system lib instead
FS-7338: change to always use system liblua
FS-7338: remove libbroadvoice from tree, use system lib instead
FS-7338: remove libilbc from tree, use system lib instead
FS-7338: remove libs using system libs from bootstrap
FS-7338: remove libg722_1 from tree, use system lib instead
FS-7338: remove mod_celt, it has be superseded by mod_opus
FS-7338: remove libcodec2 from tree, use system lib instead
FS-7338: remove libopus from tree, use system lib instead
FS-7338: remove libsoundtouch build from tree, use system lib instead
FS-7338: remove flite build from tree, use system lib instead
FS-7338: remove openldap build from tree, use system lib instead
FS-7338: remove libmongoc build from tree, use system lib instead
FS-7338: remove mod_mongo deps that are no longer actually required
FS-7338: remove some dup demo modules and don't include demo code in packages
add the ability to pass -T[path to custom sources path] and -K[custom keyfile path]
options to build the FS packages with a custom sources and keyring path.
FS-7373
With this commit we allow getting `make -jN` behavior by setting
`parallel=N` in `DEB_BUILD_OPTIONS`. Setting `parallel=` will result
in `make -j` being run (i.e. no limit on the number of jobs). The
default is to run one job at a time; this is still the safest bet when
building all modules.
Thanks to Peter Wu for suggesting a different way to do this.
ref: https://www.debian.org/doc/debian-policy/ch-source.html#s-debianrules-options
When '-g' is passed, freeswitch drops all other groups except for the
given group. This impacts people who depend on FS having access to
resources that would be allowed by membership to those other groups.
It was possible to override this by setting DAEMON_ARGS in
/etc/default/freeswitch, but we'll go ahead and make this the default.
Since freeswitch uses the primary group of a user when `-g` is
omitted, we'll just omit it, and do similarly when setting the
ownership of our directory in /var/run.
Edited-by: Travis Cross <tc@traviscross.com>
The libtool binary used to be contained in the libtool package. As of
current sid/jessie the libtool package contains everything about
libtool but the libtool binary, and we need to install libtool-bin to
get the libtool binary itself. Which is to say that Debian decided to
make the libtool package architecture-independent.
Without this commit the FS debian packaging will not build/bootstrap
on sid/jessie.
This is a convenience option that can be passed to either
debian/bootstrap.sh or to debian/util.sh to include a module in the
build that would normally be excluded. This option, -p, can be passed
multiple times.
If -t is passed to debian/util.sh, then we will import the
/etc/apt/sources.list mirrors and all apt keys into the
pbuilder/cowbuilder build environment.
This is useful e.g. when the FS build depends on a library not
available in Debian yet.
Normally we override the config of each pbuilder/cowbuilder image when
we update the image before using it for the build. Passing this
option allows for using an existing cowbuilder image (assuming it's in
the correct location) with some existing desirable configuration.
The debian/control-modules file is a comprehensive list of modules,
not a list of modules which are built. Our build tools verify the
file is comprehensive, so modules can't be removed from here unless
we're taking them out of tree.
Partially revert "don't package mod_cluechoo and don't build/load by default"
This partially reverts commit e02e41a5c1.