summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/control22
-rwxr-xr-xdebian/rules20
-rw-r--r--debian/vyos-1x.install1
-rw-r--r--debian/vyos-1x.links1
-rw-r--r--debian/vyos-1x.postinst100
-rw-r--r--debian/vyos-1x.preinst4
6 files changed, 120 insertions, 28 deletions
diff --git a/debian/control b/debian/control
index ec08968c9..ee45a5fe3 100644
--- a/debian/control
+++ b/debian/control
@@ -6,14 +6,8 @@ Build-Depends:
debhelper (>= 9),
dh-python,
fakeroot,
- gcc-multilib [amd64],
- clang [amd64],
+ gcc,
iproute2,
- llvm [amd64],
- libbpf-dev [amd64],
- libelf-dev (>= 0.2) [amd64],
- libpcap-dev [amd64],
- build-essential,
libvyosconfig0 (>= 0.0.7),
libzmq3-dev,
python3 (>= 3.10),
@@ -32,6 +26,10 @@ Standards-Version: 3.9.6
Package: vyos-1x
Architecture: amd64 arm64
+Pre-Depends:
+ libnss-tacplus [amd64],
+ libpam-tacplus [amd64],
+ libpam-radius-auth [amd64]
Depends:
${python3:Depends} (>= 3.10),
aardvark-dns,
@@ -74,6 +72,7 @@ Depends:
iperf,
iperf3,
iproute2 (>= 6.0.0),
+ iptables,
iputils-arping,
isc-dhcp-client,
isc-dhcp-relay,
@@ -84,17 +83,17 @@ Depends:
lcdproc-extra-drivers,
libatomic1,
libauparse0,
- libbpf1 [amd64],
libcharon-extra-plugins (>=5.9),
libcharon-extauth-plugins (>=5.9),
libndp-tools,
libnetfilter-conntrack3,
libnfnetlink0,
- libpam-radius-auth (>= 1.5.0),
libqmi-utils,
libstrongswan-extra-plugins (>=5.9),
libstrongswan-standard-plugins (>=5.9),
+ libvppinfra [amd64],
libvyosconfig0,
+ linux-cpupower,
lldpd,
lm-sensors,
lsscsi,
@@ -146,6 +145,7 @@ Depends:
python3-tabulate,
python3-vici (>= 5.7.2),
python3-voluptuous,
+ python3-vpp-api [amd64],
python3-xmltodict,
python3-zmq,
qrencode,
@@ -180,6 +180,9 @@ Depends:
uidmap,
usb-modeswitch,
usbutils,
+ vpp [amd64],
+ vpp-plugin-core [amd64],
+ vpp-plugin-dpdk [amd64],
vyatta-bash,
vyatta-cfg,
vyos-http-api-tools,
@@ -188,6 +191,7 @@ Depends:
wireguard-tools,
wireless-regdb,
wpasupplicant (>= 0.6.7),
+ zabbix-agent2,
ndppd,
miniupnpd-nftables
Description: VyOS configuration scripts and data
diff --git a/debian/rules b/debian/rules
index 55e02fae6..e6bbeeafb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -28,17 +28,10 @@ override_dh_gencontrol:
override_dh_auto_build:
make all
-ifeq ($(DEB_TARGET_ARCH),amd64)
- # Only build XDP on amd64 systems
- make vyxdp
-endif
override_dh_auto_install:
dh_auto_install
- # convert the XML to dictionaries
- env PYTHONPATH=python python3 python/vyos/xml/generate.py
-
cd python; python3 setup.py install --install-layout=deb --root ../$(DIR); cd ..
# Install scripts
@@ -55,6 +48,10 @@ override_dh_auto_install:
mkdir -p $(DIR)/$(VYOS_LIBEXEC_DIR)/op_mode
cp -r src/op_mode/* $(DIR)/$(VYOS_LIBEXEC_DIR)/op_mode
+ # Install op mode scripts
+ mkdir -p $(DIR)/$(VYOS_LIBEXEC_DIR)/init
+ cp -r src/init/* $(DIR)/$(VYOS_LIBEXEC_DIR)/init
+
# Install validators
mkdir -p $(DIR)/$(VYOS_LIBEXEC_DIR)/validators
cp -r src/validators/* $(DIR)/$(VYOS_LIBEXEC_DIR)/validators
@@ -128,9 +125,6 @@ override_dh_auto_install:
mkdir -p $(DIR)/usr/lib/udev
cp src/helpers/vyos_net_name $(DIR)/usr/lib/udev
-ifeq ($(DEB_TARGET_ARCH),amd64)
- # We only install XDP on amd64 systems
- mkdir -p $(DIR)/$(VYOS_DATA_DIR)/xdp
- cp -r src/xdp/xdp_prog_kern.o $(DIR)/$(VYOS_DATA_DIR)/xdp
- find src/xdp -perm /a+x -exec cp {} $(DIR)/$(VYOS_SBIN_DIR) \;
-endif
+override_dh_installsystemd:
+ dh_installsystemd -pvyos-1x --name vyos-router vyos-router.service
+ dh_installsystemd -pvyos-1x --name vyos vyos.target
diff --git a/debian/vyos-1x.install b/debian/vyos-1x.install
index 07cdf8c74..9e43669be 100644
--- a/debian/vyos-1x.install
+++ b/debian/vyos-1x.install
@@ -30,6 +30,7 @@ usr/bin/vyos-hostsd-client
usr/lib
usr/libexec/vyos/completion
usr/libexec/vyos/conf_mode
+usr/libexec/vyos/init
usr/libexec/vyos/op_mode
usr/libexec/vyos/services
usr/libexec/vyos/system
diff --git a/debian/vyos-1x.links b/debian/vyos-1x.links
new file mode 100644
index 000000000..0e2d1b841
--- /dev/null
+++ b/debian/vyos-1x.links
@@ -0,0 +1 @@
+/etc/netplug/linkup.d/vyos-python-helper /etc/netplug/linkdown.d/vyos-python-helper
diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst
index 6653cd585..b43416152 100644
--- a/debian/vyos-1x.postinst
+++ b/debian/vyos-1x.postinst
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash
# Turn off Debian default for %sudo
sed -i -e '/^%sudo/d' /etc/sudoers || true
@@ -29,10 +29,66 @@ do
sed -i "/^# Standard Un\*x authentication\./i${PAM_CONFIG}" $file
done
+# We do not make use of a TACACS UNIX group - drop it
+if grep -q '^tacacs' /etc/group; then
+ delgroup tacacs
+fi
+
+# Both RADIUS and TACACS users belong to aaa group - this must be added first
+if ! grep -q '^aaa' /etc/group; then
+ addgroup --firstgid 1000 --quiet aaa
+fi
+
+# Remove TACACS user added by base package - we use our own UID range and group
+# assignments - see below
+if grep -q '^tacacs' /etc/passwd; then
+ if [ $(id -u tacacs0) -ge 1000 ]; then
+ level=0
+ vyos_group=vyattaop
+ while [ $level -lt 16 ]; do
+ userdel tacacs${level} || true
+ rm -rf /home/tacacs${level} || true
+ level=$(( level+1 ))
+ done 2>&1
+ fi
+fi
+
+# Add TACACS system users required for TACACS based system authentication
+if ! grep -q '^tacacs' /etc/passwd; then
+ # Add the tacacs group and all 16 possible tacacs privilege-level users to
+ # the password file, home directories, etc. The accounts are not enabled
+ # for local login, since they are only used to provide uid/gid/homedir for
+ # the mapped TACACS+ logins (and lookups against them). The tacacs15 user
+ # is also added to the sudo group, and vyattacfg group rather than vyattaop
+ # (used for tacacs0-14).
+ level=0
+ vyos_group=vyattaop
+ while [ $level -lt 16 ]; do
+ adduser --quiet --system --firstuid 900 --disabled-login --ingroup users \
+ --no-create-home --gecos "TACACS+ mapped user at privilege level ${level}" \
+ --shell /bin/vbash tacacs${level}
+ adduser --quiet tacacs${level} frrvty
+ adduser --quiet tacacs${level} adm
+ adduser --quiet tacacs${level} dip
+ adduser --quiet tacacs${level} users
+ adduser --quiet tacacs${level} aaa
+ if [ $level -lt 15 ]; then
+ adduser --quiet tacacs${level} vyattaop
+ adduser --quiet tacacs${level} operator
+ else
+ adduser --quiet tacacs${level} vyattacfg
+ adduser --quiet tacacs${level} sudo
+ adduser --quiet tacacs${level} disk
+ adduser --quiet tacacs${level} frr
+ fi
+ level=$(( level+1 ))
+ done 2>&1 | grep -v 'User tacacs${level} already exists'
+fi
+
# Add RADIUS operator user for RADIUS authenticated users to map to
if ! grep -q '^radius_user' /etc/passwd; then
- adduser --quiet --firstuid 1000 --disabled-login --ingroup vyattaop \
- --no-create-home --gecos "radius user" \
+ adduser --quiet --firstuid 1000 --disabled-login --ingroup users \
+ --no-create-home --gecos "RADIUS mapped user at privilege level operator" \
--shell /sbin/radius_shell radius_user
adduser --quiet radius_user frrvty
adduser --quiet radius_user vyattaop
@@ -40,12 +96,13 @@ if ! grep -q '^radius_user' /etc/passwd; then
adduser --quiet radius_user adm
adduser --quiet radius_user dip
adduser --quiet radius_user users
+ adduser --quiet radius_user aaa
fi
# Add RADIUS admin user for RADIUS authenticated users to map to
if ! grep -q '^radius_priv_user' /etc/passwd; then
- adduser --quiet --firstuid 1000 --disabled-login --ingroup vyattacfg \
- --no-create-home --gecos "radius privileged user" \
+ adduser --quiet --firstuid 1000 --disabled-login --ingroup users \
+ --no-create-home --gecos "RADIUS mapped user at privilege level admin" \
--shell /sbin/radius_shell radius_priv_user
adduser --quiet radius_priv_user frrvty
adduser --quiet radius_priv_user vyattacfg
@@ -55,6 +112,7 @@ if ! grep -q '^radius_priv_user' /etc/passwd; then
adduser --quiet radius_priv_user disk
adduser --quiet radius_priv_user users
adduser --quiet radius_priv_user frr
+ adduser --quiet radius_priv_user aaa
fi
# add hostsd group for vyos-hostsd
@@ -68,9 +126,24 @@ if ! grep -q '^dhcpd' /etc/passwd; then
adduser --quiet dhcpd hostsd
fi
-# ensure hte proxy user has a proper shell
+# ensure the proxy user has a proper shell
chsh -s /bin/sh proxy
+# create /opt/vyatta/etc/config/scripts/vyos-preconfig-bootup.script
+PRECONFIG_SCRIPT=/opt/vyatta/etc/config/scripts/vyos-preconfig-bootup.script
+if [ ! -x $PRECONFIG_SCRIPT ]; then
+ mkdir -p $(dirname $PRECONFIG_SCRIPT)
+ touch $PRECONFIG_SCRIPT
+ chmod 755 $PRECONFIG_SCRIPT
+ cat <<EOF >>$PRECONFIG_SCRIPT
+#!/bin/sh
+# This script is executed at boot time before VyOS configuration is applied.
+# Any modifications required to work around unfixed bugs or use
+# services not available through the VyOS CLI system can be placed here.
+
+EOF
+fi
+
# create /opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script
POSTCONFIG_SCRIPT=/opt/vyatta/etc/config/scripts/vyos-postconfig-bootup.script
if [ ! -x $POSTCONFIG_SCRIPT ]; then
@@ -127,3 +200,18 @@ systemctl enable vyos-config-cloud-init.service
# Generate API GraphQL schema
/usr/libexec/vyos/services/api/graphql/generate/generate_schema.py
+
+# Update XML cache
+python3 /usr/lib/python3/dist-packages/vyos/xml_ref/update_cache.py
+
+# T1797: disable VPP support for rolling release, should be used by developers
+# only (in the initial phase). If you wan't to enable VPP use the below command
+# on your VyOS installation:
+#
+# sudo mv /opt/vyatta/share/vyatta-cfg/vpp /opt/vyatta/share/vyatta-cfg/templates/vpp
+if [ -d /opt/vyatta/share/vyatta-cfg/templates/vpp ]; then
+ if [ -d /opt/vyatta/share/vyatta-cfg/vpp ]; then
+ rm -rf /opt/vyatta/share/vyatta-cfg/vpp
+ fi
+ mv /opt/vyatta/share/vyatta-cfg/templates/vpp /opt/vyatta/share/vyatta-cfg/vpp
+fi
diff --git a/debian/vyos-1x.preinst b/debian/vyos-1x.preinst
index 949ffcbc4..e355ffa84 100644
--- a/debian/vyos-1x.preinst
+++ b/debian/vyos-1x.preinst
@@ -3,6 +3,10 @@ dpkg-divert --package vyos-1x --add --no-rename /etc/security/capability.conf
dpkg-divert --package vyos-1x --add --no-rename /lib/systemd/system/lcdproc.service
dpkg-divert --package vyos-1x --add --no-rename /etc/logrotate.d/conntrackd
dpkg-divert --package vyos-1x --add --no-rename /usr/share/pam-configs/radius
+dpkg-divert --package vyos-1x --add --no-rename /usr/share/pam-configs/tacplus
dpkg-divert --package vyos-1x --add --no-rename /etc/rsyslog.conf
dpkg-divert --package vyos-1x --add --no-rename /etc/skel/.bashrc
dpkg-divert --package vyos-1x --add --no-rename /etc/skel/.profile
+dpkg-divert --package vyos-1x --add --no-rename /etc/sysctl.d/80-vpp.conf
+dpkg-divert --package vyos-1x --add --no-rename /etc/netplug/netplugd.conf
+dpkg-divert --package vyos-1x --add --no-rename /etc/netplug/netplug