File tree Expand file tree Collapse file tree 7 files changed +33
-41
lines changed Expand file tree Collapse file tree 7 files changed +33
-41
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,15 @@ Build-Depends: cmake,
12
12
libssh-dev,
13
13
libssl-dev,
14
14
libsysrepo-dev (>= 2.0.0),
15
- libyang2 -dev (>= 2.0.0),
15
+ libyang -dev (>= 2.0.0),
16
16
pkg-config,
17
17
sysrepo-tools (>= 2.0.0),
18
18
libcurl4-openssl-dev (>= 7.30.0)
19
19
Homepage: https://github.com/CESNET/netopeer2/
20
20
21
21
Package: netopeer2
22
22
Depends: openssl,
23
+ passwd,
23
24
${misc:Depends},
24
25
${shlibs:Depends}
25
26
Section: admin
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- # postinst script for netopeer2
3
- #
4
- # see: dh_installdeb(1)
5
2
6
3
set -e
7
4
@@ -20,20 +17,13 @@ set -e
20
17
21
18
case " $1 " in
22
19
configure)
23
- if ! getent group netconf > /dev/null; then
24
- addgroup --quiet --system netconf
25
- fi
26
20
env - \
27
21
NP2_MODULE_DIR=/usr/share/yang/modules/netopeer2 \
28
- NP2_MODULE_PERMS=660 \
22
+ NP2_MODULE_PERMS=640 \
29
23
NP2_MODULE_OWNER=root \
30
- NP2_MODULE_GROUP=netconf \
24
+ NP2_MODULE_GROUP=sysrepo \
31
25
LN2_MODULE_DIR=/usr/share/yang/modules/libnetconf2 \
32
26
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
37
27
;;
38
28
39
29
abort-upgrade|abort-remove|abort-deconfigure)
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- # prerm script for netopeer2
3
- #
4
- # see: dh_installdeb(1)
5
2
6
3
set -e
7
4
@@ -20,20 +17,8 @@ set -e
20
17
21
18
22
19
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
- ;;
30
20
remove)
31
21
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 \
37
22
bash /usr/share/netopeer2/scripts/remove.sh
38
23
;;
39
24
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
Original file line number Diff line number Diff line change @@ -14,21 +14,15 @@ CXXFLAGS+=$(CPPFLAGS)
14
14
# be strict when comparing symbols in netopeer2-1
15
15
export DPKG_GENSYMBOLS_CHECK_LEVEL =4
16
16
17
- # use the executable from the system
18
- SYSREPOCFG_EXECUTABLE =/usr/bin/sysrepoctl
19
-
20
17
% :
21
18
dh $@ --buildsystem=cmake --builddir=build
22
19
23
20
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
25
22
26
23
override_dh_auto_install :
27
24
dh_auto_install --builddir=build --destdir=$(CURDIR ) /debian/tmp
28
25
29
26
override_dh_missing :
30
27
dh_missing --fail-missing
31
28
32
- override_dh_auto_test :
33
- dh_auto_test --builddir=build || ( make -C build test_clean; exit 1; )
34
- make -C build test_clean
Original file line number Diff line number Diff line change @@ -81,8 +81,6 @@ export NP2_MODULE_OWNER=root
81
81
export LN2_MODULE_DIR=%{_datadir }/yang/modules/libnetconf2
82
82
83
83
%{_datadir }/netopeer2/scripts/setup.sh
84
- %{_datadir }/netopeer2/scripts/merge_hostkey.sh
85
- %{_datadir }/netopeer2/scripts/merge_config.sh
86
84
87
85
%systemd_post netopeer2-server.service
88
86
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# create archive from current source using git
3
3
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)
8
5
9
6
NAMEVER=netopeer2-$VERSION
10
7
ARCHIVE=$NAMEVER .tar.gz
You can’t perform that action at this time.
0 commit comments