aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteadfasterX2019-01-03 11:30:35 +0100
committersteadfasterX2019-01-03 12:05:09 +0100
commit3e291bbc4d5d8236020504e8ba6606730d09439b (patch)
tree26ad16ac36428b30e7ea450f56426ee220c27090
downloadaur-3e291bbc4d5d8236020504e8ba6606730d09439b.tar.gz
squashed and merged from upstream
added .SRCINFO added maintainer, better description README updated bumped version fix stupid github markdown bumped version (after 1 year daily usage... yea 1.0) completed install guide fix: typo for ssmtp fix: when no ignore pkg specified archnews failed fix: cron get not executed due to wrong file perm fix: create log directory if it doesn't exist missing line first version of a real readme new release fix: omg.. the ignores had an effect for the checks only.. fix: typo prevented arch news exec fix/new: parsing the config before install/remove this gives high flexibility to change installation path, user etc fix: whole installation now clean adding post install and post remove fix: uau symlink new: initial version of package build initial version of gitignore Initial commit
-rw-r--r--.SRCINFO22
-rw-r--r--.gitignore5
-rw-r--r--LICENSE165
-rw-r--r--PKGBUILD49
-rw-r--r--README.md46
-rw-r--r--uau.install34
6 files changed, 321 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b465c83a3e16
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = uau
+ pkgdesc = A little helper for installing Arch upgrades scheduled, respecting the recommended upgrade checks and doing all this non-interactively
+ pkgver = 1.1.0
+ pkgrel = 1
+ url = https://github.com/steadfasterX/arch_uau
+ install = uau.install
+ arch = any
+ license = LGPL3
+ makedepends = git
+ depends = aur-comment-fetcher-git
+ depends = checkupdates+aur
+ depends = sudo
+ depends = pacman
+ depends = python3-memoizedb
+ optdepends = ssmtp: to provide the sendmail like mail command
+ backup = etc/unattended-arch-upgrade.conf
+ backup = etc/unattended-arch-upgrade.ignore
+ source = https://github.com/steadfasterX/arch_uau/archive/v1.1.0.tar.gz
+ md5sums = SKIP
+
+pkgname = uau
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..82f4af9beb14
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.pkg.tar.xz
+*.tar.gz
+pkg/*
+src/*
+*.swp
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..65c5ca88a67c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..dd761e9fdb90
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: steadfasterX <steadfasterX [at] gmail -dot- com>
+pkgname=uau
+pkgver=1.1.0
+pkgrel=1
+pkgdesc="A little helper for installing Arch upgrades scheduled, respecting the recommended upgrade checks and doing all this non-interactively"
+arch=('any')
+url="https://github.com/steadfasterX/arch_uau"
+license=('LGPL3')
+depends=('aur-comment-fetcher-git' 'checkupdates+aur' 'sudo' 'pacman' 'python3-memoizedb')
+makedepends=('git')
+optdepends=('ssmtp: to provide the sendmail like mail command')
+backup=('etc/unattended-arch-upgrade.conf' 'etc/unattended-arch-upgrade.ignore')
+source=("https://github.com/steadfasterX/arch_$pkgname/archive/v$pkgver.tar.gz")
+md5sums=('SKIP')
+BINFIX=usr/local/bin
+SUDOERS=etc/sudoers.d
+SYSD=etc/systemd/system
+MANDIR=usr/share/man
+MAN5DIR=${MANDIR}/man5
+MAN8DIR=${MANDIR}/man8
+MAN5PAGE=uau.5
+MAN8PAGE=uau.8
+USER=root
+GROUP=root
+install=${pkgname}.install
+
+package() {
+ cd "arch_$pkgname-$pkgver"
+
+ mkdir -p $pkgdir/etc/cron.d $pkgdir/${BINFIX} $pkgdir/$SYSD $pkgdir/$MAN5DIR $pkgdir/$MAN8DIR
+
+ install -d -m 0750 $pkgdir/${SUDOERS}
+ install -o ${USER} -g ${GROUP} -m 0700 conf/uau_sudo $pkgdir/${SUDOERS}/uau_sudo
+ install -o ${USER} -g ${GROUP} -m 0744 conf/unattended-arch-upgrade.conf $pkgdir/etc/unattended-arch-upgrade.conf
+ install -o ${USER} -g ${GROUP} -m 0744 conf/unattended-arch-upgrade.ignore $pkgdir/etc/unattended-arch-upgrade.ignore
+ install -o ${USER} -g ${GROUP} -m 0755 bin/* $pkgdir/${BINFIX}/
+ ln -sfv uau $pkgdir/${BINFIX}/unattended-upgrade
+ install -o ${USER} -g ${GROUP} -m 0755 conf/archnews_cron $pkgdir/etc/cron.d/archnews
+ install -o ${USER} -g ${GROUP} -m 0755 conf/unattended-arch-upgrade.service $pkgdir/${SYSD}/unattended-arch-upgrade.service
+ install -o ${USER} -g ${GROUP} -m 0755 conf/unattended-arch-upgrade.timer $pkgdir/${SYSD}/unattended-arch-upgrade.timer
+
+ install -m 0644 doc/${MAN5PAGE} $pkgdir/${MAN5DIR}/${MAN5PAGE}
+ install -m 0644 doc/${MAN8PAGE} $pkgdir/${MAN8DIR}/${MAN8PAGE}
+
+ mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
+ install -D -m644 ./LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+}
+
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..f3e74716a917
--- /dev/null
+++ b/README.md
@@ -0,0 +1,46 @@
+## uAu (unattended Arch upgrade) package build
+
+package build for uAu (https://github.com/steadfasterX/arch_uau/)
+
+## Guide
+
+### Install the requirements
+
+`gpg --receive-keys 1D1F0DC78F173680`
+
+`trizen -S --noconfirm aur-comment-fetcher-git checkupdates+aur python3-memoizedb`
+
+#### optional: Install mail
+
+If you have the command `mail` **not** available on your system:
+
+`sudo pacman -S ssmtp`
+
+I use and have tested only sstmp but every sendmail-like `mail` cmd will do.
+
+#### Build & Install
+
+`git clone https://github.com/steadfasterX/arch_uau-pkg.git`
+
+`cd arch_uau-pkg`
+
+`makepkg -si`
+
+#### Configure
+
+Set the expiry, inactive etc to never:
+
+`chage -E -1 -I -1 -m -1 -M -1 archupdater`
+
+*/etc/unattended-arch-upgrade.conf*
+
+All options are well documented in that conf file. Just adjust it to your needs.
+
+*/etc/unattended-arch-upgrade.ignore*
+
+This one should be used VERY carefully as ignoring packages can result in unexpected system behavior.
+Each "IgnorePkg=" can just contain 1 package name.
+
+* Bad example: libraries
+* Good example: kernel
+
diff --git a/uau.install b/uau.install
new file mode 100644
index 000000000000..7b4f73f742d9
--- /dev/null
+++ b/uau.install
@@ -0,0 +1,34 @@
+
+post_install() {
+ . /etc/unattended-arch-upgrade.conf
+
+ TODAY=$(date +%F); useradd $UPDATEUSER -G systemd-journal --expiredate $TODAY -f -1 -m
+
+ # install archnews and ensure it is a supported version
+ mkdir $ANEWSDIR
+ git clone $GITANEWS $ANEWSDIR
+ cd $ANEWSDIR
+ git checkout $ANEWREL
+
+ systemctl enable unattended-arch-upgrade.timer
+ systemctl start unattended-arch-upgrade.timer
+ systemctl list-timers unattended-arch-upgrade.timer
+
+ sed -i '/\[options\]/a Include=/etc/unattended-arch-upgrade.ignore' $PACCONF
+
+ mkdir -p $LOGDIR
+ chown $UPDATEUSER $LOGDIR
+
+ chmod 644 /etc/cron.d/archnews
+}
+
+pre_remove() {
+ . /etc/unattended-arch-upgrade.conf
+
+ sed -i 's#Include=/etc/unattended-arch-upgrade.ignore##g' $PACCONF
+
+ systemctl stop unattended-arch-upgrade.timer
+ systemctl disable unattended-arch-upgrade.timer
+ userdel $UPDATEUSER -r
+}
+