From 93abc85df8a72067aecc72c4773d00b040d6a1e2 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Fri, 26 Jun 2020 19:18:25 +0000 Subject: Fri Jun 26 19:18:25 UTC 2020 a/sysklogd-2.1.2-x86_64-1.txz: Upgraded. Make sure to move the .new init script and config into place for this. ap/undervolt-20200612_07d0c70-x86_64-1.txz: Added. l/popt-1.18-x86_64-1.txz: Upgraded. x/libglvnd-1.3.2-x86_64-1.txz: Upgraded. x/libva-2.8.0-x86_64-1.txz: Upgraded. x/libva-utils-2.8.0-x86_64-1.txz: Upgraded. --- source/a/sysklogd/config/rc.syslog.new | 36 ++---- source/a/sysklogd/config/syslog.conf.new | 31 +++-- source/a/sysklogd/config/syslogd.new | 4 + source/a/sysklogd/doinst.sh | 5 +- source/a/sysklogd/slack-desc | 12 +- source/a/sysklogd/sysklogd.SlackBuild | 137 ++++++++++++++------- .../sysklogd/sysklogd.allow.repeated.messages.diff | 69 ----------- source/a/sysklogd/sysklogd.union.wait.int.diff | 11 -- source/a/sysklogd/sysklogd.url | 1 + source/a/sysklogd/use_memmove_not_strcpy.diff | 15 --- source/ap/undervolt/fetch-undervolt.sh | 52 ++++++++ source/ap/undervolt/slack-desc | 19 +++ source/ap/undervolt/undervolt.SlackBuild | 80 ++++++++++++ source/ap/undervolt/undervolt.url | 1 + source/l/popt/popt.SlackBuild | 7 +- source/l/popt/popt.url | 1 + 16 files changed, 288 insertions(+), 193 deletions(-) create mode 100644 source/a/sysklogd/config/syslogd.new delete mode 100644 source/a/sysklogd/sysklogd.allow.repeated.messages.diff delete mode 100644 source/a/sysklogd/sysklogd.union.wait.int.diff create mode 100644 source/a/sysklogd/sysklogd.url delete mode 100644 source/a/sysklogd/use_memmove_not_strcpy.diff create mode 100755 source/ap/undervolt/fetch-undervolt.sh create mode 100644 source/ap/undervolt/slack-desc create mode 100755 source/ap/undervolt/undervolt.SlackBuild create mode 100644 source/ap/undervolt/undervolt.url create mode 100644 source/l/popt/popt.url (limited to 'source') diff --git a/source/a/sysklogd/config/rc.syslog.new b/source/a/sysklogd/config/rc.syslog.new index f2b51d5eb..a802ec38a 100644 --- a/source/a/sysklogd/config/rc.syslog.new +++ b/source/a/sysklogd/config/rc.syslog.new @@ -1,42 +1,22 @@ #!/bin/sh -# Start/stop/restart the system logging daemons. +# Start/stop/restart the system logging daemon. # # Written for Slackware Linux by Patrick J. Volkerding . -# Uncomment the following line to use the -c option to syslogd. This will -# disable suppressing repeated messages, which may be useful with tools that -# parse the logs, such as fail2ban: -#SYSLOGD_OPTIONS="-c " - -# Options for klogd: -# '-c 3' = display level 'error' or higher messages on console -# '-x' = turn off broken EIP translation -KLOGD_OPTIONS="-c 3 -x" +# Source default settings: +if [ -r /etc/default/syslogd ]; then + . /etc/default/syslogd +fi syslogd_start() { - if [ -x /usr/sbin/syslogd -a -x /usr/sbin/klogd ]; then - echo -n "Starting sysklogd daemons: " - echo -n "/usr/sbin/syslogd ${SYSLOGD_OPTIONS};" - /usr/sbin/syslogd $SYSLOGD_OPTIONS - # prevent syslogd/klogd race condition on SMP kernels - if ps acx | grep -q udevd ; then - while [ ! -e /dev/log ] ; do - sleep 0 - done - else - sleep 1 - fi - # Run klogd, unless we are in a container: - if [ -z $container ]; then - echo " /usr/sbin/klogd $KLOGD_OPTIONS" - /usr/sbin/klogd $KLOGD_OPTIONS - fi + if [ -x /usr/sbin/syslogd ]; then + echo -n "Starting syslogd daemon: /usr/sbin/syslogd ${SYSLOGD_OPTS}" + /usr/sbin/syslogd $SYSLOGD_OPTS fi } syslogd_stop() { killall syslogd 2> /dev/null - killall klogd 2> /dev/null } syslogd_restart() { diff --git a/source/a/sysklogd/config/syslog.conf.new b/source/a/sysklogd/config/syslog.conf.new index 15bc5ee41..4cf787aef 100644 --- a/source/a/sysklogd/config/syslog.conf.new +++ b/source/a/sysklogd/config/syslog.conf.new @@ -1,26 +1,31 @@ # /etc/syslog.conf # For info about the format of this file, see "man syslog.conf" -# and /usr/doc/sysklogd/README.linux. Note the '-' prefixing some -# of these entries; this omits syncing the file after every logging. +# and /usr/doc/sysklogd/README.linux. Note the '-' prefixing some +# of these entries; this omits syncing the file after every logging. # In the event of a crash, some log information might be lost, so # if this is a concern to you then you might want to remove the '-'. -# Be advised this will cause a performation loss if you're using +# Be advised this will cause a performance loss if you're using # programs that do heavy logging. -# Uncomment this to see kernel messages on the console. -#kern.* /dev/console +# Uncomment to see kernel messages 'err' or higher on the console. +# Note that this is disabled by default because the kernel has defined +# the "No irq handler for vector" message as 'emerg' (the highest, your +# system should be considered unusable) level and will spam the console +# during boot. But perhaps you can live with that in order to see the +# other kernel messages... +#kern.err /dev/console # Log anything 'info' or higher, but lower than 'warn'. -# Exclude authpriv, cron, mail, and news. These are logged elsewhere. +# Exclude authpriv, cron, mail, and news. These are logged elsewhere. *.info;*.!warn;\ authpriv.none;cron.none;mail.none;news.none -/var/log/messages # Log anything 'warn' or higher. -# Exclude authpriv, cron, mail, and news. These are logged elsewhere. +# Exclude authpriv, cron, mail, and news. These are logged elsewhere. *.warn;\ authpriv.none;cron.none;mail.none;news.none -/var/log/syslog -# Debugging information is logged here. +# Debugging information is logged here: *.=debug -/var/log/debug # Private authentication message logging: @@ -35,12 +40,14 @@ mail.* -/var/log/maillog # Emergency level messages go to all users: *.emerg * -# This log is for news and uucp errors: -uucp,news.crit -/var/log/spooler +# Uncomment to log news and uucp errors: +#uucp,news.crit -/var/log/spooler -# Uncomment these if you'd like INN to keep logs on everything. -# You won't need this if you don't run INN (the InterNetNews daemon). +# Uncomment these if you run a news server and would like to log related +# messages: #news.=crit -/var/log/news/news.crit #news.=err -/var/log/news/news.err #news.notice -/var/log/news/news.notice +# Include all config files in /etc/syslog.d/: +include /etc/syslog.d/*.conf diff --git a/source/a/sysklogd/config/syslogd.new b/source/a/sysklogd/config/syslogd.new new file mode 100644 index 000000000..b621cd8f3 --- /dev/null +++ b/source/a/sysklogd/config/syslogd.new @@ -0,0 +1,4 @@ +# Options for the syslog daemon. +# Default is "-s" to run in secure mode - not accepting network connections. +# For other options, see syslog(8). +SYSLOGD_OPTS="-s" diff --git a/source/a/sysklogd/doinst.sh b/source/a/sysklogd/doinst.sh index fcaf830d6..25150813d 100644 --- a/source/a/sysklogd/doinst.sh +++ b/source/a/sysklogd/doinst.sh @@ -9,15 +9,15 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } +config etc/default/syslogd.new config etc/logrotate.d/syslog.new -config etc/syslog.conf.new config etc/rc.d/rc.syslog.new +config etc/syslog.conf.new config var/log/cron.new config var/log/debug.new config var/log/maillog.new config var/log/messages.new config var/log/secure.new -config var/log/spooler.new config var/log/syslog.new # Remove any leftover empty files: @@ -26,6 +26,5 @@ rm -f var/log/debug.new rm -f var/log/maillog.new rm -f var/log/messages.new rm -f var/log/secure.new -rm -f var/log/spooler.new rm -f var/log/syslog.new diff --git a/source/a/sysklogd/slack-desc b/source/a/sysklogd/slack-desc index f20ffbe9d..0a3a20e98 100644 --- a/source/a/sysklogd/slack-desc +++ b/source/a/sysklogd/slack-desc @@ -8,12 +8,12 @@ |-----handy-ruler------------------------------------------------------| sysklogd: sysklogd (Linux system logging utilities) sysklogd: -sysklogd: Dr. Greg Wettstein and Stephen Tweedie's syslogd/klogd. -sysklogd: -sysklogd: This package contains a modified version of syslogd for the Linux -sysklogd: environment. An additional utility, klogd, is included which allows -sysklogd: kernel logging to be directed through the syslogd facility. -sysklogd: Syslogd and klogd are started when your system boots. +sysklogd: The syslogd utility reads and logs messages to the system console, log +sysklogd: files, other machines and/or users as specified by its configuration +sysklogd: file. It was originally ported to Linux by Dr. Greg Wettstein, Stephen +sysklogd: Tweedie, Juha Virtanen, Shane Alderton, and Martin Schulze, and is +sysklogd: currently maintained by Joachim Nilsson. sysklogd: +sysklogd: Homepage: https://github.com/troglobit/sysklogd sysklogd: sysklogd: diff --git a/source/a/sysklogd/sysklogd.SlackBuild b/source/a/sysklogd/sysklogd.SlackBuild index 6f934c1e5..c797be8a1 100755 --- a/source/a/sysklogd/sysklogd.SlackBuild +++ b/source/a/sysklogd/sysklogd.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2005-2020 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,15 +23,18 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=sysklogd -VERSION=1.5.1 -BUILD=${BUILD:-3} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} +# Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then - case "$( uname -m )" in - i?86) export ARCH=i586 ;; - arm*) export ARCH=arm ;; - *) export ARCH=$( uname -m ) ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) ARCH=$(uname -m) ;; esac + export ARCH fi # If the variable PRINT_PACKAGE_NAME is set, then this script will report what @@ -44,15 +47,37 @@ fi NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "armv7hl" ]; then + SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16" + LIBDIRSUFFIX="" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + TMP=${TMP:-/tmp} -PKG=$TMP/package-sysklogd +PKG=$TMP/package-$PKGNAM rm -rf $PKG mkdir -p $TMP $PKG + cd $TMP -rm -rf sysklogd-$VERSION -tar xvf $CWD/sysklogd-$VERSION.tar.gz || exit 1 -cd sysklogd-$VERSION +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ @@ -60,30 +85,24 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \+ -# Use memmove() instead of strcpy() in syslogd.c -zcat $CWD/use_memmove_not_strcpy.diff.gz | patch -p1 --verbose || exit 1 - -# Allow -c option to log all (even repeated) messages: -zcat $CWD/sysklogd.allow.repeated.messages.diff.gz | patch -p1 --verbose || exit 1 - -# union wait removed in glibc, use int instead: -zcat $CWD/sysklogd.union.wait.int.diff.gz | patch -p1 --verbose || exit 1 - -make all syslog_tst $NUMJOBS || make || exit 1 - -mkdir -p $PKG/usr/sbin -cat klogd > $PKG/usr/sbin/klogd -cat syslog_tst > $PKG/usr/sbin/syslog_tst -cat syslogd > $PKG/usr/sbin/syslogd -chmod 0755 $PKG/usr/sbin/* - -mkdir -p $PKG/usr/man/man{5,8} -cat syslog.conf.5 | gzip -9c > $PKG/usr/man/man5/syslog.conf.5.gz -cat klogd.8 | gzip -9c > $PKG/usr/man/man8/klogd.8.gz -cat sysklogd.8 | gzip -9c > $PKG/usr/man/man8/sysklogd.8.gz -( cd $PKG/usr/man/man8 ; ln -s sysklogd.8.gz syslogd.8.gz ) - -mkdir -p $PKG/etc +# Configure, build, and install: +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --docdir=/usr/doc/$PKGNAM-$VERSION \ + --mandir=/usr/man \ + --infodir=/usr/info \ + --disable-static \ + --without-logger \ + --build=$ARCH-slackware-linux || exit 1 +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +mkdir -p $PKG/etc/syslog.d cat $CWD/config/syslog.conf.new > $PKG/etc/syslog.conf.new mkdir -p $PKG/etc/logrotate.d @@ -93,25 +112,53 @@ mkdir -p $PKG/etc/rc.d cat $CWD/config/rc.syslog.new > $PKG/etc/rc.d/rc.syslog.new chmod 0755 $PKG/etc/rc.d/rc.syslog.new +mkdir -p $PKG/etc/default +cat $CWD/config/syslogd.new > $PKG/etc/default/syslogd.new + mkdir -p $PKG/var/log -for i in cron debug maillog messages secure spooler syslog ; do +for i in cron debug maillog messages secure syslog ; do touch $PKG/var/log/$i.new chmod 640 $PKG/var/log/$i.new done -find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +# Strip binaries: +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +# Compress manual pages: +find $PKG/usr/man -type f -exec gzip -9 {} \+ +for i in $( find $PKG/usr/man -type l ) ; do + ln -s $( readlink $i ).gz $i.gz + rm $i +done -mkdir -p $PKG/usr/doc/sysklogd-$VERSION +# Compress info files, if any: +if [ -d $PKG/usr/info ]; then + ( cd $PKG/usr/info + rm -f dir + gzip -9 * + ) +fi + +# Add a documentation directory: +mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION cp -a \ - ANNOUNCE CHANGES COPYING INSTALL MANIFEST NEWS README.1st README.linux \ - $PKG/usr/doc/sysklogd-$VERSION -chmod 0644 $PKG/usr/doc/sysklogd-$VERSION/* + ChangeLog* COPYING* LICENSE* NEWS* README* THANKS* TODO* \ + $PKG/usr/doc/${PKGNAM}-$VERSION + +# If there's a ChangeLog, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r ChangeLog ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat ChangeLog.md | head -n 1000 > $DOCSDIR/ChangeLog.md + touch -r ChangeLog.md $DOCSDIR/ChangeLog.md +fi mkdir -p $PKG/install +zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc -zcat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $TMP/sysklogd-$VERSION-$ARCH-$BUILD.txz - +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/a/sysklogd/sysklogd.allow.repeated.messages.diff b/source/a/sysklogd/sysklogd.allow.repeated.messages.diff deleted file mode 100644 index 41e6bf15d..000000000 --- a/source/a/sysklogd/sysklogd.allow.repeated.messages.diff +++ /dev/null @@ -1,69 +0,0 @@ ---- ./syslogd.c.orig 2014-10-04 14:47:18.000000000 -0500 -+++ ./syslogd.c 2016-06-29 01:46:39.355541929 -0500 -@@ -776,6 +776,7 @@ - }; - - int Debug; /* debug flag */ -+int Compress = 1; /* compress repeated messages flag */ - char LocalHostName[MAXHOSTNAMELEN+1]; /* our hostname */ - char *LocalDomain; /* our local domain name */ - char *emptystring = ""; -@@ -888,7 +889,7 @@ - funix[i] = -1; - } - -- while ((ch = getopt(argc, argv, "a:dhf:l:m:np:rs:v")) != EOF) -+ while ((ch = getopt(argc, argv, "a:cdhf:l:m:np:rs:v")) != EOF) - switch((char)ch) { - case 'a': - if (nfunix < MAXFUNIX) -@@ -896,6 +897,9 @@ - else - fprintf(stderr, "Out of descriptors, ignoring %s\n", optarg); - break; -+ case 'c': /* don't compress repeated messages */ -+ Compress = 0; -+ break; - case 'd': /* debug */ - Debug = 1; - break; -@@ -1240,7 +1244,7 @@ - - int usage() - { -- fprintf(stderr, "usage: syslogd [-drvh] [-l hostlist] [-m markinterval] [-n] [-p path]\n" \ -+ fprintf(stderr, "usage: syslogd [-cdrvh] [-l hostlist] [-m markinterval] [-n] [-p path]\n" \ - " [-s domainlist] [-f conffile]\n"); - exit(1); - } -@@ -1703,7 +1707,7 @@ - /* - * suppress duplicate lines to this file - */ -- if ((flags & MARK) == 0 && msglen == f->f_prevlen && -+ if (Compress && (flags & MARK) == 0 && msglen == f->f_prevlen && - !strcmp(msg, f->f_prevline) && - !strcmp(from, f->f_prevhost)) { - (void) strncpy(f->f_lasttime, timestamp, 15); ---- ./sysklogd.8.orig 2014-10-04 14:47:18.000000000 -0500 -+++ ./sysklogd.8 2016-06-29 01:59:45.311525189 -0500 -@@ -10,6 +10,7 @@ - .RB [ " \-a " - .I socket - ] -+.RB [ " \-c " ] - .RB [ " \-d " ] - .RB [ " \-f " - .I config file -@@ -83,6 +84,11 @@ - described by the people from OpenBSD at - . - .TP -+.B "\-c" -+Disable the repeating line compression that normally suppresses the -+repeated lines and logs a message such as 'last message repeated 124 -+times'. With this option, all repeated lines will be logged. -+.TP - .B "\-d" - Turns on debug mode. Using this the daemon will not proceed a - .BR fork (2) diff --git a/source/a/sysklogd/sysklogd.union.wait.int.diff b/source/a/sysklogd/sysklogd.union.wait.int.diff deleted file mode 100644 index 7bbc19447..000000000 --- a/source/a/sysklogd/sysklogd.union.wait.int.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ./syslogd.c.orig 2014-10-04 14:47:18.000000000 -0500 -+++ ./syslogd.c 2018-02-03 15:04:06.324301613 -0600 -@@ -2094,7 +2094,7 @@ - (void) signal(SIGCHLD, reapchild); /* reset signal handler -ASP */ - wait ((int *)0); - #else -- union wait status; -+ int status; - - while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0) - ; diff --git a/source/a/sysklogd/sysklogd.url b/source/a/sysklogd/sysklogd.url new file mode 100644 index 000000000..d1fe076d1 --- /dev/null +++ b/source/a/sysklogd/sysklogd.url @@ -0,0 +1 @@ +https://github.com/troglobit/sysklogd diff --git a/source/a/sysklogd/use_memmove_not_strcpy.diff b/source/a/sysklogd/use_memmove_not_strcpy.diff deleted file mode 100644 index 8fb7c5045..000000000 --- a/source/a/sysklogd/use_memmove_not_strcpy.diff +++ /dev/null @@ -1,15 +0,0 @@ -Adapted from this upstream git commit: 2a80f8117f40dc6a3fce30c6d0f15f3c5af55ccf -http://git.infodrom.org/?p=infodrom/sysklogd;a=commit;h=2a80f8117f40dc6a3fce30c6d0f15f3c5af55ccf - -diff -Nur sysklogd-1.5.orig//syslogd.c sysklogd-1.5/syslogd.c ---- sysklogd-1.5.orig//syslogd.c 2007-07-04 14:04:01.000000000 -0500 -+++ sysklogd-1.5/syslogd.c 2010-10-14 13:12:15.808000011 -0500 -@@ -2392,7 +2392,7 @@ - if (*p == '\0' || *p == '#') - continue; - #if CONT_LINE -- strcpy(cline, p); -+ memmove(cline, p, strlen(p)+1); - #endif - for (p = strchr(cline, '\0'); isspace(*--p);); - #if CONT_LINE diff --git a/source/ap/undervolt/fetch-undervolt.sh b/source/ap/undervolt/fetch-undervolt.sh new file mode 100755 index 000000000..073165ae1 --- /dev/null +++ b/source/ap/undervolt/fetch-undervolt.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# Copyright 2019, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +PKGNAM=undervolt + +# Pull a stable branch + patches +BRANCH=${1:-master} + +# Clear download area: +rm -rf ${PKGNAM} + +# Clone repository: +git clone https://github.com/georgewhewell/${PKGNAM} + +# checkout $BRANCH: +( cd ${PKGNAM} + git checkout $BRANCH || exit 1 +) + +HEADISAT="$( cd ${PKGNAM} && git log -1 --format=%h )" +DATE="$( cd ${PKGNAM} && git log -1 --format=%ad --date=format:%Y%m%d )" +LONGDATE="$( cd ${PKGNAM} && git log -1 --format=%ad --date=format:%c )" +# Cleanup. We're not packing up the whole git repo. +( cd ${PKGNAM} && find . -type d -name ".git*" -exec rm -rf {} \; 2> /dev/null ) +mv ${PKGNAM} ${PKGNAM}-${DATE}_${HEADISAT} +tar cf ${PKGNAM}-${DATE}_${HEADISAT}.tar ${PKGNAM}-${DATE}_${HEADISAT} +plzip -9 -f ${PKGNAM}-${DATE}_${HEADISAT}.tar +rm -rf ${PKGNAM}-${DATE}_${HEADISAT} +touch -d "$LONGDATE" ${PKGNAM}-${DATE}_${HEADISAT}.tar.lz +echo +echo "${PKGNAM} branch $BRANCH with HEAD at $HEADISAT packaged as ${PKGNAM}-${DATE}_${HEADISAT}.tar.lz" +echo diff --git a/source/ap/undervolt/slack-desc b/source/ap/undervolt/slack-desc new file mode 100644 index 000000000..350615ebc --- /dev/null +++ b/source/ap/undervolt/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +undervolt: undervolt (undervolt Intel CPUs) +undervolt: +undervolt: undervolt is a program for undervolting Intel CPUs under Linux. It +undervolt: works in a similar manner to the Windows program *ThrottleStop* (i.e.: +undervolt: MSR 0x150). You can apply a fixed voltage offset to one of 5 voltage +undervolt: planes, and override your systems temperature target (CPU will +undervolt: throttle when this temperature is reached). Use at your own risk. +undervolt: +undervolt: Homepage: https://github.com/georgewhewell/undervolt +undervolt: +undervolt: diff --git a/source/ap/undervolt/undervolt.SlackBuild b/source/ap/undervolt/undervolt.SlackBuild new file mode 100755 index 000000000..0a05028b8 --- /dev/null +++ b/source/ap/undervolt/undervolt.SlackBuild @@ -0,0 +1,80 @@ +#!/bin/bash + +# Copyright 2020 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PKGNAM=undervolt +VERSION=${VERSION:-$(echo ${PKGNAM}-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PKGNAM + +rm -rf $PKG +mkdir -p $TMP $PKG +cd $TMP +rm -rf $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1 +cd $PKGNAM-$VERSION || exit 1 +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ + +python3 setup.py install --root=$PKG || exit 1 + +mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION +cp -a *.rst *.txt \ + $PKG/usr/doc/$PKGNAM-$VERSION +find $PKG/usr/doc/$PKGNAM-$VERSION -type f -exec chmod 0644 {} \+ + +# If there's a CHANGELOG.rst, installing at least part of the recent history +# is useful, but don't let it get totally out of control: +if [ -r CHANGELOG.rst ]; then + DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION) + cat CHANGELOG.rst | head -n 1000 > $DOCSDIR/CHANGELOG.rst + touch -r CHANGELOG.rst $DOCSDIR/CHANGELOG.rst +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz diff --git a/source/ap/undervolt/undervolt.url b/source/ap/undervolt/undervolt.url new file mode 100644 index 000000000..482a02800 --- /dev/null +++ b/source/ap/undervolt/undervolt.url @@ -0,0 +1 @@ +https://github.com/georgewhewell/undervolt diff --git a/source/l/popt/popt.SlackBuild b/source/l/popt/popt.SlackBuild index a55da8133..d65c0e27d 100755 --- a/source/l/popt/popt.SlackBuild +++ b/source/l/popt/popt.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2006, 2007, 2008, 2009, 2013, 2018 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009, 2013, 2018, 2020 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,8 +23,8 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=popt -VERSION=${VERSION:-1.16} -BUILD=${BUILD:-3} +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} @@ -146,4 +146,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz - diff --git a/source/l/popt/popt.url b/source/l/popt/popt.url new file mode 100644 index 000000000..6a351f8a9 --- /dev/null +++ b/source/l/popt/popt.url @@ -0,0 +1 @@ +ftp://ftp.rpm.org/pub/rpm/popt/releases -- cgit v1.2.3