From b564292054e57e5d732d82ddb43731a2e917bab1 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 25 Aug 2021 14:49:19 -0400 Subject: [PATCH] Convert fm-common to new debian pkg system Convert fm-common to use the new debian packaging infrastructure. Story: 2009101 Task: 43090 Signed-off-by: Charles Short Change-Id: I4c53d8b446504a4ef7ac407fa063f6a328e1dc3d --- debian_pkg_dirs | 1 + fm-common/debian/control | 33 ------------- fm-common/debian/deb_folder/changelog | 5 ++ fm-common/debian/deb_folder/control | 48 +++++++++++++++++++ fm-common/debian/deb_folder/copyright | 42 ++++++++++++++++ .../debian/deb_folder/fm-common-dev.dirs | 2 + .../debian/deb_folder/fm-common-dev.install | 2 + .../fm-common-dev.lintian-overrides | 1 + .../debian/deb_folder/fm-common-doc.install | 1 + .../fm-common-doc.lintian-overrides | 1 + fm-common/debian/deb_folder/fm-common.dirs | 1 + fm-common/debian/deb_folder/fm-common.install | 4 ++ .../deb_folder/fm-common.lintian-overrides | 3 ++ fm-common/debian/deb_folder/rules | 21 ++++++++ fm-common/debian/deb_folder/source/format | 1 + fm-common/debian/fm-common-dev.install | 7 --- fm-common/debian/fm-common-doc.install | 1 - fm-common/debian/fm-common-wheels.install | 1 - fm-common/debian/fm-common.install | 6 --- fm-common/debian/meta_data.yaml | 7 +++ fm-common/debian/rules | 25 ---------- 21 files changed, 140 insertions(+), 73 deletions(-) delete mode 100644 fm-common/debian/control create mode 100644 fm-common/debian/deb_folder/changelog create mode 100644 fm-common/debian/deb_folder/control create mode 100644 fm-common/debian/deb_folder/copyright create mode 100644 fm-common/debian/deb_folder/fm-common-dev.dirs create mode 100644 fm-common/debian/deb_folder/fm-common-dev.install create mode 100644 fm-common/debian/deb_folder/fm-common-dev.lintian-overrides create mode 100644 fm-common/debian/deb_folder/fm-common-doc.install create mode 100644 fm-common/debian/deb_folder/fm-common-doc.lintian-overrides create mode 100644 fm-common/debian/deb_folder/fm-common.dirs create mode 100644 fm-common/debian/deb_folder/fm-common.install create mode 100644 fm-common/debian/deb_folder/fm-common.lintian-overrides create mode 100755 fm-common/debian/deb_folder/rules create mode 100644 fm-common/debian/deb_folder/source/format delete mode 100644 fm-common/debian/fm-common-dev.install delete mode 100644 fm-common/debian/fm-common-doc.install delete mode 100644 fm-common/debian/fm-common-wheels.install delete mode 100644 fm-common/debian/fm-common.install create mode 100644 fm-common/debian/meta_data.yaml delete mode 100644 fm-common/debian/rules diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 126e56e5..2dee0375 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,2 +1,3 @@ fm-api python-fmclient +fm-common diff --git a/fm-common/debian/control b/fm-common/debian/control deleted file mode 100644 index 145cad22..00000000 --- a/fm-common/debian/control +++ /dev/null @@ -1,33 +0,0 @@ -Source: fm-common -Priority: optional -Maintainer: StarlingX team -Build-Depends: python-setuptools, - python-all, - debhelper, - dh-python, - python-pip, - python-wheel, - python2.7-dev, - libpq-dev, - uuid-dev -Standards-Version: 3.9.6 - -Package: fm-common -Architecture: amd64 -Depends: libpq-dev, - uuid-dev, - python-dev -Description: fm-common. - -Package: fm-common-dev -Architecture: amd64 -Depends: fm-common -Description: StarlingX Fault Management Client Library that provides APIs for applications to raise/clear/update active alarms. This package contains symbolic links, header files, and related items necessary for software development. - -Package: fm-common-doc -Architecture: amd64 -Description: Contains fmAlarm.h which is to be used by fm-doc package to validate the Alarms & Logs Doc Yaml file. - -Package: fm-common-wheels -Architecture: amd64 -Description: Contains python wheels for fm-common. diff --git a/fm-common/debian/deb_folder/changelog b/fm-common/debian/deb_folder/changelog new file mode 100644 index 00000000..0efbf9f7 --- /dev/null +++ b/fm-common/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +fm-common (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Chuck Short Sat, 21 Aug 2021 10:32:21 +0000 diff --git a/fm-common/debian/deb_folder/control b/fm-common/debian/deb_folder/control new file mode 100644 index 00000000..f2de3569 --- /dev/null +++ b/fm-common/debian/deb_folder/control @@ -0,0 +1,48 @@ +Source: fm-common +Priority: optional +Section: libs +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + dh-python, + libjson-c-dev, + libpq-dev, + python3, + python3-dev, + python3-setuptools, + uuid-dev +Standards-Version: 4.5.1 +Rules-Requires-Root: no + +Package: fm-common-dev +Section: libdevel +Architecture: amd64 +Multi-Arch: no +Depends: fm-common (= ${binary:Version}), ${misc:Depends} +Description: StarlingX fault management client library - header files + StarlingX Fault Management Client Library that provides APIs for + applications to raise/clear/update active alarms. This package + contains symbolic links, header files, and related items necessary + for software development. + . + This package contains the header files + +Package: fm-common +Architecture: any +Multi-Arch: same +Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends} +Description: StarlingX fault management client library + StarlingX Fault Management Client Library that provides APIs for applications + to raise/clear/update active alarms. This package contains symbolic links, + header files, and related items necessary for software development. + +Package: fm-common-doc +Architecture: all +Section: doc +Depends: ${misc:Depends} +Description: StarlingX fault management client library - documentation + StarlingX Fault Management Client Library that provides APIs for applications + to raise/clear/update active alarms. This package contains symbolic links, + header files, and related items necessary for software development. + . + This package contains the documentation for fm-common + diff --git a/fm-common/debian/deb_folder/copyright b/fm-common/debian/deb_folder/copyright new file mode 100644 index 00000000..8fc4dc90 --- /dev/null +++ b/fm-common/debian/deb_folder/copyright @@ -0,0 +1,42 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: fm-common +Source: https://opendev.org/starlingx/fm-common + +Files: * +Copyright: (c) 2013-2021 Wind River Systems, Inc + (c) 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/fm-common/debian/deb_folder/fm-common-dev.dirs b/fm-common/debian/deb_folder/fm-common-dev.dirs new file mode 100644 index 00000000..da07fddd --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common-dev.dirs @@ -0,0 +1,2 @@ +usr/include +usr/lib diff --git a/fm-common/debian/deb_folder/fm-common-dev.install b/fm-common/debian/deb_folder/fm-common-dev.install new file mode 100644 index 00000000..89309bc8 --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common-dev.install @@ -0,0 +1,2 @@ +usr/include/* +usr/lib/libfmcommon.so diff --git a/fm-common/debian/deb_folder/fm-common-dev.lintian-overrides b/fm-common/debian/deb_folder/fm-common-dev.lintian-overrides new file mode 100644 index 00000000..7dadc629 --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common-dev.lintian-overrides @@ -0,0 +1 @@ +missing-dependency-on-libc diff --git a/fm-common/debian/deb_folder/fm-common-doc.install b/fm-common/debian/deb_folder/fm-common-doc.install new file mode 100644 index 00000000..250562d9 --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common-doc.install @@ -0,0 +1 @@ +opt/deploy/cgcs_doc diff --git a/fm-common/debian/deb_folder/fm-common-doc.lintian-overrides b/fm-common/debian/deb_folder/fm-common-doc.lintian-overrides new file mode 100644 index 00000000..5d9719c2 --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common-doc.lintian-overrides @@ -0,0 +1 @@ +dir-or-file-in-opt diff --git a/fm-common/debian/deb_folder/fm-common.dirs b/fm-common/debian/deb_folder/fm-common.dirs new file mode 100644 index 00000000..68457717 --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common.dirs @@ -0,0 +1 @@ +usr/lib diff --git a/fm-common/debian/deb_folder/fm-common.install b/fm-common/debian/deb_folder/fm-common.install new file mode 100644 index 00000000..2d4bbde4 --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common.install @@ -0,0 +1,4 @@ +usr/bin/fmClientCli usr/bin +usr/bin/fm_db_sync_event_suppression.py usr/bin +usr/lib/*.so.* +usr/lib/python*/dist-packages/* diff --git a/fm-common/debian/deb_folder/fm-common.lintian-overrides b/fm-common/debian/deb_folder/fm-common.lintian-overrides new file mode 100644 index 00000000..6c2f591d --- /dev/null +++ b/fm-common/debian/deb_folder/fm-common.lintian-overrides @@ -0,0 +1,3 @@ +arch-dependent-file-not-in-arch-specific-directory +dir-or-file-in-opt +missing-dependency-on-libc diff --git a/fm-common/debian/deb_folder/rules b/fm-common/debian/deb_folder/rules new file mode 100755 index 00000000..dd4d61c6 --- /dev/null +++ b/fm-common/debian/deb_folder/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +export ROOT=debian/tmp + +%: + dh $@ --with python3 --builsystem=pybuild + +override_dh_auto_build: + $(MAKE) + python3 setup.py build + +override_dh_auto_install: + make DESTDIR=$(ROOT) \ + BINDIR=/usr/bin \ + LIBDIR=/usr/lib \ + INCDIR=/usr/include \ + CGCS_DOC_DEPLOY=/opt/deploy/cgcs_doc install + python3 setup.py install --install-layout=deb --root $(ROOT) + + diff --git a/fm-common/debian/deb_folder/source/format b/fm-common/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/fm-common/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/fm-common/debian/fm-common-dev.install b/fm-common/debian/fm-common-dev.install deleted file mode 100644 index 6a96b0c8..00000000 --- a/fm-common/debian/fm-common-dev.install +++ /dev/null @@ -1,7 +0,0 @@ -usr/include/fmAPI.h usr/include -usr/include/fmAlarm.h usr/include -usr/include/fmConfig.h usr/include -usr/include/fmDbAPI.h usr/include -usr/include/fmLog.h usr/include -usr/include/fmThread.h usr/include -usr/lib/libfmcommon.so usr/lib diff --git a/fm-common/debian/fm-common-doc.install b/fm-common/debian/fm-common-doc.install deleted file mode 100644 index fa81edd6..00000000 --- a/fm-common/debian/fm-common-doc.install +++ /dev/null @@ -1 +0,0 @@ -opt/deploy/cgcs_doc/fmAlarm.h opt/deploy/cgcs_doc diff --git a/fm-common/debian/fm-common-wheels.install b/fm-common/debian/fm-common-wheels.install deleted file mode 100644 index 51ba6743..00000000 --- a/fm-common/debian/fm-common-wheels.install +++ /dev/null @@ -1 +0,0 @@ -wheels/fm_core-1.0-cp27-cp27mu-linux_x86_64.whl wheels diff --git a/fm-common/debian/fm-common.install b/fm-common/debian/fm-common.install deleted file mode 100644 index 60154612..00000000 --- a/fm-common/debian/fm-common.install +++ /dev/null @@ -1,6 +0,0 @@ -usr/lib/libfmcommon.so.1 usr/lib -usr/lib/libfmcommon.so.1.0 usr/lib -usr/lib/python2.7/site-packages/fm_core-1.0-py2.7.egg-info usr/lib/python2.7/site-packages -usr/lib/python2.7/site-packages/fm_core.so usr/lib/python2.7/site-packages -usr/bin/fmClientCli usr/bin -usr/bin/fm_db_sync_event_suppression.py usr/bin diff --git a/fm-common/debian/meta_data.yaml b/fm-common/debian/meta_data.yaml new file mode 100644 index 00000000..be972867 --- /dev/null +++ b/fm-common/debian/meta_data.yaml @@ -0,0 +1,7 @@ +--- +debname: fm-common +debver: 1.0 +src_path: sources +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/fm-common/debian/rules b/fm-common/debian/rules deleted file mode 100644 index 6368db1a..00000000 --- a/fm-common/debian/rules +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/make -f - -export MAJOR=1 -export MINOR=0 -export ROOT=debian/tmp - -%: - dh $@ - -override_dh_auto_install: - make DESTDIR=${ROOT} \ - BINDIR=/usr/bin \ - LIBDIR=/usr/lib \ - INCDIR=/usr/include \ - CGCS_DOC_DEPLOY=/opt/deploy/cgcs_doc \ - MAJOR=${MAJOR} MINOR=${MINOR} install - python setup.py build - python setup.py bdist_wheel - python setup.py install --root ${ROOT} --install-data=/usr/share --prefix=/usr - mkdir -p ${ROOT}/wheels/ - install -m 644 dist/*.whl ${ROOT}/wheels/ - -override_dh_installdocs: - -override_dh_installchangelogs: