diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2016-06-30 20:26:57 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:31:18 +0200 |
commit | d31c50870d0bee042ce660e445c9294a59a3a65b (patch) | |
tree | 6bfc0de3c95267b401b620c2c67859557dc60f97 /source/a/util-linux | |
parent | 76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff) | |
download | current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz |
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016
Slackware 14.2 x86_64 stable is released!
The long development cycle (the Linux community has lately been living in
"interesting times", as they say) is finally behind us, and we're proud to
announce the release of Slackware 14.2. The new release brings many updates
and modern tools, has switched from udev to eudev (no systemd), and adds
well over a hundred new packages to the system. Thanks to the team, the
upstream developers, the dedicated Slackware community, and everyone else
who pitched in to help make this release a reality.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
Have fun! :-)
Diffstat (limited to 'source/a/util-linux')
-rw-r--r-- | source/a/util-linux/0001-mount-old-fix-encryption-usage.patch | 88 | ||||
-rw-r--r-- | source/a/util-linux/0002-fdisk-don-t-ignore-1MiB-granularity-on-512-byte-sect.patch | 31 | ||||
-rw-r--r-- | source/a/util-linux/bsdstrings-util-linux_overflow.diff | 20 | ||||
-rw-r--r-- | source/a/util-linux/column-fix_long_opts.diff | 15 | ||||
-rw-r--r-- | source/a/util-linux/ddate.1 | 115 | ||||
-rw-r--r-- | source/a/util-linux/ddate.c | 399 | ||||
-rw-r--r-- | source/a/util-linux/partx.data.type.diff | 11 | ||||
-rw-r--r-- | source/a/util-linux/util-linux-2.27.1.tar.sign | 17 | ||||
-rwxr-xr-x | source/a/util-linux/util-linux.SlackBuild | 80 | ||||
-rw-r--r-- | source/a/util-linux/util-linux.fdisk-no-solaris.diff | 7 |
10 files changed, 594 insertions, 189 deletions
diff --git a/source/a/util-linux/0001-mount-old-fix-encryption-usage.patch b/source/a/util-linux/0001-mount-old-fix-encryption-usage.patch deleted file mode 100644 index afe6e5c9..00000000 --- a/source/a/util-linux/0001-mount-old-fix-encryption-usage.patch +++ /dev/null @@ -1,88 +0,0 @@ ---- ./mount/mount.c.orig 2012-05-25 04:44:58.993195438 -0500 -+++ ./mount/mount.c 2012-08-02 12:04:52.455435631 -0500 -@@ -41,6 +41,7 @@ - #include "nls.h" - #include "blkdev.h" - #include "strutils.h" -+#include "xgetpass.h" - - #define DO_PS_FIDDLING - -@@ -1238,6 +1239,8 @@ - int looptype; - uintmax_t offset = 0, sizelimit = 0; - struct loopdev_cxt lc; -+ char *pwd = NULL; -+ int ret = EX_FAIL; - - /* - * In the case of a loop mount, either type is of the form lo@/dev/loop5 -@@ -1317,8 +1320,18 @@ - return EX_FAIL; - } - -+ if (opt_encryption) { -+#ifdef MCL_FUTURE -+ if (mlockall(MCL_CURRENT | MCL_FUTURE)) { -+ error(_("mount: couldn't lock into memory")); -+ return EX_FAIL; -+ } -+#endif -+ pwd = xgetpass(pfd, _("Password: ")); -+ } -+ - loopcxt_init(&lc, 0); -- /* loopcxt_enable_debug(&lc, 1); */ -+ /*loopcxt_enable_debug(&lc, 1);*/ - - if (*loopdev && **loopdev) - loopcxt_set_device(&lc, *loopdev); /* use loop=<devname> */ -@@ -1343,6 +1356,8 @@ - rc = loopcxt_set_offset(&lc, offset); - if (!rc && sizelimit) - rc = loopcxt_set_sizelimit(&lc, sizelimit); -+ if (!rc && opt_encryption && pwd) -+ loopcxt_set_encryption(&lc, opt_encryption, pwd); - if (!rc) - loopcxt_set_flags(&lc, loop_opts); - -@@ -1358,8 +1373,7 @@ - break; /* success */ - - if (rc != -EBUSY) { -- if (verbose) -- printf(_("mount: failed setting up loop device\n")); -+ error(_("mount: %s: failed setting up loop device: %m"), *loopfile); - if (!opt_loopdev) { - my_free(*loopdev); - *loopdev = NULL; -@@ -1399,9 +1413,15 @@ - } - } - -- return 0; -+ ret = 0; - err: -- return EX_FAIL; -+ if (pwd) { -+ char *p = pwd; -+ while (*p) -+ *p++ = '\0'; -+ free(pwd); -+ } -+ return ret; - } - - ---- ./mount/Makefile.am.orig 2012-05-25 04:44:58.000000000 -0500 -+++ ./mount/Makefile.am 2012-08-02 12:04:14.958439138 -0500 -@@ -23,7 +23,8 @@ - $(top_srcdir)/lib/at.c \ - $(top_srcdir)/lib/sysfs.c \ - $(top_srcdir)/lib/loopdev.c \ -- $(top_srcdir)/lib/strutils.c -+ $(top_srcdir)/lib/strutils.c \ -+ $(top_srcdir)/lib/xgetpass.c - - # generic flags for all programs - # -- note that pkg-config autoconf macros (pkg.m4) does not differentiate diff --git a/source/a/util-linux/0002-fdisk-don-t-ignore-1MiB-granularity-on-512-byte-sect.patch b/source/a/util-linux/0002-fdisk-don-t-ignore-1MiB-granularity-on-512-byte-sect.patch deleted file mode 100644 index 4d3622c3..00000000 --- a/source/a/util-linux/0002-fdisk-don-t-ignore-1MiB-granularity-on-512-byte-sect.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- ./fdisk/fdisk.c.orig 2012-05-25 04:44:58.977195366 -0500 -+++ ./fdisk/fdisk.c 2012-08-02 12:00:59.692457377 -0500 -@@ -569,6 +569,19 @@ - lba_is_aligned(unsigned long long lba) - { - unsigned int granularity = max(phy_sector_size, min_io_size); -+ unsigned long long offset; -+ -+ if (grain > granularity) -+ granularity = grain; -+ offset = (lba * sector_size) & (granularity - 1); -+ -+ return !((granularity + alignment_offset - offset) & (granularity - 1)); -+} -+ -+static int -+lba_is_phy_aligned(unsigned long long lba) -+{ -+ unsigned int granularity = max(phy_sector_size, min_io_size); - unsigned long long offset = (lba * sector_size) & (granularity - 1); - - return !((granularity + alignment_offset - offset) & (granularity - 1)); -@@ -1808,7 +1821,7 @@ - static void - check_alignment(unsigned long long lba, int partition) - { -- if (!lba_is_aligned(lba)) -+ if (!lba_is_phy_aligned(lba)) - printf(_("Partition %i does not start on physical sector boundary.\n"), - partition + 1); - } diff --git a/source/a/util-linux/bsdstrings-util-linux_overflow.diff b/source/a/util-linux/bsdstrings-util-linux_overflow.diff new file mode 100644 index 00000000..127ff9d0 --- /dev/null +++ b/source/a/util-linux/bsdstrings-util-linux_overflow.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); + } diff --git a/source/a/util-linux/column-fix_long_opts.diff b/source/a/util-linux/column-fix_long_opts.diff deleted file mode 100644 index e5215db7..00000000 --- a/source/a/util-linux/column-fix_long_opts.diff +++ /dev/null @@ -1,15 +0,0 @@ -diff -Naur util-linux-2.21.2/text-utils/column.c util-linux-2.21.2.patched//text-utils/column.c ---- util-linux-2.21.2/text-utils/column.c 2012-05-25 05:44:59.000000000 -0400 -+++ util-linux-2.21.2.patched//text-utils/column.c 2012-08-14 05:22:17.000000000 -0400 -@@ -121,9 +121,9 @@ - { - { "help", 0, 0, 'h' }, - { "version", 0, 0, 'V' }, -- { "columns", 0, 0, 'c' }, -+ { "columns", 1, 0, 'c' }, - { "table", 0, 0, 't' }, -- { "separator", 0, 0, 's' }, -+ { "separator", 1, 0, 's' }, - { "fillrows", 0, 0, 'x' }, - { NULL, 0, 0, 0 }, - }; diff --git a/source/a/util-linux/ddate.1 b/source/a/util-linux/ddate.1 new file mode 100644 index 00000000..ec4ee81d --- /dev/null +++ b/source/a/util-linux/ddate.1 @@ -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. diff --git a/source/a/util-linux/ddate.c b/source/a/util-linux/ddate.c new file mode 100644 index 00000000..4c2a0f8f --- /dev/null +++ b/source/a/util-linux/ddate.c @@ -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 diff --git a/source/a/util-linux/partx.data.type.diff b/source/a/util-linux/partx.data.type.diff deleted file mode 100644 index 9811c0bd..00000000 --- a/source/a/util-linux/partx.data.type.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- ./partx/partx.h.orig 2012-05-25 04:44:58.994195443 -0500 -+++ ./partx/partx.h 2013-08-07 21:06:30.899997659 -0500 -@@ -23,7 +23,7 @@ - } - - static inline int partx_add_partition(int fd, int partno, -- unsigned long start, unsigned long size) -+ long long start, long long size) - { - struct blkpg_ioctl_arg a; - struct blkpg_partition p; diff --git a/source/a/util-linux/util-linux-2.27.1.tar.sign b/source/a/util-linux/util-linux-2.27.1.tar.sign new file mode 100644 index 00000000..671c7f6f --- /dev/null +++ b/source/a/util-linux/util-linux-2.27.1.tar.sign @@ -0,0 +1,17 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1 + +iQIcBAABAgAGBQJWN0FGAAoJEOS3HV7sOcKEwYIP/0eA52LeAeSVAb3hATWA0TMg +N0zfKyRECDxRuwdQW3yyjtypd4Cir6QlgyBrqLyXSskVuIj0dq7S1mlI/Xa94IFU +Fa2lmzyAcxvl33Bv/Fljh/GeVSqqmUHk8q1ecRh7DYR1Lda6xzfCFs2Dl3Q5JXK/ +k2tTgNug0+f8E6LT/5qrrXeDS+O7/hAtRqqA6yHkAHGqYV2RgBJ9NDAanaGYXDeB +abrduP2xRIvJ9oYOrayG5WH/wAY/sKT433zx20J9ZZvtutTV4VF2ML9zfeQiYitY +hoQOGt5tJW/CfvU2DUaBlTlrXW/MnMQE8KDWn64NbokA3HOxrW+7wJ/gJCp+7e7v +gLELeLLTnMq3NX++SR5I2I2fvqBejYykcaOQMHi9DK+UZed/CBJKR+6SF1WKOndI +GRYJSs9DAXL3dJCSCp6V4fqf+Lfr2Vv4z+Jo8EzIIIlfly1cZx2Blx7C0Y6CNETA +fYPYYKW7qKHsdS5J2Axf8vNIHQsRhkpiUltjQHQ+rIAmx1hl/10a7Fd9KkqFEJV2 +R0zLPaJK8d9gEWHRdzQNozABZVeR8PV3WXuDD2XjC2T30ldlFNlbzyWhDiPf6DNk +tIEi3f+RTTltIvCobChq+Ri2dKM0+wAV/FwwR31E/YgJIpUWfJNKRwWT8Ja887JN +j5aNV18qjet7TUosKYqm +=BMBT +-----END PGP SIGNATURE----- diff --git a/source/a/util-linux/util-linux.SlackBuild b/source/a/util-linux/util-linux.SlackBuild index b348d83e..4d604602 100755 --- a/source/a/util-linux/util-linux.SlackBuild +++ b/source/a/util-linux/util-linux.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2008, 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,25 +22,27 @@ # Slackware build script for util-linux -VERSION=${VERSION:-$(echo util-linux*.tar.?z* | cut -d - -f 3 | rev | cut -f 3- -d . | rev)} -BUILD=${BUILD:-6} +VERSION=${VERSION:-$(echo util-linux*.tar.xz | cut -d - -f 3 | rev | cut -f 3- -d . | rev)} +BUILD=${BUILD:-1} ADJTIMEXVERS=1.29 SETSERIALVERS=2.17 ZIPTOOLVERS=1.4.0 +NUMJOBS=${--j8} + # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + 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 [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -70,38 +72,11 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -# Disabled login stuff from being built, as this is provided by shadow -# -# /sbin/elvtune is not built, as configure says it only works with 2.2 and -# 2.4 kernels - -# This block is handled near the bottom of the script in symlink creation -# /bin/setterm -- now located in /usr/bin/setterm -# /bin/getopt -- same as setterm -# /usr/bin/readprofile -- now in /usr/sbin -# /usr/bin/tunelp -- same as readprofile - # 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 -# Fix loop encryption: -zcat $CWD/0001-mount-old-fix-encryption-usage.patch.gz | patch -p1 --verbose || exit 1 - -# Fix fdisk granularity on 512 byte sector size devices: -zcat $CWD/0002-fdisk-don-t-ignore-1MiB-granularity-on-512-byte-sect.patch.gz | patch -p1 --verbose || exit 1 - -# 20120814 bkw: fix "column --separator <anything>" segfault -zcat $CWD/column-fix_long_opts.diff.gz | patch -p1 --verbose || exit 1 - -# Fix data type in partx to prevent silently truncating partition sizes and -# offsets to 4GB on 32-bit platforms: -zcat $CWD/partx.data.type.diff.gz | patch -p1 --verbose || exit 1 - -# Regenerate, since patch 0001 hits mount/Makefile.am: -./autogen.sh - CFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ @@ -112,8 +87,8 @@ CFLAGS="$SLKCFLAGS" \ --infodir=/usr/info \ --docdir=/usr/doc/util-linux-$VERSION \ --disable-static \ - --enable-arch \ --enable-agetty \ + --disable-eject \ --enable-kill \ --disable-last \ --enable-line \ @@ -122,32 +97,46 @@ CFLAGS="$SLKCFLAGS" \ --enable-raw \ --enable-rename \ --enable-reset \ - --disable-login-utils \ + --disable-login \ --enable-schedutils \ --enable-wall \ --enable-write \ --enable-use-tty-group \ --enable-libblkid \ --enable-libmount \ - --enable-libmount-mount \ --enable-libuuid \ --disable-uuidd \ - --enable-ddate \ + --with-python=2 \ + --without-readline \ --build=$ARCH-slackware-linux \ || exit 1 -make || exit 1 +# UNUSED, but maybe needed if we enable readline here: +# +# Yet another project that doesn't seem to get that -readline requires either +# -ltermcap or -lncurses on systems that don't make assumptions... +#sed -i -e 's|-lreadline|\0 -lncursesw|g' Makefile + +make $NUMBJOBS || make || exit 1 make install DESTDIR=$PKG || make install DESTDIR=$PKG -# Move the libblkid, libmount, and libuuid libraries to /lib${LIBSUFFIX} +# 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 + +# 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 libmount.so libuuid.so + 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 ) @@ -165,6 +154,13 @@ if [ -r $PKG/usr/sbin/fdformat ]; then ) fi +# 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 cd $TMP || exit 1 rm -rf ziptool-$ZIPTOOLVERS @@ -188,6 +184,7 @@ 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 @@ -279,7 +276,8 @@ cd $TMP/util-linux-$VERSION # Go back home :) ln -s ../../sbin/sfdisk . cd $PKG/usr/bin ln -s ../sbin/readprofile . - ln -s ../sbin/tunelp . + # tunelp was removed by upstream: + #ln -s ../sbin/tunelp . ln -s ../../bin/more . ln -s ../../sbin/raw . cd $PKG/usr/man/man1 diff --git a/source/a/util-linux/util-linux.fdisk-no-solaris.diff b/source/a/util-linux/util-linux.fdisk-no-solaris.diff index a3aa100e..a495ffac 100644 --- a/source/a/util-linux/util-linux.fdisk-no-solaris.diff +++ b/source/a/util-linux/util-linux.fdisk-no-solaris.diff @@ -1,6 +1,7 @@ ---- ./fdisk/i386_sys_types.c.orig 2007-04-25 07:43:38.000000000 -0500 -+++ ./fdisk/i386_sys_types.c 2008-03-31 14:53:52.000000000 -0500 -@@ -53,7 +53,7 @@ +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 */ |