From ca508281fa84cb62eebed050229c801e49c3cb64 Mon Sep 17 00:00:00 2001 From: sev Date: Sat, 9 May 2020 04:21:13 -0500 Subject: [PATCH] add motd and bsd-security --- .gitignore | 3 ++ testing/bsd-security/APKBUILD | 41 +++++++++++++++++++ testing/bsd-security/bsd-security.confd | 7 ++++ testing/bsd-security/bsd-security.initd | 16 ++++++++ .../bsd-security/bsd-security.post-install | 4 ++ testing/bsd-security/bsd-security.pre-install | 4 ++ testing/motd/APKBUILD | 21 ++++++++++ testing/motd/COPYING | 15 +++++++ testing/motd/motd | 2 + 9 files changed, 113 insertions(+) create mode 100644 .gitignore create mode 100644 testing/bsd-security/APKBUILD create mode 100644 testing/bsd-security/bsd-security.confd create mode 100644 testing/bsd-security/bsd-security.initd create mode 100644 testing/bsd-security/bsd-security.post-install create mode 100644 testing/bsd-security/bsd-security.pre-install create mode 100644 testing/motd/APKBUILD create mode 100644 testing/motd/COPYING create mode 100755 testing/motd/motd diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e24cce0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +src/ +build/ +pkg/ diff --git a/testing/bsd-security/APKBUILD b/testing/bsd-security/APKBUILD new file mode 100644 index 0000000..d25168c --- /dev/null +++ b/testing/bsd-security/APKBUILD @@ -0,0 +1,41 @@ +# Contributor: sev +# Maintainer: sev +pkgname=bsd-security +pkgver= +pkgrel=0 +pkgdesc="Shell scripts inspired by FreeBSD's security suite" +url="" +arch="all" +license="WTFPL" +depends="" +makedepends="" +install="$pkgname.pre-install $pkgname.post-install" +subpackages="$pkgname-dev $pkgname-doc" +source=" + bsd-security.initd + bsd-security.confd + " +builddir="$srcdir/" + +build() { + # Replace with proper build command(s) + : +} + +check() { + # Replace with proper check command(s) + : +} + +package() { + # Replace with proper package command(s) + : + + install -m755 -D "$srcdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd \ + "$pkgdir"/etc/conf.d/$pkgname +} + +sha512sums="512331fd6b4c5621c14b8bf07a94b2318dc33fea245de1e66d6385e1dc4cbfde7cb0d53507b46c85a11defe65a936cca40ace80df76130c7af2ef5999899892c bsd-security.initd +f11f0d192cd7823307c2ce4ddc7b3fff5190f72d3f65a5524b487021a95a222aca1fd36ab1eb58ed533e7acd555bfb70f0c8a13db20338ea31527f3151fd2bd7 bsd-security.confd" diff --git a/testing/bsd-security/bsd-security.confd b/testing/bsd-security/bsd-security.confd new file mode 100644 index 0000000..486252b --- /dev/null +++ b/testing/bsd-security/bsd-security.confd @@ -0,0 +1,7 @@ +# Sample conf.d file for alpine linux + +# +# Specify daemon options here. +# + +sample_opts="" diff --git a/testing/bsd-security/bsd-security.initd b/testing/bsd-security/bsd-security.initd new file mode 100644 index 0000000..0dc706c --- /dev/null +++ b/testing/bsd-security/bsd-security.initd @@ -0,0 +1,16 @@ +#!/sbin/openrc-run + +# Sample init.d file for alpine linux. + +name= +command="/usr/sbin/$name" +command_args="$sample_opts" +command_background="yes" + +start_stop_daemon_args="--user $sample_user:$sample_group" +pidfile="/run/$name.pid" + +depend() { + need net + after firewall +} diff --git a/testing/bsd-security/bsd-security.post-install b/testing/bsd-security/bsd-security.post-install new file mode 100644 index 0000000..512fd3e --- /dev/null +++ b/testing/bsd-security/bsd-security.post-install @@ -0,0 +1,4 @@ +#!/bin/sh + +# add something which happens after install + diff --git a/testing/bsd-security/bsd-security.pre-install b/testing/bsd-security/bsd-security.pre-install new file mode 100644 index 0000000..20f04f7 --- /dev/null +++ b/testing/bsd-security/bsd-security.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh + +# add something which happens before install + diff --git a/testing/motd/APKBUILD b/testing/motd/APKBUILD new file mode 100644 index 0000000..8766e15 --- /dev/null +++ b/testing/motd/APKBUILD @@ -0,0 +1,21 @@ +# Contributor: sev +# Maintainer: sev +pkgname=motd +pkgver=1.0.0 +pkgrel=0 +pkgdesc="Write the result of \`uname -a' to /etc/motd daily" +url="https://git.sev.monster/~sev/alpine-local" +arch="noarch" +license="WTFPL" +subpackages="$pkgname-doc" +source="motd COPYING" +options="!check" + +package() { + # Replace with proper package command(s) + install -Dm644 motd "$pkgdir"/etc/periodic/daily/motd + install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING +} + +sha512sums="e109f378b89fc6a61e72ce53101867976996a5643e1e68acc7a5b1666f073d34e40a91d6223bed20c8f17a62314acdae670385aa26c6887e6d74e15df2d09bcb motd +9af1142d329fc79e9bc947435d572f82c67827bc9f267b6d253561331c3a3b6dabdc72ceeab91be0683678245376d91d48f7f1902d733d9db8d80434e1e5a3a9 COPYING" diff --git a/testing/motd/COPYING b/testing/motd/COPYING new file mode 100644 index 0000000..77dea88 --- /dev/null +++ b/testing/motd/COPYING @@ -0,0 +1,15 @@ + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + + diff --git a/testing/motd/motd b/testing/motd/motd new file mode 100755 index 0000000..8e4a51d --- /dev/null +++ b/testing/motd/motd @@ -0,0 +1,2 @@ +#!/bin/sh +uname -a > /etc/motd -- 2.46.0