Browse Source

rpm-sign fix for centos8

pull/115/head
Alfredo Cardigliano 5 years ago
parent
commit
5889b2c4a0
  1. 2
      packages/rpm/Makefile.in
  2. 20
      packages/rpm/configure
  3. 11
      packages/rpm/configure.in

2
packages/rpm/Makefile.in

@ -10,7 +10,7 @@ all: clean pkg
pkg: pkg:
rpmbuild -bb ./n2n.spec rpmbuild -bb ./n2n.spec
@./rpm-sign.exp $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG) @@RPM_SIGN_CMD@ $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG)
@echo "" @echo ""
@echo "Package contents:" @echo "Package contents:"
@rpm -qpl $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG) @rpm -qpl $(HOME)/rpmbuild/RPMS/$(PLATFORM)/$(RPM_PKG)

20
packages/rpm/configure

@ -583,10 +583,11 @@ PACKAGE_URL=''
ac_subst_vars='LTLIBOBJS ac_subst_vars='LTLIBOBJS
LIBOBJS LIBOBJS
N2N_VERSION_SHORT RPM_SIGN_CMD
GIT_COMMITS
DATE DATE
EXTN EXTN
GIT_COMMITS
N2N_VERSION_SHORT
MACHINE MACHINE
APP APP
target_alias target_alias
@ -1668,6 +1669,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# NOTE: this file is not actually used. You need to edit configure as well!
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
MACHINE=`uname -m` MACHINE=`uname -m`
SHORT_MACHINE=`uname -m | cut -b1-3` SHORT_MACHINE=`uname -m | cut -b1-3`
@ -1693,10 +1698,17 @@ else
fi fi
APP=n2n APP=n2n
N2N_VERSION_SHORT=`grep N2N_VERSION_SHORT ../../Makefile | head -1| cut -d "=" -f 2`
GIT_COMMITS=`grep GIT_COMMITS ../../Makefile | head -1| cut -d "=" -f 2`
DATE=`date -R` DATE=`date -R`
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 3|cut -d '.' -f 1`
if test $CENTOS_RELEASE = "release"; then
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 4|cut -d '.' -f 1`
fi
RPM_SIGN_CMD="rpm --addsign"
if test "$CENTOS_RELEASE" -ne 8; then
RPM_SIGN_CMD="./rpm-sign.exp"
fi

11
packages/rpm/configure.in

@ -31,12 +31,23 @@ fi
APP=n2n APP=n2n
DATE=`date -R` DATE=`date -R`
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 3|cut -d '.' -f 1`
if test $CENTOS_RELEASE = "release"; then
CENTOS_RELEASE=`cat /etc/centos-release | cut -d ' ' -f 4|cut -d '.' -f 1`
fi
RPM_SIGN_CMD="rpm --addsign"
if test "$CENTOS_RELEASE" -ne 8; then
RPM_SIGN_CMD="./rpm-sign.exp"
fi
AC_SUBST(APP) AC_SUBST(APP)
AC_SUBST(MACHINE) AC_SUBST(MACHINE)
AC_SUBST(N2N_VERSION_SHORT) AC_SUBST(N2N_VERSION_SHORT)
AC_SUBST(GIT_COMMITS) AC_SUBST(GIT_COMMITS)
AC_SUBST(EXTN) AC_SUBST(EXTN)
AC_SUBST(DATE) AC_SUBST(DATE)
AC_SUBST(RPM_SIGN_CMD)
AC_CONFIG_FILES(n2n.spec) AC_CONFIG_FILES(n2n.spec)
AC_CONFIG_FILES(../etc/systemd/system/edge.service) AC_CONFIG_FILES(../etc/systemd/system/edge.service)

Loading…
Cancel
Save