mirror of
git://slackware.nl/current.git
synced 2024-12-27 09:59:16 +01:00
Tue Feb 15 20:00:48 UTC 2022
patches/packages/aaa_base-15.0-x86_64-4_slack15.0.txz: Rebuilt. If root's mailbox did not already exist, it would be created with insecure permissions leading to possible local information disclosure. This update ensures that a new mailbox will be created with proper permissions and ownership, and corrects the permissions on an existing mailbox if they are found to be incorrect. Thanks to Martin for the bug report. (* Security fix *) patches/packages/util-linux-2.37.4-x86_64-1_slack15.0.txz: Upgraded. This release fixes a security issue in chsh(1) and chfn(8): By default, these utilities had been linked with libreadline, which allows the INPUTRC environment variable to be abused to produce an error message containing data from an arbitrary file. So, don't link these utilities with libreadline as it does not use secure_getenv() (or a similar concept), or sanitize the config file path to avoid vulnerabilities that could occur in set-user-ID or set-group-ID programs. For more information, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0563 (* Security fix *)
This commit is contained in:
parent
9a5f4fd634
commit
c9881ad979
33 changed files with 11440 additions and 3384 deletions
|
@ -11,9 +11,37 @@
|
|||
<description>Tracking Slackware development in git.</description>
|
||||
<language>en-us</language>
|
||||
<id xmlns="http://www.w3.org/2005/Atom">urn:uuid:c964f45e-6732-11e8-bbe5-107b4450212f</id>
|
||||
<pubDate>Mon, 14 Feb 2022 00:10:38 GMT</pubDate>
|
||||
<lastBuildDate>Mon, 14 Feb 2022 12:29:49 GMT</lastBuildDate>
|
||||
<pubDate>Tue, 15 Feb 2022 20:00:48 GMT</pubDate>
|
||||
<lastBuildDate>Wed, 16 Feb 2022 12:29:48 GMT</lastBuildDate>
|
||||
<generator>maintain_current_git.sh v 1.17</generator>
|
||||
<item>
|
||||
<title>Tue, 15 Feb 2022 20:00:48 GMT</title>
|
||||
<pubDate>Tue, 15 Feb 2022 20:00:48 GMT</pubDate>
|
||||
<link>https://git.slackware.nl/current/tag/?h=20220215200048</link>
|
||||
<guid isPermaLink="false">20220215200048</guid>
|
||||
<description>
|
||||
<![CDATA[<pre>
|
||||
patches/packages/aaa_base-15.0-x86_64-4_slack15.0.txz: Rebuilt.
|
||||
If root's mailbox did not already exist, it would be created with insecure
|
||||
permissions leading to possible local information disclosure. This update
|
||||
ensures that a new mailbox will be created with proper permissions and
|
||||
ownership, and corrects the permissions on an existing mailbox if they are
|
||||
found to be incorrect. Thanks to Martin for the bug report.
|
||||
(* Security fix *)
|
||||
patches/packages/util-linux-2.37.4-x86_64-1_slack15.0.txz: Upgraded.
|
||||
This release fixes a security issue in chsh(1) and chfn(8):
|
||||
By default, these utilities had been linked with libreadline, which allows
|
||||
the INPUTRC environment variable to be abused to produce an error message
|
||||
containing data from an arbitrary file. So, don't link these utilities with
|
||||
libreadline as it does not use secure_getenv() (or a similar concept), or
|
||||
sanitize the config file path to avoid vulnerabilities that could occur in
|
||||
set-user-ID or set-group-ID programs.
|
||||
For more information, see:
|
||||
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0563
|
||||
(* Security fix *)
|
||||
</pre>]]>
|
||||
</description>
|
||||
</item>
|
||||
<item>
|
||||
<title>Mon, 14 Feb 2022 00:10:38 GMT</title>
|
||||
<pubDate>Mon, 14 Feb 2022 00:10:38 GMT</pubDate>
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
Tue Feb 15 20:00:48 UTC 2022
|
||||
patches/packages/aaa_base-15.0-x86_64-4_slack15.0.txz: Rebuilt.
|
||||
If root's mailbox did not already exist, it would be created with insecure
|
||||
permissions leading to possible local information disclosure. This update
|
||||
ensures that a new mailbox will be created with proper permissions and
|
||||
ownership, and corrects the permissions on an existing mailbox if they are
|
||||
found to be incorrect. Thanks to Martin for the bug report.
|
||||
(* Security fix *)
|
||||
patches/packages/util-linux-2.37.4-x86_64-1_slack15.0.txz: Upgraded.
|
||||
This release fixes a security issue in chsh(1) and chfn(8):
|
||||
By default, these utilities had been linked with libreadline, which allows
|
||||
the INPUTRC environment variable to be abused to produce an error message
|
||||
containing data from an arbitrary file. So, don't link these utilities with
|
||||
libreadline as it does not use secure_getenv() (or a similar concept), or
|
||||
sanitize the config file path to avoid vulnerabilities that could occur in
|
||||
set-user-ID or set-group-ID programs.
|
||||
For more information, see:
|
||||
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0563
|
||||
(* Security fix *)
|
||||
+--------------------------+
|
||||
Mon Feb 14 00:10:38 UTC 2022
|
||||
patches/packages/mariadb-10.5.15-x86_64-1_slack15.0.txz: Upgraded.
|
||||
This update fixes potential denial-of-service vulnerabilities.
|
||||
|
|
6808
FILELIST.TXT
6808
FILELIST.TXT
File diff suppressed because it is too large
Load diff
11
patches/packages/aaa_base-15.0-x86_64-4_slack15.0.txt
Normal file
11
patches/packages/aaa_base-15.0-x86_64-4_slack15.0.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
aaa_base: aaa_base (Basic Linux filesystem package)
|
||||
aaa_base:
|
||||
aaa_base: Sets up the empty directory tree for Slackware and adds an email to
|
||||
aaa_base: root's mailbox welcoming them to Linux. :) This package should be
|
||||
aaa_base: installed first, and never uninstalled.
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
11
patches/packages/util-linux-2.37.4-x86_64-1_slack15.0.txt
Normal file
11
patches/packages/util-linux-2.37.4-x86_64-1_slack15.0.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
util-linux: util-linux (a huge collection of essential utilities)
|
||||
util-linux:
|
||||
util-linux: The util-linux package is a huge collection of random utilities
|
||||
util-linux: that are essential to run a Linux system.
|
||||
util-linux:
|
||||
util-linux: Homepage: https://www.kernel.org/pub/linux/utils/util-linux/
|
||||
util-linux:
|
||||
util-linux:
|
||||
util-linux:
|
||||
util-linux:
|
||||
util-linux:
|
111
patches/source/aaa_base/aaa_base.SlackBuild
Executable file
111
patches/source/aaa_base/aaa_base.SlackBuild
Executable file
|
@ -0,0 +1,111 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2018, 2021, 2022 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.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=aaa_base
|
||||
VERSION=15.0
|
||||
BUILD=${BUILD:-4_slack15.0}
|
||||
|
||||
# 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 ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export 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-aaa_base
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
|
||||
# Explode the package framework:
|
||||
cd $PKG
|
||||
explodepkg $CWD/_aaa_base.tar.gz
|
||||
|
||||
echo "+======================+"
|
||||
echo "| repackaging aaa_base |"
|
||||
echo "+======================+"
|
||||
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cp -a $CWD/slackware-version $PKG/etc/slackware-version
|
||||
chown root:root $PKG/etc/slackware-version
|
||||
chmod 644 $PKG/etc/slackware-version
|
||||
cp -a $CWD/os-release $PKG/etc/os-release
|
||||
chown root:root $PKG/etc/os-release
|
||||
chmod 644 $PKG/etc/os-release
|
||||
# Set $ARCH in PRETTY_NAME:
|
||||
sed -i "s/%ARCH%/$ARCH/g" $PKG/etc/os-release
|
||||
|
||||
# If this is a -current version, label it as such:
|
||||
if [ -r $CWD/current-release ]; then
|
||||
# Read variables:
|
||||
. $CWD/current-release
|
||||
echo "$SLACKWARE_VERSION" > $PKG/etc/slackware-version
|
||||
echo "VERSION_CODENAME=$VERSION_CODENAME" >> $PKG/etc/os-release
|
||||
sed -i "s/PRETTY_NAME=.*/PRETTY_NAME=\"$PRETTY_NAME\"/g" $PKG/etc/os-release
|
||||
else
|
||||
echo "VERSION_CODENAME=stable" >> $PKG/etc/os-release
|
||||
fi
|
||||
|
||||
# Add lib64 directories on x86_64:
|
||||
if [ "$ARCH" = "x86_64" ]; then
|
||||
mkdir -p $PKG/lib64 $PKG/usr/lib64 $PKG/usr/local/lib64
|
||||
fi
|
||||
|
||||
# Build the package:
|
||||
cd $PKG
|
||||
makepkg -l y -c n $TMP/aaa_base-$VERSION-$ARCH-$BUILD.txz
|
||||
|
||||
# Black box warning on -current label:
|
||||
if [ -r $CWD/current-release ]; then
|
||||
cat << EOF
|
||||
################################################################
|
||||
################################################################
|
||||
## ##
|
||||
## WARNING: This release is tagged as -current! ##
|
||||
## ##
|
||||
## Before issuing a -stable release, rename current-release ##
|
||||
## to current-release.inactive and then rebuild this package. ##
|
||||
## ##
|
||||
################################################################
|
||||
################################################################
|
||||
EOF
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
# Clean up the extra stuff:
|
||||
if [ "$1" = "--cleanup" ]; then
|
||||
rm -rf $PKG
|
||||
fi
|
28
patches/source/aaa_base/current-release.inactive
Normal file
28
patches/source/aaa_base/current-release.inactive
Normal file
|
@ -0,0 +1,28 @@
|
|||
# If this file is present and named "current-release" when aaa_base is
|
||||
# built, then we will modify the files /etc/slackware-version and
|
||||
# /etc/os-release to help users identify that this system is running a
|
||||
# -current (test) version of Slackware, rather than the otherwise listed
|
||||
# stable release.
|
||||
#
|
||||
# How useful this will be remains to be seen, because there can be a wide
|
||||
# variation in the amount of difference a -current installation has from
|
||||
# the previous stable depending on how many updates have been made to it.
|
||||
# But, it's probably better than nothing.
|
||||
#
|
||||
# Change made to /etc/slackware-version:
|
||||
# Append a "+" to indicate -current.
|
||||
#
|
||||
# Changes made to /etc/os-release:
|
||||
# Add VERSION_CODENAME seen below.
|
||||
# Use the PRETTY_NAME variable seen below.
|
||||
#
|
||||
# This file will still ship in the build directory of a stable release,
|
||||
# but will be renamed "current-release.inactive".
|
||||
|
||||
# For /etc/slackware-version:
|
||||
SLACKWARE_VERSION="Slackware 15.0+"
|
||||
|
||||
# For /etc/os-release:
|
||||
VERSION_CODENAME=current
|
||||
PRETTY_NAME="Slackware 15.0 $ARCH (post 15.0 -current)"
|
||||
|
10
patches/source/aaa_base/os-release
Normal file
10
patches/source/aaa_base/os-release
Normal file
|
@ -0,0 +1,10 @@
|
|||
NAME=Slackware
|
||||
VERSION="15.0"
|
||||
ID=slackware
|
||||
VERSION_ID=15.0
|
||||
PRETTY_NAME="Slackware 15.0 %ARCH%"
|
||||
ANSI_COLOR="0;34"
|
||||
CPE_NAME="cpe:/o:slackware:slackware_linux:15.0"
|
||||
HOME_URL="http://slackware.com/"
|
||||
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
|
||||
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
|
19
patches/source/aaa_base/slack-desc
Normal file
19
patches/source/aaa_base/slack-desc
Normal file
|
@ -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------------------------------------------------------|
|
||||
aaa_base: aaa_base (Basic Linux filesystem package)
|
||||
aaa_base:
|
||||
aaa_base: Sets up the empty directory tree for Slackware and adds an email to
|
||||
aaa_base: root's mailbox welcoming them to Linux. :) This package should be
|
||||
aaa_base: installed first, and never uninstalled.
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
||||
aaa_base:
|
1
patches/source/aaa_base/slackware-version
Normal file
1
patches/source/aaa_base/slackware-version
Normal file
|
@ -0,0 +1 @@
|
|||
Slackware 15.0
|
6564
patches/source/util-linux/adjtimex_1.29-2.2.diff
Normal file
6564
patches/source/util-linux/adjtimex_1.29-2.2.diff
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,20 @@
|
|||
From db281fc97f1d665a61acabfd8d5933130996b29f Mon Sep 17 00:00:00 2001
|
||||
From: mancha <mancha1@zoho.com>
|
||||
Date: Wed, 29 Oct 2014
|
||||
Subject: Heap overflow
|
||||
|
||||
Fix heap-buffer-overflow in strings.c as bundled by util-linux
|
||||
through version 2.9 and as shipped by Slackware Linux and
|
||||
Slackware derivatives.
|
||||
|
||||
--- a/strings.c
|
||||
+++ b/strings.c
|
||||
@@ -124,7 +124,7 @@ main(argc, argv)
|
||||
if (minlen == -1)
|
||||
minlen = DEF_LEN;
|
||||
|
||||
- if (!(bfr = malloc((u_int)minlen))) {
|
||||
+ if (!(bfr = malloc((u_int)minlen + 1))) {
|
||||
(void)fprintf(stderr, "strings: %s\n", strerror(errno));
|
||||
exit(1);
|
||||
}
|
115
patches/source/util-linux/ddate.1
Normal file
115
patches/source/util-linux/ddate.1
Normal file
|
@ -0,0 +1,115 @@
|
|||
.\" All Rites Reversed. This file is in the PUBLIC DOMAIN.
|
||||
.\" Kallisti.
|
||||
.TH DDATE 1 "Bureaucracy 3161" "ddate" "Emperor Norton User Command"
|
||||
.SH NAME
|
||||
ddate \- convert Gregorian dates to Discordian dates
|
||||
.SH SYNOPSIS
|
||||
.B ddate
|
||||
.RI [ \fB+\fPformat]
|
||||
.RI [ date ]
|
||||
.SH DESCRIPTION
|
||||
.B ddate
|
||||
prints the date in Discordian date format.
|
||||
.PP
|
||||
If called with no arguments,
|
||||
.B ddate
|
||||
will get the current system date, convert this to the Discordian
|
||||
date format and print this on the standard output. Alternatively, a
|
||||
Gregorian date may be specified on the command line, in the form of a numerical
|
||||
day, month and year.
|
||||
.PP
|
||||
If a format string is specified, the Discordian date will be printed in
|
||||
a format specified by the string. This mechanism works similarly to the
|
||||
format string mechanism of
|
||||
.B date(1),
|
||||
only almost completely differently. The fields are:
|
||||
.IP %A
|
||||
Full name of the day of the week (i.e., Sweetmorn)
|
||||
.IP %a
|
||||
Abbreviated name of the day of the week (i.e., SM)
|
||||
.IP %B
|
||||
Full name of the season (i.e., Chaos)
|
||||
.IP %b
|
||||
Abbreviated name of the season (i.e., Chs)
|
||||
.IP %d
|
||||
Cardinal number of day in season (i.e., 23)
|
||||
.IP %e
|
||||
Ordinal number of day in season (i.e., 23rd)
|
||||
.IP %H
|
||||
Name of current Holyday, if any
|
||||
.IP %N
|
||||
Magic code to prevent rest of format from being printed unless today is
|
||||
a Holyday.
|
||||
.IP %n
|
||||
Newline
|
||||
.IP %t
|
||||
Tab
|
||||
.IP %X
|
||||
Number of days remaining until X-Day. (Not valid if the SubGenius options
|
||||
are not compiled in.)
|
||||
.IP %{
|
||||
.IP %}
|
||||
Used to enclose the part of the string which is to be replaced with the
|
||||
words "St. Tib's Day" if the current day is St. Tib's Day.
|
||||
.IP %\.
|
||||
Try it and see.
|
||||
.bp
|
||||
.SH EXAMPLES
|
||||
.nf
|
||||
% ddate
|
||||
.br
|
||||
Sweetmorn, Bureaucracy 42, 3161 YOLD
|
||||
.PP
|
||||
% ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H'
|
||||
.br
|
||||
Today is Sweetmorn, the 42nd of Bureaucracy, 3161.
|
||||
.PP
|
||||
% ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995
|
||||
.br
|
||||
It's Prickle-Prickle, the 50th of Bureaucracy, 3161.
|
||||
.br
|
||||
Celebrate Bureflux
|
||||
.PP
|
||||
% ddate +"Today's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 29 2 1996
|
||||
.br
|
||||
Today's St. Tib's Day, 3162.
|
||||
.br
|
||||
|
||||
.SH BUGS
|
||||
|
||||
.B ddate(1)
|
||||
will produce undefined behavior if asked to produce the date for St. Tib's
|
||||
day and its format string does not contain the St. Tib's Day delimiters
|
||||
%{ and %}.
|
||||
|
||||
.SH NOTE
|
||||
|
||||
After `X-Day' passed without incident, the Church of the SubGenius
|
||||
declared that it had got the year upside down - X-Day is actually in 8661 AD
|
||||
rather than 1998 AD. Thus, the True X-Day is Cfn 40, 9827.
|
||||
|
||||
.SH AUTHOR
|
||||
.nh
|
||||
Original program by Druel the Chaotic aka Jeremy Johnson (mpython@gnu.ai.mit.edu)
|
||||
.br
|
||||
Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak (acb@dev.null.org)
|
||||
.br
|
||||
Gregorian B.C.E. dates fixed by Chaplain Nyan the Wiser, aka Dan Dart (ntw@dandart.co.uk)
|
||||
.br
|
||||
Five tons of flax.
|
||||
|
||||
.SH DISTRIBUTION POLICY
|
||||
|
||||
Public domain. All rites reversed.
|
||||
|
||||
.SH SEE ALSO
|
||||
|
||||
date(1),
|
||||
.br
|
||||
http://www.subgenius.com/
|
||||
.br
|
||||
Malaclypse the Younger,
|
||||
.I "Principia Discordia, Or How I Found Goddess And What I Did To Her When I Found Her"
|
||||
|
||||
.SH AVAILABILITY
|
||||
The ddate command is available from https://github.com/bo0ts/ddate.
|
399
patches/source/util-linux/ddate.c
Normal file
399
patches/source/util-linux/ddate.c
Normal file
|
@ -0,0 +1,399 @@
|
|||
/* $ DVCS ID: $jer|,523/lhos,KYTP!41023161\b"?" <<= DO NOT DELETE! */
|
||||
|
||||
/* ddate.c .. converts boring normal dates to fun Discordian Date -><-
|
||||
written the 65th day of The Aftermath in the Year of Our Lady of
|
||||
Discord 3157 by Druel the Chaotic aka Jeremy Johnson aka
|
||||
mpython@gnu.ai.mit.edu
|
||||
28 Sever St Apt #3
|
||||
Worcester MA 01609
|
||||
|
||||
and I'm not responsible if this program messes anything up (except your
|
||||
mind, I'm responsible for that)
|
||||
|
||||
(k) YOLD 3161 and all time before and after.
|
||||
Reprint, reuse, and recycle what you wish.
|
||||
This program is in the public domain. Distribute freely. Or not.
|
||||
|
||||
Majorly hacked, extended and bogotified/debogotified on
|
||||
Sweetmorn, Bureaucracy 42, 3161 YOLD, by Lee H:. O:. Smith, KYTP,
|
||||
aka Andrew Bulhak, aka acb@dev.null.org
|
||||
|
||||
Slightly hackled and crackled by a sweet firey stove on
|
||||
Boomtime, the 53rd day of Bureaucracy in the YOLD 3179,
|
||||
by Chaplain Nyan the Wiser, aka Dan Dart, aka ntw@dandart.co.uk
|
||||
|
||||
and I'm not responsible if this program messes anything up (except your
|
||||
mind, I'm responsible for that) (and that goes for me as well --lhos)
|
||||
|
||||
Version history:
|
||||
Bureflux 3161: First release of enhanced ddate with format strings
|
||||
59 Bcy, 3161: PRAISE_BOB and KILL_BOB options split, other minor
|
||||
changes.
|
||||
53 Bcy, 3179: Fixed gregorian date conversions less than YOLD 1167
|
||||
|
||||
1999-02-22 Arkadiusz Miskiewicz <misiek@pld.ORG.PL>
|
||||
- added Native Language Support
|
||||
|
||||
2000-03-17 Burt Holzman <holzman+ddate@gmail.com>
|
||||
- added range checks for dates
|
||||
|
||||
2014-06-07 William Woodruff <william@tuffbizz.com>
|
||||
- removed gettext dependent locale code
|
||||
|
||||
15th of Confusion, 3180:
|
||||
- call out adherents of the wrong fruit
|
||||
|
||||
FIVE TONS OF FLAX
|
||||
*/
|
||||
|
||||
/* configuration options VVVVV READ THIS!!! */
|
||||
|
||||
/* If you wish ddate(1) to print the date in the same format as Druel's
|
||||
* original ddate when called in immediate mode, define OLD_IMMEDIATE_FMT
|
||||
*/
|
||||
|
||||
#define OLD_IMMEDIATE_FMT
|
||||
|
||||
/* If you wish to use the US format for aneristic dates (m-d-y), as opposed to
|
||||
* the Commonwealth format, define US_FORMAT.
|
||||
*/
|
||||
|
||||
/* #define US_FORMAT */
|
||||
|
||||
/* If you are ideologically, theologically or otherwise opposed to the
|
||||
* Church of the SubGenius and do not wish your copy of ddate(1) to contain
|
||||
* code for counting down to X-Day, undefine KILL_BOB */
|
||||
|
||||
#define KILL_BOB 13013
|
||||
|
||||
/* If you wish ddate(1) to contain SubGenius slogans, define PRAISE_BOB */
|
||||
|
||||
/*#define PRAISE_BOB 13013*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
// work around includes and defines from formerly c.h
|
||||
#ifndef ARRAY_SIZE
|
||||
# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
|
||||
#endif
|
||||
|
||||
/* &a[0] degrades to a pointer: a different type from an array */
|
||||
# define __must_be_array(a) \
|
||||
BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(__typeof__(a), __typeof__(&a[0])))
|
||||
|
||||
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
|
||||
|
||||
/* work around hacks for standalone package */
|
||||
#define PACKAGE "ddate"
|
||||
#define PACKAGE_STRING "Stand Alone"
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define inline /* foo */
|
||||
#endif
|
||||
|
||||
#ifdef KILL_BOB
|
||||
int xday_countdown(int yday, int year);
|
||||
#endif
|
||||
|
||||
|
||||
/* string constants */
|
||||
|
||||
char *day_long[5] = {
|
||||
"Sweetmorn", "Boomtime", "Pungenday", "Prickle-Prickle", "Setting Orange"
|
||||
};
|
||||
|
||||
char *day_short[5] = {"SM","BT","PD","PP","SO"};
|
||||
|
||||
char *season_long[5] = {
|
||||
"Chaos", "Discord", "Confusion", "Bureaucracy", "The Aftermath"
|
||||
};
|
||||
|
||||
char *season_short[5] = {"Chs", "Dsc", "Cfn", "Bcy", "Afm"};
|
||||
|
||||
char *holyday[5][2] = {
|
||||
{ "Mungday", "Chaoflux" },
|
||||
{ "Mojoday", "Discoflux" },
|
||||
{ "Syaday", "Confuflux" },
|
||||
{ "Zaraday", "Bureflux" },
|
||||
{ "Maladay", "Afflux" }
|
||||
};
|
||||
|
||||
struct disc_time {
|
||||
int season; /* 0-4 */
|
||||
int day; /* 0-72 */
|
||||
int yday; /* 0-365 */
|
||||
int year; /* 3066- */
|
||||
};
|
||||
|
||||
char *excl[] = {
|
||||
"Hail Eris!", "All Hail Discordia!", "Kallisti!", "Fnord.", "Or not.",
|
||||
"Wibble.", "Pzat!", "P'tang!", "Frink!",
|
||||
#ifdef PRAISE_BOB
|
||||
"Slack!", "Praise \"Bob\"!", "Or kill me.",
|
||||
#endif /* PRAISE_BOB */
|
||||
/* randomness, from the Net and other places. Feel free to add (after
|
||||
checking with the relevant authorities, of course). */
|
||||
"Grudnuk demand sustenance!", "Keep the Lasagna flying!",
|
||||
"You are what you see.",
|
||||
"Or is it?", "This statement is false.",
|
||||
"Lies and slander, sire!", "Hee hee hee!",
|
||||
#if defined(linux) || defined (__linux__) || defined (__linux)
|
||||
"Hail Eris, Hack Linux!",
|
||||
#elif defined(__APPLE__)
|
||||
"This Fruit is not the True Fruit of Discord.",
|
||||
#endif
|
||||
""
|
||||
};
|
||||
|
||||
char default_fmt[] = "%{%A, %B %d%}, %Y YOLD";
|
||||
char *default_immediate_fmt=
|
||||
#ifdef OLD_IMMEDIATE_FMT
|
||||
"Today is %{%A, the %e day of %B%} in the YOLD %Y%N%nCelebrate %H"
|
||||
#else
|
||||
default_fmt
|
||||
#endif
|
||||
;
|
||||
|
||||
#define DY(y) (y+1166)
|
||||
|
||||
static inline char *ending(int i) {
|
||||
return i/10==1?"th":(i%10==1?"st":(i%10==2?"nd":(i%10==3?"rd":"th")));
|
||||
}
|
||||
|
||||
static inline int leapp(int i) {
|
||||
return (!(DY(i)%4))&&((DY(i)%100)||(!(DY(i)%400)));
|
||||
}
|
||||
|
||||
/* select a random string */
|
||||
static inline char *sel(char **strings, int num) {
|
||||
return(strings[random()%num]);
|
||||
}
|
||||
|
||||
void print(struct disc_time,char **); /* old */
|
||||
void format(char *buf, const char* fmt, struct disc_time dt);
|
||||
/* read a fortune file */
|
||||
int load_fortunes(char *fn, char *delim, char** result);
|
||||
|
||||
struct disc_time convert(int,int);
|
||||
struct disc_time makeday(int,int,int);
|
||||
|
||||
int
|
||||
main (int argc, char *argv[]) {
|
||||
long t;
|
||||
struct tm *eris;
|
||||
int bob,raw;
|
||||
struct disc_time hastur;
|
||||
char schwa[23*17], *fnord=0;
|
||||
int pi;
|
||||
char *progname, *p;
|
||||
|
||||
progname = argv[0];
|
||||
if ((p = strrchr(progname, '/')) != NULL)
|
||||
progname = p+1;
|
||||
|
||||
srandom(time(NULL));
|
||||
/* do args here */
|
||||
for(pi=1; pi<argc; pi++) {
|
||||
switch(argv[pi][0]) {
|
||||
case '+': fnord=argv[pi]+1; break;
|
||||
case '-':
|
||||
switch(argv[pi][1]) {
|
||||
case 'V':
|
||||
printf(("%s (%s)\n"), progname, PACKAGE_STRING);
|
||||
default: goto usage;
|
||||
}
|
||||
default: goto thud;
|
||||
}
|
||||
}
|
||||
|
||||
thud:
|
||||
if (argc-pi==3){
|
||||
int moe=atoi(argv[pi]), larry=atoi(argv[pi+1]), curly=atoi(argv[pi+2]);
|
||||
hastur=makeday(
|
||||
#ifdef US_FORMAT
|
||||
moe,larry,
|
||||
#else
|
||||
larry,moe,
|
||||
#endif
|
||||
curly);
|
||||
if (hastur.season == -1) {
|
||||
printf("Invalid date -- out of range\n");
|
||||
return -1;
|
||||
}
|
||||
fnord=fnord?fnord:default_fmt;
|
||||
} else if (argc!=pi) {
|
||||
usage:
|
||||
fprintf(stderr,("usage: %s [+format] [day month year]\n"), argv[0]);
|
||||
exit(1);
|
||||
} else {
|
||||
t= time(NULL);
|
||||
eris=localtime(&t);
|
||||
bob=eris->tm_yday; /* days since Jan 1. */
|
||||
raw=eris->tm_year; /* years since 1980 */
|
||||
hastur=convert(bob,raw);
|
||||
fnord=fnord?fnord:default_immediate_fmt;
|
||||
}
|
||||
format(schwa, fnord, hastur);
|
||||
printf("%s\n", schwa);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void format(char *buf, const char* fmt, struct disc_time dt)
|
||||
{
|
||||
int tib_start=-1, tib_end=0;
|
||||
int i, fmtlen=strlen(fmt);
|
||||
char *bufptr=buf;
|
||||
|
||||
/* fprintf(stderr, "format(%p, \"%s\", dt)\n", buf, fmt);*/
|
||||
|
||||
/* first, find extents of St. Tib's Day area, if defined */
|
||||
for(i=0; i<fmtlen; i++) {
|
||||
if(fmt[i]=='%') {
|
||||
switch(fmt[i+1]) {
|
||||
case 'A':
|
||||
case 'a':
|
||||
case 'd':
|
||||
case 'e':
|
||||
if(tib_start>0) tib_end=i+1;
|
||||
else tib_start=i;
|
||||
break;
|
||||
case '{': tib_start=i; break;
|
||||
case '}': tib_end=i+1; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* now do the formatting */
|
||||
buf[0]=0;
|
||||
|
||||
for(i=0; i<fmtlen; i++) {
|
||||
if((i==tib_start) && (dt.day==-1)) {
|
||||
/* handle St. Tib's Day */
|
||||
strcpy(bufptr, ("St. Tib's Day"));
|
||||
bufptr += strlen(bufptr);
|
||||
i=tib_end;
|
||||
} else {
|
||||
if(fmt[i]=='%') {
|
||||
char *wibble=0, snarf[23];
|
||||
switch(fmt[++i]) {
|
||||
case 'A': wibble=day_long[dt.yday%5]; break;
|
||||
case 'a': wibble=day_short[dt.yday%5]; break;
|
||||
case 'B': wibble=season_long[dt.season]; break;
|
||||
case 'b': wibble=season_short[dt.season]; break;
|
||||
case 'd': sprintf(snarf, "%d", dt.day+1); wibble=snarf; break;
|
||||
case 'e': sprintf(snarf, "%d%s", dt.day+1, ending(dt.day+1));
|
||||
wibble=snarf; break;
|
||||
case 'H': if(dt.day==4||dt.day==49)
|
||||
wibble=holyday[dt.season][dt.day==49]; break;
|
||||
case 'N': if(dt.day!=4&&dt.day!=49) goto eschaton; break;
|
||||
case 'n': *(bufptr++)='\n'; break;
|
||||
case 't': *(bufptr++)='\t'; break;
|
||||
|
||||
case 'Y': sprintf(snarf, "%d", dt.year); wibble=snarf; break;
|
||||
case '.': wibble=sel(excl, ARRAY_SIZE(excl));
|
||||
break;
|
||||
#ifdef KILL_BOB
|
||||
case 'X': sprintf(snarf, "%d",
|
||||
xday_countdown(dt.yday, dt.year));
|
||||
wibble = snarf; break;
|
||||
#endif /* KILL_BOB */
|
||||
}
|
||||
if(wibble) {
|
||||
/* fprintf(stderr, "wibble = (%s)\n", wibble);*/
|
||||
strcpy(bufptr, wibble); bufptr+=strlen(wibble);
|
||||
}
|
||||
} else {
|
||||
*(bufptr++) = fmt[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
eschaton:
|
||||
*(bufptr)=0;
|
||||
}
|
||||
|
||||
struct disc_time makeday(int imonth,int iday,int iyear) /*i for input */
|
||||
{
|
||||
struct disc_time funkychickens;
|
||||
|
||||
int cal[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
|
||||
int dayspast=0;
|
||||
|
||||
memset(&funkychickens,0,sizeof(funkychickens));
|
||||
/* basic range checks */
|
||||
if (imonth < 1 || imonth > 12 || iyear == 0) {
|
||||
funkychickens.season = -1;
|
||||
return funkychickens;
|
||||
}
|
||||
if (iday < 1 || iday > cal[imonth-1]) {
|
||||
if (!(imonth == 2 && iday == 29 && iyear%4 == 0 &&
|
||||
(iyear%100 != 0 || iyear%400 == 0))) {
|
||||
funkychickens.season = -1;
|
||||
return funkychickens;
|
||||
}
|
||||
}
|
||||
|
||||
imonth--;
|
||||
/* note: gregorian year 0 doesn't exist so
|
||||
* add one if user specifies a year less than 0 */
|
||||
funkychickens.year= iyear+1166 + ((0 > iyear)?1:0);
|
||||
while(imonth>0) { dayspast+=cal[--imonth]; }
|
||||
funkychickens.day=dayspast+iday-1;
|
||||
funkychickens.season=0;
|
||||
if((funkychickens.year%4)==2) {
|
||||
if (funkychickens.day==59 && iday==29) funkychickens.day=-1;
|
||||
}
|
||||
funkychickens.yday=funkychickens.day;
|
||||
/* note: EQUAL SIGN...hopefully that fixes it */
|
||||
while(funkychickens.day>=73) {
|
||||
funkychickens.season++;
|
||||
funkychickens.day-=73;
|
||||
}
|
||||
return funkychickens;
|
||||
}
|
||||
|
||||
struct disc_time convert(int nday, int nyear)
|
||||
{ struct disc_time funkychickens;
|
||||
|
||||
funkychickens.year = nyear+3066;
|
||||
funkychickens.day=nday;
|
||||
funkychickens.season=0;
|
||||
if ((funkychickens.year%4)==2)
|
||||
{if (funkychickens.day==59)
|
||||
funkychickens.day=-1;
|
||||
else if (funkychickens.day >59)
|
||||
funkychickens.day-=1;
|
||||
}
|
||||
funkychickens.yday=funkychickens.day;
|
||||
while (funkychickens.day>=73)
|
||||
{ funkychickens.season++;
|
||||
funkychickens.day-=73;
|
||||
}
|
||||
return funkychickens;
|
||||
|
||||
}
|
||||
|
||||
#ifdef KILL_BOB
|
||||
|
||||
/* Code for counting down to X-Day, X-Day being Cfn 40, 3164
|
||||
*
|
||||
* After `X-Day' passed without incident, the CoSG declared that it had
|
||||
* got the year upside down --- X-Day is actually in 8661 AD rather than
|
||||
* 1998 AD.
|
||||
*
|
||||
* Thus, the True X-Day is Cfn 40, 9827.
|
||||
*
|
||||
*/
|
||||
|
||||
int xday_countdown(int yday, int year) {
|
||||
int r=(185-yday)+(((yday<59)&&(leapp(year)))?1:0);
|
||||
while(year<9827) r+=(leapp(++year)?366:365);
|
||||
while(year>9827) r-=(leapp(year--)?366:365);
|
||||
return r;
|
||||
}
|
||||
|
||||
#endif
|
33
patches/source/util-linux/doinst.sh
Normal file
33
patches/source/util-linux/doinst.sh
Normal file
|
@ -0,0 +1,33 @@
|
|||
config() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
# If there's no config file by that name, mv it over:
|
||||
if [ ! -r $OLD ]; then
|
||||
mv $NEW $OLD
|
||||
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
|
||||
# toss the redundant copy
|
||||
rm $NEW
|
||||
fi
|
||||
# Otherwise, we leave the .new copy for the admin to consider...
|
||||
}
|
||||
|
||||
# Keep same perms on rc.serial.new:
|
||||
if [ -e etc/rc.d/rc.serial ]; then
|
||||
cp -a etc/rc.d/rc.serial etc/rc.d/rc.serial.new.incoming
|
||||
cat etc/rc.d/rc.serial.new > etc/rc.d/rc.serial.new.incoming
|
||||
mv etc/rc.d/rc.serial.new.incoming etc/rc.d/rc.serial.new
|
||||
fi
|
||||
|
||||
config etc/rc.d/rc.serial.new
|
||||
config etc/rc.d/rc.setterm.new
|
||||
config etc/serial.conf.new
|
||||
|
||||
for configfile in chfn.new chsh.new login.new runuser.new runuser-l.new su.new su-l.new ; do
|
||||
if [ -r etc/pam.d/$configfile ]; then
|
||||
config etc/pam.d/$configfile
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -r etc/default/su.new ]; then
|
||||
config etc/default/su.new
|
||||
fi
|
11
patches/source/util-linux/pam.d-su/su
Normal file
11
patches/source/util-linux/pam.d-su/su
Normal file
|
@ -0,0 +1,11 @@
|
|||
#%PAM-1.0
|
||||
auth sufficient pam_rootok.so
|
||||
# Uncomment the following line to implicitly trust users in the "wheel" group.
|
||||
#auth sufficient pam_wheel.so trust use_uid
|
||||
# Uncomment the following line to require a user to be in the "wheel" group.
|
||||
#auth required pam_wheel.so use_uid
|
||||
auth include system-auth
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
session include system-auth
|
||||
session optional pam_xauth.so
|
6
patches/source/util-linux/pam.d-su/su-l
Normal file
6
patches/source/util-linux/pam.d-su/su-l
Normal file
|
@ -0,0 +1,6 @@
|
|||
#%PAM-1.0
|
||||
auth include su
|
||||
account include su
|
||||
password include su
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include su
|
6
patches/source/util-linux/pam.d/chfn
Normal file
6
patches/source/util-linux/pam.d/chfn
Normal file
|
@ -0,0 +1,6 @@
|
|||
#%PAM-1.0
|
||||
auth sufficient pam_rootok.so
|
||||
auth include system-auth
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
session include system-auth
|
6
patches/source/util-linux/pam.d/chsh
Normal file
6
patches/source/util-linux/pam.d/chsh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#%PAM-1.0
|
||||
auth sufficient pam_rootok.so
|
||||
auth include system-auth
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
session include system-auth
|
20
patches/source/util-linux/pam.d/login
Normal file
20
patches/source/util-linux/pam.d/login
Normal file
|
@ -0,0 +1,20 @@
|
|||
#%PAM-1.0
|
||||
auth required pam_securetty.so
|
||||
# When using pam_faillock, print a message to the user if the account is
|
||||
# locked. This lets the user know what is going on, but it also potentially
|
||||
# gives additional information to attackers:
|
||||
#auth requisite pam_faillock.so preauth
|
||||
auth include system-auth
|
||||
# To set a limit on failed authentications, the pam_faillock module
|
||||
# can be enabled. See pam_faillock(8) for more information.
|
||||
#auth [default=die] pam_faillock.so authfail
|
||||
#auth sufficient pam_faillock.so authsucc
|
||||
auth include postlogin
|
||||
account required pam_nologin.so
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
session include system-auth
|
||||
session include postlogin
|
||||
session required pam_loginuid.so
|
||||
-session optional pam_ck_connector.so nox11
|
||||
-session optional pam_elogind.so
|
5
patches/source/util-linux/pam.d/runuser
Normal file
5
patches/source/util-linux/pam.d/runuser
Normal file
|
@ -0,0 +1,5 @@
|
|||
#%PAM-1.0
|
||||
auth sufficient pam_rootok.so
|
||||
session optional pam_keyinit.so revoke
|
||||
session required pam_limits.so
|
||||
session required pam_unix.so
|
4
patches/source/util-linux/pam.d/runuser-l
Normal file
4
patches/source/util-linux/pam.d/runuser-l
Normal file
|
@ -0,0 +1,4 @@
|
|||
#%PAM-1.0
|
||||
auth include runuser
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include runuser
|
13
patches/source/util-linux/rc.setterm
Normal file
13
patches/source/util-linux/rc.setterm
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This file provides the command line for the setterm utility to set the
|
||||
# terminal attributes (primarily used for screen blanking and power
|
||||
# management).
|
||||
|
||||
# Screen blanks after 15 minutes idle time, and powers down in one hour
|
||||
# if the kernel supports APM or ACPI power management (default setting):
|
||||
/bin/setterm -blank 15 -powersave powerdown -powerdown 60
|
||||
|
||||
# Screen does not blank or use power management features:
|
||||
#/bin/setterm -blank 0 -powersave off -powerdown 0
|
||||
|
48
patches/source/util-linux/scsi_ioctl.h
Normal file
48
patches/source/util-linux/scsi_ioctl.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
#ifndef _SCSI_IOCTL_H
|
||||
#define _SCSI_IOCTL_H
|
||||
|
||||
#define SCSI_IOCTL_SEND_COMMAND 1
|
||||
#define SCSI_IOCTL_TEST_UNIT_READY 2
|
||||
#define SCSI_IOCTL_BENCHMARK_COMMAND 3
|
||||
#define SCSI_IOCTL_SYNC 4 /* Request synchronous parameters */
|
||||
#define SCSI_IOCTL_START_UNIT 5
|
||||
#define SCSI_IOCTL_STOP_UNIT 6
|
||||
/* The door lock/unlock constants are compatible with Sun constants for
|
||||
the cdrom */
|
||||
#define SCSI_IOCTL_DOORLOCK 0x5380 /* lock the eject mechanism */
|
||||
#define SCSI_IOCTL_DOORUNLOCK 0x5381 /* unlock the mechanism */
|
||||
|
||||
#define SCSI_REMOVAL_PREVENT 1
|
||||
#define SCSI_REMOVAL_ALLOW 0
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct scsi_device;
|
||||
|
||||
/*
|
||||
* Structures used for scsi_ioctl et al.
|
||||
*/
|
||||
|
||||
typedef struct scsi_ioctl_command {
|
||||
unsigned int inlen;
|
||||
unsigned int outlen;
|
||||
unsigned char data[0];
|
||||
} Scsi_Ioctl_Command;
|
||||
|
||||
typedef struct scsi_idlun {
|
||||
__u32 dev_id;
|
||||
__u32 host_unique_id;
|
||||
} Scsi_Idlun;
|
||||
|
||||
/* Fibre Channel WWN, port_id struct */
|
||||
typedef struct scsi_fctargaddress {
|
||||
__u32 host_port_id;
|
||||
unsigned char host_wwn[8]; // include NULL term.
|
||||
} Scsi_FCTargAddress;
|
||||
|
||||
extern int scsi_ioctl(struct scsi_device *, int, void __user *);
|
||||
extern int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,
|
||||
void __user *arg, struct file *filp);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* _SCSI_IOCTL_H */
|
49
patches/source/util-linux/setserial-rc.serial.diff
Normal file
49
patches/source/util-linux/setserial-rc.serial.diff
Normal file
|
@ -0,0 +1,49 @@
|
|||
--- ./rc.serial.orig Thu Jan 27 07:47:30 2000
|
||||
+++ ./rc.serial Sun May 13 13:27:57 2001
|
||||
@@ -14,8 +14,6 @@
|
||||
# XXXX For now, the autosave feature doesn't work if you are
|
||||
# using the multiport feature; it doesn't save the multiport configuration
|
||||
# (for now). Autosave also doesn't work for the hayes devices.
|
||||
-# Will fix later...
|
||||
-#
|
||||
#
|
||||
|
||||
RCLOCKFILE=/var/lock/subsys/serial
|
||||
@@ -87,7 +85,7 @@
|
||||
mv /etc/.serial.conf.new /etc/serial.conf
|
||||
echo "done."
|
||||
fi
|
||||
- if test -n $MODULE ; then
|
||||
+ if test -n "$MODULE" ; then
|
||||
module=`grep $MODULE_REGEXP /proc/modules | awk '{print $1}'`
|
||||
if test -z "$module" ; then
|
||||
echo "The $DRIVER_NAME driver is not loaded."
|
||||
@@ -108,22 +106,22 @@
|
||||
# If not stop, it must be a start....
|
||||
#
|
||||
|
||||
-if test -n $MODULE -a "$LOADED" != "yes" ; then
|
||||
- if insmod -fm $MODULE $DRIVER_ARG \
|
||||
- > /tmp/$DRIVER.map 2> /tmp/$DRIVER.$$; then :;
|
||||
+if test -n "$MODULE" -a "$LOADED" != "yes" ; then
|
||||
+ if insmod -f $MODULE $DRIVER_ARG ; then
|
||||
+ true
|
||||
else
|
||||
echo "Couldn't load $DRIVER_NAME driver."
|
||||
- echo "See error logs in /tmp/$DRIVER.$$"
|
||||
exit 1
|
||||
fi
|
||||
- /bin/rm -f /tmp/$DRIVER.$$
|
||||
fi
|
||||
|
||||
if test -f /etc/serial.conf ; then
|
||||
if test -n ${SETSERIAL} ; then
|
||||
grep -v ^# < /etc/serial.conf | while read device args
|
||||
do
|
||||
- ${SETSERIAL} -z $device $args
|
||||
+ if [ ! "$device" = "" -a ! "$args" = "" ]; then
|
||||
+ ${SETSERIAL} -z $device $args
|
||||
+ fi
|
||||
done
|
||||
fi
|
||||
else
|
13
patches/source/util-linux/setserial-undef_TIOCGHAYESESP.diff
Normal file
13
patches/source/util-linux/setserial-undef_TIOCGHAYESESP.diff
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff -Nur setserial-2.17.orig/setserial.c setserial-2.17/setserial.c
|
||||
--- setserial-2.17.orig/setserial.c 2000-01-27 09:40:52.000000000 -0600
|
||||
+++ setserial-2.17/setserial.c 2010-03-29 23:05:27.093878048 -0500
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
#include "version.h"
|
||||
|
||||
+/* http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=f53a2ade0bb9f2a81f473e6469155172a96b7c38 */
|
||||
+#undef TIOCGHAYESESP
|
||||
+
|
||||
static char version_str[] = "setserial version " SETSERIAL_VERSION ", "
|
||||
SETSERIAL_DATE;
|
||||
|
19
patches/source/util-linux/slack-desc
Normal file
19
patches/source/util-linux/slack-desc
Normal file
|
@ -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------------------------------------------------|
|
||||
util-linux: util-linux (a huge collection of essential utilities)
|
||||
util-linux:
|
||||
util-linux: The util-linux package is a huge collection of random utilities
|
||||
util-linux: that are essential to run a Linux system.
|
||||
util-linux:
|
||||
util-linux: Homepage: https://www.kernel.org/pub/linux/utils/util-linux/
|
||||
util-linux:
|
||||
util-linux:
|
||||
util-linux:
|
||||
util-linux:
|
||||
util-linux:
|
3
patches/source/util-linux/su.default
Normal file
3
patches/source/util-linux/su.default
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Ensure that ENV_SUPATH from /etc/login.defs is used for the $PATH when
|
||||
# 'su' is used. Otherwise /sbin paths will be missing unless 'su -' is used.
|
||||
ALWAYS_SET_PATH yes
|
382
patches/source/util-linux/util-linux.SlackBuild
Executable file
382
patches/source/util-linux/util-linux.SlackBuild
Executable file
|
@ -0,0 +1,382 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2017, 2018, 2020, 2021, 2022 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.
|
||||
|
||||
# Slackware build script for util-linux
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PKGNAM=util-linux
|
||||
VERSION=${VERSION:-$(echo util-linux*.tar.xz | cut -d - -f 3 | rev | cut -f 3- -d . | rev)}
|
||||
BUILD=${BUILD:-1_slack15.0}
|
||||
|
||||
ADJTIMEXVERS=1.29
|
||||
SETSERIALVERS=2.17
|
||||
ZIPTOOLVERS=1.4.0
|
||||
|
||||
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 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 ;;
|
||||
# Unless $ARCH is already set, use uname -m for all other archs:
|
||||
*) export 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
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "s390" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=$TMP/package-util-linux
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG
|
||||
cd $TMP || exit 1
|
||||
rm -rf util-linux-$VERSION
|
||||
tar xvf $CWD/util-linux-$VERSION.tar.xz || exit 1
|
||||
cd util-linux-$VERSION || exit 1
|
||||
chown -R root.root .
|
||||
find . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
||||
-exec chmod 755 {} \+ -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \+
|
||||
|
||||
# Choose correct options depending on whether PAM is installed:
|
||||
if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
|
||||
LOGIN_OPTIONS=""
|
||||
# By default, don't use the util-linux version of /bin/su:
|
||||
SHIP_SU=${SHIP_SU:-NO}
|
||||
# Add /etc/pam.d config files:
|
||||
rm -rf $PKG/etc/pam.d
|
||||
mkdir -p $PKG/etc/pam.d
|
||||
for file in $CWD/pam.d/* ; do
|
||||
cp -a ${file} $PKG/etc/pam.d/
|
||||
done
|
||||
if [ "$SHIP_SU" = "YES" ]; then
|
||||
# Add su default file to ensure using ENV_SUPATH with 'su':
|
||||
mkdir -p $PKG/etc/default
|
||||
cp -a $CWD/su.default $PKG/etc/default/su.new
|
||||
chown root:root $PKG/etc/default/su.new
|
||||
chmod 644 $PKG/etc/default/su.new
|
||||
# Add su /etc/pam.d files:
|
||||
cp -a $CWD/pam.d-su/* $PKG/etc/pam.d/
|
||||
fi
|
||||
# Ensure correct perms/ownership on files in /etc/pam.d/:
|
||||
chown root:root $PKG/etc/pam.d/*
|
||||
chmod 644 $PKG/etc/pam.d/*
|
||||
# Don't clobber existing config files:
|
||||
find $PKG/etc/pam.d -type f -exec mv {} {}.new \;
|
||||
else
|
||||
# Don't use the util-linux version of /bin/su.
|
||||
# It can't be built without PAM anyway.
|
||||
SHIP_SU=NO
|
||||
LOGIN_OPTIONS="--disable-login"
|
||||
fi
|
||||
|
||||
# Changing the fdisk -l output (this was done prior to util-linux-ng) broke
|
||||
# our installation scripts, so we have changed the name of partition type
|
||||
# 83 back to "Linux swap":
|
||||
zcat $CWD/util-linux.fdisk-no-solaris.diff.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# Revert to the behavior of earlier versions of fdisk which did not list the
|
||||
# /dev/ram* devices in 'fdisk -l' output:
|
||||
zcat $CWD/util-linux.do.not.list.ram.devices.diff.gz | patch -p1 --verbose || exit 1
|
||||
|
||||
# This just call the configure script with $1 either being 2 for python2
|
||||
# or 3 for python3.
|
||||
#
|
||||
# The releasenotes say to use --runstatedir, but it doesn't work and the
|
||||
# configure script fails. So we'll leave things using localstatedir, but
|
||||
# check again later:
|
||||
#
|
||||
# --runstatedir=/run
|
||||
configure_with_python(){
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
--infodir=/usr/info \
|
||||
--docdir=/usr/doc/util-linux-$VERSION \
|
||||
--disable-static \
|
||||
--enable-agetty \
|
||||
--enable-fdformat \
|
||||
--enable-kill \
|
||||
--disable-last \
|
||||
--enable-libmount-support-mtab \
|
||||
--enable-line \
|
||||
--enable-mesg \
|
||||
--enable-partx \
|
||||
--enable-pg \
|
||||
--disable-raw \
|
||||
--enable-rename \
|
||||
$LOGIN_OPTIONS \
|
||||
--enable-schedutils \
|
||||
--enable-wall \
|
||||
--enable-write \
|
||||
--enable-use-tty-group \
|
||||
--enable-libblkid \
|
||||
--enable-libmount \
|
||||
--enable-libuuid \
|
||||
--disable-uuidd \
|
||||
--with-python=$1 \
|
||||
--build=$ARCH-slackware-linux
|
||||
}
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
configure_with_python 2 || exit 1
|
||||
|
||||
make $NUMJOBS || make || exit 1
|
||||
make install $NUMJOBS DESTDIR=$PKG || exit 1
|
||||
|
||||
# These need to be setuid root to work properly (only built for PAM):
|
||||
if [ -r $PKG/usr/bin/chfn ]; then
|
||||
chmod 4711 $PKG/usr/bin/chfn
|
||||
fi
|
||||
if [ -r $PKG/usr/bin/chsh ]; then
|
||||
chmod 4711 $PKG/usr/bin/chsh
|
||||
fi
|
||||
|
||||
# Build python3 bindings for libmount:
|
||||
make clean
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
configure_with_python 3 || exit 1
|
||||
make $NUMJOBS \
|
||||
install-pylibmountexecLTLIBRARIES \
|
||||
install-pylibmountexecPYTHON \
|
||||
DESTDIR=$PKG || exit 1
|
||||
|
||||
# Remove all overlap with the shadow package, since --disable-login doesn't quite do that:
|
||||
rm $PKG/sbin/nologin $PKG/usr/man/man8/nologin.8 $PKG/sbin/sulogin $PKG/usr/man/man8/sulogin.8
|
||||
|
||||
# If we aren't shipping su, remove the files:
|
||||
if [ "$SHIP_SU" = "NO" ]; then
|
||||
rm -f $PKG/bin/su
|
||||
rm -f $PKG/usr/man/man1/su.1
|
||||
rm -f $PKG/usr/share/bash-completion/completions/runuser
|
||||
rm -f $PKG/usr/share/bash-completion/completions/su
|
||||
fi
|
||||
|
||||
# Move the libblkid, libfdisk, libmount, libsmartcols, and
|
||||
# libuuid libraries to /lib${LIBSUFFIX}:
|
||||
mkdir -p $PKG/lib${LIBDIRSUFFIX}
|
||||
( cd $PKG/usr/lib${LIBDIRSUFFIX}
|
||||
mv libblkid.so.1* $PKG/lib${LIBDIRSUFFIX}
|
||||
mv libfdisk.so.1* $PKG/lib${LIBDIRSUFFIX}
|
||||
mv libmount.so.1* $PKG/lib${LIBDIRSUFFIX}
|
||||
mv libsmartcols.so.1* $PKG/lib${LIBDIRSUFFIX}
|
||||
mv libuuid.so.1* $PKG/lib${LIBDIRSUFFIX}
|
||||
rm -f libblkid.so libfdisk.so libmount.so libsmartcols.so libuuid.so
|
||||
ln -sf ../../lib${LIBDIRSUFFIX}/libblkid.so.1 libblkid.so
|
||||
ln -sf ../../lib${LIBDIRSUFFIX}/libfdisk.so.1 libfdisk.so
|
||||
ln -sf ../../lib${LIBDIRSUFFIX}/libmount.so.1 libmount.so
|
||||
ln -sf ../../lib${LIBDIRSUFFIX}/libsmartcols.so.1 libsmartcols.so
|
||||
ln -sf ../../lib${LIBDIRSUFFIX}/libuuid.so.1 libuuid.so
|
||||
)
|
||||
|
||||
# Moving things around that have been in the same place
|
||||
# for 15 years is, IMHO, not a wise idea AT ALL.
|
||||
# If this had to be moved, some place out of /usr might
|
||||
# have shown a grain of insight...
|
||||
if [ -r $PKG/usr/sbin/fdformat ]; then
|
||||
mkdir -p $PKG/usr/bin
|
||||
mv $PKG/usr/sbin/fdformat $PKG/usr/bin/fdformat
|
||||
# Now since stuff will start looking in this new place,
|
||||
# we have no choice but to link these:
|
||||
( cd $PKG/usr/sbin
|
||||
ln -sf ../bin/fdformat .
|
||||
)
|
||||
fi
|
||||
|
||||
# Add the rc.setterm init script to set default terminal attributes:
|
||||
mkdir -p $PKG/etc/rc.d
|
||||
cp -a $CWD/rc.setterm $PKG/etc/rc.d/rc.setterm.new
|
||||
chown root:root $PKG/etc/rc.d/rc.setterm.new
|
||||
chmod 755 $PKG/etc/rc.d/rc.setterm.new
|
||||
|
||||
# ddate.{1,c} taken from https://github.com/bo0ts/ddate:
|
||||
cp -a $CWD/ddate.? .
|
||||
cc -O -o ddate ddate.c
|
||||
cp -a ddate $PKG/usr/bin
|
||||
cat ddate.1 > $PKG/usr/man/man1/ddate.1
|
||||
chown root:root $PKG/usr/bin/ddate
|
||||
|
||||
# Build ziptool (install as jaztool to avoid conflict with libzip):
|
||||
cd $TMP || exit 1
|
||||
rm -rf ziptool-$ZIPTOOLVERS
|
||||
tar xvf $CWD/ziptool-$ZIPTOOLVERS.tar.xz || exit 1
|
||||
cd ziptool-$ZIPTOOLVERS || exit 1
|
||||
zcat $CWD/ziptool-fix_build.patch.gz | patch -p1 || exit 1
|
||||
mkdir scsi
|
||||
cat $CWD/scsi_ioctl.h > scsi/scsi_ioctl.h
|
||||
chown -R root:root .
|
||||
make || exit 1
|
||||
strip ziptool
|
||||
cat ziptool > $PKG/sbin/jaztool
|
||||
chmod 0755 $PKG/sbin/jaztool
|
||||
mkdir -p $PKG/usr/doc/ziptool-$ZIPTOOLVERS
|
||||
cp -a README $PKG/usr/doc/ziptool-$ZIPTOOLVERS
|
||||
chmod 644 $PKG/usr/doc/ziptool-$ZIPTOOLVERS/*
|
||||
cat ziptool.1.gz > $PKG/usr/man/man1/jaztool.1.gz
|
||||
|
||||
# Build bsdstrings
|
||||
cd $TMP || exit 1
|
||||
rm -rf bsdstrings
|
||||
tar xvf $CWD/bsdstrings.tar.gz || exit 1
|
||||
cd bsdstrings || exit 1
|
||||
zcat $CWD/bsdstrings-util-linux_overflow.diff.gz | patch -p1 --verbose || exit 1
|
||||
make || exit 1
|
||||
strip strings
|
||||
cat strings > $PKG/usr/bin/strings-BSD
|
||||
chmod 0755 $PKG/usr/bin/strings-BSD
|
||||
cat strings.1 | gzip -9c > $PKG/usr/man/man1/strings-BSD.1.gz
|
||||
|
||||
# Build adjtimex
|
||||
cd $TMP || exit 1
|
||||
rm -rf adjtimex-$ADJTIMEXVERS
|
||||
tar xvf $CWD/adjtimex_${ADJTIMEXVERS}.orig.tar.gz || exit 1
|
||||
cd adjtimex-$ADJTIMEXVERS || exit 1
|
||||
chown -R root:root .
|
||||
zcat $CWD/adjtimex_1.29-2.2.diff.gz | patch -p1 || exit 1
|
||||
CFLAGS=-O2 ./configure --prefix=/usr || exit 1
|
||||
make || exit 1
|
||||
strip adjtimex
|
||||
cat adjtimex > $PKG/sbin/adjtimex
|
||||
chmod 0755 $PKG/sbin/adjtimex
|
||||
cat adjtimex.8 | gzip -9c > $PKG/usr/man/man8/adjtimex.8.gz
|
||||
mkdir -p $PKG/usr/doc/adjtimex-$ADJTIMEXVERS
|
||||
cp -a COPYING COPYRIGHT README README.ru adjtimex.lsm \
|
||||
$PKG/usr/doc/adjtimex-$ADJTIMEXVERS
|
||||
|
||||
# Build setserial
|
||||
cd $TMP || exit 1
|
||||
rm -rf setserial-$SETSERIALVERS
|
||||
tar xvf $CWD/setserial-$SETSERIALVERS.tar.gz || exit 1
|
||||
cd setserial-$SETSERIALVERS || exit 1
|
||||
chown -R root:root .
|
||||
zcat $CWD/setserial-rc.serial.diff.gz | patch -E -p1 --verbose || exit 1
|
||||
zcat $CWD/setserial-undef_TIOCGHAYESESP.diff.gz | patch -E -p1 --verbose || exit 1
|
||||
# The original config.{guess,sub} do not work on x86_64
|
||||
cp -p /usr/share/libtool/config/config.{guess,sub} .
|
||||
./configure --prefix=/usr || exit 1
|
||||
make || exit 1
|
||||
strip setserial
|
||||
cat setserial > $PKG/sbin/setserial
|
||||
chmod 0755 $PKG/sbin/setserial
|
||||
mkdir -p $PKG/etc/rc.d
|
||||
cat rc.serial > $PKG/etc/rc.d/rc.serial.new
|
||||
cat serial.conf > $PKG/etc/serial.conf.new
|
||||
cat setserial.8 | gzip -9c > $PKG/usr/man/man8/setserial.8.gz
|
||||
|
||||
# These have always traditionally been available before /usr
|
||||
# might be mounted:
|
||||
( cd $PKG/usr/bin
|
||||
mv getopt setterm $PKG/bin
|
||||
cd $PKG/usr/bin
|
||||
ln -s ../../bin/getopt .
|
||||
ln -s ../../bin/setterm .
|
||||
)
|
||||
|
||||
cd $TMP/util-linux-$VERSION # Go back home :)
|
||||
|
||||
# Now let's add some important symlinks :)
|
||||
( cd $PKG/sbin
|
||||
ln -s ../bin/mount .
|
||||
ln -s ../bin/umount .
|
||||
#ln -s ziptool jaztool
|
||||
ln -s hwclock clock
|
||||
cd $PKG/usr/sbin
|
||||
ln -s ../../sbin/cfdisk .
|
||||
ln -s ../../sbin/ctrlaltdel .
|
||||
ln -s ../../sbin/sfdisk .
|
||||
cd $PKG/usr/bin
|
||||
ln -s ../sbin/readprofile .
|
||||
# tunelp was removed by upstream:
|
||||
#ln -s ../sbin/tunelp .
|
||||
ln -s ../../bin/more .
|
||||
cd $PKG/usr/man/man1
|
||||
#ln -s ziptool.1 jaztool.1
|
||||
cd $PKG/usr/man/man8
|
||||
ln -s hwclock.8 clock.8
|
||||
)
|
||||
|
||||
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
|
||||
|
||||
# Compress and if needed symlink the man pages:
|
||||
if [ -d $PKG/usr/man ]; then
|
||||
( cd $PKG/usr/man
|
||||
for manpagedir in $(find . -type d -name "man*") ; do
|
||||
( cd $manpagedir
|
||||
for eachpage in $( find . -type l -maxdepth 1) ; do
|
||||
ln -s $( readlink $eachpage ).gz $eachpage.gz
|
||||
rm $eachpage
|
||||
done
|
||||
gzip -9 *.?
|
||||
)
|
||||
done
|
||||
)
|
||||
fi
|
||||
|
||||
# Compress info page and remove dir file
|
||||
rm $PKG/usr/info/dir
|
||||
gzip -9 $PKG/usr/info/*
|
||||
|
||||
mkdir -p $PKG/usr/doc/util-linux-$VERSION
|
||||
cp -a AUTHORS COPYING* DEPRECATED NEWS README* \
|
||||
Documentation/releases/v${VERSION}-ReleaseNotes \
|
||||
Documentation/licenses/* Documentation/{TODO,*.txt} \
|
||||
$PKG/usr/doc/util-linux-$VERSION
|
||||
|
||||
mkdir $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $TMP/util-linux-$VERSION-$ARCH-$BUILD.txz
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
--- ./disk-utils/fdisk-list.c.orig 2018-09-20 07:38:55.845404951 -0500
|
||||
+++ ./disk-utils/fdisk-list.c 2019-01-02 15:53:21.256868721 -0600
|
||||
@@ -337,6 +337,10 @@
|
||||
if (devno <= 0)
|
||||
continue;
|
||||
|
||||
+ /* Don't list /dev/ram* devices */
|
||||
+ if (strstr(line, "ram") && devno >= 256)
|
||||
+ continue;
|
||||
+
|
||||
if (sysfs_devno_is_dm_private(devno, NULL) ||
|
||||
sysfs_devno_is_wholedisk(devno) <= 0)
|
||||
continue;
|
12
patches/source/util-linux/util-linux.fdisk-no-solaris.diff
Normal file
12
patches/source/util-linux/util-linux.fdisk-no-solaris.diff
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -Nur util-linux-2.24.2.orig/include/pt-mbr-partnames.h util-linux-2.24.2/include/pt-mbr-partnames.h
|
||||
--- util-linux-2.24.2.orig/include/pt-mbr-partnames.h 2014-04-24 02:37:04.352704164 -0500
|
||||
+++ util-linux-2.24.2/include/pt-mbr-partnames.h 2014-07-03 03:33:27.054574467 -0500
|
||||
@@ -49,7 +49,7 @@
|
||||
{0x75, N_("PC/IX")},
|
||||
{0x80, N_("Old Minix")}, /* Minix 1.4a and earlier */
|
||||
{0x81, N_("Minix / old Linux")},/* Minix 1.4b and later */
|
||||
- {0x82, N_("Linux swap / Solaris")},
|
||||
+ {0x82, N_("Linux swap")},
|
||||
{0x83, N_("Linux")},
|
||||
{0x84, N_("OS/2 hidden C: drive")},
|
||||
{0x85, N_("Linux extended")},
|
24
patches/source/util-linux/ziptool-fix_build.patch
Normal file
24
patches/source/util-linux/ziptool-fix_build.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff -Nur ziptool-1.4.0.orig/Makefile ziptool-1.4.0/Makefile
|
||||
--- ziptool-1.4.0.orig/Makefile 2002-08-23 17:13:48.000000000 -0500
|
||||
+++ ziptool-1.4.0/Makefile 2009-02-09 16:33:12.913637302 -0600
|
||||
@@ -5,10 +5,6 @@
|
||||
#
|
||||
CFLAGS = -O2 -g -Wall
|
||||
|
||||
-# Path to linux kernel sources.
|
||||
-#
|
||||
-LINUX_SRC_DIR = /usr/src/linux
|
||||
-
|
||||
# Installation directories
|
||||
#
|
||||
INSTALL_BIN_DIR = /usr/bin
|
||||
@@ -30,7 +26,7 @@
|
||||
cd $(INSTALL_MAN_DIR)/man1; ln -sf ziptool.1.gz jaztool.1.gz
|
||||
|
||||
ziptool: ziptool.c
|
||||
- cc $(CFLAGS) -I$(LINUX_SRC_DIR)/include -o ziptool ziptool.c
|
||||
+ cc $(CFLAGS) -I. -o ziptool ziptool.c
|
||||
|
||||
jaztool: ziptool.c
|
||||
- cc $(CFLAGS) -I$(LINUX_SRC_DIR)/include -o jaztool ziptool.c
|
||||
+ cc $(CFLAGS) -I. -o jaztool ziptool.c
|
|
@ -1167,6 +1167,14 @@ gzip ./patches/source/mozilla-thunderbird/tb.ui.scrollToClick.diff
|
|||
gzip ./patches/source/mozilla-thunderbird/gkrust.a.no.networking.check.diff
|
||||
gzip ./patches/source/mariadb/rc.mysqld
|
||||
gzip ./patches/source/mariadb/doinst.sh
|
||||
gzip ./patches/source/util-linux/setserial-undef_TIOCGHAYESESP.diff
|
||||
gzip ./patches/source/util-linux/setserial-rc.serial.diff
|
||||
gzip ./patches/source/util-linux/util-linux.do.not.list.ram.devices.diff
|
||||
gzip ./patches/source/util-linux/bsdstrings-util-linux_overflow.diff
|
||||
gzip ./patches/source/util-linux/util-linux.fdisk-no-solaris.diff
|
||||
gzip ./patches/source/util-linux/adjtimex_1.29-2.2.diff
|
||||
gzip ./patches/source/util-linux/doinst.sh
|
||||
gzip ./patches/source/util-linux/ziptool-fix_build.patch
|
||||
gzip ./patches/source/at/doinst.sh
|
||||
gzip ./patches/source/mozilla-firefox/firefox.moz_plugin_path.diff
|
||||
gzip ./patches/source/mozilla-firefox/ff.ui.scrollToClick.diff
|
||||
|
|
Loading…
Reference in a new issue