Skip to content

Commit

Permalink
Debian/Ubuntu packaging: use --enable-no-sign to build *.deb pack…
Browse files Browse the repository at this point in the history
…ages w/o signing those

 * can be used for local and CI builds

Signed-off-by: Toni Uhlig <[email protected]>
  • Loading branch information
utoni committed Nov 14, 2024
1 parent 59ee1fe commit 0a08ab4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jobs:
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64')
run: |
sudo apt-get update
sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
sudo apt-get install autoconf automake debhelper libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
sudo apt-get install rrdtool librrd-dev parallel
- name: Install Ubuntu Prerequisites [Mingw-w64] (runs only on ubuntu jobs)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.msan, '--with-') #Only on a few "standard" builds, without any sanitizers
Expand Down Expand Up @@ -372,6 +372,13 @@ jobs:
run: |
make dist
./utils/verify_dist_tarball.sh
- name: Build Debian/Ubuntu package
if: startsWith(matrix.os, 'ubuntu-24.04') && startsWith(matrix.arch, 'x86_64')
run: |
cd packages/ubuntu
./configure --enable-no-sign
make
cd ../..
- name: Build nDPI [Mingw-w64] (runs only on ubuntu jobs)
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.msan, '--with-') #Only on a few "standard" builds, without any sanitizers
run: |
Expand Down
20 changes: 20 additions & 0 deletions packages/ubuntu/configure
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_no_sign
'
ac_precious_vars='build_alias
host_alias
Expand Down Expand Up @@ -1327,6 +1328,12 @@ if test -n "$ac_init_help"; then
esac
cat <<\_ACEOF
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-no-sign do not try to sign any package
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
Expand Down Expand Up @@ -3331,6 +3338,19 @@ else
SIGN_CMD="dpkg-sig"
fi

# Check whether --enable-no-sign was given.
if test ${enable_no_sign+y}
then :
enableval=$enable_no_sign;
fi

if test "${enable_no_sign+set}" = set
then :

SIGN_CMD="true"

fi

ac_config_files="$ac_config_files Makefile debian/changelog debian/files debian/control"


Expand Down
9 changes: 7 additions & 2 deletions packages/ubuntu/configure.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([Makefile.in], 1.0)
AC_INIT([Makefile.in],[1.0])

DATE=`date -R`
KERNEL=`uname -r`
Expand Down Expand Up @@ -29,7 +29,7 @@ MAJOR_RELEASE=`$(dirname "${0}")/../version.sh --major-release`
GIT_REVISION=`$(dirname "${0}")/../version.sh --revision`

AC_CHECK_LIB([maxminddb], [MMDB_lookup_sockaddr])
AC_HAVE_HEADERS(maxminddb.h)
AC_CHECK_HEADERS([maxminddb.h])
if test ".${ac_cv_lib_maxminddb_MMDB_lookup_sockaddr}" = ".yes" &&
test ".${ac_cv_header_maxminddb_h}" = ".yes"; then
GEOIP_DEP=", libmaxminddb0"
Expand All @@ -41,6 +41,11 @@ else
SIGN_CMD="dpkg-sig"
fi

AC_ARG_ENABLE(no-sign, AS_HELP_STRING([--enable-no-sign], [do not try to sign any package]))
AS_IF([test "${enable_no_sign+set}" = set],[
SIGN_CMD="true"
])

AC_CONFIG_FILES([Makefile debian/changelog debian/files debian/control])

AC_SUBST(NDPI_VERS)
Expand Down
2 changes: 1 addition & 1 deletion packages/ubuntu/debian/control.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: free
Priority: optional
Maintainer: Luca Deri <[email protected]>
Standards-Version: @NDPI_VERS@
Build-Depends:
Build-Depends: debhelper
Build-Conflicts:

Package: ndpi
Expand Down

0 comments on commit 0a08ab4

Please sign in to comment.