From 61e9cf0755e65b656b83f4378896bce451a8091a Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 1 Aug 2024 14:56:30 -0400 Subject: Add hacky Debian packaging --- data/uncron.service | 7 +++---- debian/changelog | 5 +++++ debian/compat | 1 + debian/control | 17 +++++++++++++++++ debian/copyright | 35 +++++++++++++++++++++++++++++++++++ debian/rules | 19 +++++++++++++++++++ 6 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100755 debian/rules diff --git a/data/uncron.service b/data/uncron.service index 493d835..bb4ba05 100644 --- a/data/uncron.service +++ b/data/uncron.service @@ -3,12 +3,11 @@ Description=Command Queue Service After=auditd.service systemd-user-sessions.service time-sync.target [Service] -EnvironmentFile=/etc/sysconfig/uncron -ExecStart=/usr/sbin/uncron +ExecStart=/usr/bin/uncron ExecReload=/bin/kill -HUP $MAINPID KillMode=process -User=khagen -Group=maintainers +User=root +Group= Restart=on-failure RestartSec=5s diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f792ea4 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +uncron (1.0.0) unstable; urgency=medium + + * Initial Debian package release. + + -- Daniil Baturin Tue, 30 Jul 2024 12:14:31 -0400 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..e5ac91e --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: uncron +Section: contrib/net +Priority: extra +Maintainer: VyOS Package Maintainers +Build-Depends: debhelper (>= 9), + quilt +Standards-Version: 3.9.6 + +Package: uncron +Architecture: any +Depends: socat + ${misc:Depends} +Description: Simple job queue daemon + Simple job queue daemon that allows scheduling commands + with a guarantee that next command will not run + until previous commands completes, + so that it's safe to use with utilities that can't run in parallel diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..3aba789 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,35 @@ +This package was debianized by Daniil Baturin on +Tue, 30 Jul 2024 12:29:30 -0400 + +It's original content from the GIT repository + +Upstream Author: + + + +Copyright: + + Copyright (C) 2024 VyOS maintainers and contributors + All Rights Reserved. + +License: + +This program 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, or (at your option) +any later version. + +This program 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. + +A copy of the GNU General Public License is available as +`/usr/share/common-licenses/GPL' in the Debian GNU/Linux distribution +or on the World Wide Web at `http://www.gnu.org/copyleft/gpl.html'. +You can also obtain it by writing to the Free Software Foundation, +Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +MA 02110-1301, USA. + +The Debian packaging is (C) 2024, Daniil Baturin and +is licensed under the GPL, see above. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..7519cd9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f + +DIR := debian/uncron + +%: + dh $@ --with quilt + +override_dh_auto_build: + dune build --profile static + +override_dh_auto_install: + mkdir -p $(DIR)/usr/bin + cp _build/default/src/uncron.exe $(DIR)/usr/bin/uncron + cp src/uncron-add $(DIR)/usr/bin/uncron-add + mkdir -p $(DIR)/usr/lib/systemd/system + cp data/uncron.service $(DIR)/usr/lib/systemd/system/uncron.service + +override_dh_auto_test: + echo "No tests yet" -- cgit v1.2.3