Commit Graph

15 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
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
Brian West
a1799bd2b2 FS-8270 #resolve 2015-10-02 09:56:35 -05: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
9cff1eb71f Cleanup non-semantic whitespace in debian/ 2015-09-15 22:36:23 +00: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
Travis Cross
9dd7173b6e Avoid overaggressive chmod/chown on upgrade
It's reasonable for someone to change one or more of these directory
permissions after installation.  We shouldn't touch more than we need
on upgrade.  Each directory needs to be owned by the freeswitch user,
but past that we can leave discretion to the system administrator.
2014-08-28 12:24:44 +00:00
Travis Cross
c79509a367 Use /var/lib/freeswitch as home directory on Debian
Previously we were using /var/run/freeswitch.

Julian pointed out that someone may actually want to keep information
around in the home directory.  For Gemeinschaft they need to keep the
.odbc.ini file here.

Thanks-to: Julian Pawlowski <julian.pawlowski@gmail.com>
2012-12-18 17:43:04 +00:00
Travis Cross
8bbfe99e19 debian: whitespace 2012-05-06 22:46:36 +00:00
Travis Cross
4ce0f57a8b debian: add new and vastly improved packaging for Debian
We now break out each module and component of FreeSWITCH into a
separate individually-installable package.  For each package with
executables or modules, we also build a package that includes the
stripped debugging symbols so that users can be helpful when they
discover bugs in FreeSWITCH.

As of this commit, we successfully build 263 distinct binary packages
starting from a clean minimal image on both Debian Sid and Debian
Squeeze.

To keep this manageable, we include a program that generates the
various Debian packaging files from a consolidated description of the
modules and their metadata.  The program can even generate this
configuration file by walking the FreeSWITCH source tree.

To provide a smooth user experience, we provide meta-packages that
install sensible sets of modules and other components.

All files are installed into the traditional and customary Linux
directories that you would expect in accordance with the Filesystem
Hierarchy Standard (FHS).

This commit also adds support for running FreeSWITCH as a forked
systemd service in Debian.

For more information about the technical details of the source
packaging, how to build the binary packages from source, and how you
can contribute, please read debian/README.source.

To learn about how this packaging affects you as a user and how to use
the finished Debian packages, read debian/README.Debian.

Signed-off-by: Travis Cross <tc@traviscross.com>
2012-05-05 11:54:05 +00:00
Michal Bielicki
7db7234fe4 Looks like a pretty complete debian packaging done :)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6474 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-12-02 23:50:45 +00:00
Michal Bielicki
8150716372 typo :(
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6425 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-11-29 01:05:33 +00:00
Michal Bielicki
1418be8cb6 fixes to make it more debianish. also fixed to create and remove the
pacakge


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6423 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-11-29 00:38:58 +00:00