From 12f7ca48d80c8d93617615e82c63670c8e522043 Mon Sep 17 00:00:00 2001 From: TeoV Date: Tue, 6 Aug 2019 16:55:01 +0300 Subject: [PATCH] Replace jesse and squeeze with debian inside packages --- packages/Makefile | 29 +--- packages/{jessie => debian}/cgrates.service | 0 packages/{squeeze => debian}/changelog | 5 +- packages/debian/changelog.dch | 43 +++++ packages/{jessie => debian}/compat | 0 packages/{jessie => debian}/control | 0 packages/{jessie => debian}/copyright | 0 packages/debian/debian | 1 + packages/{jessie => debian}/docs | 0 packages/{jessie => debian}/postinst | 0 packages/{jessie => debian}/rules | 0 packages/{jessie => debian}/source/format | 0 packages/{jessie => debian}/source/options | 0 packages/squeeze/cgrates.default | 17 -- packages/squeeze/cgrates.init | 171 -------------------- packages/squeeze/compat | 1 - packages/squeeze/control | 14 -- packages/squeeze/copyright | 12 -- packages/squeeze/docs | 0 packages/squeeze/postinst | 48 ------ packages/squeeze/rules | 59 ------- packages/squeeze/source/format | 1 - packages/squeeze/source/options | 5 - 23 files changed, 53 insertions(+), 353 deletions(-) rename packages/{jessie => debian}/cgrates.service (100%) rename packages/{squeeze => debian}/changelog (76%) create mode 100644 packages/debian/changelog.dch rename packages/{jessie => debian}/compat (100%) rename packages/{jessie => debian}/control (100%) rename packages/{jessie => debian}/copyright (100%) create mode 120000 packages/debian/debian rename packages/{jessie => debian}/docs (100%) rename packages/{jessie => debian}/postinst (100%) rename packages/{jessie => debian}/rules (100%) rename packages/{jessie => debian}/source/format (100%) rename packages/{jessie => debian}/source/options (100%) delete mode 100644 packages/squeeze/cgrates.default delete mode 100755 packages/squeeze/cgrates.init delete mode 100644 packages/squeeze/compat delete mode 100644 packages/squeeze/control delete mode 100644 packages/squeeze/copyright delete mode 100644 packages/squeeze/docs delete mode 100755 packages/squeeze/postinst delete mode 100755 packages/squeeze/rules delete mode 100644 packages/squeeze/source/format delete mode 100644 packages/squeeze/source/options diff --git a/packages/Makefile b/packages/Makefile index ec575a340..a0fc12af1 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -12,38 +12,21 @@ ifeq ($(GIT_DATE),) exit 1 endif -JESSIE_VERSION=$(shell dpkg-parsechangelog -S Version -ljessie/changelog 2> /dev/null) +DEBIAN_VERSION=$(shell dpkg-parsechangelog -S Version -ldebian/changelog 2> /dev/null) -ifeq ($(JESSIE_VERSION),) - echo "Error: Failed to extract version from jessie changelog" +ifeq ($(DEBIAN_VERSION),) + echo "Error: Failed to extract version from debian changelog" exit 1 endif -JESSIE_PKG_VERSION=$(JESSIE_VERSION)+$(GIT_DATE)+$(GIT_COMMIT) - -SQUEEZE_VERSION=$(shell dpkg-parsechangelog -S Version -lsqueeze/changelog 2> /dev/null) - -ifeq ($(SQUEEZE_VERSION),) - echo "Error: Failed to extract version from squeeze changelog" - exit 1 -endif - -SQUEEZE_PKG_VERSION=$(SQUEEZE_VERSION)+$(GIT_DATE)+$(GIT_COMMIT) +DEBIAN_PKG_VERSION=$(DEBIAN_VERSION)+$(GIT_DATE)+$(GIT_COMMIT) make deb: cd ..;\ - ln -sf packages/jessie debian ;\ - dch -v "$(JESSIE_PKG_VERSION)" -m "Package build for git commit $(GIT_COMMIT) ($(GIT_DATE))." -D "$(DISTRIBUTION)" ;\ + ln -sf packages/debian debian ;\ + dch -v "$(DEBIAN_PKG_VERSION)" -m "Package build for git commit $(GIT_COMMIT) ($(GIT_DATE))." -D "$(DISTRIBUTION)" ;\ dpkg-buildpackage -rfakeroot -tc; \ rm debian git checkout jessie/changelog -make squeeze: - cd ..;\ - ln -sf packages/squeeze debian ;\ - dch -v "$(SQUEEZE_PKG_VERSION)" -m "Package build for git commit $(GIT_COMMIT) ($(GIT_DATE))." -D "$(DISTRIBUTION)" ;\ - dpkg-buildpackage -rfakeroot -tc; \ - rm debian - git checkout squeeze/changelog - .PHONY: deb squeeze diff --git a/packages/jessie/cgrates.service b/packages/debian/cgrates.service similarity index 100% rename from packages/jessie/cgrates.service rename to packages/debian/cgrates.service diff --git a/packages/squeeze/changelog b/packages/debian/changelog similarity index 76% rename from packages/squeeze/changelog rename to packages/debian/changelog index e772cfba6..db60686ea 100644 --- a/packages/squeeze/changelog +++ b/packages/debian/changelog @@ -1,8 +1,9 @@ -cgrates (0.9.1~rc8) UNRELEASED; urgency=low +cgrates (0.9.1~rc8+20190806152614+e7ec60e7f) nightly; urgency=low * RC8. + * Package build for git commit e7ec60e7f (20190806152614). - -- DanB Mon, 22 Sep 2015 12:05:00 +0200 + -- DanB Tue, 06 Aug 2019 16:06:31 +0300 cgrates (0.9.1~rc7) UNRELEASED; urgency=low diff --git a/packages/debian/changelog.dch b/packages/debian/changelog.dch new file mode 100644 index 000000000..fcb5c6002 --- /dev/null +++ b/packages/debian/changelog.dch @@ -0,0 +1,43 @@ +cgrates (0.9.1~rc8+20190806152614+e7ec60e7f+20190806152614+e7ec60e7f) debian; urgency=medium + + * Package build for git commit e7ec60e7f (20190806152614). + + -- DanB Tue, 06 Aug 2019 16:24:01 +0300 + +cgrates (0.9.1~rc8+20190806152614+e7ec60e7f) nightly; urgency=low + + * RC8. + * Package build for git commit e7ec60e7f (20190806152614). + + -- DanB Tue, 06 Aug 2019 16:06:31 +0300 + +cgrates (0.9.1~rc7) UNRELEASED; urgency=low + + * RC7. + + -- DanB Wed, 3 Aug 2015 14:04:00 -0600 + +cgrates (0.9.1~rc6) UNRELEASED; urgency=low + + * RC6. + + -- DanB Wed, 10 Sep 2014 13:30:00 +0100 + +cgrates (0.9.1~rc5) UNRELEASED; urgency=low + + * RC5. + + -- DanB Mon, 18 Aug 2014 13:30:00 +0100 + + +cgrates (0.9.1~rc4) UNRELEASED; urgency=low + + * RC4. + + -- DanB Thu, 25 Mar 2014 17:30:00 +0100 + +cgrates (0.9.1~rc3) UNRELEASED; urgency=low + + * RC3. + + -- DanB Fri, 03 Jan 2014 17:37:31 +0100 diff --git a/packages/jessie/compat b/packages/debian/compat similarity index 100% rename from packages/jessie/compat rename to packages/debian/compat diff --git a/packages/jessie/control b/packages/debian/control similarity index 100% rename from packages/jessie/control rename to packages/debian/control diff --git a/packages/jessie/copyright b/packages/debian/copyright similarity index 100% rename from packages/jessie/copyright rename to packages/debian/copyright diff --git a/packages/debian/debian b/packages/debian/debian new file mode 120000 index 000000000..3088477d5 --- /dev/null +++ b/packages/debian/debian @@ -0,0 +1 @@ +packages/debian \ No newline at end of file diff --git a/packages/jessie/docs b/packages/debian/docs similarity index 100% rename from packages/jessie/docs rename to packages/debian/docs diff --git a/packages/jessie/postinst b/packages/debian/postinst similarity index 100% rename from packages/jessie/postinst rename to packages/debian/postinst diff --git a/packages/jessie/rules b/packages/debian/rules similarity index 100% rename from packages/jessie/rules rename to packages/debian/rules diff --git a/packages/jessie/source/format b/packages/debian/source/format similarity index 100% rename from packages/jessie/source/format rename to packages/debian/source/format diff --git a/packages/jessie/source/options b/packages/debian/source/options similarity index 100% rename from packages/jessie/source/options rename to packages/debian/source/options diff --git a/packages/squeeze/cgrates.default b/packages/squeeze/cgrates.default deleted file mode 100644 index 2e880651d..000000000 --- a/packages/squeeze/cgrates.default +++ /dev/null @@ -1,17 +0,0 @@ -# defaults file for CGRateS real-time charging system - -# start CGRateS init.d script? -# starts with "true" -ENABLE=false - -# Start with specific user/group -#USER=cgrates -#GROUP=cgrates - -# what extra options to give cgrates binary? -# See cgr-engine -h for options -#DAEMON_OPTS='' - -# Don't forget to create an appropriate config file, -# else the CGRateS system will not start. - diff --git a/packages/squeeze/cgrates.init b/packages/squeeze/cgrates.init deleted file mode 100755 index f6e8deac1..000000000 --- a/packages/squeeze/cgrates.init +++ /dev/null @@ -1,171 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: cgrates -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: CGRateS real-time charging system -# Description: Control CGRateS - carrier grade real-time charging system -### END INIT INFO - -# Author: DanB -# -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="CGRateS real-time charging system" -NAME=cgrates -DAEMON=/usr/bin/cgr-engine -USER=cgrates -GROUP=cgrates -DAEMON_OPTS="" -RUNDIR=/var/run/$NAME -PIDFILE=$RUNDIR/cgr-engine.pid -STACKTRACE=$RUNDIR/$NAME.strace -SCRIPTNAME=/etc/init.d/$NAME -DEFAULTS=/etc/default/$NAME -ENABLE=false - -# Exit if the package is not installed -[ -x "$DAEMON" ] || exit 0 - -# Read configuration variable file if it is present -[ -r $DEFAULTS ] && . $DEFAULTS - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.2-14) to ensure that this file is present -# and status_of_proc is working. -. /lib/lsb/init-functions - -if [ "$ENABLE" != "true" ]; then - echo "$DESC not yet configured. Edit $DEFAULTS first." - exit 0 -fi - -# Install the run folder -if [ ! -d $RUNDIR ]; then - mkdir $RUNDIR - touch $STACKTRACE - chown -R $USER:$GROUP $RUNDIR -fi - - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - echo "\n### Started at:" `date`>>$STACKTRACE - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test\ - || return 1 - start-stop-daemon --start --quiet --chuid $USER:$GROUP --make-pidfile --pidfile $PIDFILE --background\ - --startas /bin/bash -- -c "exec $DAEMON $DAEMON_OPTS >> $STACKTRACE 2>&1" \ - || return 2 -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/packages/squeeze/compat b/packages/squeeze/compat deleted file mode 100644 index 7f8f011eb..000000000 --- a/packages/squeeze/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/packages/squeeze/control b/packages/squeeze/control deleted file mode 100644 index 2905a6bdd..000000000 --- a/packages/squeeze/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: cgrates -Section: base -Priority: optional -Maintainer: DanB -Build-Depends: debhelper, git -Standards-Version: 3.9.1 -Homepage: http://cgrates.org - -Package: cgrates -Architecture: amd64 -Suggests: git, redis-server, mysql-server -Version: 0.9.1-rc8 -Description: Carrier Grade Real-time Charging System - CGRateS is a very fast and easy scalable real-time charging system for Telecom environments. diff --git a/packages/squeeze/copyright b/packages/squeeze/copyright deleted file mode 100644 index 6b10f41c4..000000000 --- a/packages/squeeze/copyright +++ /dev/null @@ -1,12 +0,0 @@ -Original packaging work by: - Gustavo Niemeyer on Wed, 02 Feb 2011 11:38:38 -0200 - -Downloaded from: - http://launchpad.net/lbox - -The Debian packaging is: - Copyright (C) 2011 Canonical Ltd. - -Further development: - Copyright (C) 2014 ITsysCOM GmbH - diff --git a/packages/squeeze/docs b/packages/squeeze/docs deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/squeeze/postinst b/packages/squeeze/postinst deleted file mode 100755 index cec03328d..000000000 --- a/packages/squeeze/postinst +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -# -# $Id$ - -PKG=cgrates - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package -# -# quoting from the policy: -# Any necessary prompting should almost always be confined to the -# post-installation script, and should be protected with a conditional -# so that unnecessary prompting doesn't happen if a package's -# installation fails and the `postinst' is called with `abort-upgrade', -# `abort-remove' or `abort-deconfigure'. - -case "$1" in - - configure) - adduser --quiet --system --group --disabled-password --shell /bin/false --gecos "CGRateS" cgrates || true - chown -R cgrates:cgrates /var/lib/cgrates/ - chown -R cgrates:cgrates /var/spool/cgrates/ - chown -R cgrates:cgrates /usr/share/cgrates/ - chown root:adm /var/log/cgrates - chmod 775 /var/log/cgrates - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# diff --git a/packages/squeeze/rules b/packages/squeeze/rules deleted file mode 100755 index 93b04894a..000000000 --- a/packages/squeeze/rules +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 - -export GOPATH=$(CURDIR) - -PKGDIR=debian/cgrates -SRCDIR=src/github.com/cgrates/cgrates - -%: - dh $@ - -clean: - dh_clean - rm -rf $(GOPATH)/bin $(GOPATH)/pkg $(GOPATH)/src - rm -rf $(GOPATH)/debian/cgrates.debhelper.log - rm -f $(GOPATH)/goinstall.log - -binary-arch: clean - dh_prep - dh_installdirs - mkdir -p src/github.com/cgrates - ln -sf $(CURDIR) src/github.com/cgrates - go get -u -v github.com/Masterminds/glide - $(GOPATH)/bin/glide install --force - exec $(CURDIR)/build.sh - mkdir -p $(PKGDIR)/usr/bin - cp $(GOPATH)/bin/cgr-* $(PKGDIR)/usr/bin/ - mkdir -p $(PKGDIR)/etc/ - cp -r $(CURDIR)/data/conf/cgrates $(PKGDIR)/etc/ - mkdir -p $(PKGDIR)/etc/logrotate.d - mkdir -p $(PKGDIR)/etc/rsyslog.d - cp -r $(CURDIR)/data/conf/logging/deb_logrotate.conf $(PKGDIR)/etc/logrotate.d/cgrates - cp -r $(CURDIR)/data/conf/logging/deb_rsyslog.conf $(PKGDIR)/etc/rsyslog.d/25-cgrates.conf - mkdir -p $(PKGDIR)/usr/share/cgrates - cp -r $(CURDIR)/data/* $(PKGDIR)/usr/share/cgrates/ - tar -xzvf $(PKGDIR)/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz -C $(PKGDIR)/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/ - rm $(PKGDIR)/usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/freeswitch_conf.tar.gz - mkdir -p $(PKGDIR)/var/spool/cgrates/cdrc/in - mkdir -p $(PKGDIR)/var/spool/cgrates/cdrc/out - mkdir -p $(PKGDIR)/var/spool/cgrates/cdre/csv - mkdir -p $(PKGDIR)/var/spool/cgrates/cdre/fwv - mkdir -p $(PKGDIR)/var/spool/cgrates/tpe - mkdir -p $(PKGDIR)/var/spool/cgrates/failed_posts - mkdir -p $(PKGDIR)/var/lib/cgrates/history - mkdir -p $(PKGDIR)/var/lib/cgrates/cache_dump - mkdir -p $(PKGDIR)/var/log/cgrates - dh_strip - dh_compress - dh_fixperms - dh_installinit - dh_installdeb - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-arch diff --git a/packages/squeeze/source/format b/packages/squeeze/source/format deleted file mode 100644 index 89ae9db8f..000000000 --- a/packages/squeeze/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packages/squeeze/source/options b/packages/squeeze/source/options deleted file mode 100644 index 38bb1abc2..000000000 --- a/packages/squeeze/source/options +++ /dev/null @@ -1,5 +0,0 @@ -tar-ignore = .hg -tar-ignore = .git -tar-ignore = .bzr -tar-ignore = .gitignore -tar-ignore = .travis.yml