Skip to content

Commit 3553179

Browse files
committed
distro UPDATE sysrepo and general updates
1 parent cfaccc1 commit 3553179

File tree

7 files changed

+33
-41
lines changed

7 files changed

+33
-41
lines changed

distro/pkg/deb/control

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ Build-Depends: cmake,
1212
libssh-dev,
1313
libssl-dev,
1414
libsysrepo-dev (>= 2.0.0),
15-
libyang2-dev (>= 2.0.0),
15+
libyang-dev (>= 2.0.0),
1616
pkg-config,
1717
sysrepo-tools (>= 2.0.0),
1818
libcurl4-openssl-dev (>= 7.30.0)
1919
Homepage: https://github.com/CESNET/netopeer2/
2020

2121
Package: netopeer2
2222
Depends: openssl,
23+
passwd,
2324
${misc:Depends},
2425
${shlibs:Depends}
2526
Section: admin

distro/pkg/deb/netopeer2.postinst

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#!/bin/sh
2-
# postinst script for netopeer2
3-
#
4-
# see: dh_installdeb(1)
52

63
set -e
74

@@ -20,20 +17,13 @@ set -e
2017

2118
case "$1" in
2219
configure)
23-
if ! getent group netconf > /dev/null; then
24-
addgroup --quiet --system netconf
25-
fi
2620
env - \
2721
NP2_MODULE_DIR=/usr/share/yang/modules/netopeer2 \
28-
NP2_MODULE_PERMS=660 \
22+
NP2_MODULE_PERMS=640 \
2923
NP2_MODULE_OWNER=root \
30-
NP2_MODULE_GROUP=netconf \
24+
NP2_MODULE_GROUP=sysrepo \
3125
LN2_MODULE_DIR=/usr/share/yang/modules/libnetconf2 \
3226
bash /usr/share/netopeer2/scripts/setup.sh
33-
env - \
34-
bash /usr/share/netopeer2/scripts/merge_hostkey.sh
35-
env - \
36-
bash /usr/share/netopeer2/scripts/merge_config.sh
3727
;;
3828

3929
abort-upgrade|abort-remove|abort-deconfigure)

distro/pkg/deb/netopeer2.preinst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
6+
case "$1" in
7+
install)
8+
if ! groups root | grep sysrepo > /dev/null; then
9+
usermod -G sysrepo -a root
10+
fi
11+
;;
12+
13+
upgrade|abort-upgrade)
14+
;;
15+
16+
*)
17+
echo "preinst called with unknown argument \`$1'" >&2
18+
exit 1
19+
;;
20+
esac
21+
22+
# dh_installdeb will replace this with shell code automatically
23+
# generated by other debhelper scripts.
24+
25+
#DEBHELPER#
26+
27+
exit 0

distro/pkg/deb/netopeer2.prerm

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
#!/bin/sh
2-
# prerm script for netopeer2
3-
#
4-
# see: dh_installdeb(1)
52

63
set -e
74

@@ -20,20 +17,8 @@ set -e
2017

2118

2219
case "$1" in
23-
purge)
24-
if [ -x "$(command -v delgroup)" ]; then
25-
delgroup --quiet --system netconf > /dev/null || true
26-
else
27-
echo >&2 "not removing netconf system group because delgroup command was not found"
28-
fi
29-
;;
3020
remove)
3121
env - \
32-
SYSREPOCTL_EXECUTABLE=sysrepoctl \
33-
NP2_MODULE_DIR=/usr/share/yang/modules/netopeer2 \
34-
NP2_MODULE_PERMS=660 \
35-
NP2_MODULE_OWNER=root \
36-
NP2_MODULE_GROUP=netconf \
3722
bash /usr/share/netopeer2/scripts/remove.sh
3823
;;
3924
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

distro/pkg/deb/rules

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,15 @@ CXXFLAGS+=$(CPPFLAGS)
1414
# be strict when comparing symbols in netopeer2-1
1515
export DPKG_GENSYMBOLS_CHECK_LEVEL=4
1616

17-
# use the executable from the system
18-
SYSREPOCFG_EXECUTABLE=/usr/bin/sysrepoctl
19-
2017
%:
2118
dh $@ --buildsystem=cmake --builddir=build
2219

2320
override_dh_auto_configure:
24-
dh_auto_configure --builddir=build -- -DBUILD_CLI=ON -DBUILD_TESTS=ON -DSYSREPO_SETUP=OFF -DPIDFILE_PREFIX=/run -DSERVER_DIR=/var/lib/netopeer2
21+
dh_auto_configure --builddir=build -- -DCMAKE_BUILD_TYPE="Release" -DENABLE_TESTS=OFF -DBUILD_CLI=ON -DSYSREPO_SETUP=OFF -DPIDFILE_PREFIX=/run -DSERVER_DIR=/var/lib/netopeer2
2522

2623
override_dh_auto_install:
2724
dh_auto_install --builddir=build --destdir=$(CURDIR)/debian/tmp
2825

2926
override_dh_missing:
3027
dh_missing --fail-missing
3128

32-
override_dh_auto_test:
33-
dh_auto_test --builddir=build || ( make -C build test_clean; exit 1; )
34-
make -C build test_clean

distro/pkg/rpm/netopeer2.spec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export NP2_MODULE_OWNER=root
8181
export LN2_MODULE_DIR=%{_datadir}/yang/modules/libnetconf2
8282

8383
%{_datadir}/netopeer2/scripts/setup.sh
84-
%{_datadir}/netopeer2/scripts/merge_hostkey.sh
85-
%{_datadir}/netopeer2/scripts/merge_config.sh
8684

8785
%systemd_post netopeer2-server.service
8886

distro/scripts/make-archive.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/bin/bash
22
# create archive from current source using git
33

4-
VERSION=$(git describe --tags --always)
5-
# skip "v" from start of version number (if it exists) and replace - with .
6-
VERSION=${VERSION#v}
7-
VERSION=${VERSION//[-]/.}
4+
VERSION=$(git log --oneline -n1 --grep="^VERSION" | rev | cut -d' ' -f1 | rev)
85

96
NAMEVER=netopeer2-$VERSION
107
ARCHIVE=$NAMEVER.tar.gz

0 commit comments

Comments
 (0)