From a901973654740ce20f1c4e26275588ee5c9f6c0d Mon Sep 17 00:00:00 2001 From: Charles Short Date: Tue, 14 Sep 2021 08:20:23 -0400 Subject: [PATCH] Add debian packaging for puppet-dcdbsync Add debian packaging infrastructure for puppet-dcdbsync. Story:2009101 Task: 43314 Signed-off-by: Charles Short Change-Id: I45f7c80c7e48e489c23b9c31bbccb7208a55694e --- .../debian/deb_folder/README.Debian | 8 ++++ .../debian/deb_folder/changelog | 5 +++ .../puppet-dcdbsync/debian/deb_folder/control | 18 ++++++++ .../debian/deb_folder/copyright | 42 +++++++++++++++++++ .../debian/deb_folder/puppet-dcdbsync.install | 1 + .../deb_folder/puppet-dcdbsync.postinst | 12 ++++++ .../debian/deb_folder/puppet-dcdbsync.postrm | 12 ++++++ .../debian/deb_folder/puppet-dcdbsync.prerm | 12 ++++++ .../puppet-dcdbsync/debian/deb_folder/rules | 16 +++++++ .../debian/deb_folder/source/format | 1 + modules/puppet-dcdbsync/debian/meta_data.yaml | 7 ++++ 11 files changed, 134 insertions(+) create mode 100644 modules/puppet-dcdbsync/debian/deb_folder/README.Debian create mode 100644 modules/puppet-dcdbsync/debian/deb_folder/changelog create mode 100644 modules/puppet-dcdbsync/debian/deb_folder/control create mode 100644 modules/puppet-dcdbsync/debian/deb_folder/copyright create mode 100644 modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.install create mode 100755 modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postinst create mode 100755 modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postrm create mode 100755 modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.prerm create mode 100755 modules/puppet-dcdbsync/debian/deb_folder/rules create mode 100644 modules/puppet-dcdbsync/debian/deb_folder/source/format create mode 100644 modules/puppet-dcdbsync/debian/meta_data.yaml diff --git a/modules/puppet-dcdbsync/debian/deb_folder/README.Debian b/modules/puppet-dcdbsync/debian/deb_folder/README.Debian new file mode 100644 index 000000000..e95346849 --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/README.Debian @@ -0,0 +1,8 @@ +This package contains a module for use by puppet. It is +automatically added to the module load path of puppet's default +environment, and should be ready for use. + +You can use "update-alternatives --config puppet-module-starlingx-dcdbsync"" +to configure which module should appear in the module path of the +default puppet environment, in case multiple modules which provide +the same name are installed. diff --git a/modules/puppet-dcdbsync/debian/deb_folder/changelog b/modules/puppet-dcdbsync/debian/deb_folder/changelog new file mode 100644 index 000000000..1b1a50513 --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +puppet-dcdbsync (1.0.0-1) unstable; urgency=medium + + * Initial release. + + -- Chuck Short Wed, 08 Sep 2021 14:40:03 -0400 diff --git a/modules/puppet-dcdbsync/debian/deb_folder/control b/modules/puppet-dcdbsync/debian/deb_folder/control new file mode 100644 index 000000000..e08a6b021 --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/control @@ -0,0 +1,18 @@ +Source: puppet-dcdbsync +Section: admin +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13) +Standards-Version: 4.4.1 +Homepage: https://www.starlingx.io + +Package: puppet-dcdbsync +Architecture: all +Depends: puppet, ${misc:Depends} +Description: Puppet module for StarlingX dcdbsync + Puppet lets you centrally manage every important aspect of your system using a + cross-platform specification language that manages all the separate elements + normally aggregated in different files, like users, cron jobs, and hosts, + along with obviously discrete elements like packages, services, and files. + . + This module manages both the installation and configuration of dcdbsync. diff --git a/modules/puppet-dcdbsync/debian/deb_folder/copyright b/modules/puppet-dcdbsync/debian/deb_folder/copyright new file mode 100644 index 000000000..cbcd16f8d --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/copyright @@ -0,0 +1,42 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: stx-puppet +Source: https://opendev.org/starlingx/stx-puppet + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc + Others (See individual files for more details) +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + +# If you want to use GPL v2 or later for the /debian/* files use +# the following clauses, or change it to suit. Delete these two lines +Files: debian/* +Copyright: 2021 Wind River Systems, Inc +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. diff --git a/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.install b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.install new file mode 100644 index 000000000..04ff5b96a --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.install @@ -0,0 +1 @@ +usr/share/puppet/modules.available/dcdbsync diff --git a/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postinst b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postinst new file mode 100755 index 000000000..2e367ad81 --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postinst @@ -0,0 +1,12 @@ +#1/bin/sh + +set -e + +if [ "${1}" = "configure" ] ; then + update-alternatives --install /usr/share/puppet/modules/dcdbsync \ + puppet-module-starlingx-dcdbsync /usr/share/puppet/modules.available/dcdbsync 500 +fi + +#DEBHELPER# + +exit 0 diff --git a/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postrm b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postrm new file mode 100755 index 000000000..cee339339 --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.postrm @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ "${1}" = "remove" ] || [ "${1}" = "disappear" ]; then + update-alternatives --remove puppet-module-starlingx-dcdbsync \ + /usr/share/puppet/modules.available/dcdbsync +fi + +#DEBHELPER# + +exit 0 diff --git a/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.prerm b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.prerm new file mode 100755 index 000000000..a2447d4ff --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/puppet-dcdbsync.prerm @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ "${1}" = "remove" ] || [ "${1}" = "upgrade" ] || [ "${1}" = "deconfigure" ] ; then + update-alternatives --remove puppet-module-starlingx-dcdbsync \ + /usr/share/puppet/modules.available/dcdbsync +fi + +#DEBHELPER# + +exit 0 diff --git a/modules/puppet-dcdbsync/debian/deb_folder/rules b/modules/puppet-dcdbsync/debian/deb_folder/rules new file mode 100755 index 000000000..8e3cfffdc --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +DEBIAN_DIR := ${CURDIR}/debian/tmp + +%: + dh $@ + +override_dh_auto_build: + echo "Do nothing" + +override_dh_auto_clean: + echo "Do nothing" + +override_dh_auto_install: + $(MAKE) install MODULEDIR=$(DEBIAN_DIR)/usr/share/puppet/modules.available diff --git a/modules/puppet-dcdbsync/debian/deb_folder/source/format b/modules/puppet-dcdbsync/debian/deb_folder/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/modules/puppet-dcdbsync/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/modules/puppet-dcdbsync/debian/meta_data.yaml b/modules/puppet-dcdbsync/debian/meta_data.yaml new file mode 100644 index 000000000..33609a741 --- /dev/null +++ b/modules/puppet-dcdbsync/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: puppet-dcdbsync +debver: 1.0.0-1 +src_path: src +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true