Commit Graph

573 Commits

Author SHA1 Message Date
Michael Hanselmann 3b4b839ed4 FS-8948 #resolve Handle non-existent config in Debian postinst
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.
2016-03-17 17:01:08 +01:00
William King 6313f69105 Removing libyuv as a required dep since it's moved to core. 2016-03-04 12:10:34 -08:00
William King 1d5b898a83 FS-8867 Adding changes to the debian package building 2016-02-24 16:13:29 -08:00
Michael Jerris febe0f8dac FS-8867: build using in tree libvpx, vpx no longer optional and does not use system libvpx due to issues with having to update it frequently conflicting with system libraries, now we link to the static in tree version instead. Also, mod_vpx is now a core module instead of a loadable module, so mod_vpx.so will no longer be built 2016-02-24 18:44:11 -05:00
Ken Rice 59a8dede02 small tweak to debian package build script 2016-02-17 16:32:08 -06:00
William King 9acd1c7110 FS-8788 Enabling stacksize limits for Debian packaging 2016-01-27 11:53:59 -08:00
William King 24fb219fa0 Adding a file extension to the package build logs 2016-01-08 10:14:19 -08:00
Travis Cross de5bbefdf0 Fix typo in freeswitch-doc package description 2015-12-31 16:03:11 +00:00
William King 1eec06bd85 FS-8576 resolving issue where fonts and images were installed in all of the conf packages. 2015-11-25 16:04:45 -08:00
William King 58c267bf96 FS-8152 package the image directories too 2015-11-25 14:20:53 -08:00
William King 8012a5b72b Revert "FS-8530 add codecs/mod_sangoma_codec to avoid_mods in debian/bootstrap.sh"
This reverts commit 8a16ed1a49.
2015-11-11 14:07:50 -08:00
Stanislav Sinyagin 8a16ed1a49 FS-8530 add codecs/mod_sangoma_codec to avoid_mods in debian/bootstrap.sh 2015-11-11 21:59:01 +00:00
Stanislav Sinyagin ffa24ef6a5 FS-8426 place freeswitch.pm into /usr/share/perl5 2015-11-08 00:59:15 +01:00
Tyler Cross 21a79e3fbb FS-8398: Added event_handlers/mod_amqp to avoided modules for Ubuntu 14.04 Trusty
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.
2015-10-29 14:17:59 -06:00
William King ffe671f7d6 FS-8362 #resolve Now if you install with freeswitch-all you will get the default fonts too 2015-10-20 11:21:56 -07:00
Stanislav Sinyagin 77f52bb6a8 FS-7928 FS-7618 systemd and package build improvements
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
2015-10-13 22:36:37 +02:00
Stanislav Sinyagin b2bcc8b2dd FS-8194 FS-7910 FS-7937 systemd service improvements
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.
2015-10-10 16:08:11 +02:00
William King dbddff88a6 FS-8271 If using system apt repo list, then include the supplementary ones too. 2015-10-09 09:09:28 -07:00
William King 9fe91d7c89 FS-8271 clarify help text 2015-10-08 15:05:25 -07:00
William King 7ac881fb51 FS-8271 fixing bash typo 2015-10-08 15:02:27 -07:00
William King 9b33b05362 FS-8271 defaulting to automatically download the binary deps because without major changes to package building in cowbuilder(which is the primary supported method of building FS packages), you can't access the network to build the binary packages from the source package. 2015-10-08 14:02:05 -07:00
William King 967245bfe2 FS-8271 Now the default will build packages with the upstream FS package repos. This is a change in the default behavior of the debian packaging system with the justification that in 1.6 it is now required to use the FS public repo for deps because system dependancies have been removed from the FS codebase which use to be included. 2015-10-08 14:32:17 -05:00
Brian West 580c1704ba FS-8285 2015-10-02 10:06:02 -05:00
Brian West a1799bd2b2 FS-8270 #resolve 2015-10-02 09:56:35 -05:00
William King 019b1ae3d0 FS-8271 simplify package building for the default case 2015-10-02 04:05:44 -07:00
William King 94b1dfab18 FS-8255 #resolve fix debian codename changes since jessie was released as stable 2015-09-30 11:19:20 -07:00
Travis Cross 2184af8ea6 Remove explicit set of WorkingDirectory
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
2015-09-22 05:34:15 +00:00
Travis Cross 16d0538fb5 Move chown of /etc/freeswitch/tls to postinst
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
2015-09-22 04:58:50 +00:00
Travis Cross 12e90ce989 Use systemd RuntimeDirectory for /run/freeswitch
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
2015-09-22 04:41:00 +00:00
Raphael Lechner fbacd42c98 FS-5660 - add freeswitch.py to the freeswitch-mod-python debian package 2015-09-17 21:07:40 +02:00
Travis Cross 9cff1eb71f Cleanup non-semantic whitespace in debian/ 2015-09-15 22:36:23 +00:00
Travis Cross 9f99b12e76 Fix debian/bootstrap.sh from whitespace error
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.
2015-09-15 22:04:19 +00:00
William King 39ad66380d FS-8165 #resolve Fix debian build depends for mod_hiredis 2015-09-15 10:43:26 -07:00
Ken Rice e3e8c99567 FS-8072 #resolve fix a missed space 2015-09-09 10:34:01 -05:00
William King 5c8c4ebc62 FS-7697 chown the /etc/freeswitch/tls directory so that the freeswitch user can have read/write for TLS certificate generation 2015-09-08 14:17:33 -07:00
William King f769c692d1 FS-7168 update Debian packages so that FS core libraries are setup as runtime deps 2015-09-08 11:58:28 -07:00
Stanislav Sinyagin e45837198c debian/README.source updated
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.
2015-08-24 10:27:23 -04:00
Stanislav Sinyagin a083b881f3 debian/bootstrap.sh: excluded few modules that fail to compile
applications/mod_mp4v2
codecs/mod_openh264
event_handlers/mod_smpp
formats/mod_webm
2015-08-24 08:52:44 -04:00
Stanislav Sinyagin e78c440585 FS-8019 debian/util.sh ignored -T option
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
2015-08-22 20:22:06 -04:00
Federico Castro e5d247df29 FS-6972 Packaging a version of the python ESL wrapper for python. 2015-08-21 10:27:59 -03:00
Stanislav Sinyagin cd68e0fe1b FS-7909 working directory is now /var/log/freeswitch
This is where core is dumped by default
2015-07-31 02:13:55 +02:00
Miguelo adb5f0d278 FS-7130 make /run/freeswitch persistent, so it will start under systemd 2015-07-22 09:36:09 +02:00
William King 8b10cd3d00 Broke build.
Revert "FS-7130 make /run/freeswitch persistent, so it will start under systemd"

This reverts commit bdfb8363f5.
2015-07-21 13:32:35 -07:00
Miguelo Sana bdfb8363f5 FS-7130 make /run/freeswitch persistent, so it will start under systemd 2015-07-13 11:33:46 +02:00
Luis Azedo eaf6430e0d FS-7776 #resolve add mod_kazoo to build system 2015-07-06 23:13:00 +01:00
William King c431ed1ff9 FS-7697 #resolve Now when we install FS by default the tls directory will also be created. 2015-06-19 16:39:44 -07:00
William King 33c723e839 FS-7669 #resolve There was already a postinst file, and I missed it. 2015-06-17 20:40:19 -07:00
William King 5ab9d46691 Revert "FS-7669 #resolve now if you don't have the /etc/freeswitch directory, we will install the default packages for you. If you already have this directory, we'll let you deal with your own configs."
This reverts commit 5550f37fe0.
2015-06-17 20:38:10 -07:00
Michael Jerris 67d1d1df8f FS-7605 remove surplus config flags and fix rundir and logdir set under fhs 2015-06-17 21:55:40 -05:00
William King 19de3b0f81 FS-7605 now depends on libyuv and libvpx properly 2015-06-17 19:07:39 -07:00