2 Commits a6d43f4053 ... fd577a25c3

Author SHA1 Message Date
  Michael Buesch fd577a25c3 pilc: Move ssh-regen to pilc-system 4 years ago
  Michael Buesch 4c3c91bb97 pilc: Add pilc-system deb package 4 years ago

+ 5 - 0
pilc/deb/pilc-system/debian/changelog

@@ -0,0 +1,5 @@
+pilc-system (1.0) testing; urgency=medium
+
+  * Initial release
+
+ -- Michael Buesch <m@bues.ch>  Sat, 29 Jun 2019 16:46:44 +0200

+ 1 - 0
pilc/deb/pilc-system/debian/compat

@@ -0,0 +1 @@
+9

+ 13 - 0
pilc/deb/pilc-system/debian/control

@@ -0,0 +1,13 @@
+Source: pilc-system
+Section: misc
+Priority: optional
+Maintainer: Michael Buesch <m@bues.ch>
+Build-Depends: debhelper (>= 11)
+Standards-Version: 4.1.3
+Homepage: https://bues.ch/a/pilc
+
+Package: pilc-system
+Architecture: all
+Depends: ${misc:Depends}, raspberrypi-sys-mods, raspberrypi-net-mods, openssh-server
+Description: PiLC system files
+ System files for the PiLC.

+ 22 - 0
pilc/deb/pilc-system/debian/copyright

@@ -0,0 +1,22 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: pilc-system
+Source: https://bues.ch/a/pilc
+
+Files: *
+Copyright: 2019 Michael Buesch <m@bues.ch>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

+ 1 - 0
pilc/deb/pilc-system/debian/pilc-system.install

@@ -0,0 +1 @@
+etc

+ 1 - 1
pilc/templates/regenerate_ssh_host_keys.service

@@ -5,7 +5,7 @@ Before=ssh.service
 
 [Service]
 Type=forking
-ExecStart=/bin/sh /etc/ssh/regenerate_ssh_host_keys.sh
+ExecStart=/bin/sh /etc/ssh/pilc_regenerate_ssh_host_keys.sh
 
 [Install]
 WantedBy=multi-user.target

+ 50 - 0
pilc/deb/pilc-system/debian/pilc-system.postinst

@@ -0,0 +1,50 @@
+#!/bin/sh
+# postinst script for pilc-system
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see https://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+first()
+{
+	echo "$1"
+}
+
+case "$1" in
+    configure)
+	systemctl disable regenerate_ssh_host_keys.service
+	systemctl enable pilc_regenerate_ssh_host_keys.service
+	systemctl disable ssh.service
+	if [ -e "$(first /etc/ssh/ssh_host_*_key*)" ]; then
+		rm /etc/ssh/ssh_host_*_key*
+	fi
+	echo 1 > /etc/ssh/sshd_not_to_be_run
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0

+ 27 - 0
pilc/deb/pilc-system/debian/rules

@@ -0,0 +1,27 @@
+#!/usr/bin/make -f
+# See debhelper(7) (uncomment to enable)
+# output every command that modifies files on the build system.
+#export DH_VERBOSE = 1
+
+
+# see FEATURE AREAS in dpkg-buildflags(1)
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+# see ENVIRONMENT in dpkg-buildflags(1)
+# package maintainers to append CFLAGS
+#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
+# package maintainers to append LDFLAGS
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+
+
+%:
+	dh $@ --with systemd
+
+override_dh_installinit:
+	dh_installinit --name=pilc_regenerate_ssh_host_keys --no-restart-on-upgrade --no-start
+
+override_dh_systemd_enable:
+	dh_systemd_enable --name=pilc_regenerate_ssh_host_keys --no-enable
+
+override_dh_systemd_start:
+	dh_systemd_start --name=pilc_regenerate_ssh_host_keys --no-start

+ 1 - 0
pilc/deb/pilc-system/debian/source/format

@@ -0,0 +1 @@
+3.0 (native)

+ 0 - 0
pilc/templates/modules-load-i2c.conf


Some files were not shown because too many files changed in this diff