Roger Light avatar Roger Light committed e012976

Debian package updates for 1.1

Comments (0)

Files changed (8)

-mosquitto (1.0.5-1) experimental; urgency=low
+mosquitto (1.1-1) experimental; urgency=low
 
-  * New upstream release: http://mosquitto.org/2012/11/version-1-0-5-released/
-    (Closes: #685119, LP: #972389, LP: #1035328)
+  * New upstream release: http://mosquitto.org/2012/11/version-1-1-released/
+    (Closes: #685119, LP: #1035328)
   * Bumped standards release to 3.9.3. No changes needed.
   * Added mosquitto-dbg package for binary debug information.
   * Added python3-mosquitto binary package.
   * Use dh_python2 (and dh_python3) instead of python-support.
+  * Debhelper bumped to version 9 to help fix hardening-no-fortify-functions.
+  * Added upstart init script.
+  * Modified normal init script to work if upstart is used.
 
- -- Roger A. Light <roger@atchoo.org>  Sat, 03 Nov 2012 23:38:07 +0000
+ -- Roger A. Light <roger@atchoo.org>  Thu, 27 Dec 2012 23:29:02 +0000
 
 mosquitto (0.15-1) unstable; urgency=low
 
-8
+9
 Section: net
 Priority: optional
 Maintainer: Roger A. Light <roger@atchoo.org>
-Build-Depends: debhelper (>= 8), libssl-dev (>=1.0.0), libwrap0-dev, python-setuptools, python (>= 2.6.6-3~), python3
+Build-Depends: debhelper (>= 9), libssl-dev (>=1.0.0), libwrap0-dev, python-setuptools, python (>= 2.6.6-3~), python3
 Standards-Version: 3.9.3
 Homepage: http://mosquitto.org/
 Vcs-Hg: http://bitbucket.org/oojah/mosquitto-packaging

debian/libmosquitto1.symbols

 libmosquitto.so.1 libmosquitto1 #MINVER#
  (symver)MOSQ_1.0 1.0
+ (symver)MOSQ_1.1 1.1

debian/libmosquittopp1.symbols

 libmosquittopp.so.1 libmosquittopp1 #MINVER#
+ (c++)"mosqpp::mosquittopp::loop_forever(int, int)@Base" 1.1
  (c++)"mosqpp::lib_cleanup()@Base" 1.0
  (c++)"mosqpp::lib_version(int*, int*, int*)@Base" 1.0
  (c++)"mosqpp::mosquittopp::disconnect()@Base" 1.0

debian/mosquitto.init

 
 . /lib/lsb/init-functions
 
+# Upstart detection. If Ubuntu, then we're using upstart otherwise
+# init-functions contains the init_is_upstart() function.
+USE_UPSTART=no
+if [ -f /etc/lsb-release ]; then
+	. /etc/lsb-release
+	if [ "${DISTRIB_ID}" = "Ubuntu" ]; then
+		USE_UPSTART=yes
+	fi
+else
+	if init_is_upstart; then
+		USE_UPSTART=yes
+	fi
+fi
+
 # Are we running from init?
 run_by_init() {
     ([ "$previous" ] && [ "$runlevel" ]) || [ "$runlevel" = S ]
 
 case "$1" in
   start)
+	if [ "${USE_UPSTART}" = "yes" ]; then
+		/sbin/start mosquitto
+		exit $?
+	fi
 	log_daemon_msg "Starting Mosquitto message broker" "mosquitto"
 	if start-stop-daemon --start --quiet --oknodo --background  --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c /etc/mosquitto/mosquitto.conf ; then
 	    log_end_msg 0
 	fi
 	;;
   stop)
+	if [ "${USE_UPSTART}" = "yes" ]; then
+		/sbin/stop mosquitto
+		exit $?
+	fi
 	log_daemon_msg "Stopping Mosquitto message broker" "mosquitto"
 	if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then
 	    log_end_msg 0
 
 
   reload|force-reload)
+	if [ "${USE_UPSTART}" = "yes" ]; then
+		/sbin/reload mosquitto
+		exit $?
+	fi
 	log_daemon_msg "Reloading Mosquitto message broker's configuration" "mosquitto"
         if start-stop-daemon --stop --signal HUP --quiet --oknodo --pidfile $PIDFILE; then
             log_end_msg 0
 	;;
 
   restart)
+	if [ "${USE_UPSTART}" = "yes" ]; then
+		/sbin/restart mosquitto
+		exit $?
+	fi
 	log_daemon_msg "Restarting Mosquitto message broker" "mosquitto"
 	if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then
 	    rm -f ${PIDFILE}
 	;;
 
   try-restart)
+	if [ "${USE_UPSTART}" = "yes" ]; then
+		/sbin/restart mosquitto
+		exit $?
+	fi
 	log_daemon_msg "Restarting Mosquitto message broker" "mosquitto"
 	set +e
 	start-stop-daemon --stop --quiet --retry 30 --pidfile ${PIDFILE}
 	;;
 
   status)
+	if [ "${USE_UPSTART}" = "yes" ]; then
+		/sbin/status mosquitto
+		exit $?
+	fi
 	status_of_proc -p ${PIDFILE} ${DAEMON} mosquitto && exit 0 || exit $?
 	;;
 

debian/mosquitto.upstart

+description "Mosquitto MQTTv3 broker"
+author "Roger Light <roger@atchoo.org"
+
+start on net-device-up
+
+respawn
+
+exec /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

debian/patches/mosquitto.conf.patch

  
  # When run as root, drop privileges to this user and its primary 
  # group.
-@@ -327,7 +330,7 @@
+@@ -341,7 +344,7 @@
  # subscriptions, currently in-flight messages and retained 
  # messages.
  # retained_persistence is a synonym for this option.
  
  # The filename to use for the persistent database, not including 
  # the path.
-@@ -336,7 +339,7 @@
+@@ -350,7 +353,7 @@
  # Location for persistent database. Must include trailing /
  # Default is an empty string (current directory).
  # Set to /var/lib/mosquitto/ if running as a proper service.
  
  # =================================================================
  # Logging
-@@ -354,7 +357,7 @@
+@@ -368,7 +371,7 @@
  # Note that if the broker is running as a Windows service it will default to
  # "log_dest none" and neither stdout nor stderr logging is available.
  # Use "log_dest none" if you wish to disable logging.
  
  # Types of messages to log. Use multiple log_type lines for logging
  # multiple types of messages.
-@@ -647,3 +650,5 @@
+@@ -672,3 +675,5 @@
  #max_log_entries
  #trace_level
  #trace_output
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.