aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/README.Debian5
-rw-r--r--debian/changelog5
-rw-r--r--debian/control16
-rw-r--r--debian/copyright47
-rw-r--r--debian/patches/series2
-rw-r--r--debian/patches/wsgi-ini-fix.patch13
-rw-r--r--debian/postinst35
-rw-r--r--debian/postrm23
-rw-r--r--debian/prerm33
-rwxr-xr-xdebian/rules20
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/local-options2
-rw-r--r--debian/stackbin.dsc14
-rw-r--r--debian/stackbin.lintian-overrides1
-rw-r--r--debian/watch2
15 files changed, 219 insertions, 0 deletions
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..b74e6c4
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,5 @@
+stackbin for Devuan
+
+To run stackbin, you will probably need to a2enmods these three mods: proxy rewrite ssl
+
+ -- B. Stack <bgstack15@gmail.com> Tue, 15 Feb 2022 19:07:18 -0500
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..67536b3
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+stackbin (0.0.1-1) obs; urgency=low
+
+ * Initial release. Closes: packages-want#005
+
+ -- B. Stack <bgstack15@gmail.com> Tue, 15 Feb 2022 19:07:18 -0500
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..bd3824a
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,16 @@
+Source: stackbin
+Section: web
+Priority: optional
+Maintainer: B. Stack <bgstack15@gmail.com>
+Build-Depends: debhelper-compat (= 12)
+Standards-Version: 4.5.0
+Homepage: https://bgstack15.ddns.net/
+
+Package: stackbin
+Architecture: all
+Multi-Arch: foreign
+Pre-Depends: adduser
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: pastebin in flask
+ A simple pastebin written in flask with a password-
+ protected admin panel.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..13f285a
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,47 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: stackbin
+Upstream-Contact: <preferred name and address to reach the upstream project>
+Source: <url://example.com>
+#
+# Please double check copyright with the licensecheck(1) command.
+
+Files: .gitignore
+ extra/Makefile
+ extra/pip-helper.sh
+ extra/stackbin.conf.apache
+ extra/stackbin.conf.nginx
+ extra/stackbin.service
+ extra/stackbin.spec
+ extra/stackbin.sysusers
+ initdb.py
+ manage.py
+ requirements.txt
+ stackbin.bin
+ stackbin.conf.example
+ stackbin.py
+ stackbin.wsgi.ini.example
+ stackbin_auth.py
+ static/style.css
+ templates/_pagination.html
+ templates/admin.html
+ templates/new_paste.html
+ templates/show_paste.html
+Copyright: __NO_COPYRIGHT_NOR_LICENSE__
+License: __NO_COPYRIGHT_NOR_LICENSE__
+
+Files: extra/stackbin.init
+Copyright: __NO_COPYRIGHT__ in: extra/stackbin.init
+License: __UNKNOWN__
+ Do NOT "set -e"
+ .
+ PATH should only include /usr/* if it runs after the mountnfs.sh script
+
+#----------------------------------------------------------------------------
+# xml and html files (skipped):
+# README.md
+# templates/layout.html
+# templates/login_form.html
+
+#----------------------------------------------------------------------------
+# Files marked as NO_LICENSE_TEXT_FOUND may be covered by the following
+# license/copyright files.
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..411aacf
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+# You must remove unused comment lines for the released package.
+wsgi-ini-fix.patch
diff --git a/debian/patches/wsgi-ini-fix.patch b/debian/patches/wsgi-ini-fix.patch
new file mode 100644
index 0000000..7823ca6
--- /dev/null
+++ b/debian/patches/wsgi-ini-fix.patch
@@ -0,0 +1,13 @@
+--- a/stackbin.wsgi.ini.example
++++ b/stackbin.wsgi.ini.example
+@@ -1,8 +1,8 @@
+ [uwsgi]
+ # CentOS 7 uwsgi needs "python36" added to this list.
+-plugins = logfile, python36
++#plugins = logfile, python36
+ # Devuan Ceres does not.
+-#plugins = logfile
++plugins = logfile
+ http-socket = 127.0.0.1:4680
+ wsgi-file = /usr/libexec/stackbin/stackbin.py
+ callable = app
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..fdcc7ee
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,35 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+OUT=/dev/null
+USERNAME=stackbin
+HOME=/var/stackbin
+SERVICE=stackbin
+
+case "$1" in
+ configure)
+ update-rc.d ${SERVICE} defaults
+ if ! getent passwd ${USERNAME} 1>${OUT} 2>&1 ;
+ then
+ echo "Creating ${USERNAME} system user & group..."
+ adduser --quiet --system --home $HOME \
+ --disabled-password --group \
+ --gecos "stackbin system user" \
+ ${USERNAME} > ${OUT} 2>&1
+ fi
+ chown ${USERNAME}:${USERNAME} \
+ ${HOME} ${HOME}/* \
+ /var/log/${SERVICE} /var/log/${SERVICE}/*log 1>/${OUT} 2>&1 || :
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..87735c2
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+OUT=/dev/null
+HOME=/var/stackbin
+SERVICE=stackbin
+
+case "$1" in
+ purge)
+ update-rc.d -f ${SERVICE} remove
+ rm -f ${HOME}/upload/.*.meta 1>${OUT} 2>&1 || :
+ ;;
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/prerm b/debian/prerm
new file mode 100644
index 0000000..8c70071
--- /dev/null
+++ b/debian/prerm
@@ -0,0 +1,33 @@
+#!/bin/sh
+set -e
+OUT=/dev/null
+HOME=/var/stackbin
+SERVICE=stackbin
+
+case "$1" in
+ remove)
+ test -x /usr/sbin/invoke-rc.d && \
+ INIT="invoke-rc.d ${SERVICE}" || \
+ INIT="/etc/init.d/${SERVICE}"
+ ${INIT} stop
+ ;;
+
+ purge)
+ rm -f ${HOME}/${SERVICE}-wsgi.pid 1>${OUT} 2>&1 || :
+ ;;
+
+ upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b123419
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,20 @@
+#!/usr/bin/make -f
+# You must remove unused comment lines for the released package.
+#export DH_VERBOSE = 1
+#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
+#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
+export APPNAME=stackbin
+
+%:
+ dh $@ --sourcedirectory=extra
+
+override_dh_auto_install:
+ dh_auto_install -- prefix=/usr \
+ DEFAULTDIR='$$(DESTDIR)/etc/default' \
+ APACHEDIR='$$(SYSCONFDIR)/apache2/sites-available'
+
+override_dh_gencontrol:
+ printf "misc:Depends=" > debian/${APPNAME}.substvars
+ make -C extra DISTRO=devuan deplist SEPARATOR=',' | grep -vE 'make\[[0-9]' >> debian/${APPNAME}.substvars
+ dh_gencontrol
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/local-options b/debian/source/local-options
new file mode 100644
index 0000000..00131ee
--- /dev/null
+++ b/debian/source/local-options
@@ -0,0 +1,2 @@
+#abort-on-upstream-changes
+#unapply-patches
diff --git a/debian/stackbin.dsc b/debian/stackbin.dsc
new file mode 100644
index 0000000..4a3f24a
--- /dev/null
+++ b/debian/stackbin.dsc
@@ -0,0 +1,14 @@
+Format: 3.0 (quilt)
+Source: stackbin
+Binary: stackbin
+Architecture: all
+Version: 0.0.1-1
+Maintainer: B. Stack <bgstack15@gmail.com>
+Homepage: https://bgstack15.ddns.net/
+Standards-Version: 4.5.0
+Build-Depends: debhelper-compat (= 12)
+Package-List:
+ stackbin deb web optional arch=all
+Files:
+ 00000000000000000000000000000000 1 stackbin_0.0.1.orig.tar.gz
+ 00000000000000000000000000000000 1 stackbin_0.0.1-1.debian.tar.xz
diff --git a/debian/stackbin.lintian-overrides b/debian/stackbin.lintian-overrides
new file mode 100644
index 0000000..4276455
--- /dev/null
+++ b/debian/stackbin.lintian-overrides
@@ -0,0 +1 @@
+copyright-has-url-from-dh_make-boilerplate
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..76575dc
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+# You must remove unused comment lines for the released package.
+version=3
bgstack15