2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2014-2020, Intel Corporation
6 # build-dpkg.sh - Script for building deb packages
11 SCRIPT_DIR
=$
(dirname $0)
12 source $SCRIPT_DIR/pkg-common.sh
15 # usage -- print usage message and exit
19 [ "$1" ] && echo Error
: $1
21 Usage: $0 [ -h ] -t version-tag -s source-dir -w working-dir -o output-dir
22 [ -e build-experimental ] [ -c run-check ]
23 [ -n with-ndctl ] [ -f testconfig-file ]
25 -h print this help message
26 -t version-tag source version tag
27 -s source-dir source directory
28 -w working-dir working directory
29 -o output-dir output directory
30 -e build-experimental build experimental packages
31 -c run-check run package check
32 -n with-ndctl build with libndctl
33 -f testconfig-file custom testconfig.sh
39 # command-line argument processing...
41 args
=`getopt he:c:r:n:t:d:s:w:o:f: $*`
54 BUILD_PACKAGE_CHECK
="$2"
70 PACKAGE_VERSION_TAG
="$2"
92 # check for mandatory arguments
93 if [ -z "$PACKAGE_VERSION_TAG" -o -z "$SOURCE" -o -z "$WORKING_DIR" -o -z "$OUT_DIR" ]
95 error
"Mandatory arguments missing"
102 LIB_DIR
=$PREFIX/lib
/$
(dpkg-architecture
-qDEB_HOST_MULTIARCH)
103 INC_DIR
=$PREFIX/include
104 MAN1_DIR
=$PREFIX/share
/man
/man1
105 MAN3_DIR
=$PREFIX/share
/man
/man3
106 MAN5_DIR
=$PREFIX/share
/man
/man5
107 MAN7_DIR
=$PREFIX/share
/man
/man7
109 DOC_DIR
=$PREFIX/share
/doc
110 if [ "$EXTRA_CFLAGS_RELEASE" = "" ]; then
111 export EXTRA_CFLAGS_RELEASE
="-ggdb -fno-omit-frame-pointer"
114 LIBFABRIC_MIN_VERSION
=1.4.2
115 NDCTL_MIN_VERSION
=60.1
117 function convert_changelog
() {
120 if [[ $line =~
$REGEX_DATE_AUTHOR ]]
122 DATE
="${BASH_REMATCH[1]}"
123 AUTHOR
="${BASH_REMATCH[2]}"
124 echo " * ${DATE} ${AUTHOR}"
125 elif [[ $line =~
$REGEX_MESSAGE_START ]]
127 MESSAGE
="${BASH_REMATCH[1]}"
129 elif [[ $line =~
$REGEX_MESSAGE ]]
131 MESSAGE
="${BASH_REMATCH[1]}"
137 function rpmem_install_triggers_overrides
() {
138 cat << EOF > debian/librpmem.install
139 $LIB_DIR/librpmem.so.*
142 cat << EOF > debian/librpmem.lintian-overrides
144 new-package-should-close-itp-bug
145 librpmem: package-name-doesnt-match-sonames
148 cat << EOF > debian/librpmem-dev.install
149 $LIB_DIR/pmdk_debug/librpmem.a $LIB_DIR/pmdk_dbg/
150 $LIB_DIR/pmdk_debug/librpmem.so $LIB_DIR/pmdk_dbg/
151 $LIB_DIR/pmdk_debug/librpmem.so.* $LIB_DIR/pmdk_dbg/
153 $LIB_DIR/pkgconfig/librpmem.pc
159 cat << EOF > debian/librpmem-dev.triggers
163 cat << EOF > debian/librpmem-dev.lintian-overrides
165 new-package-should-close-itp-bug
166 # The following warnings are triggered by a bug in debhelper:
167 # https://bugs.debian.org/204975
168 postinst-has-useless-call-to-ldconfig
169 postrm-has-useless-call-to-ldconfig
170 # We do not want to compile with -O2 for debug version
171 hardening-no-fortify-functions $LIB_DIR/pmdk_dbg/*
174 cat << EOF > debian/rpmemd.install
179 cat << EOF > debian/rpmemd.triggers
183 cat << EOF > debian/rpmemd.lintian-overrides
185 new-package-should-close-itp-bug
189 function append_rpmem_control
() {
190 cat << EOF >> $CONTROL_FILE
194 Depends: \${shlibs:Depends}, \${misc:Depends}
195 Description: Persistent Memory remote access support library
196 librpmem provides low-level support for remote access to persistent memory
197 (pmem) utilizing RDMA-capable RNICs. The library can be used to replicate
198 remotely a memory region over RDMA protocol. It utilizes appropriate
199 persistency mechanism based on remote node’s platform capabilities. The
200 librpmem utilizes the ssh client to authenticate a user on remote node and for
201 encryption of connection’s out-of-band configuration data.
203 This library is for applications that use remote persistent memory directly,
204 without the help of any library-supplied transactions or memory allocation.
205 Higher-level libraries that build on libpmem are available and are recommended
206 for most applications.
208 Package: librpmem-dev
211 Depends: librpmem (=\${binary:Version}), libpmem-dev, \${shlibs:Depends}, \${misc:Depends}
212 Description: Development files for librpmem
213 librpmem provides low-level support for remote access to persistent memory
214 (pmem) utilizing RDMA-capable RNICs.
216 This package contains libraries and header files used for linking programs
223 Depends: \${shlibs:Depends}, \${misc:Depends}
224 Description: rpmem daemon
225 Daemon for Remote Persistent Memory support.
229 function libpmem2_install_triggers_overrides
() {
230 cat << EOF > debian/libpmem2.install
231 $LIB_DIR/libpmem2.so.*
234 cat << EOF > debian/libpmem2.lintian-overrides
236 new-package-should-close-itp-bug
237 libpmem2: package-name-doesnt-match-sonames
240 cat << EOF > debian/libpmem2-dev.install
241 $LIB_DIR/pmdk_debug/libpmem2.a $LIB_DIR/pmdk_dbg/
242 $LIB_DIR/pmdk_debug/libpmem2.so $LIB_DIR/pmdk_dbg/
243 $LIB_DIR/pmdk_debug/libpmem2.so.* $LIB_DIR/pmdk_dbg/
245 $LIB_DIR/pkgconfig/libpmem2.pc
251 cat << EOF > debian/libpmem2-dev.triggers
255 cat << EOF > debian/libpmem2-dev.lintian-overrides
257 new-package-should-close-itp-bug
258 # The following warnings are triggered by a bug in debhelper:
259 # https://bugs.debian.org/204975
260 postinst-has-useless-call-to-ldconfig
261 postrm-has-useless-call-to-ldconfig
262 # We do not want to compile with -O2 for debug version
263 hardening-no-fortify-functions $LIB_DIR/pmdk_dbg/*
267 function append_libpmem2_control
() {
268 cat << EOF >> $CONTROL_FILE
272 Depends: \${shlibs:Depends}, \${misc:Depends}
273 Description: Persistent Memory low level support library
274 libpmem2 provides low level persistent memory support. In particular, support
275 for the persistent memory instructions for flushing changes to pmem is
278 Package: libpmem2-dev
281 Depends: libpmem2 (=\${binary:Version}), \${shlibs:Depends}, \${misc:Depends}
282 Description: Development files for libpmem2
283 libpmem2 provides low level persistent memory support. In particular, support
284 for the persistent memory instructions for flushing changes to pmem is
289 function daxio_install_triggers_overrides
() {
290 cat << EOF > debian/daxio.install
295 cat << EOF > debian/daxio.triggers
299 cat << EOF > debian/daxio.lintian-overrides
301 new-package-should-close-itp-bug
305 function append_daxio_control
() {
306 cat << EOF >> $CONTROL_FILE
312 Depends: libpmem (=\${binary:Version}), \${shlibs:Depends}, \${misc:Depends}
313 Description: dd-like tool to read/write to a devdax device
314 The daxio utility performs I/O on Device DAX devices or zeroes a Device
315 DAX device. Since the standard I/O APIs (read/write) cannot be used
316 with Device DAX, data transfer is performed on a memory-mapped device.
317 The daxio may be used to dump Device DAX data to a file, restore data from
318 a backup copy, move/copy data to another device or to erase data from
323 if [ "${BUILD_PACKAGE_CHECK}" == "y" ]
326 override_dh_auto_test:
328 if [ -f $TEST_CONFIG_FILE ]; then\
329 cp $TEST_CONFIG_FILE src/test/testconfig.sh;\
331 echo 'PMEM_FS_DIR=/tmp' > src/test/testconfig.sh; \
332 echo 'PMEM_FS_DIR_FORCE_PMEM=1' >> src/test/testconfig.sh; \
333 echo 'TEST_BUILD=\"debug nondebug\"' >> src/test/testconfig.sh; \
334 echo 'TEST_FS=\"pmem any none\"' >> src/test/testconfig.sh; \
336 make pcheck ${PCHECK_OPTS}
340 override_dh_auto_test:
347 check_file
$SCRIPT_DIR/pkg-config.sh
349 source $SCRIPT_DIR/pkg-config.sh
351 PACKAGE_VERSION
=$
(get_version
$PACKAGE_VERSION_TAG)
353 PACKAGE_SOURCE
=${PACKAGE_NAME}-${PACKAGE_VERSION}
354 PACKAGE_TARBALL_ORIG
=${PACKAGE_NAME}_
${PACKAGE_VERSION}.orig.
tar.gz
355 MAGIC_INSTALL
=utils
/magic-install.sh
356 MAGIC_UNINSTALL
=utils
/magic-uninstall.sh
357 CONTROL_FILE
=debian
/control
359 [ -d $WORKING_DIR ] || mkdir
$WORKING_DIR
360 [ -d $OUT_DIR ] || mkdir
$OUT_DIR
368 mv $SOURCE $PACKAGE_SOURCE
369 tar zcf
$PACKAGE_TARBALL_ORIG $PACKAGE_SOURCE
376 # Generate compat file
377 cat << EOF > debian/compat
381 # Generate control file
382 cat << EOF > $CONTROL_FILE
383 Source: $PACKAGE_NAME
384 Maintainer: $PACKAGE_MAINTAINER
387 Standards-version: 4.1.4
388 Build-Depends: debhelper (>= 9)
389 Homepage: https://pmem.io/pmdk/
393 Depends: \${shlibs:Depends}, \${misc:Depends}
394 Description: Persistent Memory low level support library
395 libpmem provides low level persistent memory support. In particular, support
396 for the persistent memory instructions for flushing changes to pmem is
402 Depends: libpmem (=\${binary:Version}), \${shlibs:Depends}, \${misc:Depends}
403 Description: Development files for libpmem
404 libpmem provides low level persistent memory support. In particular, support
405 for the persistent memory instructions for flushing changes to pmem is
410 Depends: libpmem (=\${binary:Version}), \${shlibs:Depends}, \${misc:Depends}
411 Description: Persistent Memory block array support library
412 libpmemblk implements a pmem-resident array of blocks, all the same size, where
413 a block is updated atomically with respect to power failure or program
414 interruption (no torn blocks).
416 Package: libpmemblk-dev
419 Depends: libpmemblk (=\${binary:Version}), libpmem-dev, \${shlibs:Depends}, \${misc:Depends}
420 Description: Development files for libpmemblk
421 libpmemblk implements a pmem-resident array of blocks, all the same size, where
422 a block is updated atomically with respect to power failure or program
423 interruption (no torn blocks).
427 Depends: libpmem (=\${binary:Version}), \${shlibs:Depends}, \${misc:Depends}
428 Description: Persistent Memory log file support library
429 libpmemlog implements a pmem-resident log file.
431 Package: libpmemlog-dev
434 Depends: libpmemlog (=\${binary:Version}), libpmem-dev, \${shlibs:Depends}, \${misc:Depends}
435 Description: Development files for libpmemlog
436 libpmemlog implements a pmem-resident log file.
440 Depends: libpmem (=\${binary:Version}), \${shlibs:Depends}, \${misc:Depends}
441 Description: Persistent Memory object store support library
442 libpmemobj turns a persistent memory file into a flexible object store,
443 supporting transactions, memory management, locking, lists, and a number of
446 Package: libpmemobj-dev
449 Depends: libpmemobj (=\${binary:Version}), libpmem-dev, \${shlibs:Depends}, \${misc:Depends}
450 Description: Development files for libpmemobj
451 libpmemobj turns a persistent memory file into a flexible object store,
452 supporting transactions, memory management, locking, lists, and a number of
455 This package contains libraries and header files used for linking programs
460 Depends: libpmem (=\${binary:Version}), \${shlibs:Depends}, \${misc:Depends}
461 Description: Persistent Memory pool management support library
462 libpmempool provides a set of utilities for management, diagnostics and repair
463 of persistent memory pools. A pool in this context means a pmemobj pool,
464 pmemblk pool, pmemlog pool or BTT layout, independent of the underlying
465 storage. The libpmempool is for applications that need high reliability or
466 built-in troubleshooting. It may be useful for testing and debugging purposes
469 Package: libpmempool-dev
472 Depends: libpmempool (=\${binary:Version}), libpmem-dev, \${shlibs:Depends}, \${misc:Depends}
473 Description: Development files for libpmempool
474 libpmempool provides a set of utilities for management, diagnostics and repair
475 of persistent memory pools.
477 This package contains libraries and header files used for linking programs
480 Package: $PACKAGE_NAME-dbg
484 Depends: libpmem (=\${binary:Version}), libpmemblk (=\${binary:Version}), libpmemlog (=\${binary:Version}), libpmemobj (=\${binary:Version}), libpmempool (=\${binary:Version}), \${misc:Depends}
485 Description: Debug symbols for PMDK libraries
486 Debug symbols for all PMDK libraries.
492 Depends: \${shlibs:Depends}, \${misc:Depends}
493 Description: utility for management and off-line analysis of PMDK memory pools
494 This utility is a standalone tool that manages Persistent Memory pools
495 created by PMDK libraries. It provides a set of utilities for
496 administration and diagnostics of Persistent Memory pools. Pmempool may be
497 useful for troubleshooting by system administrators and users of the
498 applications based on PMDK libraries.
504 Depends: \${shlibs:Depends}, \${misc:Depends}
505 Description: tool to parse and replay pmemcheck logs
506 Pmreorder is tool that parses and replays log of operations collected by
507 pmemcheck -- a atandalone tool which is a collection of python scripts designed
508 to parse and replay operations logged by pmemcheck - a persistent memory
509 checking tool. Pmreorder performs the store reordering between persistent
510 memory barriers - a sequence of flush-fence operations. It uses a
511 consistency checking routine provided in the command line options to check
512 whether files are in a consistent state.
515 cp LICENSE debian
/copyright
517 if [ -n "$NDCTL_ENABLE" ]; then
518 pass_ndctl_enable
="NDCTL_ENABLE=$NDCTL_ENABLE"
523 cat << EOF > debian/rules
530 dh_strip --dbg-package=$PACKAGE_NAME-dbg
532 override_dh_auto_build:
533 dh_auto_build -- EXPERIMENTAL=${EXPERIMENTAL} prefix=/$PREFIX libdir=/$LIB_DIR includedir=/$INC_DIR docdir=/$DOC_DIR man1dir=/$MAN1_DIR man3dir=/$MAN3_DIR man5dir=/$MAN5_DIR man7dir=/$MAN7_DIR sysconfdir=/etc bashcompdir=/usr/share/bash-completion/completions NORPATH=1 ${pass_ndctl_enable} SRCVERSION=$SRCVERSION PMEM2_INSTALL=${PMEM2_INSTALL}
535 override_dh_auto_install:
536 dh_auto_install -- EXPERIMENTAL=${EXPERIMENTAL} prefix=/$PREFIX libdir=/$LIB_DIR includedir=/$INC_DIR docdir=/$DOC_DIR man1dir=/$MAN1_DIR man3dir=/$MAN3_DIR man5dir=/$MAN5_DIR man7dir=/$MAN7_DIR sysconfdir=/etc bashcompdir=/usr/share/bash-completion/completions NORPATH=1 ${pass_ndctl_enable} SRCVERSION=$SRCVERSION PMEM2_INSTALL=${PMEM2_INSTALL}
537 find -path './debian/*usr/share/man/man*/*.gz' -exec gunzip {} \;
540 mkdir -p debian/tmp/usr/share/pmdk/
541 cp utils/pmdk.magic debian/tmp/usr/share/pmdk/
547 chmod +x debian
/rules
551 ITP_BUG_EXCUSE
="# This is our first package but we do not want to upload it yet.
552 # Please refer to Debian Developer's Reference section 5.1 (New packages) for details:
553 # https://www.debian.org/doc/manuals/developers-reference/pkgs.html#newpackage"
555 cat << EOF > debian/source/format
559 cat << EOF > debian/libpmem.install
560 $LIB_DIR/libpmem.so.*
561 usr/share/pmdk/pmdk.magic
565 cat $MAGIC_INSTALL > debian
/libpmem.postinst
566 sed -i '1s/.*/\#\!\/bin\/bash/' debian
/libpmem.postinst
567 echo $
'\n#DEBHELPER#\n' >> debian
/libpmem.postinst
568 cat $MAGIC_UNINSTALL > debian
/libpmem.prerm
569 sed -i '1s/.*/\#\!\/bin\/bash/' debian
/libpmem.prerm
570 echo $
'\n#DEBHELPER#\n' >> debian
/libpmem.prerm
572 cat << EOF > debian/libpmem.lintian-overrides
574 new-package-should-close-itp-bug
575 libpmem: package-name-doesnt-match-sonames
578 cat << EOF > debian/libpmem-dev.install
579 $LIB_DIR/pmdk_debug/libpmem.a $LIB_DIR/pmdk_dbg/
580 $LIB_DIR/pmdk_debug/libpmem.so $LIB_DIR/pmdk_dbg/
581 $LIB_DIR/pmdk_debug/libpmem.so.* $LIB_DIR/pmdk_dbg/
583 $LIB_DIR/pkgconfig/libpmem.pc
589 cat << EOF > debian/libpmem-dev.lintian-overrides
591 new-package-should-close-itp-bug
592 # The following warnings are triggered by a bug in debhelper:
593 # https://bugs.debian.org/204975
594 postinst-has-useless-call-to-ldconfig
595 postrm-has-useless-call-to-ldconfig
596 # We do not want to compile with -O2 for debug version
597 hardening-no-fortify-functions $LIB_DIR/pmdk_dbg/*
598 # pmdk provides second set of libraries for debugging.
599 # These are in /usr/lib/$arch/pmdk_dbg/, but still trigger ldconfig.
600 # Related issue: https://github.com/pmem/issues/issues/841
601 libpmem-dev: package-has-unnecessary-activation-of-ldconfig-trigger
605 cat << EOF > debian/libpmemblk.install
606 $LIB_DIR/libpmemblk.so.*
609 cat << EOF > debian/libpmemblk.lintian-overrides
611 new-package-should-close-itp-bug
612 libpmemblk: package-name-doesnt-match-sonames
615 cat << EOF > debian/libpmemblk-dev.install
616 $LIB_DIR/pmdk_debug/libpmemblk.a $LIB_DIR/pmdk_dbg/
617 $LIB_DIR/pmdk_debug/libpmemblk.so $LIB_DIR/pmdk_dbg/
618 $LIB_DIR/pmdk_debug/libpmemblk.so.* $LIB_DIR/pmdk_dbg/
619 $LIB_DIR/libpmemblk.so
620 $LIB_DIR/pkgconfig/libpmemblk.pc
621 $INC_DIR/libpmemblk.h
622 $MAN7_DIR/libpmemblk.7
623 $MAN3_DIR/pmemblk_*.3
626 cat << EOF > debian/libpmemblk-dev.lintian-overrides
628 new-package-should-close-itp-bug
629 # The following warnings are triggered by a bug in debhelper:
630 # https://bugs.debian.org/204975
631 postinst-has-useless-call-to-ldconfig
632 postrm-has-useless-call-to-ldconfig
633 # We do not want to compile with -O2 for debug version
634 hardening-no-fortify-functions $LIB_DIR/pmdk_dbg/*
635 # pmdk provides second set of libraries for debugging.
636 # These are in /usr/lib/$arch/pmdk_dbg/, but still trigger ldconfig.
637 # Related issue: https://github.com/pmem/issues/issues/841
638 libpmemblk-dev: package-has-unnecessary-activation-of-ldconfig-trigger
641 cat << EOF > debian/libpmemlog.install
642 $LIB_DIR/libpmemlog.so.*
645 cat << EOF > debian/libpmemlog.lintian-overrides
647 new-package-should-close-itp-bug
648 libpmemlog: package-name-doesnt-match-sonames
651 cat << EOF > debian/libpmemlog-dev.install
652 $LIB_DIR/pmdk_debug/libpmemlog.a $LIB_DIR/pmdk_dbg/
653 $LIB_DIR/pmdk_debug/libpmemlog.so $LIB_DIR/pmdk_dbg/
654 $LIB_DIR/pmdk_debug/libpmemlog.so.* $LIB_DIR/pmdk_dbg/
655 $LIB_DIR/libpmemlog.so
656 $LIB_DIR/pkgconfig/libpmemlog.pc
657 $INC_DIR/libpmemlog.h
658 $MAN7_DIR/libpmemlog.7
659 $MAN3_DIR/pmemlog_*.3
662 cat << EOF > debian/libpmemlog-dev.lintian-overrides
664 new-package-should-close-itp-bug
665 # The following warnings are triggered by a bug in debhelper:
666 # https://bugs.debian.org/204975
667 postinst-has-useless-call-to-ldconfig
668 postrm-has-useless-call-to-ldconfig
669 # We do not want to compile with -O2 for debug version
670 hardening-no-fortify-functions $LIB_DIR/pmdk_dbg/*
671 # pmdk provides second set of libraries for debugging.
672 # These are in /usr/lib/$arch/pmdk_dbg/, but still trigger ldconfig.
673 # Related issue: https://github.com/pmem/issues/issues/841
674 libpmemlog-dev: package-has-unnecessary-activation-of-ldconfig-trigger
677 cat << EOF > debian/libpmemobj.install
678 $LIB_DIR/libpmemobj.so.*
681 cat << EOF > debian/libpmemobj.lintian-overrides
683 new-package-should-close-itp-bug
684 libpmemobj: package-name-doesnt-match-sonames
687 cat << EOF > debian/libpmemobj-dev.install
688 $LIB_DIR/pmdk_debug/libpmemobj.a $LIB_DIR/pmdk_dbg/
689 $LIB_DIR/pmdk_debug/libpmemobj.so $LIB_DIR/pmdk_dbg/
690 $LIB_DIR/pmdk_debug/libpmemobj.so.* $LIB_DIR/pmdk_dbg/
691 $LIB_DIR/libpmemobj.so
692 $LIB_DIR/pkgconfig/libpmemobj.pc
693 $INC_DIR/libpmemobj.h
694 $INC_DIR/libpmemobj/*.h
695 $MAN7_DIR/libpmemobj.7
696 $MAN3_DIR/pmemobj_*.3
705 cat << EOF > debian/libpmemobj-dev.lintian-overrides
707 new-package-should-close-itp-bug
708 # The following warnings are triggered by a bug in debhelper:
709 # https://bugs.debian.org/204975
710 postinst-has-useless-call-to-ldconfig
711 postrm-has-useless-call-to-ldconfig
712 # We do not want to compile with -O2 for debug version
713 hardening-no-fortify-functions $LIB_DIR/pmdk_dbg/*
714 # pmdk provides second set of libraries for debugging.
715 # These are in /usr/lib/$arch/pmdk_dbg/, but still trigger ldconfig.
716 # Related issue: https://github.com/pmem/issues/issues/841
717 libpmemobj-dev: package-has-unnecessary-activation-of-ldconfig-trigger
720 cat << EOF > debian/libpmempool.install
721 $LIB_DIR/libpmempool.so.*
724 cat << EOF > debian/libpmempool.lintian-overrides
726 new-package-should-close-itp-bug
727 libpmempool: package-name-doesnt-match-sonames
730 cat << EOF > debian/libpmempool-dev.install
731 $LIB_DIR/pmdk_debug/libpmempool.a $LIB_DIR/pmdk_dbg/
732 $LIB_DIR/pmdk_debug/libpmempool.so $LIB_DIR/pmdk_dbg/
733 $LIB_DIR/pmdk_debug/libpmempool.so.* $LIB_DIR/pmdk_dbg/
734 $LIB_DIR/libpmempool.so
735 $LIB_DIR/pkgconfig/libpmempool.pc
736 $INC_DIR/libpmempool.h
737 $MAN7_DIR/libpmempool.7
738 $MAN3_DIR/pmempool_*.3
741 cat << EOF > debian/libpmempool-dev.lintian-overrides
743 new-package-should-close-itp-bug
744 # The following warnings are triggered by a bug in debhelper:
745 # https://bugs.debian.org/204975
746 postinst-has-useless-call-to-ldconfig
747 postrm-has-useless-call-to-ldconfig
748 # We do not want to compile with -O2 for debug version
749 hardening-no-fortify-functions $LIB_DIR/pmdk_dbg/*
750 # pmdk provides second set of libraries for debugging.
751 # These are in /usr/lib/$arch/pmdk_dbg/, but still trigger ldconfig.
752 # Related issue: https://github.com/pmem/issues/issues/841
753 libpmempool-dev: package-has-unnecessary-activation-of-ldconfig-trigger
756 cat << EOF > debian/$PACKAGE_NAME-dbg.lintian-overrides
758 new-package-should-close-itp-bug
761 cat << EOF > debian/pmempool.install
764 $MAN1_DIR/pmempool-*.1
765 usr/share/bash-completion/completions/pmempool
768 cat << EOF > debian/pmempool.lintian-overrides
770 new-package-should-close-itp-bug
773 cat << EOF > debian/pmreorder.install
775 usr/share/pmreorder/*.py
776 $MAN1_DIR/pmreorder.1
779 cat << EOF > debian/pmreorder.lintian-overrides
781 new-package-should-close-itp-bug
785 if [ "${BUILD_RPMEM}" = "y" -a "${RPMEM_DPKG}" = "y" ]
787 append_rpmem_control
;
788 rpmem_install_triggers_overrides
;
792 if [ "${PMEM2_INSTALL}" == "y" ]
794 append_libpmem2_control
;
795 libpmem2_install_triggers_overrides
;
799 if [ "${NDCTL_ENABLE}" != "n" ]
801 append_daxio_control
;
802 daxio_install_triggers_overrides
;
805 # Convert ChangeLog to debian format
806 CHANGELOG_TMP
=changelog.tmp
807 dch
--create --empty --package $PACKAGE_NAME -v $PACKAGE_VERSION-$PACKAGE_RELEASE -M -c $CHANGELOG_TMP
808 touch debian
/changelog
809 head -n1 $CHANGELOG_TMP >> debian
/changelog
810 echo "" >> debian
/changelog
811 convert_changelog ChangeLog
>> debian
/changelog
812 echo "" >> debian
/changelog
813 tail -n1 $CHANGELOG_TMP >> debian
/changelog
816 # This is our first release but we do
817 debuild
--preserve-envvar=EXTRA_CFLAGS_RELEASE \
818 --preserve-envvar=EXTRA_CFLAGS_DEBUG \
819 --preserve-envvar=EXTRA_CFLAGS \
820 --preserve-envvar=EXTRA_CXXFLAGS \
821 --preserve-envvar=EXTRA_LDFLAGS \
822 --preserve-envvar=NDCTL_ENABLE \
827 find $WORKING_DIR -name "*.deb"\
829 -or -name "*.changes"\
830 -or -name "*.orig.tar.gz"\
831 -or -name "*.debian.tar.gz" |
while read FILE
833 mv -v $FILE $OUT_DIR/