summaryrefslogtreecommitdiffstats
path: root/source/a
diff options
context:
space:
mode:
Diffstat (limited to 'source/a')
-rw-r--r--source/a/FTBFSlog42
-rw-r--r--source/a/aaa_base/_aaa_base/install/doinst.sh20
-rw-r--r--source/a/aaa_base/_aaa_base/var/spool/mail/root.new251
-rwxr-xr-xsource/a/aaa_base/aaa_base.SlackBuild6
-rw-r--r--source/a/aaa_base/current-release (renamed from source/a/aaa_base/current-release.inactive)0
-rwxr-xr-xsource/a/aaa_libraries/aaa_libraries.SlackBuild42
-rwxr-xr-xsource/a/aaa_libraries/display_orphans.sh8
-rw-r--r--source/a/aaa_libraries/doinst.sh7
-rw-r--r--source/a/aaa_libraries/symlinks-to-tracked-libs30
-rw-r--r--source/a/aaa_libraries/symlinks-to-tracked-libs-tmp.d/icu4c-68.26
-rw-r--r--source/a/aaa_libraries/tracked-files-tmp.d/aaa_libraries-boost40
-rw-r--r--source/a/aaa_libraries/tracked-files-tmp.d/boost-1.76.039
-rwxr-xr-xsource/a/acpid/acpid.SlackBuild8
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-00180
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-00257
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-00353
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-004126
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-005100
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-00648
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-00795
-rw-r--r--source/a/bash/bash-5.1-patches/bash51-00861
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-00146
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-00246
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-00389
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-00470
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-00547
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-006293
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-007262
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-00858
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-00943
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-01071
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-01145
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-012344
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-01358
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-014119
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-015216
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-01647
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-01747
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-0183643
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-01966
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02053
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02161
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02253
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02364
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02488
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02546
-rw-r--r--source/a/bash/bash-5.2-patches/bash52-02648
-rwxr-xr-xsource/a/btrfs-progs/btrfs-progs.SlackBuild15
-rw-r--r--source/a/coreutils/DIR_COLORS6
-rwxr-xr-xsource/a/coreutils/coreutils.SlackBuild23
-rw-r--r--source/a/coreutils/coreutils.uname.diff37
-rw-r--r--source/a/coreutils/coreutils.wc.noavx2.diff11
-rw-r--r--source/a/coreutils/no_ls_quoting.patch52
-rwxr-xr-xsource/a/cpio/cpio.SlackBuild2
-rwxr-xr-xsource/a/cracklib/cracklib.SlackBuild11
-rwxr-xr-xsource/a/cryptsetup/cryptsetup.SlackBuild41
-rw-r--r--source/a/cryptsetup/crypttab.583
-rw-r--r--source/a/cryptsetup/doinst.sh12
-rw-r--r--source/a/cryptsetup/rc.luks146
-rwxr-xr-xsource/a/dbus/dbus.SlackBuild4
-rwxr-xr-xsource/a/dcron/dcron.SlackBuild10
-rw-r--r--source/a/dcron/doinst.sh1
-rw-r--r--source/a/dcron/rc.crond1
-rw-r--r--source/a/dcron/run-parts121
-rw-r--r--source/a/dcron/run-parts.850
-rw-r--r--source/a/dcron/run-parts.default1
-rwxr-xr-xsource/a/dialog/dialog.SlackBuild6
-rw-r--r--source/a/dialog/dialog.url2
-rw-r--r--source/a/e2fsprogs/e2fsprogs.no.64bit.by.default.diff8
-rwxr-xr-xsource/a/ed/ed.SlackBuild2
-rwxr-xr-xsource/a/efibootmgr/efibootmgr.SlackBuild2
-rwxr-xr-xsource/a/efivar/efivar.SlackBuild2
-rwxr-xr-xsource/a/elilo/elilo.SlackBuild20
-rw-r--r--source/a/elilo/elilo.zeroes.cc_blob_address.diff40
-rw-r--r--source/a/elilo/eliloconfig11
-rw-r--r--source/a/elogind/11-prefer-deep-suspend.patch8
-rw-r--r--source/a/elogind/12-default-deep-suspend.patch11
-rw-r--r--source/a/elogind/doinst.sh7
-rw-r--r--source/a/elogind/elogind-polkit.patch121
-rwxr-xr-xsource/a/elogind/elogind.SlackBuild89
-rw-r--r--source/a/elogind/elogind.nobody.nogroup.99.99.diff174
-rwxr-xr-xsource/a/elvis/elvis.SlackBuild2
-rw-r--r--source/a/elvis/elvis.clr.orig56
-rw-r--r--source/a/etc/_etc/etc/nsswitch.conf.new42
-rwxr-xr-xsource/a/etc/_etc/etc/profile.d/home-profile.d.csh.new9
-rwxr-xr-xsource/a/etc/_etc/etc/profile.d/home-profile.d.sh.new9
-rw-r--r--source/a/etc/doinst.sh26
-rwxr-xr-xsource/a/etc/etc.SlackBuild9
-rw-r--r--source/a/etc/group.new10
-rw-r--r--source/a/etc/nsswitch.conf2
-rw-r--r--source/a/etc/passwd.new9
-rw-r--r--source/a/etc/shadow.new9
-rwxr-xr-xsource/a/eudev/config/rc.d/rc.udev.new4
-rwxr-xr-xsource/a/eudev/eudev.SlackBuild18
-rw-r--r--source/a/eudev/eudev.no.renderD.diff17
-rw-r--r--source/a/eudev/eudev.no.renderD.no.kvm.diff32
-rw-r--r--source/a/eudev/eudev.no.sgx.diff14
-rwxr-xr-xsource/a/exfatprogs/exfatprogs.SlackBuild2
-rwxr-xr-xsource/a/f2fs-tools/f2fs-tools.SlackBuild8
-rw-r--r--source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch33
-rwxr-xr-xsource/a/file/file.SlackBuild15
-rw-r--r--source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch33
-rw-r--r--source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch61
-rw-r--r--source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch32
-rw-r--r--source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch102
-rw-r--r--source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch26
-rw-r--r--source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch22
-rw-r--r--source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch159
-rwxr-xr-xsource/a/findutils/findutils.SlackBuild23
-rw-r--r--source/a/findutils/findutils.nolocate.diff83
-rwxr-xr-xsource/a/gawk/gawk.SlackBuild2
-rw-r--r--source/a/genpower/genpower.halt.diff32
-rw-r--r--source/a/genpower/genpower.var.diff34
-rw-r--r--source/a/genpower/slack-desc19
-rwxr-xr-xsource/a/gettext/gettext-tools.SlackBuild4
-rwxr-xr-xsource/a/gettext/gettext.SlackBuild4
-rwxr-xr-xsource/a/glibc-zoneinfo/glibc-zoneinfo.SlackBuild2
-rw-r--r--source/a/gpm/gpm-1.20.1-weak-wgetch.patch14
-rwxr-xr-xsource/a/gpm/gpm.SlackBuild26
-rw-r--r--source/a/gpm/gpm.configure.diff25
-rwxr-xr-xsource/a/gptfdisk/gptfdisk.SlackBuild2
-rwxr-xr-xsource/a/grep/grep.SlackBuild5
-rw-r--r--source/a/grep/scripts/egrep4
-rw-r--r--source/a/grep/scripts/fgrep4
-rw-r--r--source/a/grub/7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763.patch59
-rwxr-xr-xsource/a/grub/grub.SlackBuild10
-rwxr-xr-xsource/a/gzip/gzip.SlackBuild4
-rwxr-xr-xsource/a/haveged/haveged.SlackBuild5
-rwxr-xr-xsource/a/hostname/hostname.SlackBuild2
-rwxr-xr-xsource/a/hwdata/hwdata.SlackBuild4
-rwxr-xr-xsource/a/inih/inih.SlackBuild4
-rwxr-xr-xsource/a/iniparser/iniparser.SlackBuild (renamed from source/a/genpower/genpower.SlackBuild)104
-rw-r--r--source/a/iniparser/iniparser.url1
-rw-r--r--source/a/iniparser/slack-desc19
-rwxr-xr-xsource/a/inotify-tools/inotify-tools.SlackBuild2
-rw-r--r--source/a/kbd/doinst.sh28
-rw-r--r--source/a/kbd/fix-euro2.patch9
-rw-r--r--source/a/kbd/kbd-2.6.3-backspace-1.patch250
-rwxr-xr-xsource/a/kbd/kbd.SlackBuild262
-rw-r--r--source/a/kbd/kbd.url1
-rw-r--r--source/a/kbd/setconsolefont12
-rw-r--r--source/a/kbd/sources/kbd-1.15-keycodes-man.patch52
-rw-r--r--source/a/kbd/sources/kbd-1.15-resizecon-x86_64.patch15
-rw-r--r--source/a/kbd/sources/kbd-1.15-unicode_start.patch21
-rw-r--r--source/a/kbd/sources/kbd-1.15.2-po.patch14
-rw-r--r--source/a/kbd/sources/kbd-1.15.3-fix-es-translation.patch12
-rw-r--r--source/a/kbd/sources/nl.euro.diff10
-rw-r--r--source/a/kbd/sources/speakupmap.map308
-rwxr-xr-xsource/a/kernel-firmware/kernel-firmware.SlackBuild50
-rwxr-xr-xsource/a/kmod/kmod.SlackBuild2
-rw-r--r--source/a/kmod/slack-desc2
-rwxr-xr-xsource/a/lbzip2/lbzip2.SlackBuild2
-rw-r--r--source/a/less/007521ac3c95bc76.patch73
-rwxr-xr-xsource/a/less/less.SlackBuild26
-rw-r--r--source/a/less/less.url3
-rw-r--r--source/a/less/lesspipe.sh2
-rwxr-xr-xsource/a/lhasa/lhasa.SlackBuild4
-rw-r--r--source/a/lhasa/slack-desc2
-rw-r--r--source/a/libblockdev/doinst.sh4
-rwxr-xr-xsource/a/libblockdev/libblockdev.SlackBuild20
-rwxr-xr-xsource/a/libbytesize/libbytesize.SlackBuild2
-rwxr-xr-xsource/a/libcgroup/libcgroup.SlackBuild2
-rw-r--r--source/a/libcgroup/libcgroup.init.diff147
-rwxr-xr-xsource/a/libpwquality/libpwquality.SlackBuild4
-rw-r--r--source/a/lvm2/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch11
-rwxr-xr-xsource/a/lvm2/lvm2.SlackBuild4
-rwxr-xr-xsource/a/lzip/lzip.SlackBuild4
-rwxr-xr-xsource/a/lzlib/lzlib.SlackBuild4
-rw-r--r--source/a/mcelog/mcelog.logrotate.size.syntax.diff6
-rwxr-xr-xsource/a/mdadm/mdadm.SlackBuild2
-rw-r--r--source/a/mdadm/mdadm.url3
-rwxr-xr-xsource/a/minicom/minicom.SlackBuild4
-rw-r--r--source/a/mkinitrd/0003-blacklist.40-usb_modeswitch.rules.patch10
-rw-r--r--source/a/mkinitrd/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch23
-rw-r--r--source/a/mkinitrd/0005-support-modules-compressed-with-xz.patch11
-rw-r--r--source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch12
-rw-r--r--source/a/mkinitrd/0007-kmod30.patch14
-rw-r--r--source/a/mkinitrd/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch23
-rw-r--r--source/a/mkinitrd/0009-exclude-99-nfs.rules.patch10
-rw-r--r--source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch26
-rw-r--r--source/a/mkinitrd/README.initrd2
-rwxr-xr-xsource/a/mkinitrd/_initrd-tree/dev/mknodes.sh12
-rw-r--r--source/a/mkinitrd/init11
-rw-r--r--source/a/mkinitrd/mkinitrd23
-rw-r--r--source/a/mkinitrd/mkinitrd.810
-rwxr-xr-xsource/a/mkinitrd/mkinitrd.SlackBuild24
-rw-r--r--source/a/mkinitrd/mkinitrd.conf.515
-rwxr-xr-xsource/a/mlocate/mlocate.SlackBuild2
-rwxr-xr-xsource/a/mt-st/mt-st.SlackBuild8
-rw-r--r--source/a/ndctl/doinst.sh4
-rwxr-xr-xsource/a/ndctl/ndctl.SlackBuild52
-rwxr-xr-xsource/a/ntfs-3g/ntfs-3g.SlackBuild9
-rw-r--r--source/a/nut/doinst.sh30
-rwxr-xr-xsource/a/nut/nut.SlackBuild196
-rw-r--r--source/a/nut/rc.nut-drvctl32
-rw-r--r--source/a/nut/rc.nut-upsd41
-rw-r--r--source/a/nut/rc.nut-upsmon46
-rw-r--r--source/a/nut/slack-desc19
-rwxr-xr-xsource/a/nvi/nvi.SlackBuild4
-rwxr-xr-xsource/a/os-prober/os-prober.SlackBuild2
-rw-r--r--source/a/pam/fedora-patches/pam-1.1.3-nouserenv.patch27
-rw-r--r--source/a/pam/fedora-patches/pam-1.1.6-limits-user.patch20
-rw-r--r--source/a/pam/fedora-patches/pam-1.1.8-audit-user-mgmt.patch31
-rw-r--r--source/a/pam/fedora-patches/pam-1.1.8-full-relro.patch67
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.0-pwhistory-helper.patch806
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-coverity.patch185
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-motd-multiple-paths.patch755
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-noflex.patch24
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-redhat-modules.patch78
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-bcrypt_b.patch34
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch73
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-crypt_checksalt.patch40
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-fix_checksalt_syslog.patch104
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-gensalt-autoentropy.patch95
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-no-fallback.patch105
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-remove-obsolete-_unix_read_password-prototype.patch34
-rw-r--r--source/a/pam/fedora-patches/pam-1.3.1-unix-yescrypt.patch479
-rw-r--r--source/a/pam/fedora-patches/pam-1.4.0-redhat-modules.patch29
-rw-r--r--source/a/pam/fedora-patches/pam-1.5.0-redhat-modules.patch74
-rw-r--r--source/a/pam/fedora-patches/pam-1.5.3-unix-nomsg.patch (renamed from source/a/pam/fedora-patches/pam-1.3.0-unix-nomsg.patch)9
-rw-r--r--source/a/pam/fedora-patches/pam-1.6.0-redhat-modules.patch24
-rwxr-xr-xsource/a/pam/pam.SlackBuild34
-rw-r--r--source/a/pam/pam.url3
-rwxr-xr-xsource/a/pciutils/pciutils.SlackBuild15
-rw-r--r--source/a/pciutils/pciutils.url1
-rwxr-xr-xsource/a/pcmciautils/config/rc.pcmcia2
-rwxr-xr-xsource/a/pcmciautils/pcmciautils.SlackBuild2
-rw-r--r--source/a/pkgtools/manpages/installpkg.89
-rw-r--r--source/a/pkgtools/manpages/makepkg.86
-rw-r--r--source/a/pkgtools/manpages/removepkg.86
-rw-r--r--source/a/pkgtools/manpages/upgradepkg.89
-rwxr-xr-xsource/a/pkgtools/pkgtools.SlackBuild4
-rw-r--r--source/a/pkgtools/scripts/installpkg15
-rw-r--r--source/a/pkgtools/scripts/makepkg26
-rw-r--r--source/a/pkgtools/scripts/pkgtool2
-rw-r--r--source/a/pkgtools/scripts/removepkg10
-rw-r--r--source/a/pkgtools/scripts/setup.80.make-bootdisk4
-rw-r--r--source/a/pkgtools/scripts/setup.services35
-rw-r--r--source/a/pkgtools/scripts/setup.vi-ex6
-rw-r--r--source/a/pkgtools/scripts/upgradepkg3
-rwxr-xr-xsource/a/plzip/plzip.SlackBuild4
-rw-r--r--source/a/procps-ng/doinst.sh16
-rwxr-xr-xsource/a/procps-ng/procps-ng.SlackBuild57
-rw-r--r--source/a/procps-ng/sysctl.default8
-rwxr-xr-xsource/a/quota/quota.SlackBuild4
-rwxr-xr-xsource/a/reiserfsprogs/reiserfsprogs.SlackBuild23
-rw-r--r--source/a/rpm2tgz/patches/0010-no-absolute-filenames-extracting-cpio.patch11
-rw-r--r--source/a/rpm2tgz/patches/0011-ignore-rpm2cpio-error-code.patch44
-rw-r--r--source/a/rpm2tgz/rpm2targz2
-rwxr-xr-xsource/a/rpm2tgz/rpm2tgz.SlackBuild13
-rw-r--r--source/a/rpm2tgz/rpmoffset.c145
-rw-r--r--source/a/rpm2tgz/rpmoffset.c.url1
-rwxr-xr-xsource/a/sdparm/sdparm.SlackBuild2
-rwxr-xr-xsource/a/sed/sed.SlackBuild2
-rw-r--r--source/a/shadow/68a722760487d3537905d97d45e5fba189592022.patch321
-rw-r--r--source/a/shadow/a6f6da96f4898a34e5ed1475053075172f9915b2.patch52
-rw-r--r--source/a/shadow/adduser10
-rwxr-xr-xsource/a/shadow/shadow.SlackBuild14
-rw-r--r--source/a/shadow/shadow.login.display.short.hostname.diff64
-rw-r--r--source/a/shadow/shadow.url1
-rwxr-xr-xsource/a/smartmontools/smartmontools.SlackBuild2
-rw-r--r--source/a/smartmontools/smartmontools.url1
-rwxr-xr-xsource/a/sysfsutils/sysfsutils.SlackBuild32
-rw-r--r--source/a/sysfsutils/sysfsutils.url2
-rw-r--r--source/a/sysklogd/config/rc.syslog.new4
-rwxr-xr-xsource/a/sysklogd/sysklogd.SlackBuild4
-rw-r--r--source/a/sysvinit-functions/functions2
-rwxr-xr-xsource/a/sysvinit-functions/sysvinit-functions.SlackBuild2
-rw-r--r--source/a/sysvinit-scripts/default/efivarfs7
-rw-r--r--source/a/sysvinit-scripts/doinst.sh1
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.44
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.6189
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.M154
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.S543
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.cpufreq16
-rwxr-xr-xsource/a/sysvinit-scripts/sysvinit-scripts.SlackBuild9
-rwxr-xr-xsource/a/sysvinit/sysvinit.SlackBuild17
-rw-r--r--source/a/sysvinit/sysvinit.always.define.version.diff6
-rw-r--r--source/a/sysvinit/sysvinit.url3
-rw-r--r--source/a/sysvinit/sysvinit.use_dev_initctl_not_run_initctl.diff258
-rw-r--r--source/a/sysvinit/sysvinit.wrong.version.in.init.c.again.diff11
-rw-r--r--source/a/tar/tar-1.13.bzip2.diff56
-rwxr-xr-xsource/a/tar/tar.SlackBuild42
-rwxr-xr-xsource/a/tcsh/tcsh.SlackBuild5
-rw-r--r--source/a/tcsh/tcsh.nobuiltincolorls.diff11
-rwxr-xr-xsource/a/time/time.SlackBuild2
-rwxr-xr-xsource/a/tree/tree.SlackBuild15
-rw-r--r--source/a/tree/tree.url2
-rw-r--r--source/a/udisks/slack-desc19
-rw-r--r--source/a/udisks/udisks.glibc228.diff52
-rw-r--r--source/a/udisks/udisks.no.pci-db.diff32
-rw-r--r--source/a/udisks/udisks.url1
-rwxr-xr-xsource/a/udisks2/udisks2.SlackBuild2
-rwxr-xr-xsource/a/upower/upower.SlackBuild45
-rw-r--r--source/a/usbutils/usbutils.url2
-rw-r--r--source/a/userspace-rcu/slack-desc19
-rwxr-xr-xsource/a/userspace-rcu/userspace-rcu.SlackBuild (renamed from source/a/udisks/udisks.SlackBuild)123
-rw-r--r--source/a/userspace-rcu/userspace-rcu.url1
-rwxr-xr-xsource/a/utempter/utempter.SlackBuild4
-rw-r--r--source/a/util-linux/doinst.sh10
-rw-r--r--source/a/util-linux/seedrng.841
-rw-r--r--source/a/util-linux/seedrng.c441
-rwxr-xr-xsource/a/util-linux/util-linux.SlackBuild47
-rwxr-xr-xsource/a/volume_key/volume_key.SlackBuild6
-rwxr-xr-xsource/a/xfsprogs/xfsprogs.SlackBuild7
-rw-r--r--source/a/xz/f9cf4c05edd14dedfe63833f8ccbe41b55823b00.patch25
-rw-r--r--source/a/xz/slack-desc2
-rwxr-xr-xsource/a/xz/xz.SlackBuild22
-rw-r--r--source/a/xz/xz.default.verbosity.V_ERROR.diff11
-rw-r--r--source/a/xz/xz.url1
-rwxr-xr-xsource/a/zerofree/zerofree.SlackBuild2
-rwxr-xr-xsource/a/zoo/zoo.SlackBuild10
312 files changed, 10859 insertions, 7123 deletions
diff --git a/source/a/FTBFSlog b/source/a/FTBFSlog
index b40091357..639305f70 100644
--- a/source/a/FTBFSlog
+++ b/source/a/FTBFSlog
@@ -1,39 +1,9 @@
-Tue Apr 6 18:09:15 UTC 2021
- libblockdev: Fix build with glib-2.68.0. Thanks to nobodino.
+Thu Sep 28 19:05:40 UTC 2023
+ gpm: add workaround for ./configure failure.
+--------------------------+
-Sun Jan 17 20:10:50 UTC 2021
- mkinitrd: upgrade busybox to fix missing stime in newer glibc.
+Sun Oct 16 18:39:12 UTC 2022
+ f2fs-tools: patch to build with newer lz4. Thanks to nobodino.
+--------------------------+
-Sat Jan 16 18:30:47 UTC 2021
- cpio: add -fcommon to CFLAGS.
- floppy: add -fcommon to CFLAGS.
- gpm: add -fcommon to CFLAGS.
- jfsutils: add -fcommon to CFLAGS.
- kbd: add -fcommon to CFLAGS.
- sharutils: add -fcommon to CFLAGS.
- tcsh: add -fcommon to CFLAGS.
- Thanks to nobodino.
+Mon Feb 7 20:57:55 UTC 2022
+ All packages tested and found to compile properly.
+--------------------------+
-Sat May 4 17:55:48 UTC 2019
- efivar: patched to fix GCC9 warnings resulting in build failure.
- Thanks to nobodino and ponce.
-+--------------------------+
-Wed Nov 21 18:48:32 UTC 2018
- upower: preemptive fix for FTBFS with new glib.
-+--------------------------+
-Tue Jun 26 09:45:32 UTC 2018
- grub: fix FTBFS with gcc8 by patching to fix this warning:
- alignment 1 of struct efi_variable is less than 8 [-Werror=packed-not-aligned]
-+--------------------------+
-Tue Mar 13 18:42:23 UTC 2018
- btrfs-progs: patched to build with latest e2fsprogs. Thanks to nobodino.
-+--------------------------+
-Tue Feb 13 00:25:47 UTC 2018
- Fix all packages that fail to build from source:
- xfsprogs: patch to fix name collision with copy_file_range and glibc-2.27
-+--------------------------+
-Sat Feb 3 21:16:09 UTC 2018
- Fix all packages that fail to build from source:
- efibootmgr: add -fgnu89-inline to CFLAGS
- gpm: fix missing includes and fix gcc7 issues
- sysklogd: union wait was removed from glibc, use int instead as recommended
diff --git a/source/a/aaa_base/_aaa_base/install/doinst.sh b/source/a/aaa_base/_aaa_base/install/doinst.sh
index 16f1280d7..0c88db2b7 100644
--- a/source/a/aaa_base/_aaa_base/install/doinst.sh
+++ b/source/a/aaa_base/_aaa_base/install/doinst.sh
@@ -1,10 +1,20 @@
-# Invite the new admin to register their machine with the Linux Counter:
-if [ ! -f var/spool/mail/root ]; then
- mv var/spool/mail/root.new var/spool/mail/root
-else
+# Prevent/fix bad permissions on /var/spool/mail/root:
+if [ ! -r var/spool/mail/root ]; then
+ touch var/spool/mail/root
+ chown root:mail var/spool/mail/root
+ chmod 660 var/spool/mail/root
+fi
+# If there is a previous root mailbox that is world readable, then
+# fix the ownership/permissions:
+if /bin/ls -l var/spool/mail/root | grep -q rw-r--r ; then
+ chown root:mail var/spool/mail/root
+ chmod 660 var/spool/mail/root
+fi
+# Send root a welcome email unless we detect that it's there already:
+if ! grep -q "Welcome to Linux (Slackware 15.0)" var/spool/mail/root 2> /dev/null ; then
cat var/spool/mail/root.new >> var/spool/mail/root
- rm var/spool/mail/root.new
fi
+rm var/spool/mail/root.new
# (Starting with Slackware 8.1) note: These links are now replaced by
# copies of the header files that were used to compile glibc (in the
# kernel-headers package). The version number on the kernel-headers
diff --git a/source/a/aaa_base/_aaa_base/var/spool/mail/root.new b/source/a/aaa_base/_aaa_base/var/spool/mail/root.new
index a8b29151a..c1872523e 100644
--- a/source/a/aaa_base/_aaa_base/var/spool/mail/root.new
+++ b/source/a/aaa_base/_aaa_base/var/spool/mail/root.new
@@ -1,67 +1,18 @@
-From root@hive64.slackware.lan Fri May 20 15:16:45 2016
-Return-Path: <root@hive64.slackware.lan>
-Received: from hive64.slackware.lan (localhost [127.0.0.1])
- by hive64.slackware.lan (8.15.2/8.15.2) with ESMTP id u4KKGjAg003580
- for <root@hive64.slackware.lan>; Fri, 20 May 2016 15:16:45 -0500
-Received: (from root@localhost)
- by hive64.slackware.lan (8.15.2/8.15.2/Submit) id u4KKGj0X003579
- for root; Fri, 20 May 2016 15:16:45 -0500
-From: root@hive64.slackware.lan
-Message-Id: <201605202016.u4KKGj0X003579@hive64.slackware.lan>
-Date: Fri, 20 May 2016 15:16:45 -0500
-To: root@hive64.slackware.lan
-Subject: Register with the Linux counter project
-User-Agent: Heirloom mailx 12.5 7/5/10
-MIME-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-
-
- (Adapted from a question in the Linux-FAQ)
-
- How Many People Use Linux?
-
- Linux is freely available, and no one is required to register with
- any central authority, so it is difficult to know. Several businesses
- survive solely on selling and supporting Linux. Linux newsgroups are
- some of the most heavily read on Usenet. Accurate numbers are hard to
- come by, but the number is almost certainly in the millions.
-
- However, people can register as Linux users at the Linux Counter
- project, which has been in existence since 1993. In August of 2012
- the project counted more than 133,000 users, but that is certainly
- only a small fraction of all users. The operator of the Linux Counter
- estimated over 60 million users at that time.
-
- To get counted, visit the Web site at:
-
- http://linuxcounter.net
-
- ...and fill in the registration form.
-
- The current count is posted monthly to news:comp.os.linux.misc, and
- is always available from the Web site.
-
-From root@hive64.slackware.lan Fri May 20 15:16:49 2016
-Return-Path: <root@hive64.slackware.lan>
-Received: from hive64.slackware.lan (localhost [127.0.0.1])
- by hive64.slackware.lan (8.15.2/8.15.2) with ESMTP id u4KKGnSF003585
- for <root@hive64.slackware.lan>; Fri, 20 May 2016 15:16:49 -0500
-Received: (from root@localhost)
- by hive64.slackware.lan (8.15.2/8.15.2/Submit) id u4KKGnJj003584
- for root; Fri, 20 May 2016 15:16:49 -0500
-From: root@hive64.slackware.lan
-Message-Id: <201605202016.u4KKGnJj003584@hive64.slackware.lan>
-Date: Fri, 20 May 2016 15:16:49 -0500
-To: root@hive64.slackware.lan
-Subject: Welcome to Linux (Slackware 14.2)!
-User-Agent: Heirloom mailx 12.5 7/5/10
-MIME-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-
-
-Welcome! I'm glad to see you've made it this far! :^)
+From root@z-mp.slackware.lan Tue Jan 11 14:18:55 2022
+Return-Path: <root@z-mp.slackware.lan>
+X-Original-To: root
+Delivered-To: root@z-mp.slackware.lan
+Received: by z-mp.slackware.lan (Postfix, from userid 0)
+ id D7F87251F63; Tue, 11 Jan 2022 14:18:36 -0600 (CST)
+Date: Tue, 11 Jan 2022 14:18:36 -0600
+To: root@z-mp.slackware.lan
+Subject: Welcome to Linux (Slackware 15.0)!
+User-Agent: mailx v14.9.23
+Message-Id: <20220111201855.D7F87251F63@z-mp.slackware.lan>
+From: root@z-mp.slackware.lan
+
+
+Welcome! I'm glad to see you've made it this far! :^)
Here are a few hints to help you navigate through the Linux operating
system a little bit better.
@@ -69,18 +20,18 @@ system a little bit better.
Tools to help configure your system:
pkgtool: Remember those screens you saw while each package was
-installing? You can see all that information (and more) again. The
+installing? You can see all that information (and more) again. The
simplest way is to use the 'pkgtool' utility to view the package
-contents. Another way is to use 'less' or a text editor to read the
-files in /var/log/packages and /var/log/scripts (this is the method I
-use). The pkgtool script serves as a frontend to the command line
-package tools, so it's a menu based program that will enable you to
-remove, install, or view packages that are currently installed on the
-system. pkgtool will also allow you to re-run some of the system admin
-scripts that you may have seen during the installation process.
-
- Slackware's command line package tools: I use these utilities most
-of the time when I have packages to install, remove, or upgrade. These
+contents. Another way is to use 'less' or a text editor to read the
+files in /var/lib/pkgtools/packages and /var/lib/pkgtools/scripts (this
+is the method I use). The pkgtool script serves as a frontend to the
+command line package tools, so it's a menu based program that will enable
+you to remove, install, or view packages that are currently installed on
+the system. pkgtool will also allow you to re-run some of the system
+admin scripts that you may have seen during the installation process.
+
+ Slackware's command line package tools: I use these utilities most
+of the time when I have packages to install, remove, or upgrade. These
are the tools:
installpkg -- Installs packages
@@ -92,28 +43,28 @@ are the tools:
slackpkg: For those more used to automated package management tools
you might like to try slackpkg (my favorite due to its simple,
-straightforward approach to keeping a machine up to date). Slackpkg
-can be found in the slackware/ap directory. A search of the web will
-turn up more tools as well. You should approach these cautiously, as
+straightforward approach to keeping a machine up to date). Slackpkg
+can be found in the slackware/ap directory. A search of the web will
+turn up more tools as well. You should approach these cautiously, as
Slackware is designed around the idea that the system should be a
-complete installation kept updated with any official patches. This
+complete installation kept updated with any official patches. This
avoids the mess of dependencies that some other Linux based GNU systems
-face. However, many (if not most) of these tools won't know what to do
+face. However, many (if not most) of these tools won't know what to do
about .new config files, or how to handle upgrading a package that has
-changed to a new name. Some also think that any package with a larger
+changed to a new name. Some also think that any package with a larger
build number is "better", when there have been many instances that a
new upstream release wasn't working properly and we had to roll back to
an earlier one, and an automated upgrade tool didn't want to
-"downgrade" the package. This is something upgradepkg will gladly do,
+"downgrade" the package. This is something upgradepkg will gladly do,
as it doesn't (as it should not) take the package's version number to
-mean much of anything. Regarding automatic upgrades, there have also
+mean much of anything. Regarding automatic upgrades, there have also
been cases where a library upgrade caused unwanted side effects in
-programs that link with it. In theory, most libraries used on the
+programs that link with it. In theory, most libraries used on the
system try to retain backwards compatibility, but in practice this
-isn't always the case. While any issued patches should be installed to
+isn't always the case. While any issued patches should be installed to
keep your system secure, always remember the old adage "don't fix it if
it ain't broke" when considering other upgrades and additions,
-especially if they come from unofficial sources. Again, there's a lot
+especially if they come from unofficial sources. Again, there's a lot
of good stuff out there, but there's also some that's not so good.
It's always a good idea to look packages over before you install them.
This is as simple as using 'less' to view the contents so you can see
@@ -123,23 +74,23 @@ extract the archive into a temporary directory to take a closer look.
netconfig: netconfig is a menu based program that will help to
configure your network. You will be asked several questions and given
an opportunity to review your settings before the changes are
-committed. More advanced settings are available by editing the
+committed. More advanced settings are available by editing the
/etc/rc.d/rc.inet1.conf config file directly.
pppsetup: pppsetup is a menu based program that will help you to
-connect to your ISP via a PPP connection. As with netconfig you are
+connect to your ISP via a PPP connection. As with netconfig you are
asked a series of questions and given a chance to review your settings.
KDE also includes a utility for configuring PPP dialup connections.
This is found in KDE's Internet menu (kppp).
xwmconfig: If you have installed the X window system, you can use
-xwmconfig to choose your default window manager. Running this as root
+xwmconfig to choose your default window manager. Running this as root
will set the system default while running it as a normal user will only
-set the window manager for that user. An /etc/X11/xorg.conf config
+set the window manager for that user. An /etc/X11/xorg.conf config
file is no longer required to run X, but you may still use one if you
-wish. An initial xorg.conf may be generated by running: X -configure
+wish. An initial xorg.conf may be generated by running: X -configure
For many modern drivers (such as those using Kernel Mode Setting),
-X -configure no longer generates a working xorg.conf. For those drivers
+X -configure no longer generates a working xorg.conf. For those drivers
you could start by copying /etc/X11/xorg.conf-vesa to /etc/X11/xorg.conf
and then edit this line:
Driver "vesa"
@@ -147,25 +98,34 @@ Change "vesa" to the name of the X driver for your chipset.
liloconfig: If you are using the LILO boot loader to start your
system you can use liloconfig to setup and install Lilo to the boot
-drive. There's a simple installation which tries to automatically set
-up LILO to boot Linux (also Windows if found). For more advanced
+drive. There's a simple installation which tries to automatically set
+up LILO to boot Linux (also Windows if found). For more advanced
users, the expert option offers more control over the installation
-process. If you have a lot of partitions, the selection menu in
-'expert' mode may overflow. You'll likely then want to go to another
+process. If you have a lot of partitions, the selection menu in
+'expert' mode may overflow. You'll likely then want to go to another
console and find the partition you want with 'fdisk -l | less', and
then go back and enter it (proving that you are, indeed, an expert).
+ eliloconfig: If you are using the elilo boot loader to start your
+system that uses UEFI BIOS, then eliloconfig is used to copy the kernel
+(and the initrd if one is found) to the EFI System Partition, as well as
+to add a menu entry for Slackware to the EFI Boot Menu. After upgrading
+to a new kernel, use "geninitrd" to create an updated initrd, and then
+use eliloconfig to copy the kernel and initrd to the EFI System Partition.
+If you've already added a menu entry for Slackware you do not need to do
+it again, and indeed probably should not to avoid extra wear on the nvram
+used to store EFI data.
Other configuration files:
The majority of system configuration files can be found in and below
-the /etc directory. Most system configuration is done by editing these
-files with a text editor such as 'vi', "nano", or 'joe'. If you're not
+the /etc directory. Most system configuration is done by editing these
+files with a text editor such as 'vi', "nano", or 'joe'. If you're not
sure which files you need to edit to configure a given package, use
'less' or 'pkgtool' to see what files are installed by the package
paying special attention to any files placed in /etc or that end with
the suffix .new (these are usually moved into place if there's not
-already a configuration file with the same name). After upgrading a
+already a configuration file with the same name). After upgrading a
package, if a .new config file is put in place you'll have to decide
whether to delete the .new, move it over the existing config file
(losing any custom configuration information in the old file), or make
@@ -178,16 +138,16 @@ Hardware, network, and kernel issues:
If you've got hardware such as a CD-ROM drive or Ethernet card that
doesn't seem to work with Linux, it's possible that the kernel you're
-using doesn't contain the needed support. In that case, you can do one
+using doesn't contain the needed support. In that case, you can do one
of two things:
- 1. Load the support with kernel modules. This is probably the
- simplest way to handle the situation. Just edit
+ 1. Load the support with kernel modules. This is probably the
+ simplest way to handle the situation. Just edit
/etc/rc.d/rc.modules so that it loads the modules you need.
2. Recompile your kernel, including the needed driver(s).
However, recompiling your kernel is an extreme measure that can be
-both difficult and dangerous to the stability of your system. If you
+both difficult and dangerous to the stability of your system. If you
decide to go that route, either be sure you know the potential pitfalls
or seek guidance from someone experienced with kernel configuration,
compilation, and installation.
@@ -196,32 +156,32 @@ compilation, and installation.
with udev if the hardware is present in the system, unless the modules
are not udev-capable yet, or they are blacklisted in a file in
/etc/modprobe.d/ (local config files) or /lib/modprobe.d/ (config files
-that ship with the system). If the module for the driver you need is
+that ship with the system). If the module for the driver you need is
blacklisted, copy the appropriate file from /lib/modprobe.d/ to
/etc/modprobe.d/ and then comment out the line that blacklists the module
-by putting # at the beginning. Files found in /etc/modprobe.d/ will
+by putting # at the beginning. Files found in /etc/modprobe.d/ will
override those found in /lib/modprobe.d/ and will not be overwritten by
-upgrades. If that doesn't fix the issue, check with "lsmod" to make sure
-that the module is loading correctly. If not, try loading it in the
+upgrades. If that doesn't fix the issue, check with "lsmod" to make sure
+that the module is loading correctly. If not, try loading it in the
/etc/rc.d/rc.modules file.
If you're on a standalone LAN without a nameserver, make sure you
don't have a nameserver line in /etc/resolv.conf, or you may experience
delays with many network commands as they attempt to query the bogus
-nameserver. Most people these days will have a nameserver, or be able
-to access one via their router/gateway. Most DHCP servers will tell
+nameserver. Most people these days will have a nameserver, or be able
+to access one via their router/gateway. Most DHCP servers will tell
dhcpcd what it needs to know in order to set up your /etc/resolv.conf
automatically.
Want to run NFS? You'll need to install the rpcbind and nfs-utils
-packages. Then, edit your /etc/exports to allow NFS access. (see 'man
-exports' for examples). Finally, set rc.rpc and rc.nfsd executable:
+packages. Then, edit your /etc/exports to allow NFS access. (see 'man
+exports' for examples). Finally, set rc.rpc and rc.nfsd executable:
chmod 755 /etc/rc.d/rc.rpc
chmod 755 /etc/rc.d/rc.nfsd
To start the NFS server, either reboot or execute the two rc files.
The kernel is now set up with the CONFIG_SCSI_MULTI_LUNS option
-to scan for new "SCSI" devices automatically. However, if that fails
+to scan for new "SCSI" devices automatically. However, if that fails
to work after inserting a digital media card, or plugging in a new USB
or IEEE1394 (Firewire) device, you may need to run the following
command before it becomes available as a mountable device:
@@ -262,7 +222,7 @@ that CUPS will start at boot:
This local "website" may also be reached using the CUPS configuration
menu choice within a desktop environment such as KDE.
- See the extensive docs in /usr/doc/cups for more details. If you
+ See the extensive docs in /usr/doc/cups for more details. If you
don't see your exact printer model when adding a new printer, often
one that's "close" will do the trick.
@@ -272,24 +232,24 @@ Users who plan to print (or scan) need to be members of the "lp" group.
Mouse support:
Only very ancient mice will need any special treatment in order to
-get basic support, and with GPM cut and paste on the console. Most
-will work with the "ps2" or "imps2" protocols. If you should happen to
+get basic support, and with GPM cut and paste on the console. Most
+will work with the "ps2" or "imps2" protocols. If you should happen to
have one of the ancient mice that is not a serial, PS/2, or USB mouse
then you'll probably have to load a kernel module in order to get it to
-work. At this point in time, a busmouse is rare. These days, most
+work. At this point in time, a busmouse is rare. These days, most
mice are PS/2 (with a 6 pin round plug) or USB, or occasionally serial
-(with a 9 pin trapezoidal plug). These kinds of mice don't require any
+(with a 9 pin trapezoidal plug). These kinds of mice don't require any
special setup as the system should detect and activate them
-automatically. If you think your mouse might need a special driver (if
+automatically. If you think your mouse might need a special driver (if
it's not working), read the comments in /etc/rc.d/rc.modules to see
-which one is needed, and edit the file to load it at boot time. It's
+which one is needed, and edit the file to load it at boot time. It's
also possible that the /dev/mouse link may need to be changed to point
-to the proper mouse device. Or, compile a new kernel with built in
+to the proper mouse device. Or, compile a new kernel with built in
support for your mouse and install that.
Using the lsmod command, you can see if the psmouse module is loaded.
If so, you're using the psmouse module for a PS/2-like mouse (including
-most touchpads). If you need to adjust the mouse protocol, make a copy
+most touchpads). If you need to adjust the mouse protocol, make a copy
of the config file, and then edit that:
cp /lib/modprobe.d/psmouse.conf /etc/modprobe.d/psmouse.conf
@@ -301,38 +261,38 @@ switch, or to properly enable tap-to-click with a touchpad.
Network support:
- Of course, you're going to want to get your machine online. If you
+ Of course, you're going to want to get your machine online. If you
have a router supporting DHCP you're probably already on by now.
-Otherwise, 'netconfig' will give you a simple network connection. To
+Otherwise, 'netconfig' will give you a simple network connection. To
get your machine on the net, you'll need to install packages from the
-N (network) series. If you aren't sure which ones you'll need, the
-easiest thing is to just install them all. Network services will not
+N (network) series. If you aren't sure which ones you'll need, the
+easiest thing is to just install them all. Network services will not
run unless activated by making the startup scripts in /etc/rc.d/
-executable, so it doesn't hurt to have them installed. Your machine
+executable, so it doesn't hurt to have them installed. Your machine
should be configured at least with loopback using the "netconfig"
-utility. If you are using a modem, make sure the serial port your
+utility. If you are using a modem, make sure the serial port your
modem uses is correctly configured, and then use 'pppsetup' to configure
-the dialup process. Additional documentation on pppsetup can be found
-in /usr/doc/pppsetup-*/. DSL/Cable users who need to use PPPoE (PPP
+the dialup process. Additional documentation on pppsetup can be found
+in /usr/doc/pppsetup-*/. DSL/Cable users who need to use PPPoE (PPP
over Ethernet) should see the docs in /usr/doc/rp-pppoe-3.12/.
If you will be using wireless (or even a wired interface), you might
-want to let NetworkManager handle your network connections. This is
+want to let NetworkManager handle your network connections. This is
a choice during the initial installation, but may also be selected
later by rerunning netconfig, or by setting the startup script
-to executable (chmod 755 /etc/rc.d/rc.networkmanager). When Network
+to executable (chmod 755 /etc/rc.d/rc.networkmanager). When Network
Manager is used to handle connections, a nice interface is provided
to scan for wireless access points and make changes to the network
-configuration. This interface runs automatically with KDE or Xfce.
-In fluxbox, the nm-applet program will need to be launched. Other
+configuration. This interface runs automatically with KDE or Xfce.
+In fluxbox, the nm-applet program will need to be launched. Other
window managers lack a system tray to display nm-applet, so for those
you might want to look at wicd in /extra, which also provides a nice
-GUI tool for connecting to wireless (or wired) networks. For window
+GUI tool for connecting to wireless (or wired) networks. For window
managers that do not provide a tray for running programs, start
-"wicd-client" to make changes. With NetworkManager or wicd, it's
+"wicd-client" to make changes. With NetworkManager or wicd, it's
a good idea to remove any existing network configuration in
-/etc/rc.d/rc.inet1.conf first. This can be done by running netconfig
-and setting the machine to use loopback. Then, if you're using
+/etc/rc.d/rc.inet1.conf first. This can be done by running netconfig
+and setting the machine to use loopback. Then, if you're using
NetworkManager run it a second time and select NetworkManager.
If you need to set up your Linux machine as a router for other systems,
@@ -340,7 +300,7 @@ you'll want to set up the interfaces in /etc/rc.d/rc.inet1.conf, and
set up NAT support with something like this in /etc/rc.d/rc.firewall,
and then make rc.firewall executable.
-# Delete and flush. Default table is "filter".
+# Delete and flush. Default table is "filter".
# Others like "nat" must be explicitly stated.
iptables --flush
# Flush all the rules in filter and nat tables
@@ -355,16 +315,23 @@ echo "Enabling ip_forwarding..."
echo 1 > /proc/sys/net/ipv4/ip_forward
It's possible to expand (or reduce ;-) this script for just about any
-firewall needed. See "man iptables" for lots of information.
+firewall needed. See "man iptables" for lots of information.
F: FAQ series, and the HOWTO documentation collection:
If you installed the F series, you find detailed documentation on
-many common Linux tasks in /usr/doc/Linux-HOWTOs. Each of these
-instructional files covers a particular Linux task. They cover most
+many common Linux tasks in /usr/doc/Linux-HOWTOs. Each of these
+instructional files covers a particular Linux task. They cover most
system administration tasks in a lot more detail than this little email
-does.
+does. At this point the majority of these have been unmaintained for
+years and are largely obsolete, but in spite of this there are still
+good hints to be found. In general a search engine will be your best
+bet for finding additional information. Or, visit the Slackware forum
+on Linux Questions and you'll find a helpful community who can answer
+your questions (or perhaps even I'll answer you there):
+
+https://www.linuxquestions.org/questions/slackware-14/
There is also a collection of Linux related FAQs (lists of Frequently
Asked Questions with answers) /usr/doc/Linux-FAQs.
diff --git a/source/a/aaa_base/aaa_base.SlackBuild b/source/a/aaa_base/aaa_base.SlackBuild
index a05444304..c269f61b2 100755
--- a/source/a/aaa_base/aaa_base.SlackBuild
+++ b/source/a/aaa_base/aaa_base.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2018, 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# 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
@@ -23,8 +23,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=aaa_base
-VERSION=15.0
-BUILD=${BUILD:-1}
+VERSION=15.1
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/aaa_base/current-release.inactive b/source/a/aaa_base/current-release
index 5fe779910..5fe779910 100644
--- a/source/a/aaa_base/current-release.inactive
+++ b/source/a/aaa_base/current-release
diff --git a/source/a/aaa_libraries/aaa_libraries.SlackBuild b/source/a/aaa_libraries/aaa_libraries.SlackBuild
index 3cac1008d..6e6bd5df4 100755
--- a/source/a/aaa_libraries/aaa_libraries.SlackBuild
+++ b/source/a/aaa_libraries/aaa_libraries.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2018, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2018, 2020, 2021, 2022 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,8 +22,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=aaa_libraries
-VERSION=${VERSION:-15.0}
-BUILD=${BUILD:-9}
+VERSION=${VERSION:-15.1}
+BUILD=${BUILD:-31}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -64,7 +64,11 @@ cat $CWD/symlinks-to-tracked-libs \
| sed -e "s#^/lib/#/lib${LIBDIRSUFFIX}/#" \
-e "s#^/usr/lib/#/usr/lib${LIBDIRSUFFIX}/#" \
| while read library ; do
- ( [ ! -e $library ] && exit 0
+ ( if [ ! -e $library ]; then
+ echo "WARNING: $library not found"
+ sleep 10
+ exit 0
+ fi
echo "Adding $library"
mkdir -p $(dirname $library | cut -b2- )
cd $(dirname $library | cut -b2- )
@@ -80,7 +84,11 @@ cat $CWD/tracked-files \
| sed -e "s#^/lib/#/lib${LIBDIRSUFFIX}/#" \
-e "s#^/usr/lib/#/usr/lib${LIBDIRSUFFIX}/#" \
| while read library ; do
- ( [ ! -e $library ] && exit 0
+ ( if [ ! -e $library ]; then
+ echo "WARNING: $library not found"
+ sleep 10
+ exit 0
+ fi
echo "Adding $library"
mkdir -p $(dirname $library | cut -b2- )
cd $(dirname $library | cut -b2- )
@@ -94,7 +102,11 @@ cat $CWD/symlinks-to-tracked-libs-tmp.d/* \
| sed -e "s#^/lib/#/lib${LIBDIRSUFFIX}/#" \
-e "s#^/usr/lib/#/usr/lib${LIBDIRSUFFIX}/#" \
| while read library ; do
- ( [ ! -e $library ] && exit 0
+ ( if [ ! -e $library ]; then
+ echo "WARNING: $library not found"
+ sleep 10
+ exit 0
+ fi
echo "Adding $library"
mkdir -p $(dirname $library | cut -b2- )
cd $(dirname $library | cut -b2- )
@@ -110,7 +122,11 @@ cat $CWD/tracked-files-tmp.d/* \
| sed -e "s#^/lib/#/lib${LIBDIRSUFFIX}/#" \
-e "s#^/usr/lib/#/usr/lib${LIBDIRSUFFIX}/#" \
| while read library ; do
- ( [ ! -e $library ] && exit 0
+ ( if [ ! -e $library ]; then
+ echo "WARNING: $library not found"
+ sleep 10
+ exit 0
+ fi
echo "Adding $library"
mkdir -p $(dirname $library | cut -b2- )
cd $(dirname $library | cut -b2- )
@@ -126,9 +142,19 @@ chmod 755 $PKG/lib${LIBDIRSUFFIX}/lib*.so.* $PKG/usr/lib${LIBDIRSUFFIX}/lib*.so.
# installpkg will create them if needed by running ldconfig.
find $PKG -type l -exec rm --verbose "{}" \+
+# Time to ask for trouble. We should add a few compatibility symlinks for the
+# non-wide ncurses libraries, and for the now built-in tic/tinfo:
+( cd $PKG/lib${LIBDIRSUFFIX}
+ ln -sf libformw.so.6 libform.so.6
+ ln -sf libmenuw.so.6 libmenu.so.6
+ ln -sf libncurses++w.so.6 libncurses++.so.6
+ ln -sf libncursesw.so.6 libncurses.so.6
+ ln -sf libpanelw.so.6 libpanel.so.6
+)
+
mkdir -p $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/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/a/aaa_libraries/display_orphans.sh b/source/a/aaa_libraries/display_orphans.sh
index 32bd570bd..56b7b1b98 100755
--- a/source/a/aaa_libraries/display_orphans.sh
+++ b/source/a/aaa_libraries/display_orphans.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2015, 2021 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,7 +21,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# Show libraries that are only present in the aaa_elflibs that is currently
+# Show libraries that are only present in the aaa_libraries that is currently
# installed on the system.
cleanup() {
@@ -33,8 +33,8 @@ trap 'cleanup' 2 14 15 # trap CTRL+C and kill
TMPDIR="$(mktemp -d /tmp/find-aaaelfliborphans.XXXXXX)"
cp -a /var/log/packages/* $TMPDIR
-rm -f $TMPDIR/aaa_elflibs-*
-cat /var/log/packages/aaa_elflibs-* | grep -v -e PACKAGE -e aaa_elflibs: -e FILE -e '^\./$' -e install/ | grep -v '/$' | while read file ; do
+rm -f $TMPDIR/aaa_libraries-*
+cat /var/log/packages/aaa_libraries-* | grep -v -e PACKAGE -e aaa_libraries: -e FILE -e '^\./$' -e install/ | grep -v '/$' | while read file ; do
if ! grep -q $file $TMPDIR/* ; then
echo $file
fi
diff --git a/source/a/aaa_libraries/doinst.sh b/source/a/aaa_libraries/doinst.sh
new file mode 100644
index 000000000..653d4604b
--- /dev/null
+++ b/source/a/aaa_libraries/doinst.sh
@@ -0,0 +1,7 @@
+# Let's attempt to activate these libraries as they might be needed by various
+# install scripts early on. We used to package symlinks in the normal way, and
+# it's possible that would be fine too, but there must(?) have been a reason
+# that we quit doing that...
+if [ -x sbin/ldconfig ]; then
+ sbin/ldconfig -r . 2> /dev/null
+fi
diff --git a/source/a/aaa_libraries/symlinks-to-tracked-libs b/source/a/aaa_libraries/symlinks-to-tracked-libs
index 4c946be56..5895b029b 100644
--- a/source/a/aaa_libraries/symlinks-to-tracked-libs
+++ b/source/a/aaa_libraries/symlinks-to-tracked-libs
@@ -9,6 +9,7 @@
/lib/libcap.so.2
/lib/libdm.so.0
/lib/libelf.so.1
+/lib/libformw.so.6
/lib/libfuse.so.2
/lib/libgpm.so.2
/lib/libkeyutils.so.1
@@ -17,18 +18,22 @@
/lib/libk5crypto.so.3
/lib/libgssapi_krb5.so.2
/lib/liblzma.so.5
+/lib/libmenuw.so.6
/lib/libncurses.so.5
-/lib/libncurses.so.6
/lib/libncursesw.so.5
/lib/libncursesw.so.6
-/lib/libnsl.so.1
+/lib/libncurses++w.so.6
/lib/libnsl.so.2
+/lib/libnsl.so.3
+/lib/libpanelw.so.6
/lib/libpcre.so.1
+/lib/libpcre2-8.so.0
/lib/libpcreposix.so.0
/lib/libpopt.so.0
/lib/libsigsegv.so.2
/lib/libsysfs.so.2
/lib/libtermcap.so.2
+/lib/libtic.so.6
/lib/libtinfo.so.6
/lib/libtirpc.so.3
/lib/libudev.so.1
@@ -39,12 +44,9 @@
/usr/lib/libcares.so.2
/usr/lib/libcurl.so.4
/usr/lib/libexpat.so.1
-/usr/lib/libffi.so.6
-/usr/lib/libffi.so.7
+/usr/lib/libffi.so.8
/usr/lib/libform.so.5
-/usr/lib/libform.so.6
/usr/lib/libformw.so.5
-/usr/lib/libformw.so.6
/usr/lib/libgdbm.so.4
/usr/lib/libgdbm.so.6
/usr/lib/libglib-2.0.so.0
@@ -58,22 +60,16 @@
/usr/lib/libidn.so.12
/usr/lib/libidn2.so.0
/usr/lib/libjpeg.so.62
-/usr/lib/libjson-c.so.4
+/usr/lib/libjson-c.so.5
/usr/lib/libturbojpeg.so.0
-/usr/lib/liblber-2.4.so.2
-/usr/lib/libldap-2.4.so.2
+/usr/lib/liblber.so.2
+/usr/lib/libldap.so.2
/usr/lib/libltdl.so.7
/usr/lib/libmenu.so.5
-/usr/lib/libmenu.so.6
/usr/lib/libmenuw.so.5
-/usr/lib/libmenuw.so.6
/usr/lib/libmm.so.14
/usr/lib/libpanel.so.5
-/usr/lib/libpanel.so.6
/usr/lib/libpanelw.so.5
-/usr/lib/libpanelw.so.6
-/usr/lib/libpcre2-8.so.0
-/usr/lib/libpng.so.14
/usr/lib/libpng14.so.14
/usr/lib/libpng16.so.16
/usr/lib/libpsl.so.5
@@ -88,6 +84,10 @@
/usr/lib/libtdb.so.1
/usr/lib/libtiffxx.so.5
/usr/lib/libtiff.so.5
+/usr/lib/libtiffxx.so.6
+/usr/lib/libtiff.so.6
+/usr/lib/libunistring.so.5
+/usr/lib/libunwind.so.8
/usr/lib/libusb-0.1.so.4
/usr/lib/libusb-1.0.so.0
/usr/lib/libvga.so.1
diff --git a/source/a/aaa_libraries/symlinks-to-tracked-libs-tmp.d/icu4c-68.2 b/source/a/aaa_libraries/symlinks-to-tracked-libs-tmp.d/icu4c-68.2
deleted file mode 100644
index 5f831a8ee..000000000
--- a/source/a/aaa_libraries/symlinks-to-tracked-libs-tmp.d/icu4c-68.2
+++ /dev/null
@@ -1,6 +0,0 @@
-/usr/lib/libicudata.so.68
-/usr/lib/libicui18n.so.68
-/usr/lib/libicuio.so.68
-/usr/lib/libicutest.so.68
-/usr/lib/libicutu.so.68
-/usr/lib/libicuuc.so.68
diff --git a/source/a/aaa_libraries/tracked-files-tmp.d/aaa_libraries-boost b/source/a/aaa_libraries/tracked-files-tmp.d/aaa_libraries-boost
new file mode 100644
index 000000000..522001674
--- /dev/null
+++ b/source/a/aaa_libraries/tracked-files-tmp.d/aaa_libraries-boost
@@ -0,0 +1,40 @@
+# We'll keep these around for a little while... probably remove on 2024-05-16 or thereabouts
+/usr/lib/libboost_atomic.so.1.84.0
+/usr/lib/libboost_chrono.so.1.84.0
+/usr/lib/libboost_container.so.1.84.0
+/usr/lib/libboost_context.so.1.84.0
+/usr/lib/libboost_contract.so.1.84.0
+/usr/lib/libboost_coroutine.so.1.84.0
+/usr/lib/libboost_date_time.so.1.84.0
+/usr/lib/libboost_fiber.so.1.84.0
+/usr/lib/libboost_filesystem.so.1.84.0
+/usr/lib/libboost_graph.so.1.84.0
+/usr/lib/libboost_iostreams.so.1.84.0
+/usr/lib/libboost_json.so.1.84.0
+/usr/lib/libboost_locale.so.1.84.0
+/usr/lib/libboost_log.so.1.84.0
+/usr/lib/libboost_log_setup.so.1.84.0
+/usr/lib/libboost_math_c99.so.1.84.0
+/usr/lib/libboost_math_c99f.so.1.84.0
+/usr/lib/libboost_math_c99l.so.1.84.0
+/usr/lib/libboost_math_tr1.so.1.84.0
+/usr/lib/libboost_math_tr1f.so.1.84.0
+/usr/lib/libboost_math_tr1l.so.1.84.0
+/usr/lib/libboost_nowide.so.1.84.0
+/usr/lib/libboost_prg_exec_monitor.so.1.84.0
+/usr/lib/libboost_program_options.so.1.84.0
+/usr/lib/libboost_python311.so.1.84.0
+/usr/lib/libboost_random.so.1.84.0
+/usr/lib/libboost_regex.so.1.84.0
+/usr/lib/libboost_serialization.so.1.84.0
+/usr/lib/libboost_stacktrace_addr2line.so.1.84.0
+/usr/lib/libboost_stacktrace_basic.so.1.84.0
+/usr/lib/libboost_stacktrace_noop.so.1.84.0
+/usr/lib/libboost_system.so.1.84.0
+/usr/lib/libboost_thread.so.1.84.0
+/usr/lib/libboost_timer.so.1.84.0
+/usr/lib/libboost_type_erasure.so.1.84.0
+/usr/lib/libboost_unit_test_framework.so.1.84.0
+/usr/lib/libboost_url.so.1.84.0
+/usr/lib/libboost_wave.so.1.84.0
+/usr/lib/libboost_wserialization.so.1.84.0
diff --git a/source/a/aaa_libraries/tracked-files-tmp.d/boost-1.76.0 b/source/a/aaa_libraries/tracked-files-tmp.d/boost-1.76.0
deleted file mode 100644
index 7aaa82a6a..000000000
--- a/source/a/aaa_libraries/tracked-files-tmp.d/boost-1.76.0
+++ /dev/null
@@ -1,39 +0,0 @@
-/usr/lib/libboost_atomic.so.1.76.0
-/usr/lib/libboost_chrono.so.1.76.0
-/usr/lib/libboost_container.so.1.76.0
-/usr/lib/libboost_context.so.1.76.0
-/usr/lib/libboost_contract.so.1.76.0
-/usr/lib/libboost_coroutine.so.1.76.0
-/usr/lib/libboost_date_time.so.1.76.0
-/usr/lib/libboost_fiber.so.1.76.0
-/usr/lib/libboost_filesystem.so.1.76.0
-/usr/lib/libboost_graph.so.1.76.0
-/usr/lib/libboost_iostreams.so.1.76.0
-/usr/lib/libboost_json.so.1.76.0
-/usr/lib/libboost_locale.so.1.76.0
-/usr/lib/libboost_log.so.1.76.0
-/usr/lib/libboost_log_setup.so.1.76.0
-/usr/lib/libboost_math_c99.so.1.76.0
-/usr/lib/libboost_math_c99f.so.1.76.0
-/usr/lib/libboost_math_c99l.so.1.76.0
-/usr/lib/libboost_math_tr1.so.1.76.0
-/usr/lib/libboost_math_tr1f.so.1.76.0
-/usr/lib/libboost_math_tr1l.so.1.76.0
-/usr/lib/libboost_nowide.so.1.76.0
-/usr/lib/libboost_prg_exec_monitor.so.1.76.0
-/usr/lib/libboost_program_options.so.1.76.0
-/usr/lib/libboost_python27.so.1.76.0
-/usr/lib/libboost_python39.so.1.76.0
-/usr/lib/libboost_random.so.1.76.0
-/usr/lib/libboost_regex.so.1.76.0
-/usr/lib/libboost_serialization.so.1.76.0
-/usr/lib/libboost_stacktrace_addr2line.so.1.76.0
-/usr/lib/libboost_stacktrace_basic.so.1.76.0
-/usr/lib/libboost_stacktrace_noop.so.1.76.0
-/usr/lib/libboost_system.so.1.76.0
-/usr/lib/libboost_thread.so.1.76.0
-/usr/lib/libboost_timer.so.1.76.0
-/usr/lib/libboost_type_erasure.so.1.76.0
-/usr/lib/libboost_unit_test_framework.so.1.76.0
-/usr/lib/libboost_wave.so.1.76.0
-/usr/lib/libboost_wserialization.so.1.76.0
diff --git a/source/a/acpid/acpid.SlackBuild b/source/a/acpid/acpid.SlackBuild
index 8ee9b6335..dd735f7d8 100755
--- a/source/a/acpid/acpid.SlackBuild
+++ b/source/a/acpid/acpid.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2018, 2021 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=acpid
-VERSION=${VERSION:-$(echo acpid-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-$(echo acpid-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
@@ -69,7 +69,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf acpid-$VERSION
-tar xvf $CWD/acpid-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/acpid-$VERSION.tar.?z || exit 1
cd acpid-$VERSION || exit 1
chown -R root:root .
find . \
diff --git a/source/a/bash/bash-5.1-patches/bash51-001 b/source/a/bash/bash-5.1-patches/bash51-001
deleted file mode 100644
index 6f29981d2..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-001
+++ /dev/null
@@ -1,80 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-001
-
-Bug-Reported-by: Fazal Majid <fazal@majid.org>
-Bug-Reference-ID: <DEAB7D2C-C626-450C-B2E5-281AFF2D26D4@majid.org>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00000.html
-
-Bug-Description:
-
-There is a missing dependency on a constructed file, which can cause highly
-parellel builds to fail.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/Makefile.in 2020-12-04 09:51:19.000000000 -0500
---- Makefile.in 2020-12-16 11:28:36.000000000 -0500
-***************
-*** 1316,1319 ****
---- 1316,1320 ----
- bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h
- bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
-+ bashline.o: ${DEFDIR}/builtext.h
- bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
- bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h
-***************
-*** 1436,1439 ****
---- 1437,1441 ----
- builtins/evalstring.o: jobs.h builtins.h flags.h input.h execute_cmd.h
- builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h
-+ builtins/evalstring.o: ${DEFDIR}/builtext.h
- builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h
- builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h
-
-*** ../bash-5.1-patched/builtins/Makefile.in 2019-07-25 08:03:45.000000000 -0400
---- builtins/Makefile.in 2020-12-16 11:29:29.000000000 -0500
-***************
-*** 362,366 ****
- evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h
- evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h
-! evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h
- #evalstring.o: $(topdir)/y.tab.h
- getopt.o: ../config.h $(BASHINCDIR)/memalloc.h
---- 362,366 ----
- evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h
- evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h
-! evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h ./builtext.h
- #evalstring.o: $(topdir)/y.tab.h
- getopt.o: ../config.h $(BASHINCDIR)/memalloc.h
-
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 1,5 ****
- /* patchlevel.h -- current bash patch level */
-
-! /* Copyright (C) 2001-2016 Free Software Foundation, Inc.
-
- This file is part of GNU Bash, the Bourne Again SHell.
---- 1,5 ----
- /* patchlevel.h -- current bash patch level */
-
-! /* Copyright (C) 2001-2020 Free Software Foundation, Inc.
-
- This file is part of GNU Bash, the Bourne Again SHell.
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 0
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 1
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.1-patches/bash51-002 b/source/a/bash/bash-5.1-patches/bash51-002
deleted file mode 100644
index 8c991649a..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-002
+++ /dev/null
@@ -1,57 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-002
-
-Bug-Reported-by: oguzismailuysal@gmail.com
-Bug-Reference-ID: <CAH7i3LoHFUa4aSF5-AD2r80HG-p-YzD_9ZxomarZkhP8NMq63g@mail.gmail.com>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00037.html
-
-Bug-Description:
-
-If there are no jobs, and the `-n' and `-p' options are both supplied to
-`wait', bash can assign a value to the variable name specified with `-p'
-instead of leaving it unset.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/builtins/wait.def 2020-04-09 15:13:57.000000000 -0400
---- builtins/wait.def 2020-12-11 09:46:49.000000000 -0500
-***************
-*** 214,222 ****
-
- status = wait_for_any_job (wflags, &pstat);
-- if (status < 0)
-- status = 127;
--
- if (vname && status >= 0)
- bind_var_to_int (vname, pstat.pid);
- if (list)
- unset_waitlist ();
---- 214,222 ----
-
- status = wait_for_any_job (wflags, &pstat);
- if (vname && status >= 0)
- bind_var_to_int (vname, pstat.pid);
-+
-+ if (status < 0)
-+ status = 127;
- if (list)
- unset_waitlist ();
-
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 1
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 2
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.1-patches/bash51-003 b/source/a/bash/bash-5.1-patches/bash51-003
deleted file mode 100644
index 68e5dce6a..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-003
+++ /dev/null
@@ -1,53 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-003
-
-Bug-Reported-by: oguzismailuysal@gmail.com
-Bug-Reference-ID: <CAH7i3LpG91BnNcDtaTUm2Ph7a+PnJkuh6nAc87cVL7_38tOaMQ@mail.gmail.com>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00050.html
-
-Bug-Description:
-
-Bash does not put a command substitution process that is started to perform an
-expansion in a child process into the right process group where it can receive
-keyboard-generated signals.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/subst.c 2020-11-16 10:33:15.000000000 -0500
---- subst.c 2020-12-12 13:50:11.000000000 -0500
-***************
-*** 6357,6362 ****
- #if defined (JOB_CONTROL)
- old_pipeline_pgrp = pipeline_pgrp;
-! /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
-! if ((subshell_environment & SUBSHELL_PIPE) == 0)
- pipeline_pgrp = shell_pgrp;
- cleanup_the_pipeline ();
---- 6357,6364 ----
- #if defined (JOB_CONTROL)
- old_pipeline_pgrp = pipeline_pgrp;
-! /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline or
-! we've already forked to run a disk command (and are expanding redirections,
-! for example). */
-! if ((subshell_environment & (SUBSHELL_FORK|SUBSHELL_PIPE)) == 0)
- pipeline_pgrp = shell_pgrp;
- cleanup_the_pipeline ();
-
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 2
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 3
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.1-patches/bash51-004 b/source/a/bash/bash-5.1-patches/bash51-004
deleted file mode 100644
index 39a6c647f..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-004
+++ /dev/null
@@ -1,126 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-004
-
-Bug-Reported-by: oguzismailuysal@gmail.com
-Bug-Reference-ID: <CAH7i3LoHGmwaghDpCWRUfcY04gQmeDTH3RiG=bf2b=KbU=gyhw@mail.gmail.com>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00039.html
-
-Bug-Description:
-
-If a key-value compound array assignment to an associative array is supplied
-as an assignment statement argument to the `declare' command that declares the
-array, the assignment doesn't perform the correct word expansions.
-
-This patch makes key-value assignment and subscript assignment perform the
-same expansions when they're supplied as an argument to `declare'.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/arrayfunc.c 2020-10-09 11:38:58.000000000 -0400
---- arrayfunc.c 2020-12-11 15:12:22.000000000 -0500
-***************
-*** 598,601 ****
---- 598,622 ----
- }
- }
-+
-+ /* Return non-zero if L appears to be a key-value pair associative array
-+ compound assignment. */
-+ int
-+ kvpair_assignment_p (l)
-+ WORD_LIST *l;
-+ {
-+ return (l && (l->word->flags & W_ASSIGNMENT) == 0 && l->word->word[0] != '['); /*]*/
-+ }
-+
-+ char *
-+ expand_and_quote_kvpair_word (w)
-+ char *w;
-+ {
-+ char *t, *r;
-+
-+ t = w ? expand_assignment_string_to_string (w, 0) : 0;
-+ r = sh_single_quote (t ? t : "");
-+ free (t);
-+ return r;
-+ }
- #endif
-
-***************
-*** 641,645 ****
-
- #if ASSOC_KVPAIR_ASSIGNMENT
-! if (assoc_p (var) && nlist && (nlist->word->flags & W_ASSIGNMENT) == 0 && nlist->word->word[0] != '[') /*]*/
- {
- iflags = flags & ~ASS_APPEND;
---- 662,666 ----
-
- #if ASSOC_KVPAIR_ASSIGNMENT
-! if (assoc_p (var) && kvpair_assignment_p (nlist))
- {
- iflags = flags & ~ASS_APPEND;
-*** ../bash-5.1-patched/arrayfunc.h 2020-04-29 17:24:15.000000000 -0400
---- arrayfunc.h 2020-12-11 14:23:50.000000000 -0500
-***************
-*** 68,71 ****
---- 68,74 ----
- extern void quote_compound_array_list PARAMS((WORD_LIST *, int));
-
-+ extern int kvpair_assignment_p PARAMS((WORD_LIST *));
-+ extern char *expand_and_quote_kvpair_word PARAMS((char *));
-+
- extern int unbind_array_element PARAMS((SHELL_VAR *, char *, int));
- extern int skipsubscript PARAMS((const char *, int, int));
-*** ../bash-5.1-patched/subst.c 2020-11-16 10:33:15.000000000 -0500
---- subst.c 2020-12-11 15:11:10.000000000 -0500
-***************
-*** 11605,11608 ****
---- 11605,11609 ----
- WORD_LIST *l, *nl;
- char *t;
-+ int kvpair;
-
- if (flags == 0)
-***************
-*** 11619,11622 ****
---- 11620,11627 ----
- /* Associative array */
- l = parse_string_to_word_list (value, 1, "array assign");
-+ #if ASSOC_KVPAIR_ASSIGNMENT
-+ kvpair = kvpair_assignment_p (l);
-+ #endif
-+
- /* For associative arrays, with their arbitrary subscripts, we have to
- expand and quote in one step so we don't have to search for the
-***************
-*** 11624,11627 ****
---- 11629,11638 ----
- for (nl = l; nl; nl = nl->next)
- {
-+ #if ASSOC_KVPAIR_ASSIGNMENT
-+ if (kvpair)
-+ /* keys and values undergo the same set of expansions */
-+ t = expand_and_quote_kvpair_word (nl->word->word);
-+ else
-+ #endif
- if ((nl->word->flags & W_ASSIGNMENT) == 0)
- t = sh_single_quote (nl->word->word ? nl->word->word : "");
-
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 3
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 4
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.1-patches/bash51-005 b/source/a/bash/bash-5.1-patches/bash51-005
deleted file mode 100644
index dee89561d..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-005
+++ /dev/null
@@ -1,100 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-005
-
-Bug-Reported-by: Alexander Mescheryakov <alexander.s.m@gmail.com>,
- konsolebox <konsolebox@gmail.com>
-Bug-Reference-ID: <5ffd7f3d.1c69fb81.dee25.166c@mx.google.com>,
- <CAJnmqwaVs7M6NBqZzcHy5c2+yHkTEg7p+o8ZWuA7sN+6N1q4CA@mail.gmail.com>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2021-01/msg00082.html,
- https://lists.gnu.org/archive/html/bug-bash/2021-04/msg00160.html
-
-Bug-Description:
-
-Fix two memory leaks when assigning arrays using compound assignment syntax.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/subst.c 2020-12-16 17:01:32.000000000 -0500
---- subst.c 2021-01-24 17:48:40.000000000 -0500
-***************
-*** 11674,11677 ****
---- 11674,11679 ----
-
- value = string_list (l);
-+ dispose_words (l);
-+
- wlen = STRLEN (value);
-
-*** ../bash-5.1-patched/arrayfunc.c 2020-12-16 17:01:32.000000000 -0500
---- arrayfunc.c 2021-04-19 16:43:09.000000000 -0400
-***************
-*** 565,574 ****
- WORD_LIST *list;
- char *akey, *aval, *k, *v;
-- int free_aval;
-
- for (list = nlist; list; list = list->next)
- {
-- free_aval = 0;
--
- k = list->word->word;
- v = list->next ? list->next->word->word : 0;
---- 565,571 ----
-***************
-*** 578,583 ****
-
- akey = expand_assignment_string_to_string (k, 0);
-- aval = expand_assignment_string_to_string (v, 0);
--
- if (akey == 0 || *akey == 0)
- {
---- 575,578 ----
-***************
-*** 586,599 ****
- continue;
- }
- if (aval == 0)
- {
- aval = (char *)xmalloc (1);
- aval[0] = '\0'; /* like do_assignment_internal */
-- free_aval = 1;
- }
-
- bind_assoc_var_internal (var, h, akey, aval, flags);
-! if (free_aval)
-! free (aval);
- }
- }
---- 581,594 ----
- continue;
- }
-+
-+ aval = expand_assignment_string_to_string (v, 0);
- if (aval == 0)
- {
- aval = (char *)xmalloc (1);
- aval[0] = '\0'; /* like do_assignment_internal */
- }
-
- bind_assoc_var_internal (var, h, akey, aval, flags);
-! free (aval);
- }
- }
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 4
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 5
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.1-patches/bash51-006 b/source/a/bash/bash-5.1-patches/bash51-006
deleted file mode 100644
index dcabf8113..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-006
+++ /dev/null
@@ -1,48 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-006
-
-Bug-Reported-by: oguzismailuysal@gmail.com
-Bug-Reference-ID: <CAH7i3LoY7C+pV_yG2LxwPNtAw3kiRkxmB4KcL1dTsih0u2BdKA@mail.gmail.com>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2020-12/msg00108.html
-
-Bug-Description:
-
-Make sure child processes forked to run command substitutions are in the
-proper process group.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/subst.c 2020-12-16 17:01:32.000000000 -0500
---- subst.c 2020-12-25 19:20:25.000000000 -0500
-***************
-*** 6413,6416 ****
---- 6413,6423 ----
- interactive = 0;
-
-+ #if defined (JOB_CONTROL)
-+ /* Invariant: in child processes started to run command substitutions,
-+ pipeline_pgrp == shell_pgrp. Other parts of the shell assume this. */
-+ if (pipeline_pgrp > 0 && pipeline_pgrp != shell_pgrp)
-+ shell_pgrp = pipeline_pgrp;
-+ #endif
-+
- set_sigint_handler (); /* XXX */
-
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 5
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 6
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.1-patches/bash51-007 b/source/a/bash/bash-5.1-patches/bash51-007
deleted file mode 100644
index ffd04fa43..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-007
+++ /dev/null
@@ -1,95 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-007
-
-Bug-Reported-by: Tom Tromey <tom@tromey.com>
-Bug-Reference-ID: <875z3u9fd0.fsf@tromey.com>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2021-01/msg00009.html
-
-Bug-Description:
-
-The code to check readline versions in an inputrc file had the sense of the
-comparisons reversed.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/lib/readline/bind.c 2020-10-26 10:03:14.000000000 -0400
---- lib/readline/bind.c 2021-01-18 16:38:48.000000000 -0500
-***************
-*** 1235,1239 ****
- else if (_rl_strnicmp (args, "version", 7) == 0)
- {
-! int rlversion, versionarg, op, previ, major, minor;
-
- _rl_parsing_conditionalized_out = 1;
---- 1235,1239 ----
- else if (_rl_strnicmp (args, "version", 7) == 0)
- {
-! int rlversion, versionarg, op, previ, major, minor, opresult;
-
- _rl_parsing_conditionalized_out = 1;
-***************
-*** 1295,1316 ****
- {
- case OP_EQ:
-! _rl_parsing_conditionalized_out = rlversion == versionarg;
- break;
- case OP_NE:
-! _rl_parsing_conditionalized_out = rlversion != versionarg;
- break;
- case OP_GT:
-! _rl_parsing_conditionalized_out = rlversion > versionarg;
- break;
- case OP_GE:
-! _rl_parsing_conditionalized_out = rlversion >= versionarg;
- break;
- case OP_LT:
-! _rl_parsing_conditionalized_out = rlversion < versionarg;
- break;
- case OP_LE:
-! _rl_parsing_conditionalized_out = rlversion <= versionarg;
- break;
- }
- }
- /* Check to see if the first word in ARGS is the same as the
---- 1295,1317 ----
- {
- case OP_EQ:
-! opresult = rlversion == versionarg;
- break;
- case OP_NE:
-! opresult = rlversion != versionarg;
- break;
- case OP_GT:
-! opresult = rlversion > versionarg;
- break;
- case OP_GE:
-! opresult = rlversion >= versionarg;
- break;
- case OP_LT:
-! opresult = rlversion < versionarg;
- break;
- case OP_LE:
-! opresult = rlversion <= versionarg;
- break;
- }
-+ _rl_parsing_conditionalized_out = 1 - opresult;
- }
- /* Check to see if the first word in ARGS is the same as the
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 6
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 7
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.1-patches/bash51-008 b/source/a/bash/bash-5.1-patches/bash51-008
deleted file mode 100644
index ece214f09..000000000
--- a/source/a/bash/bash-5.1-patches/bash51-008
+++ /dev/null
@@ -1,61 +0,0 @@
- BASH PATCH REPORT
- =================
-
-Bash-Release: 5.1
-Patch-ID: bash51-008
-
-Bug-Reported-by: Michael Felt <aixtools@gmail.com>
-Bug-Reference-ID: <b82d9a2f-5d8a-ffb2-4115-420c09272da5@felt.demon.nl>
-Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2021-03/msg00028.html
-
-Bug-Description:
-
-Process substitution FIFOs opened by child processes as targets of redirections
-were not removed appropriately, leaving remnants in the file system.
-
-Patch (apply with `patch -p0'):
-
-*** ../bash-5.1-patched/execute_cmd.c 2020-10-12 10:16:13.000000000 -0400
---- execute_cmd.c 2021-05-04 11:12:39.000000000 -0400
-***************
-*** 5557,5565 ****
- /* Try to remove named pipes that may have been created as the
- result of redirections. */
-! unlink_fifo_list ();
- #endif /* PROCESS_SUBSTITUTION */
- exit (EXECUTION_FAILURE);
- }
-
- if (async)
- interactive = old_interactive;
---- 5557,5571 ----
- /* Try to remove named pipes that may have been created as the
- result of redirections. */
-! unlink_all_fifos ();
- #endif /* PROCESS_SUBSTITUTION */
- exit (EXECUTION_FAILURE);
- }
-
-+ #if defined (PROCESS_SUBSTITUTION) && !defined (HAVE_DEV_FD)
-+ /* This should only contain FIFOs created as part of redirection
-+ expansion. */
-+ unlink_all_fifos ();
-+ #endif
-+
- if (async)
- interactive = old_interactive;
-*** ../bash-5.1/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
---- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
-***************
-*** 26,30 ****
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 7
-
- #endif /* _PATCHLEVEL_H_ */
---- 26,30 ----
- looks for to find the patch level (for the sccs version string). */
-
-! #define PATCHLEVEL 8
-
- #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-001 b/source/a/bash/bash-5.2-patches/bash52-001
new file mode 100644
index 000000000..83776ec76
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-001
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-001
+
+Bug-Reported-by: Emanuele Torre <torreemanuele6@gmail.com>
+Bug-Reference-ID: <CAA7hNqeR1eSdiGK8mjQSqJPo815JYoG-Ekz-5PrAJTEYy2e6hg@mail.gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00060.html
+
+Bug-Description:
+
+Expanding unset arrays in an arithmetic context can cause a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2/subst.c 2022-08-31 17:36:46.000000000 -0400
+--- subst.c 2022-09-30 09:12:05.000000000 -0400
+***************
+*** 10858,10862 ****
+ t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES));
+ free (exp);
+! exp = sh_backslash_quote (t, abstab, 0);
+ free (t);
+
+--- 10858,10862 ----
+ t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES));
+ free (exp);
+! exp = t ? sh_backslash_quote (t, abstab, 0) : savestring ("");
+ free (t);
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 0
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-002 b/source/a/bash/bash-5.2-patches/bash52-002
new file mode 100644
index 000000000..18229c996
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-002
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-002
+
+Bug-Reported-by: Kan-Ru Chen <koster@debian.org>
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1021109
+
+Bug-Description:
+
+Starting bash with an invalid locale specification for LC_ALL/LANG/LC_CTYPE
+can cause the shell to crash.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/lib/readline/nls.c 2022-08-15 09:38:51.000000000 -0400
+--- lib/readline/nls.c 2022-10-05 09:23:22.000000000 -0400
+***************
+*** 142,145 ****
+--- 142,149 ----
+ lspec = "";
+ ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
++ if (ret == 0 || *ret == 0)
++ ret = setlocale (LC_CTYPE, (char *)NULL);
++ if (ret == 0 || *ret == 0)
++ ret = RL_DEFAULT_LOCALE;
+ #else
+ ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 1
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-003 b/source/a/bash/bash-5.2-patches/bash52-003
new file mode 100644
index 000000000..b2dc4cbcc
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-003
@@ -0,0 +1,89 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-003
+
+Bug-Reported-by: D630 <d630@posteo.net>
+Bug-Reference-ID: <cf8523d58ac75b9ffba9519faa175618@posteo.de>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00092.html
+
+Bug-Description:
+
+Command substitutions need to preserve newlines instead of replacing them
+with semicolons, especially in the presence of multiple here-documents.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/print_cmd.c 2022-07-26 09:16:39.000000000 -0400
+--- print_cmd.c 2022-10-17 10:41:06.000000000 -0400
+***************
+*** 298,305 ****
+--- 298,307 ----
+ {
+ char c = command->value.Connection->connector;
++ int was_newline;
+
+ s[0] = printing_comsub ? c : ';';
+ s[1] = '\0';
+
++ was_newline = deferred_heredocs == 0 && was_heredoc == 0 && c == '\n';
+ if (deferred_heredocs == 0)
+ {
+***************
+*** 315,318 ****
+--- 317,322 ----
+ if (inside_function_def)
+ cprintf ("\n");
++ else if (printing_comsub && c == '\n' && was_newline == 0)
++ cprintf ("\n"); /* preserve newlines in comsubs but don't double them */
+ else
+ {
+***************
+*** 1366,1370 ****
+ }
+ else
+! newline ("}");
+
+ dispose_command (cmdcopy);
+--- 1371,1379 ----
+ }
+ else
+! {
+! /* { */
+! newline ("}");
+! was_heredoc = 0; /* not printing any here-documents now */
+! }
+
+ dispose_command (cmdcopy);
+***************
+*** 1443,1447 ****
+ }
+ else
+! newline ("}");
+
+ result = the_printed_command;
+--- 1452,1459 ----
+ }
+ else
+! { /* { */
+! newline ("}");
+! was_heredoc = 0;
+! }
+
+ result = the_printed_command;
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 2
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-004 b/source/a/bash/bash-5.2-patches/bash52-004
new file mode 100644
index 000000000..d0834c19c
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-004
@@ -0,0 +1,70 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-004
+
+Bug-Reported-by: Antoine <bug-bash@glitchimini.net>
+Bug-Reference-ID: <8bd59753-05ff-9b09-2337-2c7f52ded650@glitchimini.net>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00022.html
+
+Bug-Description:
+
+Bash needs to keep better track of nested brace expansions to avoid problems
+with quoting and POSIX semantics.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400
+--- subst.c 2022-10-06 15:19:08.000000000 -0400
+***************
+*** 1799,1802 ****
+--- 1804,1810 ----
+ }
+
++ #define PARAMEXPNEST_MAX 32 // for now
++ static int dbstate[PARAMEXPNEST_MAX];
++
+ /* Extract a parameter expansion expression within ${ and } from STRING.
+ Obey the Posix.2 rules for finding the ending `}': count braces while
+***************
+*** 1829,1832 ****
+--- 1837,1842 ----
+ return (extract_heredoc_dolbrace_string (string, sindex, quoted, flags));
+
++ dbstate[0] = dolbrace_state;
++
+ pass_character = 0;
+ nesting_level = 1;
+***************
+*** 1853,1856 ****
+--- 1863,1868 ----
+ if (string[i] == '$' && string[i+1] == LBRACE)
+ {
++ if (nesting_level < PARAMEXPNEST_MAX)
++ dbstate[nesting_level] = dolbrace_state;
+ nesting_level++;
+ i += 2;
+***************
+*** 1865,1868 ****
+--- 1877,1881 ----
+ if (nesting_level == 0)
+ break;
++ dolbrace_state = (nesting_level < PARAMEXPNEST_MAX) ? dbstate[nesting_level] : dbstate[0]; /* Guess using initial state */
+ i++;
+ continue;
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-005 b/source/a/bash/bash-5.2-patches/bash52-005
new file mode 100644
index 000000000..3f6a85215
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-005
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-005
+
+Bug-Reported-by: Justin Wood (Callek) <callek@gmail.com>
+Bug-Reference-ID: <CANBDKY9fp2yiXONP7RY4kNuRteuovUebxSJaqePHeu7cyaFS9Q@mail.gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00088.html
+
+Bug-Description:
+
+Null pattern substitution replacement strings can cause a crash.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/subst.c 2022-10-05 10:22:02.000000000 -0400
+--- subst.c 2022-10-13 16:57:26.000000000 -0400
+***************
+*** 8966,8970 ****
+ }
+ else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
+! return ((mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : savestring (rep));
+
+ ret = (char *)xmalloc (rsize = 64);
+--- 8966,8971 ----
+ }
+ else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
+! return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2)
+! : (rep ? savestring (rep) : savestring (""));
+
+ ret = (char *)xmalloc (rsize = 64);
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 4
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-006 b/source/a/bash/bash-5.2-patches/bash52-006
new file mode 100644
index 000000000..851cfd7b6
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-006
@@ -0,0 +1,293 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-006
+
+Bug-Reported-by: feng xiangjun <fengxj325@gmail.com>
+Bug-Reference-ID: <CAHH2t87LrCmO=gdyWOmGn5WJt7EucL+iOXzrry34OETe50S6uA@mail.gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00089.html
+
+Bug-Description:
+
+In interactive shells, interrupting the shell while entering a command
+substitution can inhibit alias expansion.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/parse.y 2022-10-08 13:10:06.000000000 -0400
+--- parse.y 2022-10-14 10:03:19.000000000 -0400
+***************
+*** 3307,3310 ****
+--- 3307,3312 ----
+ extended_glob = global_extglob;
+ #endif
++ if (parser_state & (PST_CMDSUBST|PST_STRING))
++ expand_aliases = expaliases_flag;
+
+ parser_state = 0;
+***************
+*** 4389,4392 ****
+--- 4391,4395 ----
+ parser_state |= PST_NOERROR;
+
++ parser_state |= PST_STRING;
+ expand_aliases = 0;
+
+***************
+*** 6402,6406 ****
+ parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
+ /* State flags we want to set for this run through the tokenizer. */
+! parser_state |= PST_COMPASSIGN|PST_REPARSE;
+ }
+
+--- 6405,6409 ----
+ parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
+ /* State flags we want to set for this run through the tokenizer. */
+! parser_state |= PST_COMPASSIGN|PST_REPARSE|PST_STRING;
+ }
+
+*** ../bash-20221007/parser.h 2022-08-30 11:39:56.000000000 -0400
+--- parser.h 2022-10-14 09:56:18.000000000 -0400
+***************
+*** 51,54 ****
+--- 51,55 ----
+ #define PST_NOEXPAND 0x400000 /* don't expand anything in read_token_word; for command substitution */
+ #define PST_NOERROR 0x800000 /* don't print error messages in yyerror */
++ #define PST_STRING 0x1000000 /* parsing a string to a command or word list */
+
+ /* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */
+*** ../bash-20221007/builtins/shopt.def 2022-10-07 10:25:55.000000000 -0400
+--- builtins/shopt.def 2022-10-14 09:30:11.000000000 -0400
+***************
+*** 150,153 ****
+--- 150,156 ----
+ #endif
+
++ int expaliases_flag = 0;
++ static int shopt_set_expaliases PARAMS((char *, int));
++
+ static int shopt_set_debug_mode PARAMS((char *, int));
+
+***************
+*** 199,203 ****
+ { "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
+ { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
+! { "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL },
+ #if defined (DEBUGGER)
+ { "extdebug", &debugging_mode, shopt_set_debug_mode },
+--- 202,206 ----
+ { "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
+ { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
+! { "expand_aliases", &expaliases_flag, shopt_set_expaliases },
+ #if defined (DEBUGGER)
+ { "extdebug", &debugging_mode, shopt_set_debug_mode },
+***************
+*** 351,355 ****
+ allow_null_glob_expansion = glob_dot_filenames = 0;
+ no_exit_on_failed_exec = 0;
+! expand_aliases = 0;
+ extended_quote = 1;
+ fail_glob_expansion = 0;
+--- 354,358 ----
+ allow_null_glob_expansion = glob_dot_filenames = 0;
+ no_exit_on_failed_exec = 0;
+! expand_aliases = expaliases_flag = 0;
+ extended_quote = 1;
+ fail_glob_expansion = 0;
+***************
+*** 632,635 ****
+--- 635,647 ----
+ }
+
++ static int
++ shopt_set_expaliases (option_name, mode)
++ char *option_name;
++ int mode;
++ {
++ expand_aliases = expaliases_flag;
++ return 0;
++ }
++
+ #if defined (READLINE)
+ static int
+*** ../bash-20221007/builtins/common.h 2022-10-07 10:10:17.000000000 -0400
+--- builtins/common.h 2022-10-14 09:29:25.000000000 -0400
+***************
+*** 258,261 ****
+--- 258,263 ----
+ #endif
+
++ extern int expaliases_flag;
++
+ /* variables from source.def */
+ extern int source_searches_cwd;
+*** ../bash-20221007/execute_cmd.c 2022-10-10 10:48:54.000000000 -0400
+--- execute_cmd.c 2022-10-14 09:32:24.000000000 -0400
+***************
+*** 1537,1541 ****
+ aliases. */
+ if (ois != interactive_shell)
+! expand_aliases = 0;
+ }
+
+--- 1537,1541 ----
+ aliases. */
+ if (ois != interactive_shell)
+! expand_aliases = expaliases_flag = 0;
+ }
+
+*** ../bash-20221007/general.c 2021-11-04 14:12:38.000000000 -0400
+--- general.c 2022-10-14 09:34:24.000000000 -0400
+***************
+*** 92,96 ****
+ &interactive_comments,
+ &source_uses_path,
+! &expand_aliases,
+ &inherit_errexit,
+ &print_shift_error,
+--- 92,96 ----
+ &interactive_comments,
+ &source_uses_path,
+! &expaliases_flag,
+ &inherit_errexit,
+ &print_shift_error,
+***************
+*** 107,111 ****
+ if (on != 0)
+ {
+! interactive_comments = source_uses_path = expand_aliases = 1;
+ inherit_errexit = 1;
+ source_searches_cwd = 0;
+--- 107,112 ----
+ if (on != 0)
+ {
+! interactive_comments = source_uses_path = 1;
+! expand_aliases = expaliases_flag = 1;
+ inherit_errexit = 1;
+ source_searches_cwd = 0;
+***************
+*** 117,120 ****
+--- 118,122 ----
+ {
+ set_posix_options (saved_posix_vars);
++ expand_aliases = expaliases_flag;
+ free (saved_posix_vars);
+ saved_posix_vars = 0;
+***************
+*** 123,127 ****
+ {
+ source_searches_cwd = 1;
+! expand_aliases = interactive_shell;
+ print_shift_error = 0;
+ }
+--- 125,129 ----
+ {
+ source_searches_cwd = 1;
+! expand_aliases = expaliases_flag = interactive_shell; /* XXX */
+ print_shift_error = 0;
+ }
+
+*** ../bash-5.2-patched/shell.c 2022-03-04 15:13:00.000000000 -0500
+--- shell.c 2022-10-14 09:36:19.000000000 -0400
+***************
+*** 1845,1850 ****
+ init_interactive ()
+ {
+! expand_aliases = interactive_shell = startup_state = 1;
+! interactive = 1;
+ #if defined (HISTORY)
+ if (enable_history_list == -1)
+--- 1845,1850 ----
+ init_interactive ()
+ {
+! expand_aliases = expaliases_flag = 1;
+! interactive_shell = startup_state = interactive = 1;
+ #if defined (HISTORY)
+ if (enable_history_list == -1)
+***************
+*** 1866,1870 ****
+ #endif /* HISTORY */
+ interactive_shell = startup_state = interactive = 0;
+! expand_aliases = posixly_correct; /* XXX - was 0 not posixly_correct */
+ no_line_editing = 1;
+ #if defined (JOB_CONTROL)
+--- 1866,1870 ----
+ #endif /* HISTORY */
+ interactive_shell = startup_state = interactive = 0;
+! expand_aliases = expaliases_flag = posixly_correct; /* XXX - was 0 not posixly_correct */
+ no_line_editing = 1;
+ #if defined (JOB_CONTROL)
+***************
+*** 1883,1887 ****
+ #endif
+ init_noninteractive ();
+! expand_aliases = interactive_shell = startup_state = 1;
+ #if defined (HISTORY)
+ remember_on_history = enable_history_list; /* XXX */
+--- 1883,1887 ----
+ #endif
+ init_noninteractive ();
+! expand_aliases = expaliases_flag = interactive_shell = startup_state = 1;
+ #if defined (HISTORY)
+ remember_on_history = enable_history_list; /* XXX */
+***************
+*** 2026,2030 ****
+ forced_interactive = interactive_shell = 0;
+ subshell_environment = running_in_background = 0;
+! expand_aliases = 0;
+ bash_argv_initialized = 0;
+
+--- 2026,2030 ----
+ forced_interactive = interactive_shell = 0;
+ subshell_environment = running_in_background = 0;
+! expand_aliases = expaliases_flag = 0;
+ bash_argv_initialized = 0;
+
+*** ../bash-5.2-patched/y.tab.c 2022-09-23 10:18:27.000000000 -0400
+--- y.tab.c 2022-10-14 14:57:26.000000000 -0400
+***************
+*** 5618,5621 ****
+--- 5618,5623 ----
+ extended_glob = global_extglob;
+ #endif
++ if (parser_state & (PST_CMDSUBST|PST_STRING))
++ expand_aliases = expaliases_flag;
+
+ parser_state = 0;
+***************
+*** 6700,6703 ****
+--- 6702,6706 ----
+ parser_state |= PST_NOERROR;
+
++ parser_state |= PST_STRING;
+ expand_aliases = 0;
+
+***************
+*** 8713,8717 ****
+ parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
+ /* State flags we want to set for this run through the tokenizer. */
+! parser_state |= PST_COMPASSIGN|PST_REPARSE;
+ }
+
+--- 8716,8720 ----
+ parser_state &= ~PST_NOEXPAND; /* parse_comsub sentinel */
+ /* State flags we want to set for this run through the tokenizer. */
+! parser_state |= PST_COMPASSIGN|PST_REPARSE|PST_STRING;
+ }
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 5
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-007 b/source/a/bash/bash-5.2-patches/bash52-007
new file mode 100644
index 000000000..152776f4b
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-007
@@ -0,0 +1,262 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-007
+
+Bug-Reported-by: Bruce Jerrick
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=2134307
+
+Bug-Description:
+
+This patch fixes several problems with alias expansion inside command
+substitutions when in POSIX mode.
+
+Patch (apply with `patch -p0'):
+
+*** /fs1/chet/scratch/bash-5.2.6/parse.y 2022-11-02 10:36:54.000000000 -0400
+--- parse.y 2022-10-24 10:53:26.000000000 -0400
+***************
+*** 3613,3616 ****
+--- 3614,3618 ----
+ #define P_ARRAYSUB 0x0020 /* parsing a [...] array subscript for assignment */
+ #define P_DOLBRACE 0x0040 /* parsing a ${...} construct */
++ #define P_ARITH 0x0080 /* parsing a $(( )) arithmetic expansion */
+
+ /* Lexical state while parsing a grouping construct or $(...). */
+***************
+*** 3911,3914 ****
+--- 3914,3920 ----
+ else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ goto parse_dollar_word;
++ else if ((flags & P_ARITH) && (tflags & LEX_WASDOL) && ch == '(') /*)*/
++ /* $() inside $(( ))/$[ ] */
++ goto parse_dollar_word;
+ #if defined (PROCESS_SUBSTITUTION)
+ /* XXX - technically this should only be recognized at the start of
+***************
+*** 3941,3945 ****
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
+ else if (ch == '[') /* ] */
+! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+--- 3947,3951 ----
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
+ else if (ch == '[') /* ] */
+! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags|P_ARITH);
+
+ CHECK_NESTRET_ERROR ();
+***************
+*** 4080,4084 ****
+ shell_ungetc (peekc);
+ if (peekc == '(') /*)*/
+! return (parse_matched_pair (qc, open, close, lenp, 0));
+ }
+
+--- 4086,4090 ----
+ shell_ungetc (peekc);
+ if (peekc == '(') /*)*/
+! return (parse_matched_pair (qc, open, close, lenp, P_ARITH));
+ }
+
+***************
+*** 4501,4505 ****
+
+ exp_lineno = line_number;
+! ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0);
+ rval = 1;
+ if (ttok == &matched_pair_error)
+--- 4512,4516 ----
+
+ exp_lineno = line_number;
+! ttok = parse_matched_pair (0, '(', ')', &ttoklen, P_ARITH);
+ rval = 1;
+ if (ttok == &matched_pair_error)
+***************
+*** 5016,5020 ****
+ }
+ else
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+--- 5030,5034 ----
+ }
+ else
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARITH);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+*** ../bash-5.2.6/y.tab.c 2022-11-02 10:36:54.000000000 -0400
+--- y.tab.c 2022-11-02 10:55:58.000000000 -0400
+***************
+*** 5924,5927 ****
+--- 5924,5928 ----
+ #define P_ARRAYSUB 0x0020 /* parsing a [...] array subscript for assignment */
+ #define P_DOLBRACE 0x0040 /* parsing a ${...} construct */
++ #define P_ARITH 0x0080 /* parsing a $(( )) arithmetic expansion */
+
+ /* Lexical state while parsing a grouping construct or $(...). */
+***************
+*** 6222,6225 ****
+--- 6223,6229 ----
+ else if ((flags & (P_ARRAYSUB|P_DOLBRACE)) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ goto parse_dollar_word;
++ else if ((flags & P_ARITH) && (tflags & LEX_WASDOL) && ch == '(') /*)*/
++ /* $() inside $(( ))/$[ ] */
++ goto parse_dollar_word;
+ #if defined (PROCESS_SUBSTITUTION)
+ /* XXX - technically this should only be recognized at the start of
+***************
+*** 6252,6256 ****
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
+ else if (ch == '[') /* ] */
+! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+--- 6256,6260 ----
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|P_DOLBRACE|rflags);
+ else if (ch == '[') /* ] */
+! nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags|P_ARITH);
+
+ CHECK_NESTRET_ERROR ();
+***************
+*** 6391,6395 ****
+ shell_ungetc (peekc);
+ if (peekc == '(') /*)*/
+! return (parse_matched_pair (qc, open, close, lenp, 0));
+ }
+
+--- 6395,6399 ----
+ shell_ungetc (peekc);
+ if (peekc == '(') /*)*/
+! return (parse_matched_pair (qc, open, close, lenp, P_ARITH));
+ }
+
+***************
+*** 6812,6816 ****
+
+ exp_lineno = line_number;
+! ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0);
+ rval = 1;
+ if (ttok == &matched_pair_error)
+--- 6816,6820 ----
+
+ exp_lineno = line_number;
+! ttok = parse_matched_pair (0, '(', ')', &ttoklen, P_ARITH);
+ rval = 1;
+ if (ttok == &matched_pair_error)
+***************
+*** 7327,7331 ****
+ }
+ else
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+--- 7331,7335 ----
+ }
+ else
+! ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARITH);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+*** /fs1/chet/scratch/bash-5.2.6/builtins/evalstring.c 2022-07-18 14:46:56.000000000 -0400
+--- builtins/evalstring.c 2022-10-18 10:57:51.000000000 -0400
+***************
+*** 432,435 ****
+--- 432,437 ----
+ if (parse_command () == 0)
+ {
++ int local_expalias, local_alflag;
++
+ if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute))
+ {
+***************
+*** 508,511 ****
+--- 510,526 ----
+ #endif /* ONESHOT */
+
++ /* We play tricks in the parser and command_substitute() turning
++ expand_aliases on and off depending on which parsing pass and
++ whether or not we're in posix mode. This only matters for
++ parsing, and we let the higher layers deal with that. We just
++ want to ensure that expand_aliases is set to the appropriate
++ global value when we go to execute this command, so we save
++ and restore it around the execution (we don't restore it if
++ the global value of the flag (expaliases_flag) changes). */
++ local_expalias = expand_aliases;
++ local_alflag = expaliases_flag;
++ if (subshell_environment & SUBSHELL_COMSUB)
++ expand_aliases = expaliases_flag;
++
+ /* See if this is a candidate for $( <file ). */
+ if (startup_state == 2 &&
+***************
+*** 525,528 ****
+--- 540,547 ----
+ discard_unwind_frame ("pe_dispose");
+
++ /* If the global value didn't change, we restore what we had. */
++ if ((subshell_environment & SUBSHELL_COMSUB) && local_alflag == expaliases_flag)
++ expand_aliases = local_expalias;
++
+ if (flags & SEVAL_ONECMD)
+ {
+*** /fs1/chet/scratch/bash-5.2.6/command.h 2021-04-30 15:43:15.000000000 -0400
+--- command.h 2022-10-18 11:44:31.000000000 -0400
+***************
+*** 115,118 ****
+--- 115,119 ----
+ #define PF_EXPANDRHS 0x20 /* same as W_EXPANDRHS */
+ #define PF_ALLINDS 0x40 /* array, act as if [@] was supplied */
++ #define PF_BACKQUOTE 0x80 /* differentiate `` from $() for command_substitute */
+
+ /* Possible values for subshell_environment */
+*** /fs1/chet/scratch/bash-5.2.6/subst.c 2022-11-02 10:28:10.000000000 -0400
+--- subst.c 2022-10-20 12:41:07.000000000 -0400
+***************
+*** 7124,7129 ****
+
+ /* We want to expand aliases on this pass if we are not in posix mode
+! for backwards compatibility. */
+! if (expand_aliases)
+ expand_aliases = posixly_correct == 0;
+
+--- 7133,7142 ----
+
+ /* We want to expand aliases on this pass if we are not in posix mode
+! for backwards compatibility. parse_and_execute() takes care of
+! setting expand_aliases back to the global value when executing the
+! parsed string. We only do this for $(...) command substitution,
+! since that is what parse_comsub handles; `` comsubs are processed
+! using parse.y:parse_matched_pair(). */
+! if (expand_aliases && (flags & PF_BACKQUOTE) == 0)
+ expand_aliases = posixly_correct == 0;
+
+***************
+*** 11293,11297 ****
+ {
+ de_backslash (temp);
+! tword = command_substitute (temp, quoted, 0);
+ temp1 = tword ? tword->word : (char *)NULL;
+ if (tword)
+--- 11306,11310 ----
+ {
+ de_backslash (temp);
+! tword = command_substitute (temp, quoted, PF_BACKQUOTE);
+ temp1 = tword ? tword->word : (char *)NULL;
+ if (tword)
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 6
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-008 b/source/a/bash/bash-5.2-patches/bash52-008
new file mode 100644
index 000000000..ff6371140
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-008
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-008
+
+Bug-Reported-by: Glenn Jackman <glenn.jackman@gmail.com>
+Bug-Reference-ID: <CAFC8ewQDx7hzNJzveuJ5o4FWo=ij7MzckiJVN_6NXjp504QZeg@mail.gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00095.html
+
+Bug-Description:
+
+Array subscript expansion can inappropriately quote brackets if the expression
+contains < or >.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-20221015/subst.c 2022-10-18 10:47:33.000000000 -0500
+--- subst.c 2022-10-20 11:41:07.000000000 -0500
+***************
+*** 3820,3823 ****
+--- 3820,3827 ----
+ #endif
+
++ /* We don't perform process substitution in arithmetic expressions, so don't
++ bother checking for it. */
++ #define ARITH_EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
++
+ /* If there are any characters in STRING that require full expansion,
+ then call FUNC to expand STRING; otherwise just perform quote
+***************
+*** 4029,4033 ****
+ while (string[i])
+ {
+! if (EXP_CHAR (string[i]))
+ break;
+ else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
+--- 4033,4037 ----
+ while (string[i])
+ {
+! if (ARITH_EXP_CHAR (string[i]))
+ break;
+ else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 7
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-009 b/source/a/bash/bash-5.2-patches/bash52-009
new file mode 100644
index 000000000..f907c8c47
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-009
@@ -0,0 +1,43 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-009
+
+Bug-Reported-by: Corey Hickey <bugfood-ml@fatooh.org>
+Bug-Reference-ID: <134330ef-0ead-d73e-68eb-d58fc51efdba@fatooh.org>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/help-bash/2022-10/msg00025.html
+
+Bug-Description:
+
+Bash arithmetic expansion should allow `@' and `*' to be used as associative
+array keys in expressions.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/expr.c 2022-07-11 10:03:34.000000000 -0400
+--- expr.c 2022-10-31 10:51:08.000000000 -0400
+***************
+*** 1169,1172 ****
+--- 1169,1174 ----
+ #if defined (ARRAY_VARS)
+ aflag = tflag; /* use a different variable for now */
++ if (shell_compatibility_level > 51)
++ aflag |= AV_ATSTARKEYS;
+ v = (e == ']') ? array_variable_part (tok, tflag, (char **)0, (int *)0) : find_variable (tok);
+ #else
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 8
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-010 b/source/a/bash/bash-5.2-patches/bash52-010
new file mode 100644
index 000000000..b58f4a86b
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-010
@@ -0,0 +1,71 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-010
+
+Bug-Reported-by: larsh@apache.org
+Bug-Reference-ID:
+Bug-Reference-URL: https://savannah.gnu.org/support/?110744
+
+Bug-Description:
+
+Bash-5.2 checks the first 128 characters of an executable file that execve()
+refuses to execute to see whether it's a binary file before trying to
+execute it as a shell script. This defeats some previously-supported use
+cases like "self-executing" jar files or "self-uncompressing" scripts.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/general.c 2022-11-07 10:31:42.000000000 -0500
+--- general.c 2022-11-18 14:48:45.000000000 -0500
+***************
+*** 684,687 ****
+--- 684,688 ----
+ {
+ register int i;
++ int nline;
+ unsigned char c;
+
+***************
+*** 690,702 ****
+
+ /* Generally we check the first line for NULs. If the first line looks like
+! a `#!' interpreter specifier, we just look for NULs anywhere in the
+! buffer. */
+! if (sample[0] == '#' && sample[1] == '!')
+! return (memchr (sample, '\0', sample_len) != NULL);
+
+ for (i = 0; i < sample_len; i++)
+ {
+ c = sample[i];
+! if (c == '\n')
+ return (0);
+ if (c == '\0')
+--- 691,701 ----
+
+ /* Generally we check the first line for NULs. If the first line looks like
+! a `#!' interpreter specifier, we look for NULs in the first two lines. */
+! nline = (sample[0] == '#' && sample[1] == '!') ? 2 : 1;
+
+ for (i = 0; i < sample_len; i++)
+ {
+ c = sample[i];
+! if (c == '\n' && --nline == 0)
+ return (0);
+ if (c == '\0')
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 9
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-011 b/source/a/bash/bash-5.2-patches/bash52-011
new file mode 100644
index 000000000..e65a50a2d
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-011
@@ -0,0 +1,45 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-011
+
+Bug-Reported-by: Fabien Orjollet <of1@disroot.org>
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1023776
+
+Bug-Description:
+
+Patch (apply with `patch -p0'):
+
+Using timeouts and readline editing with the `read' builtin (read -e -t) can
+leave the readline timeout enabled, potentially resulting in an erroneous
+timeout on the next call.
+
+*** ../bash-5.2-patched/builtins/read.def 2022-06-02 14:23:19.000000000 -0400
+--- builtins/read.def 2022-11-10 10:27:45.000000000 -0500
+***************
+*** 168,171 ****
+--- 168,174 ----
+ if (read_timeout)
+ shtimer_clear (read_timeout);
++ #if defined (READLINE)
++ rl_clear_timeout ();
++ #endif
+ read_timeout = 0;
+ }
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 10
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 11
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-012 b/source/a/bash/bash-5.2-patches/bash52-012
new file mode 100644
index 000000000..2791542c9
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-012
@@ -0,0 +1,344 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-012
+
+Bug-Reported-by: Kerin Millar <kfm@plushkava.net>
+Bug-Reference-ID: <20221002095107.89561bc811e549b55644df11@plushkava.net>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00001.html
+
+Bug-Description:
+
+When running in bash compatibility mode, nested command substitutions can
+leave the `extglob' option enabled.
+
+Patch (apply with `patch -p0'):
+
+*** /fs1/chet/scratch/bash-5.2.12/builtins/shopt.def 2022-11-07 10:31:42.000000000 -0500
+--- builtins/shopt.def 2022-10-14 09:30:11.000000000 -0400
+***************
+*** 150,153 ****
+--- 150,158 ----
+ #endif
+
++ #if defined (EXTENDED_GLOB)
++ int extglob_flag = EXTGLOB_DEFAULT;
++ static int shopt_set_extglob PARAMS((char *, int));
++ #endif
++
+ int expaliases_flag = 0;
+ static int shopt_set_expaliases PARAMS((char *, int));
+***************
+*** 207,211 ****
+ #endif
+ #if defined (EXTENDED_GLOB)
+! { "extglob", &extended_glob, (shopt_set_func_t *)NULL },
+ #endif
+ { "extquote", &extended_quote, (shopt_set_func_t *)NULL },
+--- 212,216 ----
+ #endif
+ #if defined (EXTENDED_GLOB)
+! { "extglob", &extglob_flag, shopt_set_extglob },
+ #endif
+ { "extquote", &extended_quote, (shopt_set_func_t *)NULL },
+***************
+*** 378,382 ****
+
+ #if defined (EXTENDED_GLOB)
+! extended_glob = EXTGLOB_DEFAULT;
+ #endif
+
+--- 383,387 ----
+
+ #if defined (EXTENDED_GLOB)
+! extended_glob = extglob_flag = EXTGLOB_DEFAULT;
+ #endif
+
+***************
+*** 644,647 ****
+--- 649,663 ----
+ }
+
++ #if defined (EXTENDED_GLOB)
++ static int
++ shopt_set_extglob (option_name, mode)
++ char *option_name;
++ int mode;
++ {
++ extended_glob = extglob_flag;
++ return 0;
++ }
++ #endif
++
+ #if defined (READLINE)
+ static int
+*** /fs1/chet/scratch/bash-5.2.12/builtins/common.h 2022-11-07 10:31:42.000000000 -0500
+--- builtins/common.h 2022-10-14 09:29:25.000000000 -0400
+***************
+*** 258,261 ****
+--- 258,265 ----
+ #endif
+
++ #if defined (EXTENDED_GLOB)
++ extern int extglob_flag;
++ #endif
++
+ extern int expaliases_flag;
+
+*** /fs1/chet/scratch/bash-5.2.12/execute_cmd.c 2022-11-07 10:31:42.000000000 -0500
+--- execute_cmd.c 2022-11-02 16:32:12.000000000 -0400
+***************
+*** 3991,4001 ****
+ #endif /* COND_REGEXP */
+ {
+- int oe;
+- oe = extended_glob;
+ extended_glob = 1;
+ result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
+ ? EXECUTION_SUCCESS
+ : EXECUTION_FAILURE;
+! extended_glob = oe;
+ }
+ if (arg1 != nullstr)
+--- 4015,4023 ----
+ #endif /* COND_REGEXP */
+ {
+ extended_glob = 1;
+ result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
+ ? EXECUTION_SUCCESS
+ : EXECUTION_FAILURE;
+! extended_glob = extglob_flag;
+ }
+ if (arg1 != nullstr)
+*** /fs1/chet/scratch/bash-5.2.9/parse.y 2022-11-07 10:31:47.000000000 -0500
+--- parse.y 2022-11-14 11:27:22.000000000 -0500
+***************
+*** 126,130 ****
+
+ #if defined (EXTENDED_GLOB)
+! extern int extended_glob;
+ #endif
+
+--- 126,130 ----
+
+ #if defined (EXTENDED_GLOB)
+! extern int extended_glob, extglob_flag;
+ #endif
+
+***************
+*** 3305,3309 ****
+ /* Reset to global value of extended glob */
+ if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
+! extended_glob = global_extglob;
+ #endif
+ if (parser_state & (PST_CMDSUBST|PST_STRING))
+--- 3321,3325 ----
+ /* Reset to global value of extended glob */
+ if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
+! extended_glob = extglob_flag;
+ #endif
+ if (parser_state & (PST_CMDSUBST|PST_STRING))
+***************
+*** 4125,4132 ****
+ #if defined (EXTENDED_GLOB)
+ /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
+! conditional command and have already set global_extglob appropriately. */
+ if (shell_compatibility_level <= 51 && was_extpat == 0)
+ {
+! local_extglob = global_extglob = extended_glob;
+ extended_glob = 1;
+ }
+--- 4143,4150 ----
+ #if defined (EXTENDED_GLOB)
+ /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
+! conditional command and have already set extended_glob appropriately. */
+ if (shell_compatibility_level <= 51 && was_extpat == 0)
+ {
+! local_extglob = extended_glob;
+ extended_glob = 1;
+ }
+***************
+*** 4236,4240 ****
+ sh_parser_state_t ps;
+ sh_input_line_state_t ls;
+! int orig_ind, nc, sflags, start_lineno;
+ char *ret, *ep, *ostring;
+
+--- 4256,4260 ----
+ sh_parser_state_t ps;
+ sh_input_line_state_t ls;
+! int orig_ind, nc, sflags, start_lineno, local_extglob;
+ char *ret, *ep, *ostring;
+
+***************
+*** 4279,4283 ****
+ expand_aliases = 0;
+ #if defined (EXTENDED_GLOB)
+! global_extglob = extended_glob; /* for reset_parser() */
+ #endif
+
+--- 4299,4303 ----
+ expand_aliases = 0;
+ #if defined (EXTENDED_GLOB)
+! local_extglob = extended_glob;
+ #endif
+
+***************
+*** 4297,4300 ****
+--- 4317,4323 ----
+ restore_parser_state (&ps);
+
++ #if defined (EXTENDED_GLOB)
++ extended_glob = local_extglob;
++ #endif
+ token_to_read = 0;
+
+***************
+*** 4732,4741 ****
+--- 4755,4768 ----
+
+ /* rhs */
++ #if defined (EXTENDED_GLOB)
+ local_extglob = extended_glob;
+ if (parser_state & PST_EXTPAT)
+ extended_glob = 1;
++ #endif
+ tok = read_token (READ);
++ #if defined (EXTENDED_GLOB)
+ if (parser_state & PST_EXTPAT)
+ extended_glob = local_extglob;
++ #endif
+ parser_state &= ~(PST_REGEXP|PST_EXTPAT);
+
+***************
+*** 4784,4788 ****
+ COND_COM *cexp;
+
+- global_extglob = extended_glob;
+ cexp = cond_expr ();
+ return (make_cond_command (cexp));
+--- 4811,4814 ----
+*** y.tab.c.save 2022-11-07 10:31:47.000000000 -0500
+--- y.tab.c 2022-11-18 15:58:03.000000000 -0500
+***************
+*** 176,180 ****
+
+ #if defined (EXTENDED_GLOB)
+! extern int extended_glob;
+ #endif
+
+--- 176,180 ----
+
+ #if defined (EXTENDED_GLOB)
+! extern int extended_glob, extglob_flag;
+ #endif
+
+***************
+*** 5616,5620 ****
+ /* Reset to global value of extended glob */
+ if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
+! extended_glob = global_extglob;
+ #endif
+ if (parser_state & (PST_CMDSUBST|PST_STRING))
+--- 5616,5620 ----
+ /* Reset to global value of extended glob */
+ if (parser_state & (PST_EXTPAT|PST_CMDSUBST))
+! extended_glob = extglob_flag;
+ #endif
+ if (parser_state & (PST_CMDSUBST|PST_STRING))
+***************
+*** 6436,6443 ****
+ #if defined (EXTENDED_GLOB)
+ /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
+! conditional command and have already set global_extglob appropriately. */
+ if (shell_compatibility_level <= 51 && was_extpat == 0)
+ {
+! local_extglob = global_extglob = extended_glob;
+ extended_glob = 1;
+ }
+--- 6436,6443 ----
+ #if defined (EXTENDED_GLOB)
+ /* If (parser_state & PST_EXTPAT), we're parsing an extended pattern for a
+! conditional command and have already set extended_glob appropriately. */
+ if (shell_compatibility_level <= 51 && was_extpat == 0)
+ {
+! local_extglob = extended_glob;
+ extended_glob = 1;
+ }
+***************
+*** 6547,6551 ****
+ sh_parser_state_t ps;
+ sh_input_line_state_t ls;
+! int orig_ind, nc, sflags, start_lineno;
+ char *ret, *ep, *ostring;
+
+--- 6547,6551 ----
+ sh_parser_state_t ps;
+ sh_input_line_state_t ls;
+! int orig_ind, nc, sflags, start_lineno, local_extglob;
+ char *ret, *ep, *ostring;
+
+***************
+*** 6590,6594 ****
+ expand_aliases = 0;
+ #if defined (EXTENDED_GLOB)
+! global_extglob = extended_glob; /* for reset_parser() */
+ #endif
+
+--- 6590,6594 ----
+ expand_aliases = 0;
+ #if defined (EXTENDED_GLOB)
+! local_extglob = extended_glob;
+ #endif
+
+***************
+*** 6608,6611 ****
+--- 6608,6614 ----
+ restore_parser_state (&ps);
+
++ #if defined (EXTENDED_GLOB)
++ extended_glob = local_extglob;
++ #endif
+ token_to_read = 0;
+
+***************
+*** 7043,7052 ****
+--- 7046,7059 ----
+
+ /* rhs */
++ #if defined (EXTENDED_GLOB)
+ local_extglob = extended_glob;
+ if (parser_state & PST_EXTPAT)
+ extended_glob = 1;
++ #endif
+ tok = read_token (READ);
++ #if defined (EXTENDED_GLOB)
+ if (parser_state & PST_EXTPAT)
+ extended_glob = local_extglob;
++ #endif
+ parser_state &= ~(PST_REGEXP|PST_EXTPAT);
+
+***************
+*** 7095,7099 ****
+ COND_COM *cexp;
+
+- global_extglob = extended_glob;
+ cexp = cond_expr ();
+ return (make_cond_command (cexp));
+--- 7102,7105 ----
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 11
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 12
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-013 b/source/a/bash/bash-5.2-patches/bash52-013
new file mode 100644
index 000000000..3051269c1
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-013
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-013
+
+Bug-Reported-by: Ralf Oehler <Ralf@Oehler-Privat.de>
+Bug-Reference-ID: <20221120140252.2fc6489b@bilbo>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00082.html
+
+Bug-Description:
+
+Bash can leak memory when referencing a non-existent associative array
+element.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/subst.c 2022-11-05 17:27:48.000000000 -0400
+--- subst.c 2022-11-21 14:42:59.000000000 -0500
+***************
+*** 7498,7503 ****
+ : quote_escapes (temp);
+ rflags |= W_ARRAYIND;
+- if (estatep)
+- *estatep = es; /* structure copy */
+ }
+ /* Note that array[*] and array[@] expanded to a quoted null string by
+--- 7508,7511 ----
+***************
+*** 7508,7512 ****
+ rflags |= W_HASQUOTEDNULL;
+
+! if (estatep == 0)
+ flush_eltstate (&es);
+ }
+--- 7516,7522 ----
+ rflags |= W_HASQUOTEDNULL;
+
+! if (estatep)
+! *estatep = es; /* structure copy */
+! else
+ flush_eltstate (&es);
+ }
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 12
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 13
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-014 b/source/a/bash/bash-5.2-patches/bash52-014
new file mode 100644
index 000000000..c6f3176bf
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-014
@@ -0,0 +1,119 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-014
+
+Bug-Reported-by: Andreas Schwab <schwab@suse.de>
+Bug-Reference-ID: <mvmv8opcbha.fsf@suse.de>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00076.html
+
+Bug-Description:
+
+Bash defers processing additional terminating signals when running the
+EXIT trap while exiting due to a terminating signal. This patch allows the
+new terminating signal to kill the shell immediately.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/execute_cmd.c 2022-11-23 17:09:18.000000000 -0500
+--- execute_cmd.c 2022-11-28 10:36:08.000000000 -0500
+***************
+*** 3625,3628 ****
+--- 3649,3653 ----
+
+ dispose_words (es);
++ QUIT;
+
+ if (match)
+*** ../bash-5.2-patched/sig.c 2021-11-04 14:15:31.000000000 -0400
+--- sig.c 2022-12-06 09:45:11.000000000 -0500
+***************
+*** 95,98 ****
+--- 95,99 ----
+
+ static void initialize_shell_signals PARAMS((void));
++ static void kill_shell PARAMS((int));
+
+ void
+***************
+*** 487,490 ****
+--- 495,500 ----
+ }
+
++ static int handling_termsig = 0;
++
+ sighandler
+ termsig_sighandler (sig)
+***************
+*** 533,536 ****
+--- 543,554 ----
+ terminate_immediately = 1;
+
++ /* If we are currently handling a terminating signal, we have a couple of
++ choices here. We can ignore this second terminating signal and let the
++ shell exit from the first one, or we can exit immediately by killing
++ the shell with this signal. This code implements the latter; to implement
++ the former, replace the kill_shell(sig) with return. */
++ if (handling_termsig)
++ kill_shell (sig); /* just short-circuit now */
++
+ terminating_signal = sig;
+
+***************
+*** 565,572 ****
+ int sig;
+ {
+- static int handling_termsig = 0;
+- int i, core;
+- sigset_t mask;
+-
+ /* Simple semaphore to keep this function from being executed multiple
+ times. Since we no longer are running as a signal handler, we don't
+--- 585,588 ----
+***************
+*** 574,578 ****
+ if (handling_termsig)
+ return;
+! handling_termsig = 1;
+ terminating_signal = 0; /* keep macro from re-testing true. */
+
+--- 590,595 ----
+ if (handling_termsig)
+ return;
+!
+! handling_termsig = terminating_signal; /* for termsig_sighandler */
+ terminating_signal = 0; /* keep macro from re-testing true. */
+
+***************
+*** 614,617 ****
+--- 631,644 ----
+ run_exit_trap (); /* XXX - run exit trap possibly in signal context? */
+
++ kill_shell (sig);
++ }
++
++ static void
++ kill_shell (sig)
++ int sig;
++ {
++ int i, core;
++ sigset_t mask;
++
+ /* We don't change the set of blocked signals. If a user starts the shell
+ with a terminating signal blocked, we won't get here (and if by some
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 13
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-015 b/source/a/bash/bash-5.2-patches/bash52-015
new file mode 100644
index 000000000..740a13da5
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-015
@@ -0,0 +1,216 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-015
+
+Bug-Reported-by: Frode Nordahl <frode.nordahl@canonical.com>
+Bug-Reference-ID: <20221119070714.351759-1-frode.nordahl@canonical.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-11/msg00078.html
+
+Bug-Description:
+
+There are several cases where bash is too aggressive when optimizing out forks
+in subshells. For example, `eval' and traps should never be optimized.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/builtins/common.h 2022-11-23 17:09:18.000000000 -0500
+--- builtins/common.h 2022-11-19 18:03:59.000000000 -0500
+***************
+*** 52,55 ****
+--- 52,56 ----
+ #define SEVAL_ONECMD 0x100 /* only allow a single command */
+ #define SEVAL_NOHISTEXP 0x200 /* inhibit history expansion */
++ #define SEVAL_NOOPTIMIZE 0x400 /* don't try to set optimization flags */
+
+ /* Flags for describe_command, shared between type.def and command.def */
+*** ../bash-5.2-patched/builtins/evalstring.c 2022-11-05 17:27:44.000000000 -0400
+--- builtins/evalstring.c 2022-11-19 18:23:21.000000000 -0500
+***************
+*** 133,138 ****
+ (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') &&
+ (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) &&
+! ((startup_state == 2 && should_suppress_fork (command->value.Connection->second)) ||
+! ((subshell_environment & SUBSHELL_PAREN) && should_optimize_fork (command->value.Connection->second, 0))))
+ {
+ command->value.Connection->second->flags |= CMD_NO_FORK;
+--- 133,138 ----
+ (command->value.Connection->connector == AND_AND || command->value.Connection->connector == OR_OR || command->value.Connection->connector == ';') &&
+ (command->value.Connection->second->flags & CMD_TRY_OPTIMIZING) &&
+! (should_suppress_fork (command->value.Connection->second) ||
+! ((subshell_environment & SUBSHELL_PAREN) && should_optimize_fork (command->value.Connection->second, 0))))
+ {
+ command->value.Connection->second->flags |= CMD_NO_FORK;
+***************
+*** 291,294 ****
+--- 291,295 ----
+ (flags & SEVAL_RESETLINE) -> reset line_number to 1
+ (flags & SEVAL_NOHISTEXP) -> history_expansion_inhibited -> 1
++ (flags & SEVAL_NOOPTIMIZE) -> don't try to turn on optimizing flags
+ */
+
+***************
+*** 503,507 ****
+ series of connection commands is
+ command->value.Connection->second. */
+! else if (command->type == cm_connection && can_optimize_connection (command))
+ {
+ command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING;
+--- 504,510 ----
+ series of connection commands is
+ command->value.Connection->second. */
+! else if (command->type == cm_connection &&
+! (flags & SEVAL_NOOPTIMIZE) == 0 &&
+! can_optimize_connection (command))
+ {
+ command->value.Connection->second->flags |= CMD_TRY_OPTIMIZING;
+*** ../bash-5.2-patched/builtins/eval.def 2016-01-25 13:28:37.000000000 -0500
+--- builtins/eval.def 2022-11-19 18:04:25.000000000 -0500
+***************
+*** 54,57 ****
+ list = loptend; /* skip over possible `--' */
+
+! return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
+ }
+--- 54,57 ----
+ list = loptend; /* skip over possible `--' */
+
+! return (list ? evalstring (string_list (list), "eval", SEVAL_NOHIST|SEVAL_NOOPTIMIZE) : EXECUTION_SUCCESS);
+ }
+*** ../bash-5.2-patched/trap.c 2022-08-10 08:59:45.000000000 -0400
+--- trap.c 2022-12-12 10:57:51.000000000 -0500
+***************
+*** 305,308 ****
+--- 305,309 ----
+ volatile int save_return_catch_flag, function_code;
+ procenv_t save_return_catch;
++ char *trap_command, *old_trap;
+ #if defined (ARRAY_VARS)
+ ARRAY *ps;
+***************
+*** 420,423 ****
+--- 421,427 ----
+ else
+ {
++ old_trap = trap_list[sig];
++ trap_command = savestring (old_trap);
++
+ save_parser_state (&pstate);
+ save_subst_varlist = subst_assign_varlist;
+***************
+*** 442,446 ****
+
+ if (function_code == 0)
+! x = parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+ else
+ {
+--- 446,451 ----
+
+ if (function_code == 0)
+! /* XXX is x always last_command_exit_value? */
+! x = parse_and_execute (trap_command, "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
+ else
+ {
+***************
+*** 1003,1007 ****
+ {
+ reset_parser ();
+! parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+ }
+ else if (code == ERREXIT)
+--- 1008,1012 ----
+ {
+ reset_parser ();
+! parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
+ }
+ else if (code == ERREXIT)
+***************
+*** 1110,1114 ****
+ }
+
+! flags = SEVAL_NONINT|SEVAL_NOHIST;
+ if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
+ flags |= SEVAL_RESETLINE;
+--- 1115,1119 ----
+ }
+
+! flags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE;
+ if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
+ flags |= SEVAL_RESETLINE;
+*** ../bash-5.2-patched/parse.y 2022-11-23 17:09:18.000000000 -0500
+--- parse.y 2022-11-19 18:15:34.000000000 -0500
+***************
+*** 2828,2832 ****
+ last_lastarg = savestring (last_lastarg);
+
+! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST);
+
+ restore_parser_state (&ps);
+--- 2844,2848 ----
+ last_lastarg = savestring (last_lastarg);
+
+! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE);
+
+ restore_parser_state (&ps);
+*** ../bash-5.2-patched/jobs.c 2022-07-18 10:19:56.000000000 -0400
+--- jobs.c 2022-11-19 18:10:24.000000000 -0500
+***************
+*** 4221,4225 ****
+ for (i = 0; i < nchild; i++)
+ {
+! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE);
+ }
+
+--- 4243,4247 ----
+ for (i = 0; i < nchild; i++)
+ {
+! parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE|SEVAL_NOOPTIMIZE);
+ }
+
+*** ../bash-5.2-patched/y.tab.c 2022-11-23 17:09:18.000000000 -0500
+--- y.tab.c 2022-11-23 17:21:17.000000000 -0500
+***************
+*** 5139,5143 ****
+ last_lastarg = savestring (last_lastarg);
+
+! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST);
+
+ restore_parser_state (&ps);
+--- 5154,5158 ----
+ last_lastarg = savestring (last_lastarg);
+
+! parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOOPTIMIZE);
+
+ restore_parser_state (&ps);
+*** ../bash-5.2-patched/execute_cmd.c 2022-11-05 17:27:41.000000000 -0400
+--- execute_cmd.c 2022-11-22 17:09:38.000000000 -0500
+***************
+*** 1655,1659 ****
+ and set CMD_TRY_OPTIMIZING for simple commands on the right side of an
+ and-or or `;' list to test for optimizing forks when they are executed. */
+! if (user_subshell && command->type == cm_subshell)
+ optimize_subshell_command (command->value.Subshell->command);
+
+--- 1665,1670 ----
+ and set CMD_TRY_OPTIMIZING for simple commands on the right side of an
+ and-or or `;' list to test for optimizing forks when they are executed. */
+! if (user_subshell && command->type == cm_subshell &&
+! (command->flags & (CMD_TIME_PIPELINE|CMD_INVERT_RETURN)) == 0)
+ optimize_subshell_command (command->value.Subshell->command);
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 14
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 15
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-016 b/source/a/bash/bash-5.2-patches/bash52-016
new file mode 100644
index 000000000..e9fbbef17
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-016
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-016
+
+Bug-Reported-by: F G <frank.graziano@gmail.com>
+Bug-Reference-ID: <CAOhYt35M5VctK+xAPu=Gy_UzzGmHedWPJE4q+kL4UHF_6Nb1kA@mail.gmail.com>
+Bug-Reference-URL:
+
+Bug-Description:
+
+If an expression in an arithmetic for loop expands to NULL, the shell
+would crash.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/execute_cmd.c Thu Feb 23 14:15:05 2023
+--- execute_cmd.c Mon Feb 27 17:53:08 2023
+***************
+*** 3051,3055 ****
+ if (l->next)
+ free (expr);
+! new = make_word_list (make_word (temp), (WORD_LIST *)NULL);
+ free (temp);
+
+--- 3051,3055 ----
+ if (l->next)
+ free (expr);
+! new = make_word_list (make_word (temp ? temp : ""), (WORD_LIST *)NULL);
+ free (temp);
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 15
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 16
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-017 b/source/a/bash/bash-5.2-patches/bash52-017
new file mode 100644
index 000000000..d28b504bf
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-017
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-017
+
+Bug-Reported-by: Dan Church <h3xx@gmx.com>
+Bug-Reference-ID: <1a8fd1d6-a3ac-9a67-78eb-b9a7435304c8@gmx.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-12/msg00076.html
+
+Bug-Description:
+
+In certain cases, using the `.' builtin in a subshell would optimize away
+the rest of the commands in the subshell.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/builtins/evalfile.c 2019-07-20 16:16:08.000000000 -0400
+--- builtins/evalfile.c 2022-12-22 12:13:08.000000000 -0500
+***************
+*** 267,271 ****
+
+ /* set the flags to be passed to parse_and_execute */
+! pflags = SEVAL_RESETLINE;
+ pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
+
+--- 267,271 ----
+
+ /* set the flags to be passed to parse_and_execute */
+! pflags = SEVAL_RESETLINE|SEVAL_NOOPTIMIZE;
+ pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 16
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 17
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-018 b/source/a/bash/bash-5.2-patches/bash52-018
new file mode 100644
index 000000000..d93f11281
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-018
@@ -0,0 +1,3643 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-018
+
+Bug-Reported-by: Todd Stein <toddbstein@gmail.com>
+ Eduardo A . Bustamante López <dualbus@gmail.com>
+Bug-Reference-ID:
+ <Y/SHWg7/+sc19k7P@system76-pc>
+Bug-Reference-URL: https://savannah.gnu.org/support/?110745
+ https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00141.html
+
+Bug-Description:
+
+There are two problems with returning tokens to yyparse() when the shell
+encounters a syntax error or when it reads EOF.
+
+When reading a WORD token, the parser has to return the correct value to
+yyparse. Previous versions returned a value < 0, which the bash parser
+translated into YYERRCODE for bison, and in newer versions of bison, the
+appropriate reset actions didn't happen. We should return YYUNDEF, which
+bison uses for `invalid token'. Since we can return a token < 0 for both
+invalid tokens and EOF, the bash tokenizer needs to differentiate between
+those two cases.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/parse.y 2022-12-13 12:09:02.000000000 -0500
+--- parse.y 2023-11-08 14:29:13.000000000 -0500
+***************
+*** 453,456 ****
+--- 453,471 ----
+ }
+ }
++ | error YYEOF
++ {
++ global_command = (COMMAND *)NULL;
++ if (last_command_exit_value == 0)
++ last_command_exit_value = EX_BADUSAGE; /* force error return */
++ if (interactive && parse_and_execute_level == 0)
++ {
++ handle_eof_input_unit ();
++ YYACCEPT;
++ }
++ else
++ {
++ YYABORT;
++ }
++ }
+ | yacc_EOF
+ {
+***************
+*** 2898,2904 ****
+ if (current_token < 0)
+ #if defined (YYERRCODE) && !defined (YYUNDEF)
+! current_token = YYERRCODE;
+ #else
+! current_token = YYerror;
+ #endif
+
+--- 2913,2919 ----
+ if (current_token < 0)
+ #if defined (YYERRCODE) && !defined (YYUNDEF)
+! current_token = EOF_Reached ? YYEOF : YYERRCODE;
+ #else
+! current_token = EOF_Reached ? YYEOF : YYUNDEF;
+ #endif
+
+***************
+*** 3695,3698 ****
+--- 3711,3715 ----
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
+ EOF_Reached = 1; /* XXX */
++ parser_state |= PST_NOERROR; /* avoid redundant error message */
+ return (&matched_pair_error);
+ }
+***************
+*** 4157,4160 ****
+--- 4172,4176 ----
+
+ /* yyparse() has already called yyerror() and reset_parser() */
++ parser_state |= PST_NOERROR;
+ return (&matched_pair_error);
+ }
+
+*** /Users/chet/src/bash/bash-5.2-patched/y.tab.c 2022-12-13 12:09:02.000000000 -0500
+--- y.tab.c 2023-11-08 14:38:01.000000000 -0500
+***************
+*** 993,997 ****
+
+ /* YYFINAL -- State number of the termination state. */
+! #define YYFINAL 121
+ /* YYLAST -- Last index in YYTABLE. */
+ #define YYLAST 740
+--- 993,997 ----
+
+ /* YYFINAL -- State number of the termination state. */
+! #define YYFINAL 122
+ /* YYLAST -- Last index in YYTABLE. */
+ #define YYLAST 740
+***************
+*** 1002,1008 ****
+ #define YYNNTS 38
+ /* YYNRULES -- Number of rules. */
+! #define YYNRULES 174
+ /* YYNSTATES -- Number of states. */
+! #define YYNSTATES 349
+
+ /* YYMAXUTOK -- Last valid token kind. */
+--- 1002,1008 ----
+ #define YYNNTS 38
+ /* YYNRULES -- Number of rules. */
+! #define YYNRULES 175
+ /* YYNSTATES -- Number of states. */
+! #define YYNSTATES 350
+
+ /* YYMAXUTOK -- Last valid token kind. */
+***************
+*** 1058,1079 ****
+ static const yytype_int16 yyrline[] =
+ {
+! 0, 395, 395, 406, 414, 423, 438, 455, 465, 467,
+! 471, 477, 483, 489, 495, 501, 507, 513, 519, 525,
+! 531, 537, 543, 549, 555, 561, 568, 575, 582, 589,
+! 596, 603, 609, 615, 621, 627, 633, 639, 645, 651,
+! 657, 663, 669, 675, 681, 687, 693, 699, 705, 711,
+! 717, 723, 729, 735, 743, 745, 747, 751, 755, 766,
+! 768, 772, 774, 776, 792, 794, 798, 800, 802, 804,
+! 806, 808, 810, 812, 814, 816, 818, 822, 827, 832,
+! 837, 842, 847, 852, 857, 864, 870, 876, 882, 890,
+! 895, 900, 905, 910, 915, 920, 925, 932, 937, 942,
+! 949, 951, 953, 955, 959, 961, 992, 999, 1003, 1009,
+! 1014, 1031, 1036, 1053, 1060, 1062, 1064, 1069, 1073, 1077,
+! 1081, 1083, 1085, 1089, 1090, 1094, 1096, 1098, 1100, 1104,
+! 1106, 1108, 1110, 1112, 1114, 1118, 1120, 1129, 1135, 1141,
+! 1142, 1149, 1153, 1155, 1157, 1164, 1166, 1173, 1177, 1178,
+! 1181, 1183, 1185, 1189, 1190, 1199, 1214, 1232, 1249, 1251,
+! 1253, 1260, 1263, 1267, 1269, 1275, 1281, 1301, 1324, 1326,
+! 1349, 1353, 1355, 1357, 1359
+ };
+ #endif
+--- 1058,1079 ----
+ static const yytype_int16 yyrline[] =
+ {
+! 0, 395, 395, 406, 414, 423, 438, 455, 470, 480,
+! 482, 486, 492, 498, 504, 510, 516, 522, 528, 534,
+! 540, 546, 552, 558, 564, 570, 576, 583, 590, 597,
+! 604, 611, 618, 624, 630, 636, 642, 648, 654, 660,
+! 666, 672, 678, 684, 690, 696, 702, 708, 714, 720,
+! 726, 732, 738, 744, 750, 758, 760, 762, 766, 770,
+! 781, 783, 787, 789, 791, 807, 809, 813, 815, 817,
+! 819, 821, 823, 825, 827, 829, 831, 833, 837, 842,
+! 847, 852, 857, 862, 867, 872, 879, 885, 891, 897,
+! 905, 910, 915, 920, 925, 930, 935, 940, 947, 952,
+! 957, 964, 966, 968, 970, 974, 976, 1007, 1014, 1018,
+! 1024, 1029, 1046, 1051, 1068, 1075, 1077, 1079, 1084, 1088,
+! 1092, 1096, 1098, 1100, 1104, 1105, 1109, 1111, 1113, 1115,
+! 1119, 1121, 1123, 1125, 1127, 1129, 1133, 1135, 1144, 1150,
+! 1156, 1157, 1164, 1168, 1170, 1172, 1179, 1181, 1188, 1192,
+! 1193, 1196, 1198, 1200, 1204, 1205, 1214, 1229, 1247, 1264,
+! 1266, 1268, 1275, 1278, 1282, 1284, 1290, 1296, 1316, 1339,
+! 1341, 1364, 1368, 1370, 1372, 1374
+ };
+ #endif
+***************
+*** 1120,1124 ****
+ #endif
+
+! #define YYPACT_NINF (-152)
+
+ #define yypact_value_is_default(Yyn) \
+--- 1120,1124 ----
+ #endif
+
+! #define YYPACT_NINF (-125)
+
+ #define yypact_value_is_default(Yyn) \
+***************
+*** 1134,1172 ****
+ static const yytype_int16 yypact[] =
+ {
+! 328, 80, -152, -11, -1, 3, -152, -152, 15, 637,
+! -5, 433, 149, -28, -152, 187, 684, -152, 18, 28,
+! 130, 38, 139, 50, 52, 60, 65, 74, -152, -152,
+! -152, 89, 104, -152, -152, 97, -152, -152, 246, -152,
+! 670, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+! -152, -152, -152, 146, 211, -152, 1, 433, -152, -152,
+! 135, 484, -152, 59, 61, 90, 167, 171, 10, 71,
+! 246, 670, 144, -152, -152, -152, -152, -152, 165, -152,
+! 142, 179, 192, 140, 194, 160, 227, 245, 252, 253,
+! 260, 261, 262, 162, 269, 178, 270, 272, 273, 274,
+! 277, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+! -152, -152, -152, -152, -152, 168, 379, -152, -152, 173,
+! 244, -152, -152, -152, -152, 670, -152, -152, -152, -152,
+! -152, 535, 535, -152, -152, -152, -152, -152, -152, -152,
+! 205, -152, 14, -152, 36, -152, -152, -152, -152, 84,
+! -152, -152, -152, 249, 670, -152, 670, 670, -152, -152,
+! -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+! -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+! -152, -152, -152, -152, -152, -152, -152, -152, -152, -152,
+! -152, -152, -152, -152, 484, 484, 203, 203, 586, 586,
+! 145, -152, -152, -152, -152, -152, -152, 0, -152, 119,
+! -152, 291, 248, 66, 88, -152, 119, -152, 296, 297,
+! 35, -152, 670, 670, 35, -152, -152, 1, 1, -152,
+! -152, -152, 306, 484, 484, 484, 484, 484, 305, 169,
+! -152, 7, -152, -152, 302, -152, 131, -152, 265, -152,
+! -152, -152, -152, -152, -152, 304, 131, -152, 266, -152,
+! -152, -152, 35, -152, 313, 317, -152, -152, -152, 225,
+! 225, 225, -152, -152, -152, -152, 206, 25, -152, -152,
+! 307, -42, 319, 276, -152, -152, -152, 95, -152, 322,
+! 283, 332, 284, -152, -152, 102, -152, -152, -152, -152,
+! -152, -152, -152, -152, 45, 323, -152, -152, -152, 106,
+! -152, -152, -152, -152, -152, -152, 109, -152, -152, 264,
+! -152, -152, -152, 484, -152, -152, 333, 293, -152, -152,
+! 338, 300, -152, -152, -152, 484, 345, 303, -152, -152,
+! 346, 309, -152, -152, -152, -152, -152, -152, -152
+ };
+
+--- 1134,1172 ----
+ static const yytype_int16 yypact[] =
+ {
+! 329, 27, -125, 8, 81, 10, -125, -125, 16, 38,
+! 0, 434, -5, -16, -125, 670, 684, -125, 33, 43,
+! 62, 63, 71, 69, 94, 105, 108, 116, -125, -125,
+! -125, 125, 139, -125, -125, 111, -125, -125, 626, -125,
+! 648, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+! -125, -125, -125, 5, -21, -125, -15, 434, -125, -125,
+! -125, 196, 485, -125, 157, 2, 180, 207, 222, 227,
+! 638, 626, 648, 224, -125, -125, -125, -125, -125, 219,
+! -125, 185, 223, 228, 140, 230, 161, 232, 233, 234,
+! 236, 241, 248, 249, 162, 250, 163, 251, 254, 256,
+! 257, 258, -125, -125, -125, -125, -125, -125, -125, -125,
+! -125, -125, -125, -125, -125, -125, 225, 380, -125, -125,
+! 229, 231, -125, -125, -125, -125, 648, -125, -125, -125,
+! -125, -125, 536, 536, -125, -125, -125, -125, -125, -125,
+! -125, 214, -125, -7, -125, 85, -125, -125, -125, -125,
+! 89, -125, -125, -125, 235, 648, -125, 648, 648, -125,
+! -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+! -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+! -125, -125, -125, -125, -125, -125, -125, -125, -125, -125,
+! -125, -125, -125, -125, -125, 485, 485, 138, 138, 587,
+! 587, 17, -125, -125, -125, -125, -125, -125, 88, -125,
+! 122, -125, 274, 238, 100, 101, -125, 122, -125, 276,
+! 278, 260, -125, 648, 648, 260, -125, -125, -15, -15,
+! -125, -125, -125, 287, 485, 485, 485, 485, 485, 290,
+! 164, -125, 26, -125, -125, 285, -125, 131, -125, 242,
+! -125, -125, -125, -125, -125, -125, 288, 131, -125, 243,
+! -125, -125, -125, 260, -125, 297, 302, -125, -125, -125,
+! 152, 152, 152, -125, -125, -125, -125, 170, 61, -125,
+! -125, 281, -36, 293, 252, -125, -125, -125, 102, -125,
+! 298, 255, 300, 262, -125, -125, 103, -125, -125, -125,
+! -125, -125, -125, -125, -125, -33, 296, -125, -125, -125,
+! 110, -125, -125, -125, -125, -125, -125, 112, -125, -125,
+! 189, -125, -125, -125, 485, -125, -125, 310, 267, -125,
+! -125, 314, 275, -125, -125, -125, 485, 318, 277, -125,
+! -125, 320, 279, -125, -125, -125, -125, -125, -125, -125
+ };
+
+***************
+*** 1176,1214 ****
+ static const yytype_uint8 yydefact[] =
+ {
+! 0, 0, 153, 0, 0, 0, 153, 153, 0, 0,
+! 0, 0, 171, 54, 55, 0, 0, 118, 0, 0,
+! 0, 0, 0, 0, 0, 0, 0, 0, 153, 4,
+! 7, 0, 0, 153, 153, 0, 56, 59, 61, 170,
+! 62, 66, 76, 70, 67, 64, 72, 3, 65, 71,
+! 73, 74, 75, 0, 155, 162, 163, 0, 5, 6,
+! 0, 0, 153, 153, 0, 153, 0, 0, 0, 54,
+! 113, 109, 0, 151, 150, 152, 167, 164, 172, 173,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+! 0, 16, 25, 40, 34, 49, 31, 43, 37, 46,
+! 28, 52, 53, 22, 19, 0, 0, 10, 11, 0,
+! 0, 1, 54, 60, 57, 63, 148, 149, 2, 153,
+! 153, 156, 157, 153, 153, 166, 165, 153, 154, 137,
+! 138, 147, 0, 153, 0, 153, 153, 153, 153, 0,
+! 153, 153, 153, 153, 104, 102, 111, 110, 119, 174,
+! 153, 18, 27, 42, 36, 51, 33, 45, 39, 48,
+! 30, 24, 21, 14, 15, 17, 26, 41, 35, 50,
+! 32, 44, 38, 47, 29, 23, 20, 12, 13, 107,
+! 108, 117, 106, 58, 0, 0, 160, 161, 0, 0,
+! 0, 153, 153, 153, 153, 153, 153, 0, 153, 0,
+! 153, 0, 0, 0, 0, 153, 0, 153, 0, 0,
+! 0, 153, 105, 112, 0, 158, 159, 169, 168, 153,
+! 153, 114, 0, 0, 0, 140, 141, 139, 0, 123,
+! 153, 0, 153, 153, 0, 8, 0, 153, 0, 87,
+! 88, 153, 153, 153, 153, 0, 0, 153, 0, 68,
+! 69, 103, 0, 100, 0, 0, 116, 142, 143, 144,
+! 145, 146, 99, 129, 131, 133, 124, 0, 97, 135,
+! 0, 0, 0, 0, 77, 9, 153, 0, 78, 0,
+! 0, 0, 0, 89, 153, 0, 90, 101, 115, 153,
+! 130, 132, 134, 98, 0, 0, 153, 79, 80, 0,
+! 153, 153, 85, 86, 91, 92, 0, 153, 153, 120,
+! 153, 136, 125, 126, 153, 153, 0, 0, 153, 153,
+! 0, 0, 153, 122, 127, 128, 0, 0, 83, 84,
+! 0, 0, 95, 96, 121, 81, 82, 93, 94
+ };
+
+--- 1176,1214 ----
+ static const yytype_uint8 yydefact[] =
+ {
+! 0, 0, 154, 0, 0, 0, 154, 154, 0, 0,
+! 0, 0, 172, 55, 56, 0, 0, 119, 0, 0,
+! 0, 0, 0, 0, 0, 0, 0, 0, 154, 4,
+! 8, 0, 0, 154, 154, 0, 57, 60, 62, 171,
+! 63, 67, 77, 71, 68, 65, 73, 3, 66, 72,
+! 74, 75, 76, 0, 156, 163, 164, 0, 7, 5,
+! 6, 0, 0, 154, 154, 0, 154, 0, 0, 0,
+! 55, 114, 110, 0, 152, 151, 153, 168, 165, 173,
+! 174, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+! 0, 0, 17, 26, 41, 35, 50, 32, 44, 38,
+! 47, 29, 53, 54, 23, 20, 0, 0, 11, 12,
+! 0, 0, 1, 55, 61, 58, 64, 149, 150, 2,
+! 154, 154, 157, 158, 154, 154, 167, 166, 154, 155,
+! 138, 139, 148, 0, 154, 0, 154, 154, 154, 154,
+! 0, 154, 154, 154, 154, 105, 103, 112, 111, 120,
+! 175, 154, 19, 28, 43, 37, 52, 34, 46, 40,
+! 49, 31, 25, 22, 15, 16, 18, 27, 42, 36,
+! 51, 33, 45, 39, 48, 30, 24, 21, 13, 14,
+! 108, 109, 118, 107, 59, 0, 0, 161, 162, 0,
+! 0, 0, 154, 154, 154, 154, 154, 154, 0, 154,
+! 0, 154, 0, 0, 0, 0, 154, 0, 154, 0,
+! 0, 0, 154, 106, 113, 0, 159, 160, 170, 169,
+! 154, 154, 115, 0, 0, 0, 141, 142, 140, 0,
+! 124, 154, 0, 154, 154, 0, 9, 0, 154, 0,
+! 88, 89, 154, 154, 154, 154, 0, 0, 154, 0,
+! 69, 70, 104, 0, 101, 0, 0, 117, 143, 144,
+! 145, 146, 147, 100, 130, 132, 134, 125, 0, 98,
+! 136, 0, 0, 0, 0, 78, 10, 154, 0, 79,
+! 0, 0, 0, 0, 90, 154, 0, 91, 102, 116,
+! 154, 131, 133, 135, 99, 0, 0, 154, 80, 81,
+! 0, 154, 154, 86, 87, 92, 93, 0, 154, 154,
+! 121, 154, 137, 126, 127, 154, 154, 0, 0, 154,
+! 154, 0, 0, 154, 123, 128, 129, 0, 0, 84,
+! 85, 0, 0, 96, 97, 122, 82, 83, 94, 95
+ };
+
+***************
+*** 1216,1223 ****
+ static const yytype_int16 yypgoto[] =
+ {
+! -152, -152, 112, -29, -14, -64, 360, -152, -8, -152,
+! -152, -152, -152, -152, -151, -152, -152, -152, -152, -152,
+! -152, -152, 13, -152, 136, -152, 98, -2, -152, 30,
+! -152, -54, -26, -152, -123, 6, 78, -152
+ };
+
+--- 1216,1223 ----
+ static const yytype_int16 yypgoto[] =
+ {
+! -125, -125, 126, -25, -28, -65, 335, -125, -8, -125,
+! -125, -125, -125, -125, -96, -125, -125, -125, -125, -125,
+! -125, -125, 28, -125, 109, -125, 68, -2, -125, -11,
+! -125, -54, -26, -125, -124, 6, 34, -125
+ };
+
+***************
+*** 1225,1232 ****
+ static const yytype_int16 yydefgoto[] =
+ {
+! 0, 35, 246, 36, 37, 125, 38, 39, 40, 41,
+! 42, 43, 44, 45, 155, 46, 47, 48, 49, 50,
+! 51, 52, 232, 238, 239, 240, 281, 120, 139, 140,
+! 128, 76, 61, 53, 54, 141, 56, 57
+ };
+
+--- 1225,1232 ----
+ static const yytype_int16 yydefgoto[] =
+ {
+! 0, 35, 247, 36, 37, 126, 38, 39, 40, 41,
+! 42, 43, 44, 45, 156, 46, 47, 48, 49, 50,
+! 51, 52, 233, 239, 240, 241, 282, 121, 140, 141,
+! 129, 77, 62, 53, 54, 142, 56, 57
+ };
+
+***************
+*** 1236,1390 ****
+ static const yytype_int16 yytable[] =
+ {
+! 60, 71, 116, 135, 66, 67, 55, 157, 196, 197,
+! 147, 124, 305, 2, 242, 62, 278, 77, 3, 306,
+! 4, 5, 6, 7, 123, 63, 115, 72, 10, 65,
+! 64, 119, 80, 279, 303, 206, 142, 144, 2, 149,
+! 17, 68, 124, 3, 101, 4, 5, 6, 7, 133,
+! 208, 279, 138, 10, 102, 134, 123, 209, 243, 138,
+! 154, 156, 152, 136, 106, 17, 138, 280, 33, 261,
+! 153, 225, 226, 263, 2, 145, 110, 138, 111, 3,
+! 251, 4, 5, 6, 7, 280, 112, 138, 138, 10,
+! 222, 113, 223, 33, 210, 34, 193, 121, 215, 305,
+! 114, 17, 253, 194, 195, 216, 320, 198, 199, 310,
+! 143, 297, 73, 74, 75, 117, 317, 207, 138, 146,
+! 324, 213, 214, 328, 252, 124, 220, 124, 193, 33,
+! 118, 34, 58, 59, 224, 200, 138, 55, 55, 137,
+! 138, 148, 217, 211, 212, 245, 254, 138, 218, 219,
+! 229, 230, 231, 311, 138, 247, 103, 285, 138, 104,
+! 318, 138, 257, 158, 325, 107, 163, 329, 108, 164,
+! 73, 74, 75, 78, 79, 233, 234, 235, 236, 237,
+! 241, 150, 73, 74, 75, 151, 167, 105, 177, 168,
+! 159, 178, 286, 193, 193, 262, 109, 165, 126, 127,
+! 55, 55, 294, 160, 181, 161, 244, 182, 248, 273,
+! 274, 275, 154, 255, 277, 258, 154, 169, 162, 179,
+! 166, 287, 81, 82, 83, 84, 85, 264, 265, 189,
+! 86, 295, 191, 87, 88, 183, 129, 130, 201, 202,
+! 282, 283, 89, 90, 129, 130, 300, 301, 302, 289,
+! 290, 291, 292, 170, 154, 203, 204, 205, 201, 202,
+! 309, 131, 132, 267, 268, 269, 270, 271, 316, 332,
+! 230, 171, 122, 14, 15, 16, 227, 228, 172, 173,
+! 323, 18, 19, 20, 21, 22, 174, 175, 176, 23,
+! 24, 25, 26, 27, 335, 180, 184, 319, 185, 186,
+! 187, 31, 32, 188, 322, 192, 249, 250, 326, 327,
+! 221, 259, 260, 266, 272, 330, 331, 284, 334, 293,
+! 298, 299, 336, 337, 288, 296, 340, 341, 256, 1,
+! 344, 2, 333, 279, 307, 308, 3, 312, 4, 5,
+! 6, 7, 313, 315, 8, 9, 10, 314, 338, 321,
+! 11, 12, 339, 342, 13, 14, 15, 16, 17, 343,
+! 345, 347, 346, 18, 19, 20, 21, 22, 348, 70,
+! 0, 23, 24, 25, 26, 27, 276, 28, 304, 0,
+! 29, 30, 2, 31, 32, 0, 33, 3, 34, 4,
+! 5, 6, 7, 0, 0, 8, 9, 10, 0, 0,
+! 0, 11, 12, 0, 0, 13, 14, 15, 16, 17,
+ 0, 0, 0, 0, 18, 19, 20, 21, 22, 0,
+! 0, 0, 23, 24, 25, 26, 27, 0, 0, 0,
+! 0, 138, 0, 0, 31, 32, 2, 33, 0, 34,
+! 190, 3, 0, 4, 5, 6, 7, 0, 0, 8,
+! 9, 10, 0, 0, 0, 11, 12, 0, 0, 13,
+! 14, 15, 16, 17, 0, 0, 0, 0, 18, 19,
+! 20, 21, 22, 0, 0, 0, 23, 24, 25, 26,
+! 27, 0, 0, 0, 73, 74, 75, 2, 31, 32,
+! 0, 33, 3, 34, 4, 5, 6, 7, 0, 0,
+ 8, 9, 10, 0, 0, 0, 11, 12, 0, 0,
+ 13, 14, 15, 16, 17, 0, 0, 0, 0, 18,
+ 19, 20, 21, 22, 0, 0, 0, 23, 24, 25,
+! 26, 27, 0, 0, 0, 0, 138, 0, 2, 31,
+ 32, 0, 33, 3, 34, 4, 5, 6, 7, 0,
+ 0, 8, 9, 10, 0, 0, 0, 11, 12, 0,
+ 0, 13, 14, 15, 16, 17, 0, 0, 0, 0,
+ 18, 19, 20, 21, 22, 0, 0, 0, 23, 24,
+! 25, 26, 27, 0, 0, 0, 0, 0, 0, 2,
+ 31, 32, 0, 33, 3, 34, 4, 5, 6, 7,
+! 0, 0, 8, 9, 10, 0, 0, 0, 0, 0,
+ 0, 0, 13, 14, 15, 16, 17, 0, 0, 0,
+ 0, 18, 19, 20, 21, 22, 0, 0, 0, 23,
+! 24, 25, 26, 27, 0, 0, 0, 0, 138, 0,
+ 2, 31, 32, 0, 33, 3, 34, 4, 5, 6,
+! 7, 0, 0, 0, 0, 10, 0, 0, 0, 0,
+! 0, 0, 0, 69, 14, 15, 16, 17, 0, 0,
+ 0, 0, 18, 19, 20, 21, 22, 0, 0, 0,
+! 23, 24, 25, 26, 27, 0, 0, 0, 0, 0,
+! 0, 0, 31, 32, 0, 33, 0, 34, 15, 16,
+! 0, 0, 0, 0, 0, 18, 19, 20, 21, 22,
+! 0, 0, 0, 23, 24, 25, 26, 27, 0, 91,
+! 92, 93, 94, 95, 0, 31, 32, 96, 0, 0,
+! 97, 98, 0, 0, 0, 0, 0, 0, 0, 99,
+! 100
+ };
+
+ static const yytype_int16 yycheck[] =
+ {
+! 2, 9, 28, 57, 6, 7, 0, 71, 131, 132,
+! 64, 40, 54, 3, 14, 26, 9, 11, 8, 61,
+! 10, 11, 12, 13, 38, 26, 28, 32, 18, 26,
+! 31, 33, 60, 26, 9, 21, 62, 63, 3, 65,
+! 30, 26, 71, 8, 26, 10, 11, 12, 13, 48,
+! 14, 26, 52, 18, 26, 54, 70, 21, 58, 52,
+! 68, 69, 52, 57, 26, 30, 52, 60, 58, 220,
+! 60, 194, 195, 224, 3, 14, 26, 52, 26, 8,
+! 14, 10, 11, 12, 13, 60, 26, 52, 52, 18,
+! 154, 26, 156, 58, 58, 60, 125, 0, 14, 54,
+! 26, 30, 14, 129, 130, 21, 61, 133, 134, 14,
+! 51, 262, 51, 52, 53, 26, 14, 143, 52, 58,
+! 14, 147, 148, 14, 58, 154, 152, 156, 157, 58,
+! 26, 60, 52, 53, 160, 137, 52, 131, 132, 4,
+! 52, 51, 58, 145, 146, 26, 58, 52, 150, 151,
+! 5, 6, 7, 58, 52, 209, 26, 26, 52, 29,
+! 58, 52, 216, 19, 58, 26, 26, 58, 29, 29,
+! 51, 52, 53, 24, 25, 201, 202, 203, 204, 205,
+! 206, 14, 51, 52, 53, 14, 26, 57, 26, 29,
+! 25, 29, 246, 222, 223, 221, 57, 57, 52, 53,
+! 194, 195, 256, 61, 26, 26, 208, 29, 210, 40,
+! 41, 42, 220, 215, 240, 217, 224, 57, 26, 57,
+! 26, 247, 35, 36, 37, 38, 39, 229, 230, 61,
+! 43, 257, 59, 46, 47, 57, 33, 34, 33, 34,
+! 242, 243, 55, 56, 33, 34, 40, 41, 42, 251,
+! 252, 253, 254, 26, 262, 50, 51, 52, 33, 34,
+! 286, 50, 51, 233, 234, 235, 236, 237, 294, 5,
+! 6, 26, 26, 27, 28, 29, 198, 199, 26, 26,
+! 306, 35, 36, 37, 38, 39, 26, 26, 26, 43,
+! 44, 45, 46, 47, 320, 26, 26, 299, 26, 26,
+! 26, 55, 56, 26, 306, 61, 15, 59, 310, 311,
+! 61, 15, 15, 7, 9, 317, 318, 15, 320, 15,
+! 7, 4, 324, 325, 59, 59, 328, 329, 216, 1,
+! 332, 3, 319, 26, 15, 59, 8, 15, 10, 11,
+! 12, 13, 59, 59, 16, 17, 18, 15, 15, 26,
+! 22, 23, 59, 15, 26, 27, 28, 29, 30, 59,
+! 15, 15, 59, 35, 36, 37, 38, 39, 59, 9,
+! -1, 43, 44, 45, 46, 47, 240, 49, 280, -1,
+! 52, 53, 3, 55, 56, -1, 58, 8, 60, 10,
+! 11, 12, 13, -1, -1, 16, 17, 18, -1, -1,
+! -1, 22, 23, -1, -1, 26, 27, 28, 29, 30,
+ -1, -1, -1, -1, 35, 36, 37, 38, 39, -1,
+! -1, -1, 43, 44, 45, 46, 47, -1, -1, -1,
+! -1, 52, -1, -1, 55, 56, 3, 58, -1, 60,
+! 61, 8, -1, 10, 11, 12, 13, -1, -1, 16,
+! 17, 18, -1, -1, -1, 22, 23, -1, -1, 26,
+! 27, 28, 29, 30, -1, -1, -1, -1, 35, 36,
+! 37, 38, 39, -1, -1, -1, 43, 44, 45, 46,
+! 47, -1, -1, -1, 51, 52, 53, 3, 55, 56,
+! -1, 58, 8, 60, 10, 11, 12, 13, -1, -1,
+ 16, 17, 18, -1, -1, -1, 22, 23, -1, -1,
+ 26, 27, 28, 29, 30, -1, -1, -1, -1, 35,
+ 36, 37, 38, 39, -1, -1, -1, 43, 44, 45,
+! 46, 47, -1, -1, -1, -1, 52, -1, 3, 55,
+ 56, -1, 58, 8, 60, 10, 11, 12, 13, -1,
+ -1, 16, 17, 18, -1, -1, -1, 22, 23, -1,
+ -1, 26, 27, 28, 29, 30, -1, -1, -1, -1,
+ 35, 36, 37, 38, 39, -1, -1, -1, 43, 44,
+! 45, 46, 47, -1, -1, -1, -1, -1, -1, 3,
+ 55, 56, -1, 58, 8, 60, 10, 11, 12, 13,
+! -1, -1, 16, 17, 18, -1, -1, -1, -1, -1,
+ -1, -1, 26, 27, 28, 29, 30, -1, -1, -1,
+ -1, 35, 36, 37, 38, 39, -1, -1, -1, 43,
+! 44, 45, 46, 47, -1, -1, -1, -1, 52, -1,
+ 3, 55, 56, -1, 58, 8, 60, 10, 11, 12,
+! 13, -1, -1, -1, -1, 18, -1, -1, -1, -1,
+ -1, -1, -1, 26, 27, 28, 29, 30, -1, -1,
+ -1, -1, 35, 36, 37, 38, 39, -1, -1, -1,
+! 43, 44, 45, 46, 47, -1, -1, -1, -1, -1,
+! -1, -1, 55, 56, -1, 58, -1, 60, 28, 29,
+! -1, -1, -1, -1, -1, 35, 36, 37, 38, 39,
+! -1, -1, -1, 43, 44, 45, 46, 47, -1, 35,
+ 36, 37, 38, 39, -1, 55, 56, 43, -1, -1,
+ 46, 47, -1, -1, -1, -1, -1, -1, -1, 55,
+--- 1236,1390 ----
+ static const yytype_int16 yytable[] =
+ {
+! 61, 72, 117, 136, 67, 68, 55, 158, 197, 198,
+! 124, 148, 130, 131, 207, 125, 146, 78, 306, 79,
+! 80, 306, 230, 231, 232, 307, 116, 58, 321, 132,
+! 133, 120, 73, 134, 63, 279, 66, 143, 145, 135,
+! 150, 2, 69, 124, 81, 139, 3, 125, 4, 5,
+! 6, 7, 280, 74, 75, 76, 10, 127, 128, 102,
+! 147, 155, 157, 137, 70, 14, 15, 16, 17, 103,
+! 304, 226, 227, 18, 19, 20, 21, 22, 139, 59,
+! 60, 23, 24, 25, 26, 27, 281, 280, 104, 107,
+! 223, 105, 224, 31, 32, 111, 33, 108, 34, 209,
+! 109, 194, 243, 216, 195, 196, 210, 64, 199, 200,
+! 217, 122, 65, 139, 252, 254, 311, 318, 208, 106,
+! 112, 281, 214, 215, 325, 262, 329, 221, 110, 264,
+! 125, 113, 125, 194, 114, 225, 201, 139, 55, 55,
+! 139, 139, 115, 211, 212, 213, 244, 218, 246, 219,
+! 220, 118, 139, 139, 139, 139, 248, 286, 253, 255,
+! 312, 319, 139, 258, 139, 119, 164, 298, 326, 165,
+! 330, 130, 131, 74, 75, 76, 234, 235, 236, 237,
+! 238, 242, 74, 75, 76, 202, 203, 168, 178, 182,
+! 169, 179, 183, 287, 333, 231, 263, 166, 194, 194,
+! 138, 55, 55, 295, 274, 275, 276, 245, 144, 249,
+! 301, 302, 303, 155, 256, 278, 259, 155, 170, 180,
+! 184, 151, 288, 268, 269, 270, 271, 272, 265, 266,
+! 2, 149, 296, 228, 229, 3, 152, 4, 5, 6,
+! 7, 283, 284, 159, 160, 10, 161, 202, 203, 162,
+! 290, 291, 292, 293, 163, 155, 167, 17, 171, 172,
+! 173, 310, 174, 2, 204, 205, 206, 175, 3, 317,
+! 4, 5, 6, 7, 176, 177, 181, 185, 10, 153,
+! 186, 324, 187, 188, 189, 33, 190, 154, 192, 250,
+! 17, 260, 193, 261, 267, 336, 222, 251, 320, 273,
+! 285, 289, 297, 294, 299, 323, 300, 280, 308, 327,
+! 328, 309, 139, 313, 314, 315, 331, 332, 33, 335,
+! 34, 316, 322, 337, 338, 339, 340, 341, 342, 343,
+! 1, 345, 2, 346, 344, 348, 347, 3, 349, 4,
+! 5, 6, 7, 257, 71, 8, 9, 10, 334, 305,
+! 277, 11, 12, 0, 0, 13, 14, 15, 16, 17,
+ 0, 0, 0, 0, 18, 19, 20, 21, 22, 0,
+! 0, 0, 23, 24, 25, 26, 27, 0, 28, 0,
+! 0, 29, 30, 2, 31, 32, 0, 33, 3, 34,
+! 4, 5, 6, 7, 0, 0, 8, 9, 10, 0,
+! 0, 0, 11, 12, 0, 0, 13, 14, 15, 16,
+! 17, 0, 0, 0, 0, 18, 19, 20, 21, 22,
+! 0, 0, 0, 23, 24, 25, 26, 27, 0, 0,
+! 0, 0, 139, 0, 0, 31, 32, 2, 33, 0,
+! 34, 191, 3, 0, 4, 5, 6, 7, 0, 0,
+ 8, 9, 10, 0, 0, 0, 11, 12, 0, 0,
+ 13, 14, 15, 16, 17, 0, 0, 0, 0, 18,
+ 19, 20, 21, 22, 0, 0, 0, 23, 24, 25,
+! 26, 27, 0, 0, 0, 74, 75, 76, 2, 31,
+ 32, 0, 33, 3, 34, 4, 5, 6, 7, 0,
+ 0, 8, 9, 10, 0, 0, 0, 11, 12, 0,
+ 0, 13, 14, 15, 16, 17, 0, 0, 0, 0,
+ 18, 19, 20, 21, 22, 0, 0, 0, 23, 24,
+! 25, 26, 27, 0, 0, 0, 0, 139, 0, 2,
+ 31, 32, 0, 33, 3, 34, 4, 5, 6, 7,
+! 0, 0, 8, 9, 10, 0, 0, 0, 11, 12,
+ 0, 0, 13, 14, 15, 16, 17, 0, 0, 0,
+ 0, 18, 19, 20, 21, 22, 0, 0, 0, 23,
+! 24, 25, 26, 27, 0, 0, 0, 0, 0, 0,
+ 2, 31, 32, 0, 33, 3, 34, 4, 5, 6,
+! 7, 0, 0, 8, 9, 10, 0, 0, 0, 0,
+! 0, 0, 0, 13, 14, 15, 16, 17, 0, 0,
+ 0, 0, 18, 19, 20, 21, 22, 0, 0, 0,
+! 23, 24, 25, 26, 27, 0, 0, 0, 0, 139,
+! 0, 2, 31, 32, 0, 33, 3, 34, 4, 5,
+! 6, 7, 123, 14, 15, 16, 10, 0, 0, 0,
+! 0, 18, 19, 20, 21, 22, 0, 0, 17, 23,
+! 24, 25, 26, 27, 0, 0, 15, 16, 0, 0,
+! 0, 31, 32, 18, 19, 20, 21, 22, 0, 0,
+! 0, 23, 24, 25, 26, 27, 33, 0, 34, 0,
+! 0, 0, 0, 31, 32, 82, 83, 84, 85, 86,
+! 0, 0, 0, 87, 0, 0, 88, 89, 0, 92,
+! 93, 94, 95, 96, 0, 90, 91, 97, 0, 0,
+! 98, 99, 0, 0, 0, 0, 0, 0, 0, 100,
+! 101
+ };
+
+ static const yytype_int16 yycheck[] =
+ {
+! 2, 9, 28, 57, 6, 7, 0, 72, 132, 133,
+! 38, 65, 33, 34, 21, 40, 14, 11, 54, 24,
+! 25, 54, 5, 6, 7, 61, 28, 0, 61, 50,
+! 51, 33, 32, 48, 26, 9, 26, 63, 64, 54,
+! 66, 3, 26, 71, 60, 52, 8, 72, 10, 11,
+! 12, 13, 26, 51, 52, 53, 18, 52, 53, 26,
+! 58, 69, 70, 57, 26, 27, 28, 29, 30, 26,
+! 9, 195, 196, 35, 36, 37, 38, 39, 52, 52,
+! 53, 43, 44, 45, 46, 47, 60, 26, 26, 26,
+! 155, 29, 157, 55, 56, 26, 58, 26, 60, 14,
+! 29, 126, 14, 14, 130, 131, 21, 26, 134, 135,
+! 21, 0, 31, 52, 14, 14, 14, 14, 144, 57,
+! 26, 60, 148, 149, 14, 221, 14, 153, 57, 225,
+! 155, 26, 157, 158, 26, 161, 138, 52, 132, 133,
+! 52, 52, 26, 58, 146, 147, 58, 58, 26, 151,
+! 152, 26, 52, 52, 52, 52, 210, 26, 58, 58,
+! 58, 58, 52, 217, 52, 26, 26, 263, 58, 29,
+! 58, 33, 34, 51, 52, 53, 202, 203, 204, 205,
+! 206, 207, 51, 52, 53, 33, 34, 26, 26, 26,
+! 29, 29, 29, 247, 5, 6, 222, 57, 223, 224,
+! 4, 195, 196, 257, 40, 41, 42, 209, 51, 211,
+! 40, 41, 42, 221, 216, 241, 218, 225, 57, 57,
+! 57, 14, 248, 234, 235, 236, 237, 238, 230, 231,
+! 3, 51, 258, 199, 200, 8, 14, 10, 11, 12,
+! 13, 243, 244, 19, 25, 18, 61, 33, 34, 26,
+! 252, 253, 254, 255, 26, 263, 26, 30, 26, 26,
+! 26, 287, 26, 3, 50, 51, 52, 26, 8, 295,
+! 10, 11, 12, 13, 26, 26, 26, 26, 18, 52,
+! 26, 307, 26, 26, 26, 58, 61, 60, 59, 15,
+! 30, 15, 61, 15, 7, 321, 61, 59, 300, 9,
+! 15, 59, 59, 15, 7, 307, 4, 26, 15, 311,
+! 312, 59, 52, 15, 59, 15, 318, 319, 58, 321,
+! 60, 59, 26, 325, 326, 15, 59, 329, 330, 15,
+! 1, 333, 3, 15, 59, 15, 59, 8, 59, 10,
+! 11, 12, 13, 217, 9, 16, 17, 18, 320, 281,
+! 241, 22, 23, -1, -1, 26, 27, 28, 29, 30,
+ -1, -1, -1, -1, 35, 36, 37, 38, 39, -1,
+! -1, -1, 43, 44, 45, 46, 47, -1, 49, -1,
+! -1, 52, 53, 3, 55, 56, -1, 58, 8, 60,
+! 10, 11, 12, 13, -1, -1, 16, 17, 18, -1,
+! -1, -1, 22, 23, -1, -1, 26, 27, 28, 29,
+! 30, -1, -1, -1, -1, 35, 36, 37, 38, 39,
+! -1, -1, -1, 43, 44, 45, 46, 47, -1, -1,
+! -1, -1, 52, -1, -1, 55, 56, 3, 58, -1,
+! 60, 61, 8, -1, 10, 11, 12, 13, -1, -1,
+ 16, 17, 18, -1, -1, -1, 22, 23, -1, -1,
+ 26, 27, 28, 29, 30, -1, -1, -1, -1, 35,
+ 36, 37, 38, 39, -1, -1, -1, 43, 44, 45,
+! 46, 47, -1, -1, -1, 51, 52, 53, 3, 55,
+ 56, -1, 58, 8, 60, 10, 11, 12, 13, -1,
+ -1, 16, 17, 18, -1, -1, -1, 22, 23, -1,
+ -1, 26, 27, 28, 29, 30, -1, -1, -1, -1,
+ 35, 36, 37, 38, 39, -1, -1, -1, 43, 44,
+! 45, 46, 47, -1, -1, -1, -1, 52, -1, 3,
+ 55, 56, -1, 58, 8, 60, 10, 11, 12, 13,
+! -1, -1, 16, 17, 18, -1, -1, -1, 22, 23,
+ -1, -1, 26, 27, 28, 29, 30, -1, -1, -1,
+ -1, 35, 36, 37, 38, 39, -1, -1, -1, 43,
+! 44, 45, 46, 47, -1, -1, -1, -1, -1, -1,
+ 3, 55, 56, -1, 58, 8, 60, 10, 11, 12,
+! 13, -1, -1, 16, 17, 18, -1, -1, -1, -1,
+ -1, -1, -1, 26, 27, 28, 29, 30, -1, -1,
+ -1, -1, 35, 36, 37, 38, 39, -1, -1, -1,
+! 43, 44, 45, 46, 47, -1, -1, -1, -1, 52,
+! -1, 3, 55, 56, -1, 58, 8, 60, 10, 11,
+! 12, 13, 26, 27, 28, 29, 18, -1, -1, -1,
+! -1, 35, 36, 37, 38, 39, -1, -1, 30, 43,
+! 44, 45, 46, 47, -1, -1, 28, 29, -1, -1,
+! -1, 55, 56, 35, 36, 37, 38, 39, -1, -1,
+! -1, 43, 44, 45, 46, 47, 58, -1, 60, -1,
+! -1, -1, -1, 55, 56, 35, 36, 37, 38, 39,
+! -1, -1, -1, 43, -1, -1, 46, 47, -1, 35,
+ 36, 37, 38, 39, -1, 55, 56, 43, -1, -1,
+ 46, 47, -1, -1, -1, -1, -1, -1, -1, 55,
+***************
+*** 1401,1434 ****
+ 53, 55, 56, 58, 60, 63, 65, 66, 68, 69,
+ 70, 71, 72, 73, 74, 75, 77, 78, 79, 80,
+! 81, 82, 83, 95, 96, 97, 98, 99, 52, 53,
+! 89, 94, 26, 26, 31, 26, 89, 89, 26, 26,
+! 68, 70, 32, 51, 52, 53, 93, 97, 24, 25,
+! 60, 35, 36, 37, 38, 39, 43, 46, 47, 55,
+! 56, 35, 36, 37, 38, 39, 43, 46, 47, 55,
+! 56, 26, 26, 26, 29, 57, 26, 26, 29, 57,
+! 26, 26, 26, 26, 26, 89, 94, 26, 26, 89,
+! 89, 0, 26, 66, 65, 67, 52, 53, 92, 33,
+! 34, 50, 51, 48, 54, 93, 97, 4, 52, 90,
+! 91, 97, 94, 51, 94, 14, 58, 93, 51, 94,
+! 14, 14, 52, 60, 70, 76, 70, 67, 19, 25,
+! 61, 26, 26, 26, 29, 57, 26, 26, 29, 57,
+! 26, 26, 26, 26, 26, 26, 26, 26, 29, 57,
+! 26, 26, 29, 57, 26, 26, 26, 26, 26, 61,
+! 61, 59, 61, 65, 94, 94, 96, 96, 94, 94,
+! 89, 33, 34, 50, 51, 52, 21, 94, 14, 21,
+! 58, 89, 89, 94, 94, 14, 21, 58, 89, 89,
+! 94, 61, 67, 67, 94, 96, 96, 98, 98, 5,
+! 6, 7, 84, 94, 94, 94, 94, 94, 85, 86,
+! 87, 94, 14, 58, 89, 26, 64, 93, 89, 15,
+! 59, 14, 58, 14, 58, 89, 64, 93, 89, 15,
+! 15, 76, 94, 76, 89, 89, 7, 91, 91, 91,
+! 91, 91, 9, 40, 41, 42, 86, 94, 9, 26,
+! 60, 88, 89, 89, 15, 26, 93, 94, 59, 89,
+! 89, 89, 89, 15, 93, 94, 59, 76, 7, 4,
+! 40, 41, 42, 9, 88, 54, 61, 15, 59, 94,
+! 14, 58, 15, 59, 15, 59, 94, 14, 58, 89,
+! 61, 26, 89, 94, 14, 58, 89, 89, 14, 58,
+! 89, 89, 5, 84, 89, 94, 89, 89, 15, 59,
+! 89, 89, 15, 59, 89, 15, 59, 15, 59
+ };
+
+--- 1401,1434 ----
+ 53, 55, 56, 58, 60, 63, 65, 66, 68, 69,
+ 70, 71, 72, 73, 74, 75, 77, 78, 79, 80,
+! 81, 82, 83, 95, 96, 97, 98, 99, 0, 52,
+! 53, 89, 94, 26, 26, 31, 26, 89, 89, 26,
+! 26, 68, 70, 32, 51, 52, 53, 93, 97, 24,
+! 25, 60, 35, 36, 37, 38, 39, 43, 46, 47,
+! 55, 56, 35, 36, 37, 38, 39, 43, 46, 47,
+! 55, 56, 26, 26, 26, 29, 57, 26, 26, 29,
+! 57, 26, 26, 26, 26, 26, 89, 94, 26, 26,
+! 89, 89, 0, 26, 66, 65, 67, 52, 53, 92,
+! 33, 34, 50, 51, 48, 54, 93, 97, 4, 52,
+! 90, 91, 97, 94, 51, 94, 14, 58, 93, 51,
+! 94, 14, 14, 52, 60, 70, 76, 70, 67, 19,
+! 25, 61, 26, 26, 26, 29, 57, 26, 26, 29,
+! 57, 26, 26, 26, 26, 26, 26, 26, 26, 29,
+! 57, 26, 26, 29, 57, 26, 26, 26, 26, 26,
+! 61, 61, 59, 61, 65, 94, 94, 96, 96, 94,
+! 94, 89, 33, 34, 50, 51, 52, 21, 94, 14,
+! 21, 58, 89, 89, 94, 94, 14, 21, 58, 89,
+! 89, 94, 61, 67, 67, 94, 96, 96, 98, 98,
+! 5, 6, 7, 84, 94, 94, 94, 94, 94, 85,
+! 86, 87, 94, 14, 58, 89, 26, 64, 93, 89,
+! 15, 59, 14, 58, 14, 58, 89, 64, 93, 89,
+! 15, 15, 76, 94, 76, 89, 89, 7, 91, 91,
+! 91, 91, 91, 9, 40, 41, 42, 86, 94, 9,
+! 26, 60, 88, 89, 89, 15, 26, 93, 94, 59,
+! 89, 89, 89, 89, 15, 93, 94, 59, 76, 7,
+! 4, 40, 41, 42, 9, 88, 54, 61, 15, 59,
+! 94, 14, 58, 15, 59, 15, 59, 94, 14, 58,
+! 89, 61, 26, 89, 94, 14, 58, 89, 89, 14,
+! 58, 89, 89, 5, 84, 89, 94, 89, 89, 15,
+! 59, 89, 89, 15, 59, 89, 15, 59, 15, 59
+ };
+
+***************
+*** 1436,1457 ****
+ static const yytype_int8 yyr1[] =
+ {
+! 0, 62, 63, 63, 63, 63, 63, 63, 64, 64,
+! 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+! 65, 65, 65, 65, 66, 66, 66, 67, 67, 68,
+! 68, 69, 69, 69, 69, 69, 70, 70, 70, 70,
+! 70, 70, 70, 70, 70, 70, 70, 71, 71, 71,
+! 71, 71, 71, 71, 71, 72, 72, 72, 72, 73,
+! 73, 73, 73, 73, 73, 73, 73, 74, 74, 74,
+! 75, 75, 75, 75, 76, 76, 77, 78, 78, 79,
+! 79, 79, 79, 79, 80, 80, 80, 81, 82, 83,
+! 84, 84, 84, 85, 85, 86, 86, 86, 86, 87,
+! 87, 87, 87, 87, 87, 88, 88, 89, 89, 90,
+! 90, 90, 91, 91, 91, 91, 91, 91, 92, 92,
+! 93, 93, 93, 94, 94, 95, 95, 95, 96, 96,
+! 96, 96, 96, 97, 97, 97, 97, 97, 98, 98,
+! 98, 99, 99, 99, 99
+ };
+
+--- 1436,1457 ----
+ static const yytype_int8 yyr1[] =
+ {
+! 0, 62, 63, 63, 63, 63, 63, 63, 63, 64,
+! 64, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65, 65, 65, 65, 65, 65,
+! 65, 65, 65, 65, 65, 66, 66, 66, 67, 67,
+! 68, 68, 69, 69, 69, 69, 69, 70, 70, 70,
+! 70, 70, 70, 70, 70, 70, 70, 70, 71, 71,
+! 71, 71, 71, 71, 71, 71, 72, 72, 72, 72,
+! 73, 73, 73, 73, 73, 73, 73, 73, 74, 74,
+! 74, 75, 75, 75, 75, 76, 76, 77, 78, 78,
+! 79, 79, 79, 79, 79, 80, 80, 80, 81, 82,
+! 83, 84, 84, 84, 85, 85, 86, 86, 86, 86,
+! 87, 87, 87, 87, 87, 87, 88, 88, 89, 89,
+! 90, 90, 90, 91, 91, 91, 91, 91, 91, 92,
+! 92, 93, 93, 93, 94, 94, 95, 95, 95, 96,
+! 96, 96, 96, 96, 97, 97, 97, 97, 97, 98,
+! 98, 98, 99, 99, 99, 99
+ };
+
+***************
+*** 1459,1480 ****
+ static const yytype_int8 yyr2[] =
+ {
+! 0, 2, 2, 1, 1, 2, 2, 1, 1, 2,
+! 2, 2, 3, 3, 3, 3, 2, 3, 3, 2,
+ 3, 3, 2, 3, 3, 2, 3, 3, 2, 3,
+ 3, 2, 3, 3, 2, 3, 3, 2, 3, 3,
+! 2, 3, 3, 2, 3, 3, 2, 3, 3, 2,
+! 3, 3, 2, 2, 1, 1, 1, 1, 2, 1,
+! 2, 1, 1, 2, 1, 1, 1, 1, 5, 5,
+! 1, 1, 1, 1, 1, 1, 1, 6, 6, 7,
+! 7, 10, 10, 9, 9, 7, 7, 5, 5, 6,
+! 6, 7, 7, 10, 10, 9, 9, 6, 7, 6,
+! 5, 6, 3, 5, 1, 2, 3, 3, 3, 2,
+! 3, 3, 4, 2, 5, 7, 6, 3, 1, 3,
+! 4, 6, 5, 1, 2, 4, 4, 5, 5, 2,
+! 3, 2, 3, 2, 3, 1, 3, 2, 2, 3,
+! 3, 3, 4, 4, 4, 4, 4, 1, 1, 1,
+! 1, 1, 1, 0, 2, 1, 2, 2, 4, 4,
+! 3, 3, 1, 1, 2, 2, 2, 2, 4, 4,
+! 1, 1, 2, 2, 3
+ };
+
+--- 1459,1480 ----
+ static const yytype_int8 yyr2[] =
+ {
+! 0, 2, 2, 1, 1, 2, 2, 2, 1, 1,
+! 2, 2, 2, 3, 3, 3, 3, 2, 3, 3,
+! 2, 3, 3, 2, 3, 3, 2, 3, 3, 2,
+ 3, 3, 2, 3, 3, 2, 3, 3, 2, 3,
+ 3, 2, 3, 3, 2, 3, 3, 2, 3, 3,
+! 2, 3, 3, 2, 2, 1, 1, 1, 1, 2,
+! 1, 2, 1, 1, 2, 1, 1, 1, 1, 5,
+! 5, 1, 1, 1, 1, 1, 1, 1, 6, 6,
+! 7, 7, 10, 10, 9, 9, 7, 7, 5, 5,
+! 6, 6, 7, 7, 10, 10, 9, 9, 6, 7,
+! 6, 5, 6, 3, 5, 1, 2, 3, 3, 3,
+! 2, 3, 3, 4, 2, 5, 7, 6, 3, 1,
+! 3, 4, 6, 5, 1, 2, 4, 4, 5, 5,
+! 2, 3, 2, 3, 2, 3, 1, 3, 2, 2,
+! 3, 3, 3, 4, 4, 4, 4, 4, 1, 1,
+! 1, 1, 1, 1, 0, 2, 1, 2, 2, 4,
+! 4, 3, 3, 1, 1, 2, 2, 2, 2, 4,
+! 4, 1, 1, 2, 2, 3
+ };
+
+***************
+*** 2019,2025 ****
+ break;
+
+! case 7: /* inputunit: yacc_EOF */
+ #line 456 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+ not. */
+--- 2019,2044 ----
+ break;
+
+! case 7: /* inputunit: error $end */
+ #line 456 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
++ global_command = (COMMAND *)NULL;
++ if (last_command_exit_value == 0)
++ last_command_exit_value = EX_BADUSAGE; /* force error return */
++ if (interactive && parse_and_execute_level == 0)
++ {
++ handle_eof_input_unit ();
++ YYACCEPT;
++ }
++ else
++ {
++ YYABORT;
++ }
++ }
++ #line 2038 "y.tab.c"
++ break;
++
++ case 8: /* inputunit: yacc_EOF */
++ #line 471 "/usr/local/src/chet/src/bash/src/parse.y"
++ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+ not. */
+***************
+*** 2028,2048 ****
+ YYACCEPT;
+ }
+! #line 2031 "y.tab.c"
+ break;
+
+! case 8: /* word_list: WORD */
+! #line 466 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (WORD_LIST *)NULL); }
+! #line 2037 "y.tab.c"
+ break;
+
+! case 9: /* word_list: word_list WORD */
+! #line 468 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (yyvsp[-1].word_list)); }
+! #line 2043 "y.tab.c"
+ break;
+
+! case 10: /* redirection: '>' WORD */
+! #line 472 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2047,2067 ----
+ YYACCEPT;
+ }
+! #line 2050 "y.tab.c"
+ break;
+
+! case 9: /* word_list: WORD */
+! #line 481 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (WORD_LIST *)NULL); }
+! #line 2056 "y.tab.c"
+ break;
+
+! case 10: /* word_list: word_list WORD */
+! #line 483 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (yyvsp[-1].word_list)); }
+! #line 2062 "y.tab.c"
+ break;
+
+! case 11: /* redirection: '>' WORD */
+! #line 487 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2050,2058 ****
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, 0);
+ }
+! #line 2053 "y.tab.c"
+ break;
+
+! case 11: /* redirection: '<' WORD */
+! #line 478 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2069,2077 ----
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, 0);
+ }
+! #line 2072 "y.tab.c"
+ break;
+
+! case 12: /* redirection: '<' WORD */
+! #line 493 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2060,2068 ****
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, 0);
+ }
+! #line 2063 "y.tab.c"
+ break;
+
+! case 12: /* redirection: NUMBER '>' WORD */
+! #line 484 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2079,2087 ----
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, 0);
+ }
+! #line 2082 "y.tab.c"
+ break;
+
+! case 13: /* redirection: NUMBER '>' WORD */
+! #line 499 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2070,2078 ****
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, 0);
+ }
+! #line 2073 "y.tab.c"
+ break;
+
+! case 13: /* redirection: NUMBER '<' WORD */
+! #line 490 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2089,2097 ----
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, 0);
+ }
+! #line 2092 "y.tab.c"
+ break;
+
+! case 14: /* redirection: NUMBER '<' WORD */
+! #line 505 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2080,2088 ****
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, 0);
+ }
+! #line 2083 "y.tab.c"
+ break;
+
+! case 14: /* redirection: REDIR_WORD '>' WORD */
+! #line 496 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2099,2107 ----
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, 0);
+ }
+! #line 2102 "y.tab.c"
+ break;
+
+! case 15: /* redirection: REDIR_WORD '>' WORD */
+! #line 511 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2090,2098 ****
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, REDIR_VARASSIGN);
+ }
+! #line 2093 "y.tab.c"
+ break;
+
+! case 15: /* redirection: REDIR_WORD '<' WORD */
+! #line 502 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2109,2117 ----
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, REDIR_VARASSIGN);
+ }
+! #line 2112 "y.tab.c"
+ break;
+
+! case 16: /* redirection: REDIR_WORD '<' WORD */
+! #line 517 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2100,2108 ****
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, REDIR_VARASSIGN);
+ }
+! #line 2103 "y.tab.c"
+ break;
+
+! case 16: /* redirection: GREATER_GREATER WORD */
+! #line 508 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2119,2127 ----
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, REDIR_VARASSIGN);
+ }
+! #line 2122 "y.tab.c"
+ break;
+
+! case 17: /* redirection: GREATER_GREATER WORD */
+! #line 523 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2110,2118 ****
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, 0);
+ }
+! #line 2113 "y.tab.c"
+ break;
+
+! case 17: /* redirection: NUMBER GREATER_GREATER WORD */
+! #line 514 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2129,2137 ----
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, 0);
+ }
+! #line 2132 "y.tab.c"
+ break;
+
+! case 18: /* redirection: NUMBER GREATER_GREATER WORD */
+! #line 529 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2120,2128 ****
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, 0);
+ }
+! #line 2123 "y.tab.c"
+ break;
+
+! case 18: /* redirection: REDIR_WORD GREATER_GREATER WORD */
+! #line 520 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2139,2147 ----
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, 0);
+ }
+! #line 2142 "y.tab.c"
+ break;
+
+! case 19: /* redirection: REDIR_WORD GREATER_GREATER WORD */
+! #line 535 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2130,2138 ****
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, REDIR_VARASSIGN);
+ }
+! #line 2133 "y.tab.c"
+ break;
+
+! case 19: /* redirection: GREATER_BAR WORD */
+! #line 526 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2149,2157 ----
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, REDIR_VARASSIGN);
+ }
+! #line 2152 "y.tab.c"
+ break;
+
+! case 20: /* redirection: GREATER_BAR WORD */
+! #line 541 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2140,2148 ****
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, 0);
+ }
+! #line 2143 "y.tab.c"
+ break;
+
+! case 20: /* redirection: NUMBER GREATER_BAR WORD */
+! #line 532 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2159,2167 ----
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, 0);
+ }
+! #line 2162 "y.tab.c"
+ break;
+
+! case 21: /* redirection: NUMBER GREATER_BAR WORD */
+! #line 547 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2150,2158 ****
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, 0);
+ }
+! #line 2153 "y.tab.c"
+ break;
+
+! case 21: /* redirection: REDIR_WORD GREATER_BAR WORD */
+! #line 538 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2169,2177 ----
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, 0);
+ }
+! #line 2172 "y.tab.c"
+ break;
+
+! case 22: /* redirection: REDIR_WORD GREATER_BAR WORD */
+! #line 553 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2160,2168 ****
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, REDIR_VARASSIGN);
+ }
+! #line 2163 "y.tab.c"
+ break;
+
+! case 22: /* redirection: LESS_GREATER WORD */
+! #line 544 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2179,2187 ----
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, REDIR_VARASSIGN);
+ }
+! #line 2182 "y.tab.c"
+ break;
+
+! case 23: /* redirection: LESS_GREATER WORD */
+! #line 559 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2170,2178 ****
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, 0);
+ }
+! #line 2173 "y.tab.c"
+ break;
+
+! case 23: /* redirection: NUMBER LESS_GREATER WORD */
+! #line 550 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2189,2197 ----
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, 0);
+ }
+! #line 2192 "y.tab.c"
+ break;
+
+! case 24: /* redirection: NUMBER LESS_GREATER WORD */
+! #line 565 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2180,2188 ****
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, 0);
+ }
+! #line 2183 "y.tab.c"
+ break;
+
+! case 24: /* redirection: REDIR_WORD LESS_GREATER WORD */
+! #line 556 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2199,2207 ----
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, 0);
+ }
+! #line 2202 "y.tab.c"
+ break;
+
+! case 25: /* redirection: REDIR_WORD LESS_GREATER WORD */
+! #line 571 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2190,2198 ****
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, REDIR_VARASSIGN);
+ }
+! #line 2193 "y.tab.c"
+ break;
+
+! case 25: /* redirection: LESS_LESS WORD */
+! #line 562 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2209,2217 ----
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, REDIR_VARASSIGN);
+ }
+! #line 2212 "y.tab.c"
+ break;
+
+! case 26: /* redirection: LESS_LESS WORD */
+! #line 577 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2201,2209 ****
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2204 "y.tab.c"
+ break;
+
+! case 26: /* redirection: NUMBER LESS_LESS WORD */
+! #line 569 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2220,2228 ----
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2223 "y.tab.c"
+ break;
+
+! case 27: /* redirection: NUMBER LESS_LESS WORD */
+! #line 584 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2212,2220 ****
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2215 "y.tab.c"
+ break;
+
+! case 27: /* redirection: REDIR_WORD LESS_LESS WORD */
+! #line 576 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2231,2239 ----
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2234 "y.tab.c"
+ break;
+
+! case 28: /* redirection: REDIR_WORD LESS_LESS WORD */
+! #line 591 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2223,2231 ****
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2226 "y.tab.c"
+ break;
+
+! case 28: /* redirection: LESS_LESS_MINUS WORD */
+! #line 583 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2242,2250 ----
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2245 "y.tab.c"
+ break;
+
+! case 29: /* redirection: LESS_LESS_MINUS WORD */
+! #line 598 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2234,2242 ****
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2237 "y.tab.c"
+ break;
+
+! case 29: /* redirection: NUMBER LESS_LESS_MINUS WORD */
+! #line 590 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2253,2261 ----
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2256 "y.tab.c"
+ break;
+
+! case 30: /* redirection: NUMBER LESS_LESS_MINUS WORD */
+! #line 605 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2245,2253 ****
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2248 "y.tab.c"
+ break;
+
+! case 30: /* redirection: REDIR_WORD LESS_LESS_MINUS WORD */
+! #line 597 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2264,2272 ----
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2267 "y.tab.c"
+ break;
+
+! case 31: /* redirection: REDIR_WORD LESS_LESS_MINUS WORD */
+! #line 612 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2256,2264 ****
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2259 "y.tab.c"
+ break;
+
+! case 31: /* redirection: LESS_LESS_LESS WORD */
+! #line 604 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2275,2283 ----
+ push_heredoc ((yyval.redirect));
+ }
+! #line 2278 "y.tab.c"
+ break;
+
+! case 32: /* redirection: LESS_LESS_LESS WORD */
+! #line 619 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2266,2274 ****
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, 0);
+ }
+! #line 2269 "y.tab.c"
+ break;
+
+! case 32: /* redirection: NUMBER LESS_LESS_LESS WORD */
+! #line 610 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2285,2293 ----
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, 0);
+ }
+! #line 2288 "y.tab.c"
+ break;
+
+! case 33: /* redirection: NUMBER LESS_LESS_LESS WORD */
+! #line 625 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2276,2284 ****
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, 0);
+ }
+! #line 2279 "y.tab.c"
+ break;
+
+! case 33: /* redirection: REDIR_WORD LESS_LESS_LESS WORD */
+! #line 616 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2295,2303 ----
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, 0);
+ }
+! #line 2298 "y.tab.c"
+ break;
+
+! case 34: /* redirection: REDIR_WORD LESS_LESS_LESS WORD */
+! #line 631 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2286,2294 ****
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, REDIR_VARASSIGN);
+ }
+! #line 2289 "y.tab.c"
+ break;
+
+! case 34: /* redirection: LESS_AND NUMBER */
+! #line 622 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2305,2313 ----
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, REDIR_VARASSIGN);
+ }
+! #line 2308 "y.tab.c"
+ break;
+
+! case 35: /* redirection: LESS_AND NUMBER */
+! #line 637 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2296,2304 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+! #line 2299 "y.tab.c"
+ break;
+
+! case 35: /* redirection: NUMBER LESS_AND NUMBER */
+! #line 628 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2315,2323 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+! #line 2318 "y.tab.c"
+ break;
+
+! case 36: /* redirection: NUMBER LESS_AND NUMBER */
+! #line 643 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2306,2314 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+! #line 2309 "y.tab.c"
+ break;
+
+! case 36: /* redirection: REDIR_WORD LESS_AND NUMBER */
+! #line 634 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2325,2333 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+! #line 2328 "y.tab.c"
+ break;
+
+! case 37: /* redirection: REDIR_WORD LESS_AND NUMBER */
+! #line 649 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2316,2324 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, REDIR_VARASSIGN);
+ }
+! #line 2319 "y.tab.c"
+ break;
+
+! case 37: /* redirection: GREATER_AND NUMBER */
+! #line 640 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2335,2343 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, REDIR_VARASSIGN);
+ }
+! #line 2338 "y.tab.c"
+ break;
+
+! case 38: /* redirection: GREATER_AND NUMBER */
+! #line 655 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2326,2334 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+! #line 2329 "y.tab.c"
+ break;
+
+! case 38: /* redirection: NUMBER GREATER_AND NUMBER */
+! #line 646 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2345,2353 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+! #line 2348 "y.tab.c"
+ break;
+
+! case 39: /* redirection: NUMBER GREATER_AND NUMBER */
+! #line 661 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2336,2344 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+! #line 2339 "y.tab.c"
+ break;
+
+! case 39: /* redirection: REDIR_WORD GREATER_AND NUMBER */
+! #line 652 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2355,2363 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+! #line 2358 "y.tab.c"
+ break;
+
+! case 40: /* redirection: REDIR_WORD GREATER_AND NUMBER */
+! #line 667 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2346,2354 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, REDIR_VARASSIGN);
+ }
+! #line 2349 "y.tab.c"
+ break;
+
+! case 40: /* redirection: LESS_AND WORD */
+! #line 658 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2365,2373 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, REDIR_VARASSIGN);
+ }
+! #line 2368 "y.tab.c"
+ break;
+
+! case 41: /* redirection: LESS_AND WORD */
+! #line 673 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2356,2364 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+! #line 2359 "y.tab.c"
+ break;
+
+! case 41: /* redirection: NUMBER LESS_AND WORD */
+! #line 664 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2375,2383 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+! #line 2378 "y.tab.c"
+ break;
+
+! case 42: /* redirection: NUMBER LESS_AND WORD */
+! #line 679 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2366,2374 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+! #line 2369 "y.tab.c"
+ break;
+
+! case 42: /* redirection: REDIR_WORD LESS_AND WORD */
+! #line 670 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2385,2393 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+! #line 2388 "y.tab.c"
+ break;
+
+! case 43: /* redirection: REDIR_WORD LESS_AND WORD */
+! #line 685 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2376,2384 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, REDIR_VARASSIGN);
+ }
+! #line 2379 "y.tab.c"
+ break;
+
+! case 43: /* redirection: GREATER_AND WORD */
+! #line 676 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2395,2403 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, REDIR_VARASSIGN);
+ }
+! #line 2398 "y.tab.c"
+ break;
+
+! case 44: /* redirection: GREATER_AND WORD */
+! #line 691 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2386,2394 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+! #line 2389 "y.tab.c"
+ break;
+
+! case 44: /* redirection: NUMBER GREATER_AND WORD */
+! #line 682 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2405,2413 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+! #line 2408 "y.tab.c"
+ break;
+
+! case 45: /* redirection: NUMBER GREATER_AND WORD */
+! #line 697 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2396,2404 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+! #line 2399 "y.tab.c"
+ break;
+
+! case 45: /* redirection: REDIR_WORD GREATER_AND WORD */
+! #line 688 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2415,2423 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+! #line 2418 "y.tab.c"
+ break;
+
+! case 46: /* redirection: REDIR_WORD GREATER_AND WORD */
+! #line 703 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2406,2414 ****
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, REDIR_VARASSIGN);
+ }
+! #line 2409 "y.tab.c"
+ break;
+
+! case 46: /* redirection: GREATER_AND '-' */
+! #line 694 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2425,2433 ----
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, REDIR_VARASSIGN);
+ }
+! #line 2428 "y.tab.c"
+ break;
+
+! case 47: /* redirection: GREATER_AND '-' */
+! #line 709 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2416,2424 ****
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2419 "y.tab.c"
+ break;
+
+! case 47: /* redirection: NUMBER GREATER_AND '-' */
+! #line 700 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2435,2443 ----
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2438 "y.tab.c"
+ break;
+
+! case 48: /* redirection: NUMBER GREATER_AND '-' */
+! #line 715 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2426,2434 ****
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2429 "y.tab.c"
+ break;
+
+! case 48: /* redirection: REDIR_WORD GREATER_AND '-' */
+! #line 706 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2445,2453 ----
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2448 "y.tab.c"
+ break;
+
+! case 49: /* redirection: REDIR_WORD GREATER_AND '-' */
+! #line 721 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2436,2444 ****
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+! #line 2439 "y.tab.c"
+ break;
+
+! case 49: /* redirection: LESS_AND '-' */
+! #line 712 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2455,2463 ----
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+! #line 2458 "y.tab.c"
+ break;
+
+! case 50: /* redirection: LESS_AND '-' */
+! #line 727 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2446,2454 ****
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2449 "y.tab.c"
+ break;
+
+! case 50: /* redirection: NUMBER LESS_AND '-' */
+! #line 718 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+--- 2465,2473 ----
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2468 "y.tab.c"
+ break;
+
+! case 51: /* redirection: NUMBER LESS_AND '-' */
+! #line 733 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[-2].number);
+***************
+*** 2456,2464 ****
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2459 "y.tab.c"
+ break;
+
+! case 51: /* redirection: REDIR_WORD LESS_AND '-' */
+! #line 724 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+--- 2475,2483 ----
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+! #line 2478 "y.tab.c"
+ break;
+
+! case 52: /* redirection: REDIR_WORD LESS_AND '-' */
+! #line 739 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[-2].word);
+***************
+*** 2466,2474 ****
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+! #line 2469 "y.tab.c"
+ break;
+
+! case 52: /* redirection: AND_GREATER WORD */
+! #line 730 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2485,2493 ----
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+! #line 2488 "y.tab.c"
+ break;
+
+! case 53: /* redirection: AND_GREATER WORD */
+! #line 745 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2476,2484 ****
+ (yyval.redirect) = make_redirection (source, r_err_and_out, redir, 0);
+ }
+! #line 2479 "y.tab.c"
+ break;
+
+! case 53: /* redirection: AND_GREATER_GREATER WORD */
+! #line 736 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2495,2503 ----
+ (yyval.redirect) = make_redirection (source, r_err_and_out, redir, 0);
+ }
+! #line 2498 "y.tab.c"
+ break;
+
+! case 54: /* redirection: AND_GREATER_GREATER WORD */
+! #line 751 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2486,2520 ****
+ (yyval.redirect) = make_redirection (source, r_append_err_and_out, redir, 0);
+ }
+! #line 2489 "y.tab.c"
+ break;
+
+! case 54: /* simple_command_element: WORD */
+! #line 744 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[0].word); (yyval.element).redirect = 0; }
+! #line 2495 "y.tab.c"
+ break;
+
+! case 55: /* simple_command_element: ASSIGNMENT_WORD */
+! #line 746 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[0].word); (yyval.element).redirect = 0; }
+! #line 2501 "y.tab.c"
+ break;
+
+! case 56: /* simple_command_element: redirection */
+! #line 748 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.element).redirect = (yyvsp[0].redirect); (yyval.element).word = 0; }
+! #line 2507 "y.tab.c"
+ break;
+
+! case 57: /* redirection_list: redirection */
+! #line 752 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.redirect) = (yyvsp[0].redirect);
+ }
+! #line 2515 "y.tab.c"
+ break;
+
+! case 58: /* redirection_list: redirection_list redirection */
+! #line 756 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ register REDIRECT *t;
+--- 2505,2539 ----
+ (yyval.redirect) = make_redirection (source, r_append_err_and_out, redir, 0);
+ }
+! #line 2508 "y.tab.c"
+ break;
+
+! case 55: /* simple_command_element: WORD */
+! #line 759 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[0].word); (yyval.element).redirect = 0; }
+! #line 2514 "y.tab.c"
+ break;
+
+! case 56: /* simple_command_element: ASSIGNMENT_WORD */
+! #line 761 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[0].word); (yyval.element).redirect = 0; }
+! #line 2520 "y.tab.c"
+ break;
+
+! case 57: /* simple_command_element: redirection */
+! #line 763 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.element).redirect = (yyvsp[0].redirect); (yyval.element).word = 0; }
+! #line 2526 "y.tab.c"
+ break;
+
+! case 58: /* redirection_list: redirection */
+! #line 767 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.redirect) = (yyvsp[0].redirect);
+ }
+! #line 2534 "y.tab.c"
+ break;
+
+! case 59: /* redirection_list: redirection_list redirection */
+! #line 771 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ register REDIRECT *t;
+***************
+*** 2525,2557 ****
+ (yyval.redirect) = (yyvsp[-1].redirect);
+ }
+! #line 2528 "y.tab.c"
+ break;
+
+! case 59: /* simple_command: simple_command_element */
+! #line 767 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[0].element), (COMMAND *)NULL); }
+! #line 2534 "y.tab.c"
+ break;
+
+! case 60: /* simple_command: simple_command simple_command_element */
+! #line 769 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[0].element), (yyvsp[-1].command)); }
+! #line 2540 "y.tab.c"
+ break;
+
+! case 61: /* command: simple_command */
+! #line 773 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = clean_simple_command ((yyvsp[0].command)); }
+! #line 2546 "y.tab.c"
+ break;
+
+! case 62: /* command: shell_command */
+! #line 775 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2552 "y.tab.c"
+ break;
+
+! case 63: /* command: shell_command redirection_list */
+! #line 777 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2544,2576 ----
+ (yyval.redirect) = (yyvsp[-1].redirect);
+ }
+! #line 2547 "y.tab.c"
+ break;
+
+! case 60: /* simple_command: simple_command_element */
+! #line 782 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[0].element), (COMMAND *)NULL); }
+! #line 2553 "y.tab.c"
+ break;
+
+! case 61: /* simple_command: simple_command simple_command_element */
+! #line 784 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[0].element), (yyvsp[-1].command)); }
+! #line 2559 "y.tab.c"
+ break;
+
+! case 62: /* command: simple_command */
+! #line 788 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = clean_simple_command ((yyvsp[0].command)); }
+! #line 2565 "y.tab.c"
+ break;
+
+! case 63: /* command: shell_command */
+! #line 790 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2571 "y.tab.c"
+ break;
+
+! case 64: /* command: shell_command redirection_list */
+! #line 792 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2569,2727 ****
+ (yyval.command) = (yyvsp[-1].command);
+ }
+! #line 2572 "y.tab.c"
+ break;
+
+! case 64: /* command: function_def */
+! #line 793 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2578 "y.tab.c"
+ break;
+
+! case 65: /* command: coproc */
+! #line 795 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2584 "y.tab.c"
+ break;
+
+! case 66: /* shell_command: for_command */
+! #line 799 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2590 "y.tab.c"
+ break;
+
+! case 67: /* shell_command: case_command */
+! #line 801 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2596 "y.tab.c"
+ break;
+
+! case 68: /* shell_command: WHILE compound_list DO compound_list DONE */
+! #line 803 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_while_command ((yyvsp[-3].command), (yyvsp[-1].command)); }
+! #line 2602 "y.tab.c"
+ break;
+
+! case 69: /* shell_command: UNTIL compound_list DO compound_list DONE */
+! #line 805 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_until_command ((yyvsp[-3].command), (yyvsp[-1].command)); }
+! #line 2608 "y.tab.c"
+ break;
+
+! case 70: /* shell_command: select_command */
+! #line 807 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2614 "y.tab.c"
+ break;
+
+! case 71: /* shell_command: if_command */
+! #line 809 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2620 "y.tab.c"
+ break;
+
+! case 72: /* shell_command: subshell */
+! #line 811 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2626 "y.tab.c"
+ break;
+
+! case 73: /* shell_command: group_command */
+! #line 813 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2632 "y.tab.c"
+ break;
+
+! case 74: /* shell_command: arith_command */
+! #line 815 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2638 "y.tab.c"
+ break;
+
+! case 75: /* shell_command: cond_command */
+! #line 817 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2644 "y.tab.c"
+ break;
+
+! case 76: /* shell_command: arith_for_command */
+! #line 819 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2650 "y.tab.c"
+ break;
+
+! case 77: /* for_command: FOR WORD newline_list DO compound_list DONE */
+! #line 823 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2659 "y.tab.c"
+ break;
+
+! case 78: /* for_command: FOR WORD newline_list '{' compound_list '}' */
+! #line 828 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2668 "y.tab.c"
+ break;
+
+! case 79: /* for_command: FOR WORD ';' newline_list DO compound_list DONE */
+! #line 833 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2677 "y.tab.c"
+ break;
+
+! case 80: /* for_command: FOR WORD ';' newline_list '{' compound_list '}' */
+! #line 838 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2686 "y.tab.c"
+ break;
+
+! case 81: /* for_command: FOR WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE */
+! #line 843 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2695 "y.tab.c"
+ break;
+
+! case 82: /* for_command: FOR WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' */
+! #line 848 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2704 "y.tab.c"
+ break;
+
+! case 83: /* for_command: FOR WORD newline_list IN list_terminator newline_list DO compound_list DONE */
+! #line 853 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2713 "y.tab.c"
+ break;
+
+! case 84: /* for_command: FOR WORD newline_list IN list_terminator newline_list '{' compound_list '}' */
+! #line 858 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2722 "y.tab.c"
+ break;
+
+! case 85: /* arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE */
+! #line 865 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-5].word_list), (yyvsp[-1].command), arith_for_lineno);
+--- 2588,2746 ----
+ (yyval.command) = (yyvsp[-1].command);
+ }
+! #line 2591 "y.tab.c"
+ break;
+
+! case 65: /* command: function_def */
+! #line 808 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2597 "y.tab.c"
+ break;
+
+! case 66: /* command: coproc */
+! #line 810 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2603 "y.tab.c"
+ break;
+
+! case 67: /* shell_command: for_command */
+! #line 814 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2609 "y.tab.c"
+ break;
+
+! case 68: /* shell_command: case_command */
+! #line 816 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2615 "y.tab.c"
+ break;
+
+! case 69: /* shell_command: WHILE compound_list DO compound_list DONE */
+! #line 818 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_while_command ((yyvsp[-3].command), (yyvsp[-1].command)); }
+! #line 2621 "y.tab.c"
+ break;
+
+! case 70: /* shell_command: UNTIL compound_list DO compound_list DONE */
+! #line 820 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_until_command ((yyvsp[-3].command), (yyvsp[-1].command)); }
+! #line 2627 "y.tab.c"
+ break;
+
+! case 71: /* shell_command: select_command */
+! #line 822 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2633 "y.tab.c"
+ break;
+
+! case 72: /* shell_command: if_command */
+! #line 824 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2639 "y.tab.c"
+ break;
+
+! case 73: /* shell_command: subshell */
+! #line 826 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2645 "y.tab.c"
+ break;
+
+! case 74: /* shell_command: group_command */
+! #line 828 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2651 "y.tab.c"
+ break;
+
+! case 75: /* shell_command: arith_command */
+! #line 830 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2657 "y.tab.c"
+ break;
+
+! case 76: /* shell_command: cond_command */
+! #line 832 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2663 "y.tab.c"
+ break;
+
+! case 77: /* shell_command: arith_for_command */
+! #line 834 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2669 "y.tab.c"
+ break;
+
+! case 78: /* for_command: FOR WORD newline_list DO compound_list DONE */
+! #line 838 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2678 "y.tab.c"
+ break;
+
+! case 79: /* for_command: FOR WORD newline_list '{' compound_list '}' */
+! #line 843 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2687 "y.tab.c"
+ break;
+
+! case 80: /* for_command: FOR WORD ';' newline_list DO compound_list DONE */
+! #line 848 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2696 "y.tab.c"
+ break;
+
+! case 81: /* for_command: FOR WORD ';' newline_list '{' compound_list '}' */
+! #line 853 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2705 "y.tab.c"
+ break;
+
+! case 82: /* for_command: FOR WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE */
+! #line 858 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2714 "y.tab.c"
+ break;
+
+! case 83: /* for_command: FOR WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' */
+! #line 863 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2723 "y.tab.c"
+ break;
+
+! case 84: /* for_command: FOR WORD newline_list IN list_terminator newline_list DO compound_list DONE */
+! #line 868 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2732 "y.tab.c"
+ break;
+
+! case 85: /* for_command: FOR WORD newline_list IN list_terminator newline_list '{' compound_list '}' */
+! #line 873 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2741 "y.tab.c"
+ break;
+
+! case 86: /* arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE */
+! #line 880 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-5].word_list), (yyvsp[-1].command), arith_for_lineno);
+***************
+*** 2729,2737 ****
+ if (word_top > 0) word_top--;
+ }
+! #line 2732 "y.tab.c"
+ break;
+
+! case 86: /* arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}' */
+! #line 871 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-5].word_list), (yyvsp[-1].command), arith_for_lineno);
+--- 2748,2756 ----
+ if (word_top > 0) word_top--;
+ }
+! #line 2751 "y.tab.c"
+ break;
+
+! case 87: /* arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}' */
+! #line 886 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-5].word_list), (yyvsp[-1].command), arith_for_lineno);
+***************
+*** 2739,2747 ****
+ if (word_top > 0) word_top--;
+ }
+! #line 2742 "y.tab.c"
+ break;
+
+! case 87: /* arith_for_command: FOR ARITH_FOR_EXPRS DO compound_list DONE */
+! #line 877 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-3].word_list), (yyvsp[-1].command), arith_for_lineno);
+--- 2758,2766 ----
+ if (word_top > 0) word_top--;
+ }
+! #line 2761 "y.tab.c"
+ break;
+
+! case 88: /* arith_for_command: FOR ARITH_FOR_EXPRS DO compound_list DONE */
+! #line 892 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-3].word_list), (yyvsp[-1].command), arith_for_lineno);
+***************
+*** 2749,2757 ****
+ if (word_top > 0) word_top--;
+ }
+! #line 2752 "y.tab.c"
+ break;
+
+! case 88: /* arith_for_command: FOR ARITH_FOR_EXPRS '{' compound_list '}' */
+! #line 883 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-3].word_list), (yyvsp[-1].command), arith_for_lineno);
+--- 2768,2776 ----
+ if (word_top > 0) word_top--;
+ }
+! #line 2771 "y.tab.c"
+ break;
+
+! case 89: /* arith_for_command: FOR ARITH_FOR_EXPRS '{' compound_list '}' */
+! #line 898 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[-3].word_list), (yyvsp[-1].command), arith_for_lineno);
+***************
+*** 2759,2896 ****
+ if (word_top > 0) word_top--;
+ }
+! #line 2762 "y.tab.c"
+ break;
+
+! case 89: /* select_command: SELECT WORD newline_list DO compound_list DONE */
+! #line 891 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2771 "y.tab.c"
+ break;
+
+! case 90: /* select_command: SELECT WORD newline_list '{' compound_list '}' */
+! #line 896 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2780 "y.tab.c"
+ break;
+
+! case 91: /* select_command: SELECT WORD ';' newline_list DO compound_list DONE */
+! #line 901 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2789 "y.tab.c"
+ break;
+
+! case 92: /* select_command: SELECT WORD ';' newline_list '{' compound_list '}' */
+! #line 906 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2798 "y.tab.c"
+ break;
+
+! case 93: /* select_command: SELECT WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE */
+! #line 911 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2807 "y.tab.c"
+ break;
+
+! case 94: /* select_command: SELECT WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' */
+! #line 916 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2816 "y.tab.c"
+ break;
+
+! case 95: /* select_command: SELECT WORD newline_list IN list_terminator newline_list DO compound_list DONE */
+! #line 921 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2825 "y.tab.c"
+ break;
+
+! case 96: /* select_command: SELECT WORD newline_list IN list_terminator newline_list '{' compound_list '}' */
+! #line 926 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2834 "y.tab.c"
+ break;
+
+! case 97: /* case_command: CASE WORD newline_list IN newline_list ESAC */
+! #line 933 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[-4].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2843 "y.tab.c"
+ break;
+
+! case 98: /* case_command: CASE WORD newline_list IN case_clause_sequence newline_list ESAC */
+! #line 938 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[-5].word), (yyvsp[-2].pattern), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2852 "y.tab.c"
+ break;
+
+! case 99: /* case_command: CASE WORD newline_list IN case_clause ESAC */
+! #line 943 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[-4].word), (yyvsp[-1].pattern), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2861 "y.tab.c"
+ break;
+
+! case 100: /* function_def: WORD '(' ')' newline_list function_body */
+! #line 950 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-4].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2867 "y.tab.c"
+ break;
+
+! case 101: /* function_def: FUNCTION WORD '(' ')' newline_list function_body */
+! #line 952 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-4].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2873 "y.tab.c"
+ break;
+
+! case 102: /* function_def: FUNCTION WORD function_body */
+! #line 954 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-1].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2879 "y.tab.c"
+ break;
+
+! case 103: /* function_def: FUNCTION WORD '\n' newline_list function_body */
+! #line 956 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-3].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2885 "y.tab.c"
+ break;
+
+! case 104: /* function_body: shell_command */
+! #line 960 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2891 "y.tab.c"
+ break;
+
+! case 105: /* function_body: shell_command redirection_list */
+! #line 962 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2778,2915 ----
+ if (word_top > 0) word_top--;
+ }
+! #line 2781 "y.tab.c"
+ break;
+
+! case 90: /* select_command: SELECT WORD newline_list DO compound_list DONE */
+! #line 906 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2790 "y.tab.c"
+ break;
+
+! case 91: /* select_command: SELECT WORD newline_list '{' compound_list '}' */
+! #line 911 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-4].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2799 "y.tab.c"
+ break;
+
+! case 92: /* select_command: SELECT WORD ';' newline_list DO compound_list DONE */
+! #line 916 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2808 "y.tab.c"
+ break;
+
+! case 93: /* select_command: SELECT WORD ';' newline_list '{' compound_list '}' */
+! #line 921 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-5].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2817 "y.tab.c"
+ break;
+
+! case 94: /* select_command: SELECT WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE */
+! #line 926 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2826 "y.tab.c"
+ break;
+
+! case 95: /* select_command: SELECT WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}' */
+! #line 931 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-8].word), REVERSE_LIST ((yyvsp[-5].word_list), WORD_LIST *), (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2835 "y.tab.c"
+ break;
+
+! case 96: /* select_command: SELECT WORD newline_list IN list_terminator newline_list DO compound_list DONE */
+! #line 936 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2844 "y.tab.c"
+ break;
+
+! case 97: /* select_command: SELECT WORD newline_list IN list_terminator newline_list '{' compound_list '}' */
+! #line 941 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[-7].word), (WORD_LIST *)NULL, (yyvsp[-1].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2853 "y.tab.c"
+ break;
+
+! case 98: /* case_command: CASE WORD newline_list IN newline_list ESAC */
+! #line 948 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[-4].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2862 "y.tab.c"
+ break;
+
+! case 99: /* case_command: CASE WORD newline_list IN case_clause_sequence newline_list ESAC */
+! #line 953 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[-5].word), (yyvsp[-2].pattern), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2871 "y.tab.c"
+ break;
+
+! case 100: /* case_command: CASE WORD newline_list IN case_clause ESAC */
+! #line 958 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[-4].word), (yyvsp[-1].pattern), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+! #line 2880 "y.tab.c"
+ break;
+
+! case 101: /* function_def: WORD '(' ')' newline_list function_body */
+! #line 965 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-4].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2886 "y.tab.c"
+ break;
+
+! case 102: /* function_def: FUNCTION WORD '(' ')' newline_list function_body */
+! #line 967 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-4].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2892 "y.tab.c"
+ break;
+
+! case 103: /* function_def: FUNCTION WORD function_body */
+! #line 969 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-1].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2898 "y.tab.c"
+ break;
+
+! case 104: /* function_def: FUNCTION WORD '\n' newline_list function_body */
+! #line 971 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[-3].word), (yyvsp[0].command), function_dstart, function_bstart); }
+! #line 2904 "y.tab.c"
+ break;
+
+! case 105: /* function_body: shell_command */
+! #line 975 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 2910 "y.tab.c"
+ break;
+
+! case 106: /* function_body: shell_command redirection_list */
+! #line 977 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2921,2963 ****
+ (yyval.command) = (yyvsp[-1].command);
+ }
+! #line 2924 "y.tab.c"
+ break;
+
+! case 106: /* subshell: '(' compound_list ')' */
+! #line 993 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_subshell_command ((yyvsp[-1].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL;
+ }
+! #line 2933 "y.tab.c"
+ break;
+
+! case 107: /* comsub: DOLPAREN compound_list ')' */
+! #line 1000 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[-1].command);
+ }
+! #line 2941 "y.tab.c"
+ break;
+
+! case 108: /* comsub: DOLPAREN newline_list ')' */
+! #line 1004 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (COMMAND *)NULL;
+ }
+! #line 2949 "y.tab.c"
+ break;
+
+! case 109: /* coproc: COPROC shell_command */
+! #line 1010 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[0].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 2958 "y.tab.c"
+ break;
+
+! case 110: /* coproc: COPROC shell_command redirection_list */
+! #line 1015 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2940,2982 ----
+ (yyval.command) = (yyvsp[-1].command);
+ }
+! #line 2943 "y.tab.c"
+ break;
+
+! case 107: /* subshell: '(' compound_list ')' */
+! #line 1008 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_subshell_command ((yyvsp[-1].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL;
+ }
+! #line 2952 "y.tab.c"
+ break;
+
+! case 108: /* comsub: DOLPAREN compound_list ')' */
+! #line 1015 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[-1].command);
+ }
+! #line 2960 "y.tab.c"
+ break;
+
+! case 109: /* comsub: DOLPAREN newline_list ')' */
+! #line 1019 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (COMMAND *)NULL;
+ }
+! #line 2968 "y.tab.c"
+ break;
+
+! case 110: /* coproc: COPROC shell_command */
+! #line 1025 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[0].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 2977 "y.tab.c"
+ break;
+
+! case 111: /* coproc: COPROC shell_command redirection_list */
+! #line 1030 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2976,2993 ****
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 2979 "y.tab.c"
+ break;
+
+! case 111: /* coproc: COPROC WORD shell_command */
+! #line 1032 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ((yyvsp[-1].word)->word, (yyvsp[0].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 2988 "y.tab.c"
+ break;
+
+! case 112: /* coproc: COPROC WORD shell_command redirection_list */
+! #line 1037 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2995,3012 ----
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 2998 "y.tab.c"
+ break;
+
+! case 112: /* coproc: COPROC WORD shell_command */
+! #line 1047 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ((yyvsp[-1].word)->word, (yyvsp[0].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 3007 "y.tab.c"
+ break;
+
+! case 113: /* coproc: COPROC WORD shell_command redirection_list */
+! #line 1052 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 3006,3155 ****
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 3009 "y.tab.c"
+ break;
+
+! case 113: /* coproc: COPROC simple_command */
+! #line 1054 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[0].command)));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 3018 "y.tab.c"
+ break;
+
+! case 114: /* if_command: IF compound_list THEN compound_list FI */
+! #line 1061 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-3].command), (yyvsp[-1].command), (COMMAND *)NULL); }
+! #line 3024 "y.tab.c"
+ break;
+
+! case 115: /* if_command: IF compound_list THEN compound_list ELSE compound_list FI */
+! #line 1063 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-5].command), (yyvsp[-3].command), (yyvsp[-1].command)); }
+! #line 3030 "y.tab.c"
+ break;
+
+! case 116: /* if_command: IF compound_list THEN compound_list elif_clause FI */
+! #line 1065 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-4].command), (yyvsp[-2].command), (yyvsp[-1].command)); }
+! #line 3036 "y.tab.c"
+ break;
+
+! case 117: /* group_command: '{' compound_list '}' */
+! #line 1070 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_group_command ((yyvsp[-1].command)); }
+! #line 3042 "y.tab.c"
+ break;
+
+! case 118: /* arith_command: ARITH_CMD */
+! #line 1074 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_arith_command ((yyvsp[0].word_list)); }
+! #line 3048 "y.tab.c"
+ break;
+
+! case 119: /* cond_command: COND_START COND_CMD COND_END */
+! #line 1078 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[-1].command); }
+! #line 3054 "y.tab.c"
+ break;
+
+! case 120: /* elif_clause: ELIF compound_list THEN compound_list */
+! #line 1082 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-2].command), (yyvsp[0].command), (COMMAND *)NULL); }
+! #line 3060 "y.tab.c"
+ break;
+
+! case 121: /* elif_clause: ELIF compound_list THEN compound_list ELSE compound_list */
+! #line 1084 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-4].command), (yyvsp[-2].command), (yyvsp[0].command)); }
+! #line 3066 "y.tab.c"
+ break;
+
+! case 122: /* elif_clause: ELIF compound_list THEN compound_list elif_clause */
+! #line 1086 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-3].command), (yyvsp[-1].command), (yyvsp[0].command)); }
+! #line 3072 "y.tab.c"
+ break;
+
+! case 124: /* case_clause: case_clause_sequence pattern_list */
+! #line 1091 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[0].pattern)->next = (yyvsp[-1].pattern); (yyval.pattern) = (yyvsp[0].pattern); }
+! #line 3078 "y.tab.c"
+ break;
+
+! case 125: /* pattern_list: newline_list pattern ')' compound_list */
+! #line 1095 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (yyvsp[0].command)); }
+! #line 3084 "y.tab.c"
+ break;
+
+! case 126: /* pattern_list: newline_list pattern ')' newline_list */
+! #line 1097 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (COMMAND *)NULL); }
+! #line 3090 "y.tab.c"
+ break;
+
+! case 127: /* pattern_list: newline_list '(' pattern ')' compound_list */
+! #line 1099 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (yyvsp[0].command)); }
+! #line 3096 "y.tab.c"
+ break;
+
+! case 128: /* pattern_list: newline_list '(' pattern ')' newline_list */
+! #line 1101 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (COMMAND *)NULL); }
+! #line 3102 "y.tab.c"
+ break;
+
+! case 129: /* case_clause_sequence: pattern_list SEMI_SEMI */
+! #line 1105 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3108 "y.tab.c"
+ break;
+
+! case 130: /* case_clause_sequence: case_clause_sequence pattern_list SEMI_SEMI */
+! #line 1107 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->next = (yyvsp[-2].pattern); (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3114 "y.tab.c"
+ break;
+
+! case 131: /* case_clause_sequence: pattern_list SEMI_AND */
+! #line 1109 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3120 "y.tab.c"
+ break;
+
+! case 132: /* case_clause_sequence: case_clause_sequence pattern_list SEMI_AND */
+! #line 1111 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[-1].pattern)->next = (yyvsp[-2].pattern); (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3126 "y.tab.c"
+ break;
+
+! case 133: /* case_clause_sequence: pattern_list SEMI_SEMI_AND */
+! #line 1113 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3132 "y.tab.c"
+ break;
+
+! case 134: /* case_clause_sequence: case_clause_sequence pattern_list SEMI_SEMI_AND */
+! #line 1115 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[-1].pattern)->next = (yyvsp[-2].pattern); (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3138 "y.tab.c"
+ break;
+
+! case 135: /* pattern: WORD */
+! #line 1119 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (WORD_LIST *)NULL); }
+! #line 3144 "y.tab.c"
+ break;
+
+! case 136: /* pattern: pattern '|' WORD */
+! #line 1121 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (yyvsp[-2].word_list)); }
+! #line 3150 "y.tab.c"
+ break;
+
+! case 137: /* compound_list: newline_list list0 */
+! #line 1130 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[0].command);
+--- 3025,3174 ----
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 3028 "y.tab.c"
+ break;
+
+! case 114: /* coproc: COPROC simple_command */
+! #line 1069 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[0].command)));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+! #line 3037 "y.tab.c"
+ break;
+
+! case 115: /* if_command: IF compound_list THEN compound_list FI */
+! #line 1076 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-3].command), (yyvsp[-1].command), (COMMAND *)NULL); }
+! #line 3043 "y.tab.c"
+ break;
+
+! case 116: /* if_command: IF compound_list THEN compound_list ELSE compound_list FI */
+! #line 1078 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-5].command), (yyvsp[-3].command), (yyvsp[-1].command)); }
+! #line 3049 "y.tab.c"
+ break;
+
+! case 117: /* if_command: IF compound_list THEN compound_list elif_clause FI */
+! #line 1080 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-4].command), (yyvsp[-2].command), (yyvsp[-1].command)); }
+! #line 3055 "y.tab.c"
+ break;
+
+! case 118: /* group_command: '{' compound_list '}' */
+! #line 1085 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_group_command ((yyvsp[-1].command)); }
+! #line 3061 "y.tab.c"
+ break;
+
+! case 119: /* arith_command: ARITH_CMD */
+! #line 1089 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_arith_command ((yyvsp[0].word_list)); }
+! #line 3067 "y.tab.c"
+ break;
+
+! case 120: /* cond_command: COND_START COND_CMD COND_END */
+! #line 1093 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[-1].command); }
+! #line 3073 "y.tab.c"
+ break;
+
+! case 121: /* elif_clause: ELIF compound_list THEN compound_list */
+! #line 1097 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-2].command), (yyvsp[0].command), (COMMAND *)NULL); }
+! #line 3079 "y.tab.c"
+ break;
+
+! case 122: /* elif_clause: ELIF compound_list THEN compound_list ELSE compound_list */
+! #line 1099 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-4].command), (yyvsp[-2].command), (yyvsp[0].command)); }
+! #line 3085 "y.tab.c"
+ break;
+
+! case 123: /* elif_clause: ELIF compound_list THEN compound_list elif_clause */
+! #line 1101 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[-3].command), (yyvsp[-1].command), (yyvsp[0].command)); }
+! #line 3091 "y.tab.c"
+ break;
+
+! case 125: /* case_clause: case_clause_sequence pattern_list */
+! #line 1106 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[0].pattern)->next = (yyvsp[-1].pattern); (yyval.pattern) = (yyvsp[0].pattern); }
+! #line 3097 "y.tab.c"
+ break;
+
+! case 126: /* pattern_list: newline_list pattern ')' compound_list */
+! #line 1110 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (yyvsp[0].command)); }
+! #line 3103 "y.tab.c"
+ break;
+
+! case 127: /* pattern_list: newline_list pattern ')' newline_list */
+! #line 1112 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (COMMAND *)NULL); }
+! #line 3109 "y.tab.c"
+ break;
+
+! case 128: /* pattern_list: newline_list '(' pattern ')' compound_list */
+! #line 1114 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (yyvsp[0].command)); }
+! #line 3115 "y.tab.c"
+ break;
+
+! case 129: /* pattern_list: newline_list '(' pattern ')' newline_list */
+! #line 1116 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[-2].word_list), (COMMAND *)NULL); }
+! #line 3121 "y.tab.c"
+ break;
+
+! case 130: /* case_clause_sequence: pattern_list SEMI_SEMI */
+! #line 1120 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3127 "y.tab.c"
+ break;
+
+! case 131: /* case_clause_sequence: case_clause_sequence pattern_list SEMI_SEMI */
+! #line 1122 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->next = (yyvsp[-2].pattern); (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3133 "y.tab.c"
+ break;
+
+! case 132: /* case_clause_sequence: pattern_list SEMI_AND */
+! #line 1124 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3139 "y.tab.c"
+ break;
+
+! case 133: /* case_clause_sequence: case_clause_sequence pattern_list SEMI_AND */
+! #line 1126 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[-1].pattern)->next = (yyvsp[-2].pattern); (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3145 "y.tab.c"
+ break;
+
+! case 134: /* case_clause_sequence: pattern_list SEMI_SEMI_AND */
+! #line 1128 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3151 "y.tab.c"
+ break;
+
+! case 135: /* case_clause_sequence: case_clause_sequence pattern_list SEMI_SEMI_AND */
+! #line 1130 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyvsp[-1].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[-1].pattern)->next = (yyvsp[-2].pattern); (yyval.pattern) = (yyvsp[-1].pattern); }
+! #line 3157 "y.tab.c"
+ break;
+
+! case 136: /* pattern: WORD */
+! #line 1134 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (WORD_LIST *)NULL); }
+! #line 3163 "y.tab.c"
+ break;
+
+! case 137: /* pattern: pattern '|' WORD */
+! #line 1136 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[0].word), (yyvsp[-2].word_list)); }
+! #line 3169 "y.tab.c"
+ break;
+
+! case 138: /* compound_list: newline_list list0 */
+! #line 1145 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[0].command);
+***************
+*** 3157,3173 ****
+ gather_here_documents ();
+ }
+! #line 3160 "y.tab.c"
+ break;
+
+! case 138: /* compound_list: newline_list list1 */
+! #line 1136 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[0].command);
+ }
+! #line 3168 "y.tab.c"
+ break;
+
+! case 140: /* list0: list1 '&' newline_list */
+! #line 1143 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-2].command)->type == cm_connection)
+--- 3176,3192 ----
+ gather_here_documents ();
+ }
+! #line 3179 "y.tab.c"
+ break;
+
+! case 139: /* compound_list: newline_list list1 */
+! #line 1151 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[0].command);
+ }
+! #line 3187 "y.tab.c"
+ break;
+
+! case 141: /* list0: list1 '&' newline_list */
+! #line 1158 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-2].command)->type == cm_connection)
+***************
+*** 3176,3196 ****
+ (yyval.command) = command_connect ((yyvsp[-2].command), (COMMAND *)NULL, '&');
+ }
+! #line 3179 "y.tab.c"
+ break;
+
+! case 142: /* list1: list1 AND_AND newline_list list1 */
+! #line 1154 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), AND_AND); }
+! #line 3185 "y.tab.c"
+ break;
+
+! case 143: /* list1: list1 OR_OR newline_list list1 */
+! #line 1156 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), OR_OR); }
+! #line 3191 "y.tab.c"
+ break;
+
+! case 144: /* list1: list1 '&' newline_list list1 */
+! #line 1158 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-3].command)->type == cm_connection)
+--- 3195,3215 ----
+ (yyval.command) = command_connect ((yyvsp[-2].command), (COMMAND *)NULL, '&');
+ }
+! #line 3198 "y.tab.c"
+ break;
+
+! case 143: /* list1: list1 AND_AND newline_list list1 */
+! #line 1169 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), AND_AND); }
+! #line 3204 "y.tab.c"
+ break;
+
+! case 144: /* list1: list1 OR_OR newline_list list1 */
+! #line 1171 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), OR_OR); }
+! #line 3210 "y.tab.c"
+ break;
+
+! case 145: /* list1: list1 '&' newline_list list1 */
+! #line 1173 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-3].command)->type == cm_connection)
+***************
+*** 3199,3213 ****
+ (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), '&');
+ }
+! #line 3202 "y.tab.c"
+ break;
+
+! case 145: /* list1: list1 ';' newline_list list1 */
+! #line 1165 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), ';'); }
+! #line 3208 "y.tab.c"
+ break;
+
+! case 146: /* list1: list1 '\n' newline_list list1 */
+! #line 1167 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if (parser_state & PST_CMDSUBST)
+--- 3218,3232 ----
+ (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), '&');
+ }
+! #line 3221 "y.tab.c"
+ break;
+
+! case 146: /* list1: list1 ';' newline_list list1 */
+! #line 1180 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), ';'); }
+! #line 3227 "y.tab.c"
+ break;
+
+! case 147: /* list1: list1 '\n' newline_list list1 */
+! #line 1182 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if (parser_state & PST_CMDSUBST)
+***************
+*** 3216,3248 ****
+ (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), ';');
+ }
+! #line 3219 "y.tab.c"
+ break;
+
+! case 147: /* list1: pipeline_command */
+! #line 1174 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3225 "y.tab.c"
+ break;
+
+! case 150: /* list_terminator: '\n' */
+! #line 1182 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = '\n'; }
+! #line 3231 "y.tab.c"
+ break;
+
+! case 151: /* list_terminator: ';' */
+! #line 1184 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = ';'; }
+! #line 3237 "y.tab.c"
+ break;
+
+! case 152: /* list_terminator: yacc_EOF */
+! #line 1186 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = yacc_EOF; }
+! #line 3243 "y.tab.c"
+ break;
+
+! case 155: /* simple_list: simple_list1 */
+! #line 1200 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[0].command);
+--- 3235,3267 ----
+ (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), ';');
+ }
+! #line 3238 "y.tab.c"
+ break;
+
+! case 148: /* list1: pipeline_command */
+! #line 1189 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3244 "y.tab.c"
+ break;
+
+! case 151: /* list_terminator: '\n' */
+! #line 1197 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = '\n'; }
+! #line 3250 "y.tab.c"
+ break;
+
+! case 152: /* list_terminator: ';' */
+! #line 1199 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = ';'; }
+! #line 3256 "y.tab.c"
+ break;
+
+! case 153: /* list_terminator: yacc_EOF */
+! #line 1201 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = yacc_EOF; }
+! #line 3262 "y.tab.c"
+ break;
+
+! case 156: /* simple_list: simple_list1 */
+! #line 1215 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[0].command);
+***************
+*** 3259,3267 ****
+ }
+ }
+! #line 3262 "y.tab.c"
+ break;
+
+! case 156: /* simple_list: simple_list1 '&' */
+! #line 1215 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-1].command)->type == cm_connection)
+--- 3278,3286 ----
+ }
+ }
+! #line 3281 "y.tab.c"
+ break;
+
+! case 157: /* simple_list: simple_list1 '&' */
+! #line 1230 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-1].command)->type == cm_connection)
+***************
+*** 3281,3289 ****
+ }
+ }
+! #line 3284 "y.tab.c"
+ break;
+
+! case 157: /* simple_list: simple_list1 ';' */
+! #line 1233 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[-1].command);
+--- 3300,3308 ----
+ }
+ }
+! #line 3303 "y.tab.c"
+ break;
+
+! case 158: /* simple_list: simple_list1 ';' */
+! #line 1248 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[-1].command);
+***************
+*** 3300,3320 ****
+ }
+ }
+! #line 3303 "y.tab.c"
+ break;
+
+! case 158: /* simple_list1: simple_list1 AND_AND newline_list simple_list1 */
+! #line 1250 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), AND_AND); }
+! #line 3309 "y.tab.c"
+ break;
+
+! case 159: /* simple_list1: simple_list1 OR_OR newline_list simple_list1 */
+! #line 1252 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), OR_OR); }
+! #line 3315 "y.tab.c"
+ break;
+
+! case 160: /* simple_list1: simple_list1 '&' simple_list1 */
+! #line 1254 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-2].command)->type == cm_connection)
+--- 3319,3339 ----
+ }
+ }
+! #line 3322 "y.tab.c"
+ break;
+
+! case 159: /* simple_list1: simple_list1 AND_AND newline_list simple_list1 */
+! #line 1265 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), AND_AND); }
+! #line 3328 "y.tab.c"
+ break;
+
+! case 160: /* simple_list1: simple_list1 OR_OR newline_list simple_list1 */
+! #line 1267 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), OR_OR); }
+! #line 3334 "y.tab.c"
+ break;
+
+! case 161: /* simple_list1: simple_list1 '&' simple_list1 */
+! #line 1269 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[-2].command)->type == cm_connection)
+***************
+*** 3323,3349 ****
+ (yyval.command) = command_connect ((yyvsp[-2].command), (yyvsp[0].command), '&');
+ }
+! #line 3326 "y.tab.c"
+ break;
+
+! case 161: /* simple_list1: simple_list1 ';' simple_list1 */
+! #line 1261 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-2].command), (yyvsp[0].command), ';'); }
+! #line 3332 "y.tab.c"
+ break;
+
+! case 162: /* simple_list1: pipeline_command */
+! #line 1264 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3338 "y.tab.c"
+ break;
+
+! case 163: /* pipeline_command: pipeline */
+! #line 1268 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3344 "y.tab.c"
+ break;
+
+! case 164: /* pipeline_command: BANG pipeline_command */
+! #line 1270 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[0].command))
+--- 3342,3368 ----
+ (yyval.command) = command_connect ((yyvsp[-2].command), (yyvsp[0].command), '&');
+ }
+! #line 3345 "y.tab.c"
+ break;
+
+! case 162: /* simple_list1: simple_list1 ';' simple_list1 */
+! #line 1276 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-2].command), (yyvsp[0].command), ';'); }
+! #line 3351 "y.tab.c"
+ break;
+
+! case 163: /* simple_list1: pipeline_command */
+! #line 1279 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3357 "y.tab.c"
+ break;
+
+! case 164: /* pipeline_command: pipeline */
+! #line 1283 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3363 "y.tab.c"
+ break;
+
+! case 165: /* pipeline_command: BANG pipeline_command */
+! #line 1285 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[0].command))
+***************
+*** 3351,3359 ****
+ (yyval.command) = (yyvsp[0].command);
+ }
+! #line 3354 "y.tab.c"
+ break;
+
+! case 165: /* pipeline_command: timespec pipeline_command */
+! #line 1276 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[0].command))
+--- 3370,3378 ----
+ (yyval.command) = (yyvsp[0].command);
+ }
+! #line 3373 "y.tab.c"
+ break;
+
+! case 166: /* pipeline_command: timespec pipeline_command */
+! #line 1291 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[0].command))
+***************
+*** 3361,3369 ****
+ (yyval.command) = (yyvsp[0].command);
+ }
+! #line 3364 "y.tab.c"
+ break;
+
+! case 166: /* pipeline_command: timespec list_terminator */
+! #line 1282 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ ELEMENT x;
+--- 3380,3388 ----
+ (yyval.command) = (yyvsp[0].command);
+ }
+! #line 3383 "y.tab.c"
+ break;
+
+! case 167: /* pipeline_command: timespec list_terminator */
+! #line 1297 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ ELEMENT x;
+***************
+*** 3385,3393 ****
+ parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */
+ }
+! #line 3388 "y.tab.c"
+ break;
+
+! case 167: /* pipeline_command: BANG list_terminator */
+! #line 1302 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ ELEMENT x;
+--- 3404,3412 ----
+ parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */
+ }
+! #line 3407 "y.tab.c"
+ break;
+
+! case 168: /* pipeline_command: BANG list_terminator */
+! #line 1317 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ ELEMENT x;
+***************
+*** 3410,3424 ****
+ parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */
+ }
+! #line 3413 "y.tab.c"
+ break;
+
+! case 168: /* pipeline: pipeline '|' newline_list pipeline */
+! #line 1325 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), '|'); }
+! #line 3419 "y.tab.c"
+ break;
+
+! case 169: /* pipeline: pipeline BAR_AND newline_list pipeline */
+! #line 1327 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+--- 3429,3443 ----
+ parser_state &= ~PST_REDIRLIST; /* make_simple_command sets this */
+ }
+! #line 3432 "y.tab.c"
+ break;
+
+! case 169: /* pipeline: pipeline '|' newline_list pipeline */
+! #line 1340 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), '|'); }
+! #line 3438 "y.tab.c"
+ break;
+
+! case 170: /* pipeline: pipeline BAR_AND newline_list pipeline */
+! #line 1342 "/usr/local/src/chet/src/bash/src/parse.y"
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+***************
+*** 3443,3481 ****
+ (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), '|');
+ }
+! #line 3446 "y.tab.c"
+ break;
+
+! case 170: /* pipeline: command */
+! #line 1350 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3452 "y.tab.c"
+ break;
+
+! case 171: /* timespec: TIME */
+! #line 1354 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE; }
+! #line 3458 "y.tab.c"
+ break;
+
+! case 172: /* timespec: TIME TIMEOPT */
+! #line 1356 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+! #line 3464 "y.tab.c"
+ break;
+
+! case 173: /* timespec: TIME TIMEIGN */
+! #line 1358 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+! #line 3470 "y.tab.c"
+ break;
+
+! case 174: /* timespec: TIME TIMEOPT TIMEIGN */
+! #line 1360 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+! #line 3476 "y.tab.c"
+ break;
+
+
+! #line 3480 "y.tab.c"
+
+ default: break;
+--- 3462,3500 ----
+ (yyval.command) = command_connect ((yyvsp[-3].command), (yyvsp[0].command), '|');
+ }
+! #line 3465 "y.tab.c"
+ break;
+
+! case 171: /* pipeline: command */
+! #line 1365 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[0].command); }
+! #line 3471 "y.tab.c"
+ break;
+
+! case 172: /* timespec: TIME */
+! #line 1369 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE; }
+! #line 3477 "y.tab.c"
+ break;
+
+! case 173: /* timespec: TIME TIMEOPT */
+! #line 1371 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+! #line 3483 "y.tab.c"
+ break;
+
+! case 174: /* timespec: TIME TIMEIGN */
+! #line 1373 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+! #line 3489 "y.tab.c"
+ break;
+
+! case 175: /* timespec: TIME TIMEOPT TIMEIGN */
+! #line 1375 "/usr/local/src/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+! #line 3495 "y.tab.c"
+ break;
+
+
+! #line 3499 "y.tab.c"
+
+ default: break;
+***************
+*** 3670,3674 ****
+ }
+
+! #line 1362 "/usr/local/src/chet/src/bash/src/parse.y"
+
+
+--- 3689,3693 ----
+ }
+
+! #line 1377 "/usr/local/src/chet/src/bash/src/parse.y"
+
+
+***************
+*** 5209,5215 ****
+ if (current_token < 0)
+ #if defined (YYERRCODE) && !defined (YYUNDEF)
+! current_token = YYERRCODE;
+ #else
+! current_token = YYerror;
+ #endif
+
+--- 5228,5234 ----
+ if (current_token < 0)
+ #if defined (YYERRCODE) && !defined (YYUNDEF)
+! current_token = EOF_Reached ? YYEOF : YYERRCODE;
+ #else
+! current_token = EOF_Reached ? YYEOF : YYUNDEF;
+ #endif
+
+***************
+*** 6006,6009 ****
+--- 6026,6030 ----
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
+ EOF_Reached = 1; /* XXX */
++ parser_state |= PST_NOERROR; /* avoid redundant error message */
+ return (&matched_pair_error);
+ }
+***************
+*** 6468,6471 ****
+--- 6487,6491 ----
+
+ /* yyparse() has already called yyerror() and reset_parser() */
++ parser_state |= PST_NOERROR;
+ return (&matched_pair_error);
+ }
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 17
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 18
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-019 b/source/a/bash/bash-5.2-patches/bash52-019
new file mode 100644
index 000000000..165a55e62
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-019
@@ -0,0 +1,66 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-019
+
+Bug-Reported-by: Steffen Nurpmeso <steffen@sdaoden.eu>
+Bug-Reference-ID: <20230116233547.2jFxL%steffen@sdaoden.eu>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-01/msg00057.html
+
+Bug-Description:
+
+There are some cases where the shell reaped a background (asynchronous) job
+and would incorrectly try to set the terminal's process group back to the
+shell's. In these cases it never set the terminal process group to that
+jobs's process group initially, so resetting it is incorrect.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/jobs.c 2022-12-13 12:09:02.000000000 -0500
+--- jobs.c 2023-10-26 12:12:10.000000000 -0400
+***************
+*** 3078,3084 ****
+ subshell. Make sure subst.c:command_substitute uses the same
+ conditions to determine whether or not it should undo this and
+! give the terminal to pipeline_pgrp. */
+!
+ if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 &&
+ (subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)
+ give_terminal_to (shell_pgrp, 0);
+--- 3036,3046 ----
+ subshell. Make sure subst.c:command_substitute uses the same
+ conditions to determine whether or not it should undo this and
+! give the terminal to pipeline_pgrp. We don't give the terminal
+! back to shell_pgrp if an async job in the background exits because
+! we never gave it to that job in the first place. An async job in
+! the foreground is one we started in the background and foregrounded
+! with `fg', and gave it the terminal. */
+ if ((flags & JWAIT_NOTERM) == 0 && running_in_background == 0 &&
++ (job == NO_JOB || IS_ASYNC (job) == 0 || IS_FOREGROUND (job)) &&
+ (subshell_environment & (SUBSHELL_ASYNC|SUBSHELL_PIPE)) == 0)
+ give_terminal_to (shell_pgrp, 0);
+***************
+*** 3624,3627 ****
+--- 3599,3603 ----
+ get_tty_state ();
+ save_stty = shell_tty_info;
++ jobs[job]->flags &= ~J_ASYNC; /* no longer async */
+ /* Give the terminal to this job. */
+ if (IS_JOBCONTROL (job))
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 18
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 19
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-020 b/source/a/bash/bash-5.2-patches/bash52-020
new file mode 100644
index 000000000..0e76741e9
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-020
@@ -0,0 +1,53 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-020
+
+Bug-Reported-by: Dima Korobskiy <dkroot2@gmail.com>
+Bug-Reference-ID: <16664c2d-40ec-df33-b932-83db06e39a82@gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-08/msg00125.html
+
+Bug-Description:
+
+The parser did not allow `time' to appear as the first reserved word in a
+command substitution.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/parse.y Tue Dec 13 12:53:21 2022
+--- parse.y Fri Sep 1 10:36:28 2023
+***************
+*** 3151,3154 ****
+--- 3151,3155 ----
+ case TIMEOPT: /* time -p time pipeline */
+ case TIMEIGN: /* time -p -- ... */
++ case DOLPAREN:
+ return 1;
+ default:
+*** ../bash-5.2-patched/y.tab.c Tue Dec 13 12:53:21 2022
+--- y.tab.c Fri Sep 1 10:36:44 2023
+***************
+*** 5466,5469 ****
+--- 5466,5470 ----
+ case TIMEOPT: /* time -p time pipeline */
+ case TIMEIGN: /* time -p -- ... */
++ case DOLPAREN:
+ return 1;
+ default:
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 19
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 20
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-021 b/source/a/bash/bash-5.2-patches/bash52-021
new file mode 100644
index 000000000..ade1fac01
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-021
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-021
+
+Bug-Reported-by: Norbert Lange <nolange79@gmail.com>
+Bug-Reference-ID: <CADYdroPZFdVZSL6KkhqkAPgKKopbsLQVSm7_TvLCwadL2=UAWw@mail.gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-12/msg00046.html
+
+Bug-Description:
+
+There is an off-by-one error that causes command substitutions to fail when
+they appear in a word expansion inside a here-document.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/subst.c 2022-12-13 12:08:58.000000000 -0500
+--- subst.c 2022-12-14 09:09:53.000000000 -0500
+***************
+*** 1694,1698 ****
+ CHECK_STRING_OVERRUN (i, si, slen, c);
+
+! tlen = si - i - 1;
+ RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
+ result[result_index++] = c;
+--- 1699,1703 ----
+ CHECK_STRING_OVERRUN (i, si, slen, c);
+
+! tlen = si - i - 2;
+ RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
+ result[result_index++] = c;
+***************
+*** 1714,1718 ****
+ CHECK_STRING_OVERRUN (i, si, slen, c);
+
+! tlen = si - i - 1;
+ RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
+ result[result_index++] = c;
+--- 1719,1723 ----
+ CHECK_STRING_OVERRUN (i, si, slen, c);
+
+! tlen = si - i - 2;
+ RESIZE_MALLOCED_BUFFER (result, result_index, tlen + 4, result_size, 64);
+ result[result_index++] = c;
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 20
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 21
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-022 b/source/a/bash/bash-5.2-patches/bash52-022
new file mode 100644
index 000000000..557d38706
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-022
@@ -0,0 +1,53 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-022
+
+Bug-Reported-by: srobertson@peratonlabs.com
+Bug-Reference-ID:
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00049.html
+
+Bug-Description:
+
+It's possible for readline to try to zero out a line that's not null-
+terminated, leading to a memory fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/lib/readline/display.c 2022-04-05 10:47:31.000000000 -0400
+--- lib/readline/display.c 2022-12-13 13:11:22.000000000 -0500
+***************
+*** 2684,2692 ****
+
+ if (visible_line)
+! {
+! temp = visible_line;
+! while (*temp)
+! *temp++ = '\0';
+! }
+ rl_on_new_line ();
+ forced_display++;
+--- 2735,2740 ----
+
+ if (visible_line)
+! memset (visible_line, 0, line_size);
+!
+ rl_on_new_line ();
+ forced_display++;
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 21
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 22
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-023 b/source/a/bash/bash-5.2-patches/bash52-023
new file mode 100644
index 000000000..07ba4ae43
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-023
@@ -0,0 +1,64 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-023
+
+Bug-Reported-by: Emanuele Torre <torreemanuele6@gmail.com>
+Bug-Reference-ID: <20230206140824.1710288-1-torreemanuele6@gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00045.html
+
+Bug-Description:
+
+Running `local -' multiple times in a shell function would overwrite the
+original saved set of options.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/builtins/declare.def 2023-01-04 20:40:28.000000000 -0500
+--- builtins/declare.def 2023-02-08 15:36:49.000000000 -0500
+***************
+*** 421,429 ****
+ if (local_var && variable_context && STREQ (name, "-"))
+ {
+ var = make_local_variable ("-", 0);
+! FREE (value_cell (var)); /* just in case */
+! value = get_current_options ();
+! var_setvalue (var, value);
+! VSETATTR (var, att_invisible);
+ NEXT_VARIABLE ();
+ }
+--- 421,437 ----
+ if (local_var && variable_context && STREQ (name, "-"))
+ {
++ int o;
++
++ o = localvar_inherit;
++ localvar_inherit = 0;
+ var = make_local_variable ("-", 0);
+! localvar_inherit = o;
+!
+! if (value_cell (var) == NULL) /* no duplicate instances */
+! {
+! value = get_current_options ();
+! var_setvalue (var, value);
+! VSETATTR (var, att_invisible);
+! }
+ NEXT_VARIABLE ();
+ }
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 22
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 23
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-024 b/source/a/bash/bash-5.2-patches/bash52-024
new file mode 100644
index 000000000..8cc49e878
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-024
@@ -0,0 +1,88 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-024
+
+Bug-Reported-by: Marco <maroloccio@gmail.com>
+Bug-Reference-ID: <eaf9af76-c4ed-8b61-c517-22ed980529d3@gmail.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00044.html
+
+Bug-Description:
+
+Fix bug where associative array compound assignment would not expand tildes
+in values.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-20230105/arrayfunc.c Thu Jan 5 14:23:28 2023
+--- arrayfunc.c Wed Feb 8 16:27:48 2023
+***************
+*** 651,655 ****
+ }
+
+! aval = expand_subscript_string (v, 0);
+ if (aval == 0)
+ {
+--- 651,655 ----
+ }
+
+! aval = expand_assignment_string_to_string (v, 0);
+ if (aval == 0)
+ {
+***************
+*** 843,847 ****
+ if (assoc_p (var))
+ {
+! val = expand_subscript_string (val, 0);
+ if (val == 0)
+ {
+--- 843,847 ----
+ if (assoc_p (var))
+ {
+! val = expand_assignment_string_to_string (val, 0);
+ if (val == 0)
+ {
+***************
+*** 1031,1035 ****
+ nword[i++] = w[ind++];
+
+! t = expand_subscript_string (w+ind, 0);
+ s = (t && strchr (t, CTLESC)) ? quote_escapes (t) : t;
+ value = sh_single_quote (s ? s : "");
+--- 1031,1035 ----
+ nword[i++] = w[ind++];
+
+! t = expand_assignment_string_to_string (w+ind, 0);
+ s = (t && strchr (t, CTLESC)) ? quote_escapes (t) : t;
+ value = sh_single_quote (s ? s : "");
+*** ../bash-20230201/subst.c Mon Jan 30 16:19:46 2023
+--- subst.c Mon Feb 6 16:25:22 2023
+***************
+*** 10803,10807 ****
+--- 10803,10811 ----
+ ret = (char *)NULL;
+
++ #if 0
+ td.flags = W_NOPROCSUB|W_NOTILDE|W_NOSPLIT2; /* XXX - W_NOCOMSUB? */
++ #else
++ td.flags = W_NOPROCSUB|W_NOSPLIT2; /* XXX - W_NOCOMSUB? */
++ #endif
+ td.word = savestring (string); /* in case it's freed on error */
+
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 23
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 24
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-025 b/source/a/bash/bash-5.2-patches/bash52-025
new file mode 100644
index 000000000..4e293f9d3
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-025
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-025
+
+Bug-Reported-by: Andrew Neff <andrew.neff@visionsystemsinc.com>
+Bug-Reference-ID: <SA1P110MB1357F68AFD51BB225019EFF48D2B9@SA1P110MB1357.NAMP110.PROD.OUTLOOK.COM>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00100.html
+
+Bug-Description:
+
+Make sure a subshell checks for and handles any terminating signals before
+exiting (which might have arrived after the command completed) so the parent
+and any EXIT trap will see the correct value for $?.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2.9/execute_cmd.c 2022-11-02 10:36:54.000000000 -0400
+--- execute_cmd.c 2022-10-27 16:52:55.000000000 -0400
+***************
+*** 1726,1729 ****
+--- 1726,1732 ----
+ : EXECUTION_SUCCESS;
+
++ /* Check for terminating signals before we return to our caller, which we
++ expect to exit immediately anyway. */
++ CHECK_TERMSIG;
+
+ /* If we were explicitly placed in a subshell with (), we need
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 24
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 25
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/bash/bash-5.2-patches/bash52-026 b/source/a/bash/bash-5.2-patches/bash52-026
new file mode 100644
index 000000000..bd0f5d0d2
--- /dev/null
+++ b/source/a/bash/bash-5.2-patches/bash52-026
@@ -0,0 +1,48 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 5.2
+Patch-ID: bash52-026
+
+Bug-Reported-by: Stefan Klinger <readline-gnu.org@stefan-klinger.de>
+Bug-Reference-ID:
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-08/msg00018.html
+
+Bug-Description:
+
+The custom color prefix that readline uses to color possible completions
+must have a leading `.'.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-5.2-patched/lib/readline/colors.c 2021-12-08 11:38:25.000000000 -0500
+--- lib/readline/colors.c 2023-08-28 16:40:04.000000000 -0400
+***************
+*** 74,78 ****
+ static void restore_default_color (void);
+
+! #define RL_COLOR_PREFIX_EXTENSION "readline-colored-completion-prefix"
+
+ COLOR_EXT_TYPE *_rl_color_ext_list = 0;
+--- 74,78 ----
+ static void restore_default_color (void);
+
+! #define RL_COLOR_PREFIX_EXTENSION ".readline-colored-completion-prefix"
+
+ COLOR_EXT_TYPE *_rl_color_ext_list = 0;
+
+*** ../bash-5.2/patchlevel.h 2020-06-22 14:51:03.000000000 -0400
+--- patchlevel.h 2020-10-01 11:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 25
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 26
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/source/a/btrfs-progs/btrfs-progs.SlackBuild b/source/a/btrfs-progs/btrfs-progs.SlackBuild
index 7764ad227..bd36c98d8 100755
--- a/source/a/btrfs-progs/btrfs-progs.SlackBuild
+++ b/source/a/btrfs-progs/btrfs-progs.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2009, 2010, 2011, 2015, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2011, 2015, 2017, 2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -83,9 +83,9 @@ rm -rf $PKG
mkdir -p $PKG
cd $TMP
-rm -rf btrfs-progs btrfs-progs-$VERSION
+rm -rf btrfs-progs-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
-cd btrfs-progs-$VERSION || cd btrfs-progs || exit 1
+cd btrfs-progs-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
chown -R root:root .
@@ -110,7 +110,6 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--mandir=/usr/man \
--infodir=/usr/info \
- --disable-zstd \
--build=$ARCH-slackware-linux || exit 1
# Build and install:
@@ -120,6 +119,12 @@ make install DESTDIR=$PKG || exit 1
# Don't ship static library:
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+# Install the bash-completion file manually:
+mkdir -p $PKG/usr/share/bash-completion/completions
+cp -a btrfs-completion $PKG/usr/share/bash-completion/completions/btrfs
+chown root:root $PKG/usr/share/bash-completion/completions/btrfs
+chmod 644 $PKG/usr/share/bash-completion/completions/btrfs
+
# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -152,7 +157,7 @@ fi
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$(echo $VERSION | tr -d v)
cp -a \
- COPYING* INSTALL README* \
+ CHANGES COPYING* INSTALL README* \
$PKG/usr/doc/${PKGNAM}-$(echo $VERSION | tr -d v)
mkdir -p $PKG/install
diff --git a/source/a/coreutils/DIR_COLORS b/source/a/coreutils/DIR_COLORS
index 17120ec63..5b97e4a45 100644
--- a/source/a/coreutils/DIR_COLORS
+++ b/source/a/coreutils/DIR_COLORS
@@ -130,10 +130,12 @@ EXEC 01;32 # This is for files with execute permission:
.txz 01;31
.tz 01;31
.tz2 01;31
+.tzst 01;31
.xz 01;31
.z 01;31
.zip 01;31
.zoo 01;31
+.zst 01;31
# multimedia (video/image/sound) file formats
.aac 01;35
@@ -146,11 +148,13 @@ EXEC 01;32 # This is for files with execute permission:
.bmp 01;35
.divx 01;35
.flac 01;35
+.flv 01;35
.gif 01;35
.ico 01;35
.jpg 01;35
.jpeg 01;35
.m2a 01;35
+.m2t 01;35
.m2v 01;35
.m4a 01;35
.m4p 01;35
@@ -188,6 +192,8 @@ EXEC 01;32 # This is for files with execute permission:
.tiff 01;35
.vob 01;35
.wav 01;35
+.webm 01;35
+.webp 01;35
.wma 01;35
.wmv 01;35
.xbm 01;35
diff --git a/source/a/coreutils/coreutils.SlackBuild b/source/a/coreutils/coreutils.SlackBuild
index 3ba9bebe9..4805aa315 100755
--- a/source/a/coreutils/coreutils.SlackBuild
+++ b/source/a/coreutils/coreutils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,10 +24,17 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=coreutils
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+# "wc" seems to be the only thing used by pkgtools that can make use of AVX2,
+# and since the kernel has added a mitigation that makes AVX2 seem to be
+# available when it really isn't, it is not reliable. Even the author of this
+# wc optimization questioned how useful it really was... and for us, it isn't
+# worth it to have by default. But feel free to enable/recompile if you like.
+DISABLE_USE_AVX2_WC_LINECOUNT=${DISABLE_USE_AVX2_WC_LINECOUNT:-true}
+
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -93,6 +100,10 @@ zcat $CWD/$PKGNAM.uname.diff.gz | patch -p1 --verbose --backup --suffix=.orig ||
# Revert change to ls quoting style introduced in coreutils-8.25:
zcat $CWD/no_ls_quoting.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+if [ "$DISABLE_USE_AVX2_WC_LINECOUNT" = "true" ]; then
+ zcat $CWD/coreutils.wc.noavx2.diff.gz | patch -p1 --verbose || exit 1
+fi
+
# Compilation with glibc version later than 2.3.2 needs the environment
# variable DEFAULT_POSIX2_VERSION set to 199209.
# Without that line, the coreutils will start complaining about 'obsolete'
@@ -101,6 +112,11 @@ zcat $CWD/no_ls_quoting.patch.gz | patch -p1 --verbose --backup --suffix=.orig |
# too commonly used to disregard them. Better to stick with the older more
# widely accepted standards until things begin to demand the new way.
+# Don't use the openssl crypto library, otherwise /bin/sort ends up linked
+# against openssl's libcrypto which creates problems for upgradepkg.
+# It is also possible to use --with-linux-crypto to enable the Linux kernel
+# crypto routines, but we'll skip this for now.
+
FORCE_UNSAFE_CONFIGURE=1 \
CFLAGS="$SLKCFLAGS" \
DEFAULT_POSIX2_VERSION=199209 \
@@ -111,8 +127,9 @@ DEFAULT_POSIX2_VERSION=199209 \
--infodir=/usr/info \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --without-gmp \
--enable-install-program=arch \
+ --with-openssl=no \
+ --enable-year2038 \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
diff --git a/source/a/coreutils/coreutils.uname.diff b/source/a/coreutils/coreutils.uname.diff
index 699110318..3aec5e5f6 100644
--- a/source/a/coreutils/coreutils.uname.diff
+++ b/source/a/coreutils/coreutils.uname.diff
@@ -1,8 +1,7 @@
-diff -Nur coreutils-7.6.orig/src/uname.c coreutils-7.6/src/uname.c
---- coreutils-7.6.orig/src/uname.c 2009-09-01 06:01:16.000000000 -0500
-+++ coreutils-7.6/src/uname.c 2009-09-15 08:55:26.239452858 -0500
-@@ -50,6 +50,11 @@
- # include <mach-o/arch.h>
+--- ./src/uname.c.orig 2022-04-08 06:22:18.000000000 -0500
++++ ./src/uname.c 2022-04-17 13:30:46.550023254 -0500
+@@ -44,6 +44,11 @@
+ # endif
#endif
+#if defined (__linux__)
@@ -11,9 +10,9 @@ diff -Nur coreutils-7.6.orig/src/uname.c coreutils-7.6/src/uname.c
+#endif
+
#include "system.h"
+ #include "die.h"
#include "error.h"
- #include "quote.h"
-@@ -155,6 +160,106 @@
+@@ -149,6 +154,106 @@
exit (status);
}
@@ -120,23 +119,25 @@ diff -Nur coreutils-7.6.orig/src/uname.c coreutils-7.6/src/uname.c
/* Print ELEMENT, preceded by a space if something has already been
printed. */
-@@ -302,10 +407,14 @@
- if (toprint & PRINT_PROCESSOR)
- {
- char const *element = unknown;
+@@ -323,11 +428,16 @@
+ element = "powerpc";
+ # endif
+ #endif
-#if HAVE_SYSINFO && defined SI_ARCHITECTURE
+#if ( HAVE_SYSINFO && defined SI_ARCHITECTURE ) || defined(USE_PROCINFO)
- {
- static char processor[257];
+ if (element == unknown)
+ {
+ static char processor[257];
+#if defined(USE_PROCINFO)
-+ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
++ if (0 <= __linux_procinfo (PROCINFO_PROCESSOR, processor, sizeof processor))
+#else
- if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
++
+ if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
+#endif
- element = processor;
- }
+ element = processor;
+ }
#endif
-@@ -358,9 +467,13 @@
+@@ -360,9 +470,13 @@
if (element == unknown)
{
static char hardware_platform[257];
diff --git a/source/a/coreutils/coreutils.wc.noavx2.diff b/source/a/coreutils/coreutils.wc.noavx2.diff
new file mode 100644
index 000000000..ccae18bb8
--- /dev/null
+++ b/source/a/coreutils/coreutils.wc.noavx2.diff
@@ -0,0 +1,11 @@
+--- ./src/wc.c.orig 2023-08-29 06:39:27.000000000 -0500
++++ ./src/wc.c 2023-08-29 13:24:53.642035314 -0500
+@@ -147,7 +147,7 @@
+ static bool
+ avx2_supported (void)
+ {
+- bool avx_enabled = 0 < __builtin_cpu_supports ("avx2");
++ bool avx_enabled = 0;
+
+ if (debug)
+ error (0, 0, (avx_enabled
diff --git a/source/a/coreutils/no_ls_quoting.patch b/source/a/coreutils/no_ls_quoting.patch
index bfc9d0187..b8643c40f 100644
--- a/source/a/coreutils/no_ls_quoting.patch
+++ b/source/a/coreutils/no_ls_quoting.patch
@@ -1,41 +1,11 @@
-Description: revert inconsistent ls quoting
- This is a revert of upstream commit 109b9220cead6e979d22d16327c4d9f8350431cc.
- Info changed to reflect current upstream intentions.
-
-Bug-Debian: https://bugs.debian.org/813164
-
---- coreutils-8.25.orig/NEWS
-+++ coreutils-8.25/NEWS
-@@ -71,9 +71,6 @@ GNU coreutils NEWS
- df now prefers sources towards the root of a device when
- eliding duplicate bind mounted entries.
-
-- ls now quotes file names unambiguously and appropriate for use in a shell,
-- when outputting to a terminal.
--
- join, sort, uniq with --zero-terminated, now treat '\n' as a field delimiter.
-
- ** Improvements
---- coreutils-8.25.orig/doc/coreutils.texi
-+++ coreutils-8.25/doc/coreutils.texi
-@@ -7750,8 +7750,8 @@ this"} in the default C locale. This lo
-
- You can specify the default value of the @option{--quoting-style} option
- with the environment variable @env{QUOTING_STYLE}@. If that environment
--variable is not set, the default value is @samp{shell-escape} when the
--output is a terminal, and @samp{literal} otherwise.
-+variable is not set, the default value is @samp{literal}, but this
-+default may change to @samp{shell-escape} in a future version of this package.
-
- @item --show-control-chars
- @opindex --show-control-chars
---- coreutils-8.25.orig/src/ls.c
-+++ coreutils-8.25/src/ls.c
-@@ -1581,7 +1581,6 @@ decode_switches (int argc, char **argv)
- if (isatty (STDOUT_FILENO))
- {
- format = many_per_line;
-- set_quoting_style (NULL, shell_escape_quoting_style);
- /* See description of qmark_funny_chars, above. */
- qmark_funny_chars = true;
- }
+--- ./src/ls.c.orig 2021-09-24 06:31:05.000000000 -0500
++++ ./src/ls.c 2021-09-24 19:47:32.230001419 -0500
+@@ -2342,7 +2342,7 @@
+ qs = getenv_quoting_style ();
+ if (qs < 0)
+ qs = (ls_mode == LS_LS
+- ? (stdout_isatty () ? shell_escape_quoting_style : -1)
++ ? (stdout_isatty () ? escape_quoting_style : -1)
+ : escape_quoting_style);
+ if (0 <= qs)
+ set_quoting_style (NULL, qs);
diff --git a/source/a/cpio/cpio.SlackBuild b/source/a/cpio/cpio.SlackBuild
index b1f279bcb..463cfc4e0 100755
--- a/source/a/cpio/cpio.SlackBuild
+++ b/source/a/cpio/cpio.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=cpio
VERSION=$(ls $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/cracklib/cracklib.SlackBuild b/source/a/cracklib/cracklib.SlackBuild
index 8d2ea3ac6..4a617bbb6 100755
--- a/source/a/cracklib/cracklib.SlackBuild
+++ b/source/a/cracklib/cracklib.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2010,2011 Vincent Batts, Vienna, VA, USA
-# Copyright 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2010, 2018, 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=cracklib
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -136,6 +136,13 @@ ln -s /usr/share/cracklib/pw_dict.pwi cracklib_dict.pwi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# 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/$PKGNAM-$VERSION
cp -a \
AUTHORS COPYING.LIB ChangeLog INSTALL NEWS README* \
diff --git a/source/a/cryptsetup/cryptsetup.SlackBuild b/source/a/cryptsetup/cryptsetup.SlackBuild
index e31194315..12000d75e 100755
--- a/source/a/cryptsetup/cryptsetup.SlackBuild
+++ b/source/a/cryptsetup/cryptsetup.SlackBuild
@@ -87,6 +87,7 @@ CFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--enable-cryptsetup-reencrypt \
--enable-libargon2 \
+ --disable-asciidoc \
--mandir=/usr/man \
--docdir=/usr/doc/cryptsetup-$VERSION \
--build=$ARCH-slackware-linux || exit 1
@@ -118,9 +119,14 @@ mkdir -p $PKG/sbin
ln -sf ../../sbin/cryptsetup .
)
+# Add the rc script:
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.luks > $PKG/etc/rc.d/rc.luks.new
+chmod 755 $PKG/etc/rc.d/rc.luks.new
+
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- AUTHORS COPYING* INSTALL NEWS README* TODO FAQ \
+ AUTHORS* COPYING* INSTALL* NEWS* README* TODO* FAQ* \
$PKG/usr/doc/$PKGNAM-$VERSION
# Convert pdf files to text. We do not package bloated PDFs.
@@ -140,25 +146,30 @@ if [ -r ChangeLog ]; then
touch -r ChangeLog $DOCSDIR/ChangeLog
fi
-# Compress and link manpages, if any:
-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
+# Copy Slackware's crypttab manpage to package:
+mkdir -p $PKG/usr/man/man5
+cp -a $CWD/crypttab.5 $PKG/usr/man/man5/
+chown root:root $PKG/usr/man/man5/crypttab.5
+chmod 644 $PKG/usr/man/man5/crypttab.5
+
+# Compress and link the manpages:
+( 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
+)
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/install
+zcat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
diff --git a/source/a/cryptsetup/crypttab.5 b/source/a/cryptsetup/crypttab.5
new file mode 100644
index 000000000..bc4b95563
--- /dev/null
+++ b/source/a/cryptsetup/crypttab.5
@@ -0,0 +1,83 @@
+.\" -*- nroff -*-
+.ds g \" empty
+.ds G \" empty
+.\" Like TP, but if specified indent is more than half
+.\" the current line-length - indent, use the default indent.
+.de Tp
+.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
+.el .TP "\\$1"
+..
+.TH CRYPTTAB 5 "28 Jun 2023" "Slackware Version 15.1"
+.SH NAME
+crypttab \- static information about LUKS volumes
+.SH SYNOPSIS
+.B /etc/crypttab
+.SH DESCRIPTION
+The file
+.B crypttab
+contains the information needed to open any volumes created by cryptsetup.
+Although many distributions have a
+.B crypttab
+with similar syntax and options, the format described here is specific to
+Slackware.
+
+Each volume to be opened is described on a separate line. Fields on each
+line are separated by tabs or spaces. Lines starting with '#' are comments.
+Blank lines are ignored.
+
+.B crypttab
+follows the following format:
+
+.in +4
+<luks_name> <device> <password> <options>
+.in
+.SS The first field (luks_name)
+This is the name of your LUKS volume.
+For example: crypt-home
+.SS The second field (device)
+This is the device containing your LUKS volume.
+For example: /dev/sda2
+.SS The third field (password)
+This is either the volume password in plain text, or the name of a key
+file. Use
+.B none
+to interactively enter password on boot.
+.SS The fourth field (options)
+Comma-separated list of options. Note that there must be a password field
+for any options to be picked up (use a password of
+.B none
+to get a password prompt at boot). The following options are supported:
+.sp
+.B discard
+.RS 4
+This will cause --allow-discards to be passed to cryptsetup program while
+opening the LUKS volume.
+.RE
+.sp
+.B ro
+.RS 4
+This will cause --readonly to be passed to the cryptsetup program while
+opening the LUKS volume.
+.RE
+.sp
+.B swap
+.RS 4
+This option cannot be used with other options. The device given will be
+formatted as a new encrypted volume with a random key on boot, and used as
+swap.
+.RE
+.sp
+.B keyscript=<path/to/script>
+.RS 4
+Get the password from named script's stdout. The only parameter sent to script
+is the <password> field, but the script can ignore it.
+.SH FILES
+.sp
+\fI/etc/crypttab\fP
+.SH NOTES
+.sp
+Only LUKS formatted volumes are supported (except for swap).
+.SH AUTHOR
+Piter Punk <piterpunk@slackware.com>
+.SH "SEE ALSO"
+.BR cryptsetup(8)
diff --git a/source/a/cryptsetup/doinst.sh b/source/a/cryptsetup/doinst.sh
new file mode 100644
index 000000000..3d03e45fa
--- /dev/null
+++ b/source/a/cryptsetup/doinst.sh
@@ -0,0 +1,12 @@
+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...
+}
+config etc/rc.d/rc.luks.new
diff --git a/source/a/cryptsetup/rc.luks b/source/a/cryptsetup/rc.luks
new file mode 100644
index 000000000..9e85ceade
--- /dev/null
+++ b/source/a/cryptsetup/rc.luks
@@ -0,0 +1,146 @@
+#!/bin/bash
+# Open any volumes created by cryptsetup.
+#
+# Some notes on /etc/crypttab in Slackware:
+# Only LUKS formatted volumes are supported (except for swap)
+# crypttab follows the following format:
+# <luks_name> <device> <password> <options>
+#
+# <luks_name>: This is the name of your LUKS volume.
+# For example: crypt-home
+#
+# <device>: This is the device containing your LUKS volume.
+# For example: /dev/sda2
+#
+# <password>: This is either the volume password in plain text, or the name of
+# a key file. Use 'none' to interactively enter password on boot.
+#
+# <options>: Comma-separated list of options. Note that there must be a
+# password field for any options to be picked up (use a password of 'none' to
+# get a password prompt at boot). The following options are supported:
+#
+# discard -- this will cause --allow-discards to be passed to the cryptsetup
+# program while opening the LUKS volume.
+#
+# ro -- this will cause --readonly to be passed to the cryptsetup program while
+# opening the LUKS volume.
+#
+# swap -- this option cannot be used with other options. The device given will
+# be formatted as a new encrypted volume with a random key on boot, and used as
+# swap.
+#
+# keyscript=<path/to/script> -- get the password from the named script's stdout.
+# The only parameter sent to script is the <password> field, but the script can
+# ignore it.
+#
+
+luks_start() {
+ if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
+ # First, check for device-mapper support.
+ if ! grep -wq device-mapper /proc/devices ; then
+ # If device-mapper exists as a module, try to load it.
+ # Try to load a device-mapper kernel module:
+ /sbin/modprobe -q dm-mod
+ fi
+ # NOTE: we only support LUKS formatted volumes (except for swap)!
+ # The input for this loop comes from after the "done" below, so that we can
+ # use fd3 and keep stdin functional for password entry or in case a keyscript
+ # requires it:
+ while read line <&3; do
+ eval LUKSARRAY=( $line )
+ LUKS="${LUKSARRAY[0]}"
+ DEV="${LUKSARRAY[1]}"
+ PASS="${LUKSARRAY[2]}"
+ OPTS="${LUKSARRAY[3]}"
+ KEYSCRIPT="$(echo $OPTS | sed -n 's/.*keyscript=\([^,]*\).*/\1/p')"
+ LUKSOPTS=""
+ if echo $OPTS | grep -wq ro ; then LUKSOPTS="${LUKSOPTS} --readonly" ; fi
+ if echo $OPTS | grep -wq discard ; then LUKSOPTS="${LUKSOPTS} --allow-discards" ; fi
+ # Skip LUKS volumes that were already unlocked (in the initrd):
+ /sbin/cryptsetup status $LUKS 2>/dev/null | head -n 1 | grep -q "is active" && continue
+ if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then
+ if [ -z "${LUKSOPTS}" ]; then
+ echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV':"
+ else
+ echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV' with options '${LUKSOPTS}':"
+ fi
+ if [ -x "${KEYSCRIPT}" ]; then
+ # A password was outputted by a script
+ ${KEYSCRIPT} "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
+ echo
+ elif [ -n "${PASS}" -a "${PASS}" != "none" ]; then
+ if [ -f "${PASS}" ]; then
+ # A password was given a key-file filename
+ /sbin/cryptsetup ${LUKSOPTS} --key-file=${PASS} luksOpen $DEV $LUKS
+ else
+ # A password was provided in plain text
+ echo "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
+ fi
+ else
+ # No password was given, or a password of 'none' was given
+ /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
+ fi
+ elif echo $OPTS | grep -wq swap ; then
+ # If any of the volumes is to be used as encrypted swap,
+ # then encrypt it using a random key and run mkswap:
+ echo "Creating encrypted swap volume '${LUKS}' on device '$DEV':"
+ /sbin/cryptsetup --batch-mode --cipher=aes --key-file=/dev/urandom --key-size=256 create $LUKS $DEV
+ mkswap /dev/mapper/$LUKS
+ fi
+ done 3< <(grep -vE '^(#|$)' /etc/crypttab)
+ fi
+}
+
+luks_stop() {
+ # Close any volumes opened by cryptsetup:
+ if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
+ cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do
+ # NOTE: we only support LUKS formatted volumes (except for swap)!
+ LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ')
+ DEV=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f2 -d' ')
+ OPTS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f4 -d' ')
+ if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then
+ echo "Locking LUKS crypt volume '${LUKS}':"
+ /sbin/cryptsetup luksClose ${LUKS}
+ elif echo $OPTS | grep -wq swap ; then
+ # If any of the volumes was used as encrypted swap,
+ # then run mkswap on the underlying device -
+ # in case other Linux installations on this computer should use it:
+ echo "Erasing encrypted swap '${LUKS}' and restoring normal swap on ${DEV}:"
+ /sbin/cryptsetup remove ${LUKS}
+ mkswap $DEV
+ fi
+ done
+ fi
+}
+
+luks_status() {
+ if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
+ RET=0
+ while read line; do
+ # NOTE: we only support LUKS formatted volumes (except for swap)!
+ LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ')
+ cryptsetup status $LUKS | grep 'active'
+ STATUS="${PIPESTATUS[0]}"
+ if [ "$STATUS" != "0" ]; then
+ RET=1
+ fi
+ done < <(grep -vE '^(#|$)' /etc/crypttab)
+ return $RET
+ fi
+}
+
+case $1 in
+ 'start')
+ luks_start
+ ;;
+ 'stop')
+ luks_stop
+ ;;
+ 'status')
+ luks_status
+ ;;
+ *)
+ echo "Usage $0 start|stop|status"
+ ;;
+esac
diff --git a/source/a/dbus/dbus.SlackBuild b/source/a/dbus/dbus.SlackBuild
index aea4bbe8c..e751b8e1d 100755
--- a/source/a/dbus/dbus.SlackBuild
+++ b/source/a/dbus/dbus.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=dbus
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-5}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -148,7 +148,7 @@ mkdir -p $PKG/etc/dbus-1/system.d
# Add documentation
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- AUTHORS COPYING* HACKING INSTALL NEWS README* doc/*.{txt,html,dtd} \
+ AUTHORS* COPYING* HACKING* INSTALL* NEWS* README* doc/*.{txt,html,dtd} \
$PKG/usr/doc/$PKGNAM-$VERSION
find $PKG/usr/doc/$PKGNAM-$VERSION -type f -exec chmod 0644 {} \+
diff --git a/source/a/dcron/dcron.SlackBuild b/source/a/dcron/dcron.SlackBuild
index b9da7dbf1..1038e2dba 100755
--- a/source/a/dcron/dcron.SlackBuild
+++ b/source/a/dcron/dcron.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2009, 2010, 2012, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2012, 2016, 2018, 2022, 2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=dcron
VERSION=${VERSION:-$(echo dcron-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-11}
+BUILD=${BUILD:-17}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -112,7 +112,8 @@ mkdir -p $PKG/usr/bin
cat crontab > $PKG/usr/bin/crontab
chmod 4711 $PKG/usr/bin/crontab
-zcat $CWD/run-parts.gz > $PKG/usr/bin/run-parts
+# Add run-parts script and man page, largely taken from Fedora:
+cat $CWD/run-parts > $PKG/usr/bin/run-parts
chmod 0755 $PKG/usr/bin/run-parts
mkdir -p $PKG/usr/man/man{1,8}
@@ -125,9 +126,10 @@ mkdir -p $PKG/etc/rc.d
cat $CWD/rc.crond > $PKG/etc/rc.d/rc.crond.new
chmod 755 $PKG/etc/rc.d/rc.crond.new
-# Add the default file:
+# Add the default files:
mkdir -p $PKG/etc/default
cat $CWD/crond.default > $PKG/etc/default/crond.new
+cat $CWD/run-parts.default > $PKG/etc/default/run-parts.new
# Create some other stuff we need
mkdir -p $PKG/etc/cron.{hourly,daily,weekly,monthly}
diff --git a/source/a/dcron/doinst.sh b/source/a/dcron/doinst.sh
index 0d5f1ee87..2c3785fa0 100644
--- a/source/a/dcron/doinst.sh
+++ b/source/a/dcron/doinst.sh
@@ -26,5 +26,6 @@ preserve_perms() {
preserve_perms etc/rc.d/rc.crond.new
config etc/default/crond.new
+config etc/default/run-parts.new
config var/spool/cron/crontabs/root.new
rm -f var/spool/cron/crontabs/root.new
diff --git a/source/a/dcron/rc.crond b/source/a/dcron/rc.crond
index d9076b330..a04f750bb 100644
--- a/source/a/dcron/rc.crond
+++ b/source/a/dcron/rc.crond
@@ -10,6 +10,7 @@ start_crond() {
if ! /usr/bin/pgrep --ns $$ --euid root -f "^/usr/sbin/crond" 1> /dev/null 2> /dev/null ; then
echo "Starting crond: /usr/sbin/crond $CROND_OPTS"
mkdir -p /run/cron
+ chmod 1777 /run/cron
/usr/sbin/crond $CROND_OPTS
fi
}
diff --git a/source/a/dcron/run-parts b/source/a/dcron/run-parts
index 65c778f36..8835e6d43 100644
--- a/source/a/dcron/run-parts
+++ b/source/a/dcron/run-parts
@@ -1,46 +1,101 @@
-#!/bin/sh
-# run-parts: Runs all the scripts found in a directory.
+#!/bin/bash
+# run-parts - concept taken from Debian
# keep going when something fails
set +e
if [ $# -lt 1 ]; then
- echo "Usage: run-parts <directory>"
- exit 1
+ echo "Usage: run-parts [--list | --test] <dir>"
+ exit 1
fi
+while [ $# -gt 1 ]; do
+ case $1 in
+ --list)
+ list=1
+ shift
+ break
+ ;;
+ --test)
+ test=1
+ shift
+ break
+ ;;
+ --)
+ # -- end of options
+ shift
+ break
+ ;;
+ *)
+ # directory
+ break
+ ;;
+ esac
+done
+
if [ ! -d $1 ]; then
- echo "Not a directory: $1"
- echo "Usage: run-parts <directory>"
- exit 1
+ echo "Not a directory: $1"
+ exit 1
+fi
+
+if [ -f /etc/default/run-parts ]; then
+ . /etc/default/run-parts
fi
-# There are several types of files that we would like to
-# ignore automatically, as they are likely to be backups
-# of other scripts:
-IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
-
-# Main loop:
-for SCRIPT in $1/* ; do
- # If this is not a regular file, skip it:
- if [ ! -f $SCRIPT ]; then
- continue
- fi
- # Determine if this file should be skipped by suffix:
- SKIP=false
- for SUFFIX in $IGNORE_SUFFIXES ; do
- if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
- SKIP=true
- break
- fi
- done
- if [ "$SKIP" = "true" ]; then
- continue
- fi
- # If we've made it this far, then run the script if it's executable:
- if [ -x $SCRIPT ]; then
- $SCRIPT || echo "$SCRIPT failed."
- fi
+# Ignore *~ and *, scripts
+for i in $(LC_ALL=C; echo ${1%/}/*[^~,]) ; do
+ [ -d $i ] && continue
+ # Don't run *.{bak,new,orig,rpmsave,rpmorig,rpmnew,swp,cfsaved} scripts
+ [ "${i%.bak}" != "${i}" ] && continue
+ [ "${i%.new}" != "${i}" ] && continue
+ [ "${i%.orig}" != "${i}" ] && continue
+ [ "${i%.rpmsave}" != "${i}" ] && continue
+ [ "${i%.rpmorig}" != "${i}" ] && continue
+ [ "${i%.rpmnew}" != "${i}" ] && continue
+ [ "${i%.swp}" != "${i}" ] && continue
+ [ "${i%.cfsaved}" != "${i}" ] && continue
+ [ "${i%,v}" != "${i}" ] && continue
+
+ # jobs.deny prevents specific files from being executed
+ # jobs.allow prohibits all non-named jobs from being run.
+ # can be used in conjunction but there's no reason to do so.
+ if [ -r $1/jobs.deny ]; then
+ grep -q "^$(basename $i)$" $1/jobs.deny && continue
+ fi
+ if [ -r $1/jobs.allow ]; then
+ grep -q "^$(basename $i)$" $1/jobs.allow || continue
+ fi
+
+ if [ -e $i ]; then
+ if [ -r $1/whitelist ]; then
+ grep -q "^$(basename $i)$" $1/whitelist && continue
+ fi
+
+ if [ ${list:-0} = 1 ]; then
+ echo $i;
+ elif [ -x $i ]; then
+ if [ ${test:-0} = 1 ]; then
+ echo $i;
+ continue
+ fi
+ if [ "$RANDOMIZE" != "" ]; then
+ let "rtime = $RANDOM"
+ if [ "$RANDOMTIME" != "" ]; then
+ let "rtime %= $RANDOMTIME"
+ else
+ let "rtime %= 300"
+ fi
+ sleep $rtime
+ fi
+
+ # run executable files
+ logger -p cron.notice -t "run-parts[$$]" "($1) starting $(basename $i)"
+ $i | sed '1i\
+'"$i"':\
+'
+ logger -p cron.notice -t "run-parts[$$]" "($1) finished $(basename $i)"
+ fi
+ fi
done
exit 0
diff --git a/source/a/dcron/run-parts.8 b/source/a/dcron/run-parts.8
index 2d5e5f6ad..41111dfd9 100644
--- a/source/a/dcron/run-parts.8
+++ b/source/a/dcron/run-parts.8
@@ -7,11 +7,11 @@
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
.el .TP "\\$1"
..
-.TH RUN-PARTS 8 "14 Apr 2002" "Slackware Version 8.1.0
+.TH RUN-PARTS 8 "23 Feb 2024" "Slackware Version 15.1"
.SH NAME
run-parts \- run scripts found in a directory
.SH SYNOPSIS
-.B run-parts <directory>
+.B run-parts [ --list | --test ] <directory>
.LP
.SH DESCRIPTION
.B run-parts
@@ -27,10 +27,50 @@ can be called once a day from root's crontab to run all the scripts found in
.B run-parts
automatically skips files with certain suffixes that are generally associated
with backup or extra files. Any file that ends in one of these will be silently
-ignored: ~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp
+ignored: ~ ^ , .bak .new .orig .rpmsave .rpmorig .rpmnew .swp
+
+The execution of files can be allowed or denied by creating file
+.B jobs.allow
+or
+.B jobs.deny
+which work similarly to other allow/deny config files. The file must be
+created in the specified directory.
+
+Randomization of jobs can be configured in the
+.IR /etc/default/run-parts
+file. To enable randomization of jobs, set the RANDOMIZE parameter to 1
+and set the RANDOM parameter to an integer which determines a random
+seed. Additionally, you may configure the RANDOMTIME parameter (again,
+by specifying an integer) to provide an additional level of
+randomization. Jobs are not randomized when the RANDOM and RANDOMTIME
+parameters are set to 0. Values in these two parameters must be set to
+1 or larger to provide a good enough randomization.
+
+Randomization of cron jobs can be useful for shared networks, where
+multiple cron jobs executed at once can cause spikes in traffic,
+especially during daily jobs. With randomized jobs, the workload is
+evenly distributed throughout the day.
+
+.TP
+.B --list
+print names of all files (not limited to executables), but don't run
+them. This option can't be used with
+.B test
+option.
+.TP
+.B --test
+print names of files, which would be run.
+
+.SH EXAMPLE OF CONFIGURATION FILE
+.nf
+RANDOMIZE=1
+RANDOM=4
+RANDOMTIME=8
+.fi
+
.SH AUTHOR
-Patrick J. Volkerding <volkerdi@slackware.com>, with ideas borrowed from the
-Red Hat and Debian versions of this utility.
+Written for Fedora by Marcela Ma■lá■ová, modified slightly for Slackware by
+Patrick J. Volkerding <volkerdi@slackware.com>.
.SH "SEE ALSO"
.BR crond(8),
.BR crontab(8).
diff --git a/source/a/dcron/run-parts.default b/source/a/dcron/run-parts.default
new file mode 100644
index 000000000..6fd1cce97
--- /dev/null
+++ b/source/a/dcron/run-parts.default
@@ -0,0 +1 @@
+# This file is used to set environment variables for /usr/bin/run-parts.
diff --git a/source/a/dialog/dialog.SlackBuild b/source/a/dialog/dialog.SlackBuild
index eafa1faba..26fad21d2 100755
--- a/source/a/dialog/dialog.SlackBuild
+++ b/source/a/dialog/dialog.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2018, 2019, 2020 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2018, 2019, 2020, 2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -87,6 +87,8 @@ else
LIBDIRSUFFIX=""
fi
+NUMJOBS=${NUMJOBS:-" -j $(expr $(nproc) + 1) "}
+
cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
@@ -119,7 +121,7 @@ CFLAGS="$SLKCFLAGS" \
--build=$ARCH-slackware-linux
# Build and install:
-make -j4 || exit 1
+make $NUMJOBS || exit 1
make install DESTDIR=$PKG || exit 1
# Keep the old traditional looknfeel :-)
diff --git a/source/a/dialog/dialog.url b/source/a/dialog/dialog.url
index 20abbbea1..dd0347485 100644
--- a/source/a/dialog/dialog.url
+++ b/source/a/dialog/dialog.url
@@ -1 +1 @@
-ftp://ftp.invisible-island.net/pub/dialog/
+https://invisible-island.net/archives/dialog/
diff --git a/source/a/e2fsprogs/e2fsprogs.no.64bit.by.default.diff b/source/a/e2fsprogs/e2fsprogs.no.64bit.by.default.diff
index b4a362def..3c6688c16 100644
--- a/source/a/e2fsprogs/e2fsprogs.no.64bit.by.default.diff
+++ b/source/a/e2fsprogs/e2fsprogs.no.64bit.by.default.diff
@@ -1,11 +1,11 @@
---- ./misc/mke2fs.conf.in.orig 2021-08-18 21:53:01.000000000 -0500
-+++ ./misc/mke2fs.conf.in 2021-08-20 22:01:45.099322979 -0500
+--- ./misc/mke2fs.conf.in.orig 2023-02-08 13:32:07.116015773 -0600
++++ ./misc/mke2fs.conf.in 2023-02-08 13:33:43.568017931 -0600
@@ -11,7 +11,8 @@
features = has_journal
}
ext4 = {
-- features = has_journal,extent,huge_file,flex_bg,metadata_csum,64bit,dir_nlink,extra_isize
-+ features = has_journal,extent,huge_file,flex_bg,metadata_csum,dir_nlink,extra_isize
+- features = has_journal,extent,huge_file,flex_bg,metadata_csum,metadata_csum_seed,64bit,dir_nlink,extra_isize,orphan_file
++ features = has_journal,extent,huge_file,flex_bg,metadata_csum,metadata_csum_seed,dir_nlink,extra_isize,orphan_file
+ auto_64-bit_support = 1
}
small = {
diff --git a/source/a/ed/ed.SlackBuild b/source/a/ed/ed.SlackBuild
index f10d640b9..20fcec029 100755
--- a/source/a/ed/ed.SlackBuild
+++ b/source/a/ed/ed.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=ed
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.lz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/efibootmgr/efibootmgr.SlackBuild b/source/a/efibootmgr/efibootmgr.SlackBuild
index 42e587974..dc61fea82 100755
--- a/source/a/efibootmgr/efibootmgr.SlackBuild
+++ b/source/a/efibootmgr/efibootmgr.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-4}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/efivar/efivar.SlackBuild b/source/a/efivar/efivar.SlackBuild
index 39b8a7572..8d0c681af 100755
--- a/source/a/efivar/efivar.SlackBuild
+++ b/source/a/efivar/efivar.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/elilo/elilo.SlackBuild b/source/a/elilo/elilo.SlackBuild
index 57c8aa6aa..bf7d70990 100755
--- a/source/a/elilo/elilo.SlackBuild
+++ b/source/a/elilo/elilo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2013, 2014, 2016, 2017, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2013, 2014, 2016, 2017, 2018, 2019, 2022 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=elilo
VERSION=${VERSION:-$(echo $PKGNAM*.tar.?z* | rev | cut -f 2 -d - | rev)}
-BUILD=${BUILD:-12}
+BUILD=${BUILD:-16}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -75,6 +75,9 @@ tar xvf elilo-${VERSION}-source.tar.gz || exit 1
# things, as the loaders themselves seldom need to be rebuilt. Besides,
# elilo can be rather fragile, so we don't want to rebuild it without a
# good reason and risk breaking it.
+#
+# These EFI binaries were built with Slackware 14.2. Newer compilers might
+# cause bloat, or other issues.
tar xvf $CWD/elilo.loader.binaries.tar.xz || exit 1
chown -R root:root .
@@ -91,12 +94,21 @@ grep -r -l StrnCpy * | xargs sed -i "s/StrnCpy/elilo_StrnCpy/g"
# Increase kernel size limit from 8MB to 16MB (nobody will ever need more than 640K ;-):
zcat $CWD/elilo.double.kernel.size.limit.diff.gz | patch -p1 --verbose || exit 1
-# We will build this from source.
+# Disable the Confidential Computing blob which was leading to boot failures
+# with the 5.19.0 kernel and the EFI stub enabled:
+zcat $CWD/elilo.zeroes.cc_blob_address.diff.gz | patch -p1 --verbose || exit 1
+
+# We will build the tools from source.
# However, we will package the pre-built EFI binaries, since we would
# like to include both 32-bit and 64-bit x86 EFI loaders in the
# finished package.
-
+# To build everything, you'll need to *not* change into the tools directory,
+# instead running "make" here in the top-level. Please note that due to
+# memory exhaustion issues, to build the 32-bit loader you will need to
+# use a 32-bit userspace with an x86_64 kernel.
+cd tools
make || exit 1
+cd ..
# Install the files in the package directory:
mkdir -p $PKG/usr/sbin
diff --git a/source/a/elilo/elilo.zeroes.cc_blob_address.diff b/source/a/elilo/elilo.zeroes.cc_blob_address.diff
new file mode 100644
index 000000000..5c98d7561
--- /dev/null
+++ b/source/a/elilo/elilo.zeroes.cc_blob_address.diff
@@ -0,0 +1,40 @@
+diff -Naur elilo-3.16-source.orig/x86_64/sysdeps.h elilo-3.16-source/x86_64/sysdeps.h
+--- elilo-3.16-source.orig/x86_64/sysdeps.h 2012-11-19 19:01:04.000000000 -0200
++++ elilo-3.16-source/x86_64/sysdeps.h 2022-08-05 15:51:02.700147207 -0300
+@@ -184,7 +184,12 @@
+ /* 0xA0 */ UINT16 mca_info_len; /* LDR */
+ /* 0xA2 */ UINT8 mca_info_buf[0x10]; /* LDR */
+
+-/* 0xB2 */ UINT8 pad_4[0x10E]; /* unused */
++/* 0xB2 */ UINT8 pad_41[0x8A]; /* unused */
++
++/* Confidential Computing Blob */
++/* 0x13C */ UINT32 cc_blob_address; /* LDR */
++
++/* 0x140 */ UINT8 pad_42[0x80]; /* unused */
+
+ /* EFI boot loader signature. */
+ /* 0x1C0 */ UINT8 efi_loader_sig[4]; /* LDR */
+diff -Naur elilo-3.16-source.orig/x86_64/system.c elilo-3.16-source/x86_64/system.c
+--- elilo-3.16-source.orig/x86_64/system.c 2013-03-29 16:03:15.000000000 -0300
++++ elilo-3.16-source/x86_64/system.c 2022-08-05 15:50:45.772968102 -0300
+@@ -684,6 +684,11 @@
+ ZeroMem(bp->s.hd1_info, sizeof bp->s.hd1_info);
+
+ /*
++ * Disable Confidential Computing blob
++ */
++ bp->s.cc_blob_address = 0;
++
++ /*
+ * Memory info.
+ */
+
+@@ -826,6 +831,7 @@
+ CHECK_OFFSET(hd1_info, 0x90, L"");
+ CHECK_OFFSET(mca_info_len, 0xA0, L"%xh");
+ CHECK_OFFSET(mca_info_buf, 0xA2, L"");
++ CHECK_OFFSET(cc_blob_address, 0x13C, L"%xh");
+ CHECK_OFFSET(efi_loader_sig, 0x1C0, L"'%-4.4a'");
+ CHECK_OFFSET(efi_sys_tbl, 0x1C4, L"%xh");
+ CHECK_OFFSET(efi_mem_desc_size, 0x1C8, L"%xh");
diff --git a/source/a/elilo/eliloconfig b/source/a/elilo/eliloconfig
index 9d7475f9a..a662927bf 100644
--- a/source/a/elilo/eliloconfig
+++ b/source/a/elilo/eliloconfig
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2013, 2016, 2017 Patrick Volkerding, Sebeka, Minnesota, USA
+# Copyright 2013, 2016, 2017, 2023 Patrick Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -176,15 +176,6 @@ if [ "$REPLY" = "skip" ]; then
exit
fi
-if [ ! -d /sys/firmware/efi/vars ]; then
- modprobe efivars 1> /dev/null 2> /dev/null
- sleep 1 # Probably not needed, but playing it safe
-fi
-# If it's still gone, we fail silently:
-if [ ! -d /sys/firmware/efi/vars ]; then
- exit
-fi
-
efibootmgr -v | rev | cut -f 2- | rev | grep Boot0 | grep Slackware | while read line ; do
# Reject entries that don't exactly match as not our business
if [ ! "$(echo $line | cut -f 2- -d ' ')" = "Slackware" ]; then
diff --git a/source/a/elogind/11-prefer-deep-suspend.patch b/source/a/elogind/11-prefer-deep-suspend.patch
new file mode 100644
index 000000000..c3d3d23b5
--- /dev/null
+++ b/source/a/elogind/11-prefer-deep-suspend.patch
@@ -0,0 +1,8 @@
+--- ./src/sleep/10-elogind.conf.orig 2024-04-16 02:21:44.000000000 -0500
++++ ./src/sleep/10-elogind.conf 2024-04-16 13:32:01.046025234 -0500
+@@ -19,4 +19,4 @@
+ #HandleNvidiaSleep=no
+ #HibernateByUsing=
+ #SuspendByUsing=
+-#SuspendMode=s2idle deep
++SuspendMode=deep s2idle
diff --git a/source/a/elogind/12-default-deep-suspend.patch b/source/a/elogind/12-default-deep-suspend.patch
new file mode 100644
index 000000000..25eb73dc6
--- /dev/null
+++ b/source/a/elogind/12-default-deep-suspend.patch
@@ -0,0 +1,11 @@
+--- ./src/shared/sleep-config.c.orig 2024-04-16 02:21:44.000000000 -0500
++++ ./src/shared/sleep-config.c 2024-04-22 13:31:58.033078814 -0500
+@@ -45,7 +45,7 @@
+ #if 0 /// elogind supports suspend modes (deep s2idle) so we need defaults, too
+ /* Not used by SLEEP_SUSPEND */
+ #else // 0
+- [SLEEP_SUSPEND] = STRV_MAKE("s2idle", "deep"),
++ [SLEEP_SUSPEND] = STRV_MAKE("deep", "s2idle"),
+ #endif // 0
+ [SLEEP_HIBERNATE] = STRV_MAKE("platform", "shutdown"),
+ [SLEEP_HYBRID_SLEEP] = STRV_MAKE("suspend"),
diff --git a/source/a/elogind/doinst.sh b/source/a/elogind/doinst.sh
index 3f15bbd8d..e39e2aee3 100644
--- a/source/a/elogind/doinst.sh
+++ b/source/a/elogind/doinst.sh
@@ -28,9 +28,12 @@ preserve_perms() {
# Preserve permissions while moving into place:
preserve_perms etc/rc.d/rc.elogind.new
config etc/elogind/logind.conf.new
+config etc/elogind/sleep.conf.new
+config etc/elogind/sleep.conf.d/10-elogind.conf.new
+config etc/pam.d/elogind-user.new
-if pgrep -f elogind-daemon | grep -q 'elogind-daemon'; then
- echo "Reloading elogind-daemon..."
+# Reload elogind-daemon:
+if pgrep -f elogind-daemon 1> /dev/null 2> /dev/null ; then
pkill -HUP -f elogind-daemon
fi
diff --git a/source/a/elogind/elogind-polkit.patch b/source/a/elogind/elogind-polkit.patch
deleted file mode 100644
index 4d91b9817..000000000
--- a/source/a/elogind/elogind-polkit.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-Update org.freedesktop.login1.conf
-This mirrors an upstream change opening up all of logind's bus calls to
-unprivileged users via polkit.
-
-See systemd/systemd#471.
-Closes #3.
-
-diff -uar a/src/login/org.freedesktop.login1.conf b/src/login/org.freedesktop.login1.conf
---- a/src/login/org.freedesktop.login1.conf
-+++ b/src/login/org.freedesktop.login1.conf
-@@ -90,6 +90,42 @@
-
- <allow send_destination="org.freedesktop.login1"
- send_interface="org.freedesktop.login1.Manager"
-+ send_member="LockSession"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="UnlockSession"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="LockSessions"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="UnlockSessions"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="KillSession"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="KillUser"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="TerminateSession"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="TerminateUser"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
-+ send_member="TerminateSeat"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
- send_member="PowerOff"/>
-
- <allow send_destination="org.freedesktop.login1"
- @@ -130,6 +166,10 @@
-
- <allow send_destination="org.freedesktop.login1"
- send_interface="org.freedesktop.login1.Manager"
-+ send_member="SetWallMessage"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Manager"
- send_member="AttachDevice"/>
-
- <allow send_destination="org.freedesktop.login1"
- @@ -138,6 +178,10 @@
-
- <allow send_destination="org.freedesktop.login1"
- send_interface="org.freedesktop.login1.Seat"
-+ send_member="Terminate"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Seat"
- send_member="ActivateSession"/>
-
- <allow send_destination="org.freedesktop.login1"
- @@ -154,14 +198,30 @@
-
- <allow send_destination="org.freedesktop.login1"
- send_interface="org.freedesktop.login1.Session"
-+ send_member="Terminate"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Session"
- send_member="Activate"/>
-
- <allow send_destination="org.freedesktop.login1"
- send_interface="org.freedesktop.login1.Session"
-+ send_member="Lock"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Session"
-+ send_member="Unlock"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Session"
- send_member="SetIdleHint"/>
-
- <allow send_destination="org.freedesktop.login1"
- send_interface="org.freedesktop.login1.Session"
-+ send_member="Kill"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.Session"
- send_member="TakeControl"/>
-
- <allow send_destination="org.freedesktop.login1"
- @@ -180,6 +240,14 @@
- send_interface="org.freedesktop.login1.Session"
- send_member="PauseDeviceComplete"/>
-
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.User"
-+ send_member="Terminate"/>
-+
-+ <allow send_destination="org.freedesktop.login1"
-+ send_interface="org.freedesktop.login1.User"
-+ send_member="Kill"/>
-+
- <allow receive_sender="org.freedesktop.login1"/>
- </policy>
-
diff --git a/source/a/elogind/elogind.SlackBuild b/source/a/elogind/elogind.SlackBuild
index 9438d08b6..74d26ab85 100755
--- a/source/a/elogind/elogind.SlackBuild
+++ b/source/a/elogind/elogind.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2016, 2017, 2020 Eric Hameleers, Eindhoven, NL
-# Copyright 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2020, 2023, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -31,7 +31,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
@@ -86,45 +86,63 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-# Our nobody user has UIDNumber 99, not 65534:
-sed -e "s/65534/99/g" -i $(grep -lr 65534 .)
-
-# Launch elogind when called via DBus and make sure its rundir exists
-# (in Slackware, /run is mounted as a tmpfs):
-sed -i src/login/org.freedesktop.login1.service.in \
- -e "s,/bin/false,/lib${LIBDIRSUFFIX}/elogind,"
-
-# Merge a pull request for an upstream fix:
-zcat $CWD/elogind-polkit.patch.gz | patch -p1 --verbose || exit 1
-
-# Thanks to Widya Walesa:
-# Slackware still using cgroup v1 or legacy mode. Check the outcome of:
-# [ $(stat -fc %T /sys/fs/cgroup/) = "cgroup2fs" ] && echo "unified" \
-# || ( [ -e /sys/fs/cgroup/unified/ ] && echo "hybrid" || echo "legacy")
+# Once upon a time we were encouraged to go against long-standing UNIX
+# traditions and use 99:99 for nobody:nogroup.
+# This may have been a bad idea.
+# But since to change this we'll have to dig through the system and make
+# sure that nothing hardcodes 99:99, we'll leave it as-is for now.
+# It's more than likely on the TODO list to change these back to
+# 65534:65534, however.
+# Meanwhile we'll at least change this from a sed to a patch.
+# Always hated sed in these situations because the underlying code can change
+# but sed will still happily scribble all over everything.
+cat $CWD/elogind.nobody.nogroup.99.99.diff | patch -p1 --verbose || exit 1
+
+# OK, here's the scoop on s2idle. After doing some digging, it looks like both
+# Intel and AMD have stopped officially supporting S3 sleep (aka "deep") with
+# the latest generation of CPUs (although it "might work"). I've also seen a
+# few people say that S3 is "not secure"... which if you're worried that a
+# three letter agency might grab your sleeping laptop and extract the contents
+# of the RAM while keeping it powered up, well, maybe in that sense it isn't.
+# As far as s2idle, I have heard that it has the potential to be as much of a
+# low power mode as deep, but that depends on how low the IRQ rate gets. In
+# practice I have heard of s2idle draining a battery in half a day.
+#
+# Anyway, I tried s2idle here again (with the below sleep patches) and it still
+# locks up my machine (a fairly recent Thinkpad X1).
+#
+# S3 works and has the best power savings of all the partially-on modes.
+# Feel free to edit /etc/elogind/sleep.conf.d/10-elogind.conf if s2idle works
+# for you, but we'll continue to default to deep for now.
+#
+# Don't prefer s2idle, as it doesn't seem to work:
+cat $CWD/11-prefer-deep-suspend.patch | patch -p1 --verbose || exit 1
+cat $CWD/12-default-deep-suspend.patch | patch -p1 --verbose || exit 1
# Configure, build, and install:
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
mkdir meson-build
cd meson-build
-meson \
- --buildtype release \
- --prefix /usr \
- --libdir /usr/lib${LIBDIRSUFFIX} \
- -Drootlibdir="/lib${LIBDIRSUFFIX}" \
- -Drootlibexecdir="/lib${LIBDIRSUFFIX}/elogind" \
+meson setup \
+ --buildtype=release \
+ --prefix=/usr \
+ --libdir=/lib${LIBDIRSUFFIX} \
+ --libexecdir=/lib${LIBDIRSUFFIX}/elogind \
+ -Dpkgconfiglibdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \
+ -Dpamlibdir=/lib${LIBDIRSUFFIX}/security \
-Dudevrulesdir="/lib/udev/rules.d" \
-Ddocdir="/usr/doc/$PKGNAM-$VERSION" \
-Dhtmldir="/usr/doc/$PKGNAM-$VERSION/html" \
-Dmandir="/usr/man" \
- -Dman=true \
- -Dhtml=false \
+ -Dman=enabled \
+ -Dhtml=disabled \
-Dbashcompletiondir="/usr/share/bash-completion/completions" \
+ -Dnobody-user=nobody \
-Dnobody-group=nogroup \
- -Dpam=true \
- -Dpamlibdir="/lib${LIBDIRSUFFIX}/security" \
+ -Dpam=enabled \
-Dpamconfdir="/etc/pam.d" \
- -Dacl=true \
+ -Dacl=enabled \
-Dsmack=false \
-Dutmp=true \
-Ddefault-hierarchy=legacy \
@@ -133,18 +151,22 @@ meson \
-Dpoweroff-path=/sbin/poweroff \
-Dreboot-path=/sbin/reboot \
-Ddefault-kill-user-processes=false \
+ -Dmode=release \
.. || exit 1
"${NINJA:=ninja}" $NUMJOBS || exit 1
DESTDIR=$PKG $NINJA install || exit 1
cd ..
-# Create symlinks for elogind binaries to /usr/bin/:
-mkdir -p $PKG/usr/bin
-ln -sf /bin/elogind-inhibit $PKG/usr/bin/elogind-inhibit
-ln -sf /bin/loginctl $PKG/usr/bin/loginctl
+# Create symlinks for elogind binaries to /bin/:
+mkdir -p $PKG/bin
+ln -sf /usr/bin/elogind-inhibit $PKG/bin/elogind-inhibit
+ln -sf /usr/bin/loginctl $PKG/bin/loginctl
# Make sure we do not overwrite the user's customizations:
mv -i $PKG/etc/elogind/logind.conf{,.new}
+mv -i $PKG/etc/elogind/sleep.conf{,.new}
+mv -i $PKG/etc/elogind/sleep.conf.d/10-elogind.conf{,.new}
+mv -i $PKG/etc/pam.d/elogind-user{,.new}
# 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
@@ -169,8 +191,7 @@ mkdir -p $PKG/etc/elogind/logind.conf.d/ $PKG/etc/elogind/sleep.conf.d/
# Add login1 policy file that allows users in the 'power' group
# to shutdown/reboot the computer:
mkdir -p $PKG/usr/share/polkit-1/rules.d
-zcat $CWD/10-enable-elogind-power.rules.gz > \
- $PKG/usr/share/polkit-1/rules.d/10-enable-session-power.rules
+cat $CWD/10-enable-elogind-power.rules > $PKG/usr/share/polkit-1/rules.d/10-enable-session-power.rules
# We don't need the hidden files to make inferior package managers keep dirs:
find $PKG -type f -name ".keep_dir" -exec rm -f {} \;
diff --git a/source/a/elogind/elogind.nobody.nogroup.99.99.diff b/source/a/elogind/elogind.nobody.nogroup.99.99.diff
new file mode 100644
index 000000000..e1930ef52
--- /dev/null
+++ b/source/a/elogind/elogind.nobody.nogroup.99.99.diff
@@ -0,0 +1,174 @@
+diff -u -r --new-file elogind-252.23.orig/meson.build elogind-252.23/meson.build
+--- elogind-252.23.orig/meson.build 2024-03-10 03:24:27.000000000 -0500
++++ elogind-252.23/meson.build 2024-03-12 13:22:28.571004872 -0500
+@@ -1031,40 +1031,40 @@
+ nobody_group = get_option('nobody-group')
+
+ if not meson.is_cross_build()
+- getent_result = run_command('getent', 'passwd', '65534', check : false)
++ getent_result = run_command('getent', 'passwd', '99', check : false)
+ if getent_result.returncode() == 0
+ name = getent_result.stdout().split(':')[0]
+ if name != nobody_user
+ warning('\n' +
+- 'The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
++ 'The local user with the UID 99 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
+ 'Your build will result in an user table setup that is incompatible with the local system.')
+ endif
+ endif
+ id_result = run_command('id', '-u', nobody_user, check : false)
+ if id_result.returncode() == 0
+ id = id_result.stdout().strip().to_int()
+- if id != 65534
++ if id != 99
+ warning('\n' +
+- 'The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
++ 'The local user with the configured user name "@0@" of the nobody user does not have UID 99 (it has @1@).\n'.format(nobody_user, id) +
+ 'Your build will result in an user table setup that is incompatible with the local system.')
+ endif
+ endif
+
+- getent_result = run_command('getent', 'group', '65534', check : false)
++ getent_result = run_command('getent', 'group', '99', check : false)
+ if getent_result.returncode() == 0
+ name = getent_result.stdout().split(':')[0]
+ if name != nobody_group
+ warning('\n' +
+- 'The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
++ 'The local group with the GID 99 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
+ 'Your build will result in an group table setup that is incompatible with the local system.')
+ endif
+ endif
+ id_result = run_command('id', '-g', nobody_group, check : false)
+ if id_result.returncode() == 0
+ id = id_result.stdout().strip().to_int()
+- if id != 65534
++ if id != 99
+ warning('\n' +
+- 'The local group with the configured group name "@0@" of the nobody group does not have GID 65534 (it has @1@).\n'.format(nobody_group, id) +
++ 'The local group with the configured group name "@0@" of the nobody group does not have GID 99 (it has @1@).\n'.format(nobody_group, id) +
+ 'Your build will result in an group table setup that is incompatible with the local system.')
+ endif
+ endif
+diff -u -r --new-file elogind-252.23.orig/meson_options.txt elogind-252.23/meson_options.txt
+--- elogind-252.23.orig/meson_options.txt 2024-03-10 03:24:27.000000000 -0500
++++ elogind-252.23/meson_options.txt 2024-03-12 13:22:28.571004872 -0500
+@@ -308,10 +308,10 @@
+ option('wheel-group', type : 'boolean',
+ description : 'the ACL for wheel group should be added')
+ option('nobody-user', type : 'string',
+- description : 'The name of the nobody user (the one with UID 65534)',
++ description : 'The name of the nobody user (the one with UID 99)',
+ value : 'nobody')
+ option('nobody-group', type : 'string',
+- description : 'The name of the nobody group (the one with GID 65534)',
++ description : 'The name of the nobody group (the one with GID 99)',
+ value : 'nobody')
+ #if 0 /// UNNEEDED by elogind
+ # option('adm-gid', type : 'integer', value : 0,
+diff -u -r --new-file elogind-252.23.orig/src/basic/user-util.c elogind-252.23/src/basic/user-util.c
+--- elogind-252.23.orig/src/basic/user-util.c 2024-03-10 03:24:27.000000000 -0500
++++ elogind-252.23/src/basic/user-util.c 2024-03-12 13:22:28.571004872 -0500
+@@ -178,7 +178,7 @@
+ const char **shell,
+ UserCredsFlags flags) {
+
+- /* We enforce some special rules for uid=0 and uid=65534: in order to avoid NSS lookups for root we hardcode
++ /* We enforce some special rules for uid=0 and uid=99: in order to avoid NSS lookups for root we hardcode
+ * their user record data. */
+
+ if (STR_IN_SET(*username, "root", "0")) {
+@@ -198,7 +198,7 @@
+ return 0;
+ }
+
+- if (STR_IN_SET(*username, NOBODY_USER_NAME, "65534") &&
++ if (STR_IN_SET(*username, NOBODY_USER_NAME, "99") &&
+ synthesize_nobody()) {
+ *username = NOBODY_USER_NAME;
+
+@@ -344,7 +344,7 @@
+ return 0;
+ }
+
+- if (STR_IN_SET(*groupname, NOBODY_GROUP_NAME, "65534") &&
++ if (STR_IN_SET(*groupname, NOBODY_GROUP_NAME, "99") &&
+ synthesize_nobody()) {
+ *groupname = NOBODY_GROUP_NAME;
+
+@@ -940,7 +940,7 @@
+ bool synthesize_nobody(void) {
+ /* Returns true when we shall synthesize the "nobody" user (which we do by default). This can be turned off by
+ * touching /etc/systemd/dont-synthesize-nobody in order to provide upgrade compatibility with legacy systems
+- * that used the "nobody" user name and group name for other UIDs/GIDs than 65534.
++ * that used the "nobody" user name and group name for other UIDs/GIDs than 99.
+ *
+ * Note that we do not employ any kind of synchronization on the following caching variable. If the variable is
+ * accessed in multi-threaded programs in the worst case it might happen that we initialize twice, but that
+diff -u -r --new-file elogind-252.23.orig/src/basic/user-util.h elogind-252.23/src/basic/user-util.h
+--- elogind-252.23.orig/src/basic/user-util.h 2024-03-10 03:24:27.000000000 -0500
++++ elogind-252.23/src/basic/user-util.h 2024-03-12 13:22:28.571004872 -0500
+@@ -78,8 +78,8 @@
+ #define UID_INVALID ((uid_t) -1)
+ #define GID_INVALID ((gid_t) -1)
+
+-#define UID_NOBODY ((uid_t) 65534U)
+-#define GID_NOBODY ((gid_t) 65534U)
++#define UID_NOBODY ((uid_t) 99U)
++#define GID_NOBODY ((gid_t) 99U)
+
+ /* If REMOUNT_IDMAPPING_HOST_ROOT is set for remount_idmap() we'll include a mapping here that maps the host
+ * root user accessing the idmapped mount to the this user ID on the backing fs. This is the last valid UID in
+diff -u -r --new-file elogind-252.23.orig/src/test/test-fs-util.c elogind-252.23/src/test/test-fs-util.c
+--- elogind-252.23.orig/src/test/test-fs-util.c 2024-03-10 03:24:27.000000000 -0500
++++ elogind-252.23/src/test/test-fs-util.c 2024-03-12 13:22:28.571004872 -0500
+@@ -591,8 +591,8 @@
+ usec_t test_mtime;
+ int r;
+
+- test_uid = geteuid() == 0 ? 65534 : getuid();
+- test_gid = geteuid() == 0 ? 65534 : getgid();
++ test_uid = geteuid() == 0 ? 99 : getuid();
++ test_gid = geteuid() == 0 ? 99 : getgid();
+
+ test_mtime = usec_sub_unsigned(now(CLOCK_REALTIME), USEC_PER_WEEK);
+
+diff -u -r --new-file elogind-252.23.orig/src/test/test-user-util.c elogind-252.23/src/test/test-user-util.c
+--- elogind-252.23.orig/src/test/test-user-util.c 2024-03-10 03:24:27.000000000 -0500
++++ elogind-252.23/src/test/test-user-util.c 2024-03-12 13:22:28.571004872 -0500
+@@ -230,7 +230,7 @@
+ assert_se(!valid_user_group_name("", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
+ assert_se(valid_user_group_name("0", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
+ assert_se(valid_user_group_name("1", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
+- assert_se(valid_user_group_name("65534", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
++ assert_se(valid_user_group_name("99", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
+ assert_se(!valid_user_group_name("65535", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
+ assert_se(valid_user_group_name("65536", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
+ assert_se(!valid_user_group_name("-1", VALID_USER_ALLOW_NUMERIC|VALID_USER_RELAX));
+@@ -266,7 +266,7 @@
+ assert_se(!valid_user_group_name("", VALID_USER_ALLOW_NUMERIC));
+ assert_se(valid_user_group_name("0", VALID_USER_ALLOW_NUMERIC));
+ assert_se(valid_user_group_name("1", VALID_USER_ALLOW_NUMERIC));
+- assert_se(valid_user_group_name("65534", VALID_USER_ALLOW_NUMERIC));
++ assert_se(valid_user_group_name("99", VALID_USER_ALLOW_NUMERIC));
+ assert_se(!valid_user_group_name("65535", VALID_USER_ALLOW_NUMERIC));
+ assert_se(valid_user_group_name("65536", VALID_USER_ALLOW_NUMERIC));
+ assert_se(!valid_user_group_name("-1", VALID_USER_ALLOW_NUMERIC));
+@@ -350,7 +350,7 @@
+ test_get_user_creds_one("root", "root", 0, 0, "/root", DEFAULT_USER_SHELL);
+ test_get_user_creds_one("0", "root", 0, 0, "/root", DEFAULT_USER_SHELL);
+ test_get_user_creds_one(NOBODY_USER_NAME, NOBODY_USER_NAME, UID_NOBODY, GID_NOBODY, "/", NOLOGIN);
+- test_get_user_creds_one("65534", NOBODY_USER_NAME, UID_NOBODY, GID_NOBODY, "/", NOLOGIN);
++ test_get_user_creds_one("99", NOBODY_USER_NAME, UID_NOBODY, GID_NOBODY, "/", NOLOGIN);
+ }
+
+ #if 0 /// UNNEEDED by elogind
+@@ -375,7 +375,7 @@
+ test_get_group_creds_one("root", "root", 0);
+ test_get_group_creds_one("0", "root", 0);
+ test_get_group_creds_one(NOBODY_GROUP_NAME, NOBODY_GROUP_NAME, GID_NOBODY);
+- test_get_group_creds_one("65534", NOBODY_GROUP_NAME, GID_NOBODY);
++ test_get_group_creds_one("99", NOBODY_GROUP_NAME, GID_NOBODY);
+ }
+
+ TEST(make_salt) {
diff --git a/source/a/elvis/elvis.SlackBuild b/source/a/elvis/elvis.SlackBuild
index c8eb3e9c3..fe2817d3b 100755
--- a/source/a/elvis/elvis.SlackBuild
+++ b/source/a/elvis/elvis.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=elvis
VERSION=2.2_0
-BUILD=${BUILD:-7}
+BUILD=${BUILD:-8}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/elvis/elvis.clr.orig b/source/a/elvis/elvis.clr.orig
deleted file mode 100644
index d132c6738..000000000
--- a/source/a/elvis/elvis.clr.orig
+++ /dev/null
@@ -1,56 +0,0 @@
-switch gui
-case windows
-case x11 {
- color normal black on gray90
- color argument like keyword green or dark green
- color bottom like normal
- color comment italic dark green or light green
- color cursor blue on navyblue
- color fixed gray35 or gray80
- color function Red4 or pink
- color guide white
- color hexheading gray70
- color hlsearch boxed
- color keyword bold
- color libt like keyword italic
- color linenumber gray
- color link like formatted underlined blue or light blue
- color number Blue4 or light blue
- color other like keyword
- color prep bold Blue4 or light blue
- color prepquote like string
- color scroll like tool
- color scrollbar like toolbar
- color selection on tan
- color spell on pink
- color status like tool
- color statusbar like toolbar
- color string tan4 or tan1
- color tool black on gray75
- color toolbar white on gray40
- color variable Gray15 or palegoldenrod
-}
-case vio
-case termcap {
- color normal yellow or black
- color char like string
- color comment italic light green or green
- color fixed white or gray
- color function light cyan or cyan
- color hexheading gray
- color hlsearch bold
- color keyword bold white or black
- color libt like keyword
- color linenumber gray
- color link underlined blue or light cyan
- color number light cyan or blue
- color other like keyword
- color prep bold magenta or blue
- color prepquote like string
- color regexp like string
- color ruler blue or light cyan
- color showmode green boxed
- color spell red or light magenta
- color string white or brown
- color variable like normal
-}
diff --git a/source/a/etc/_etc/etc/nsswitch.conf.new b/source/a/etc/_etc/etc/nsswitch.conf.new
deleted file mode 100644
index 6954d6b16..000000000
--- a/source/a/etc/_etc/etc/nsswitch.conf.new
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# /etc/nsswitch.conf
-#
-# An example Name Service Switch config file. This file should be
-# sorted with the most-used services at the beginning.
-#
-# The entry '[NOTFOUND=return]' means that the search for an
-# entry should stop if the search in the previous entry turned
-# up nothing. Note that if the search failed due to some other reason
-# (like no NIS server responding) then the search continues with the
-# next entry.
-#
-# Legal entries are:
-#
-# nisplus or nis+ Use NIS+ (NIS version 3)
-# nis or yp Use NIS (NIS version 2), also called YP
-# dns Use DNS (Domain Name Service)
-# files Use the local files
-# [NOTFOUND=return] Stop searching if not found so far
-#
-
-# passwd: db files nis
-# shadow: db files nis
-# group: db files nis
-
-passwd: compat
-group: compat
-
-hosts: files dns
-networks: files dns
-
-services: db files
-protocols: db files
-rpc: db files
-ethers: db files
-netmasks: files
-netgroup: files
-bootparams: files
-
-automount: files
-aliases: files
-
diff --git a/source/a/etc/_etc/etc/profile.d/home-profile.d.csh.new b/source/a/etc/_etc/etc/profile.d/home-profile.d.csh.new
new file mode 100755
index 000000000..13da1e238
--- /dev/null
+++ b/source/a/etc/_etc/etc/profile.d/home-profile.d.csh.new
@@ -0,0 +1,9 @@
+#!/bin/csh
+
+if ( -d "$HOME/.profile.d") then
+ foreach i ("$HOME"/.profile.d/*.csh)
+ source "$i"
+ end
+endif
+
+unsetenv i
diff --git a/source/a/etc/_etc/etc/profile.d/home-profile.d.sh.new b/source/a/etc/_etc/etc/profile.d/home-profile.d.sh.new
new file mode 100755
index 000000000..23078184f
--- /dev/null
+++ b/source/a/etc/_etc/etc/profile.d/home-profile.d.sh.new
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ -d "$HOME/.profile.d" ]; then
+ for i in "$HOME"/.profile.d/*.sh; do
+ . "$i"
+ done
+fi
+
+unset i
diff --git a/source/a/etc/doinst.sh b/source/a/etc/doinst.sh
index cd4ed6a1f..3734bc854 100644
--- a/source/a/etc/doinst.sh
+++ b/source/a/etc/doinst.sh
@@ -54,6 +54,8 @@ config etc/shells.new
config etc/services.new
config etc/issue.net.new
config etc/nsswitch.conf.new
+config etc/profile.d/home-profile.d.csh.new
+config etc/profile.d/home-profile.d.sh.new
config etc/profile.d/lang.csh.new
config etc/profile.d/lang.sh.new
config etc/profile.d/z-dot-in-non-root-path.csh.new
@@ -78,10 +80,8 @@ rm -f etc/mtab.new
rm -f etc/motd.new
rm -f etc/ld.so.conf.new
rm -f etc/hosts.new
-#rm -f etc/shadow.new
rm -f etc/networks.new
rm -f etc/HOSTNAME.new
-#rm -f etc/gshadow.new
rm -f etc/shells.new
rm -f etc/printcap.new
#rm -f etc/issue.new
@@ -92,15 +92,32 @@ rm -f var/run/utmp.new
rm -f var/log/lastlog.new
rm -f var/log/wtmp.new
+# These are just a hazard to keep around, honestly.
+# There's no unique information in them anyway, as any new entries are merged
+# into the existing files automatically.
+rm -f etc/group.new
+rm -f etc/gshadow.new
+rm -f etc/passwd.new
+rm -f etc/shadow.new
+
+# We will add any missing entries to gshadow, but make no attempt to repair existing ones:
+cat etc/group | while read line ; do
+ GRP="$(echo $line | cut -f 1 -d :)"
+ GMEMBERS="$(echo $line | rev | cut -f 1 -d : | rev)"
+ if ! grep -q "^${GRP}:" etc/gshadow ; then
+ echo "${GRP}:x::${GMEMBERS}" >> etc/gshadow
+ fi
+done
+
# Make sure $HOME is correct for user sddm:
chroot . /usr/sbin/usermod -d /var/lib/sddm sddm > /dev/null 2> /dev/null
# Make sure that sddm is a member of group video:
chroot . /usr/sbin/usermod --groups video sddm > /dev/null 2> /dev/null
# Also ensure ownerships/perms:
-chown root.utmp var/run/utmp var/log/wtmp
+chown root:utmp var/run/utmp var/log/wtmp
chmod 664 var/run/utmp var/log/wtmp
-chown root.shadow etc/shadow etc/gshadow
+chown root:shadow etc/shadow etc/gshadow
chmod 640 etc/shadow etc/gshadow
# Match permissions on any leftover config z-dot-in-non-root-path scripts
@@ -112,4 +129,3 @@ fi
if [ -r etc/profile.d/z-dot-in-non-root-path.sh.new ]; then
touch -r etc/profile.d/z-dot-in-non-root-path.sh etc/profile.d/z-dot-in-non-root-path.sh.new
fi
-
diff --git a/source/a/etc/etc.SlackBuild b/source/a/etc/etc.SlackBuild
index 44a332539..f958d7628 100755
--- a/source/a/etc/etc.SlackBuild
+++ b/source/a/etc/etc.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2021 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=etc
-VERSION=15.0
-BUILD=${BUILD:-16}
+VERSION=15.1
+BUILD=${BUILD:-11}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -58,7 +58,7 @@ sed -i -e "s#/i586-slackware-linux#/${ARCH}-slackware-linux#" etc/ld.so.conf.new
if [ "$ARCH" = "x86_64" ]; then
sed -i -e "s#/lib#/lib64#" etc/ld.so.conf.new
fi
-zcat $CWD/nsswitch.conf.gz > $PKG/etc/nsswitch.conf.new
+cat $CWD/nsswitch.conf > $PKG/etc/nsswitch.conf.new
# Check to make sure that shadow has the same number of entries
# as passwd:
@@ -80,4 +80,3 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
# Build the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/etc-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/a/etc/group.new b/source/a/etc/group.new
index 414f4855a..2bcaf4ea9 100644
--- a/source/a/etc/group.new
+++ b/source/a/etc/group.new
@@ -26,6 +26,7 @@ tape:x:26:
mysql:x:27:
rpc:x:32:
sshd:x:33:sshd
+kvm:x:36:
cgred:x:41:
gdm:x:42:
shadow:x:43:
@@ -33,6 +34,8 @@ ntp:x:44:
icecc:x:49:
ftp:x:50:
oprofile:x:51:
+named:x:53:
+nslcd:x:54:
sddm:x:64:
pulse:x:65:
dhcpcd:x:68:
@@ -50,8 +53,15 @@ postdrop:x:92:
scanner:x:93:
dovecot:x:94:
dovenull:x:95:
+proftpd:x:97:
nobody:x:98:nobody
nogroup:x:99:
users:x:100:
console:x:101:
+avahi:x:214:
+nut:x:218:
+colord:x:303:
+nm-openvpn:x:320:
ldap:x:330:
+openvpn:x:443:
+overflowgid:x:65534:
diff --git a/source/a/etc/nsswitch.conf b/source/a/etc/nsswitch.conf
index 3d993afcb..4c82ae41c 100644
--- a/source/a/etc/nsswitch.conf
+++ b/source/a/etc/nsswitch.conf
@@ -26,7 +26,7 @@
passwd: compat
group: compat
-hosts: files dns
+hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
networks: files
services: files
diff --git a/source/a/etc/passwd.new b/source/a/etc/passwd.new
index e2e187ff8..f7e8e0e26 100644
--- a/source/a/etc/passwd.new
+++ b/source/a/etc/passwd.new
@@ -21,6 +21,8 @@ ntp:x:44:44:User for NTP:/:/bin/false
icecc:x:49:49:User for Icecream distributed compiler:/var/cache/icecream:/bin/false
oprofile:x:51:51:oprofile:/:/bin/false
usbmux:x:52:83:User for usbmux daemon:/var/empty:/bin/false
+named:x:53:53:User for BIND:/var/named:/bin/false
+nslcd:x:54:54:User for nslcd (nss-pam-ldapd):/dev/null:/bin/false
sddm:x:64:64:User for SDDM:/var/lib/sddm:/bin/false
pulse:x:65:65:User for PulseAudio:/var/run/pulse:/bin/false
dhcpcd:x:68:68:User for dhcpcd:/var/lib/dhcpcd:/bin/false
@@ -32,5 +34,12 @@ pop:x:90:90:POP:/:/bin/false
postfix:x:91:91:User for Postfix MTA:/dev/null:/bin/false
dovecot:x:94:94:User for Dovecot processes:/dev/null:/bin/false
dovenull:x:95:95:User for Dovecot login processing:/dev/null:/bin/false
+proftpd:x:97:97:User for ProFTPD:/:/bin/false
nobody:x:99:99:nobody:/:/bin/false
+avahi:x:214:214:User for avahi:/dev/null:/bin/false
+nut:x:218:218:User for NUT:/dev/null:/bin/false
+colord:x:303:303:User for colord:/var/lib/colord:/bin/false
+nm-openvpn:x:320:320:User for NetworkManager-openvpn:/var/lib/openvpn/chroot:/bin/false
ldap:x:330:330:OpenLDAP server:/var/lib/openldap:/bin/false
+openvpn:x:443:443:User for OpenVPN:/:/bin/false
+overflowuid:x:65534:65534:System UID overflow:/:/bin/false
diff --git a/source/a/etc/shadow.new b/source/a/etc/shadow.new
index 1f3d8a5ce..3cbc04070 100644
--- a/source/a/etc/shadow.new
+++ b/source/a/etc/shadow.new
@@ -21,6 +21,8 @@ ntp:*:9797:0:::::
icecc:*:9797:0:::::
oprofile:*:9797:0:::::
usbmux:*:9797:0:::::
+named:*:9797:0:::::
+nslcd:*:9797:0:::::
sddm:*:9797:0:::::
pulse:*:9797:0:::::
dhcpcd:*:9797:0:::::
@@ -32,5 +34,12 @@ pop:*:9797:0:::::
postfix:*:9797:0:::::
dovecot:*:9797:0:::::
dovenull:*:9797:0:::::
+proftpd:*:9797:0:::::
nobody:*:9797:0:::::
+avahi:*:9797:0:::::
+nut:*:9797:0:::::
+colord:*:9797:0:::::
+nm-openvpn:*:9797:0:::::
ldap:*:9797:0:::::
+openvpn:*:9797:0:::::
+overflowuid:*:9797:0:::::
diff --git a/source/a/eudev/config/rc.d/rc.udev.new b/source/a/eudev/config/rc.d/rc.udev.new
index 1b4e3fe9f..1db93c726 100755
--- a/source/a/eudev/config/rc.d/rc.udev.new
+++ b/source/a/eudev/config/rc.d/rc.udev.new
@@ -95,10 +95,10 @@ case "$1" in
if ! /sbin/pidof udevd 1>/dev/null 2>/dev/null; then # start udevd
echo "Creating static nodes in /dev."
kmod static-nodes -f tmpfiles --output /run/static-nodes
- grep "^d\ " /run/static-nodes | while read line ; do
+ grep "^d " /run/static-nodes | while read line ; do
mkdir -p -m $(echo $line | cut -f 3 -d ' ') $(echo $line | cut -f 2 -d ' ')
done
- grep -v "^d\ " /run/static-nodes | while read line ; do
+ grep -v "^d " /run/static-nodes | while read line ; do
mknod -m $(echo $line | cut -f 3 -d ' ') \
$(echo $line | cut -f 2 -d ' ') \
$(echo $line | cut -b1 ) \
diff --git a/source/a/eudev/eudev.SlackBuild b/source/a/eudev/eudev.SlackBuild
index f663e0b13..60125bbfe 100755
--- a/source/a/eudev/eudev.SlackBuild
+++ b/source/a/eudev/eudev.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2017, 2018, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 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
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=eudev
VERSION=${VERSION:-$(echo eudev-*.tar.* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -77,8 +77,16 @@ zcat $CWD/60-cdrom_id.rules.diff.gz | patch -p1 --verbose || exit 1
zcat $CWD/eudev.ignore_bind_unbind_events.diff.gz | patch -p1 --verbose || exit 1
# Don't require groups that we don't need:
-zcat $CWD/eudev.no.renderD.no.kvm.diff.gz | patch -p1 --verbose || exit 1
-
+zcat $CWD/eudev.no.renderD.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/eudev.no.sgx.diff.gz | patch -p1 --verbose || exit 1
+
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
./configure \
--prefix=/usr \
--with-rootprefix=/ \
@@ -153,7 +161,7 @@ chmod 0755 $PKG/lib/udev/*
mkdir -p $PKG/usr/doc/eudev-$VERSION
cp -a \
- COPYING* README* TODO \
+ BUILD* CONTRIBUTING* COPYING* LEGACY* NOTES* README* TODO* \
$PKG/usr/doc/eudev-$VERSION
# Compress and fix manpage symlinks:
diff --git a/source/a/eudev/eudev.no.renderD.diff b/source/a/eudev/eudev.no.renderD.diff
new file mode 100644
index 000000000..1a95c504f
--- /dev/null
+++ b/source/a/eudev/eudev.no.renderD.diff
@@ -0,0 +1,17 @@
+--- ./rules/50-udev-default.rules.orig 2023-05-16 10:08:56.000000000 -0500
++++ ./rules/50-udev-default.rules 2023-05-16 13:15:25.690216651 -0500
+@@ -31,12 +31,12 @@
+
+ SUBSYSTEM=="video4linux", GROUP="video"
+ SUBSYSTEM=="graphics", GROUP="video"
+-SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video"
++SUBSYSTEM=="drm", GROUP="video"
+ SUBSYSTEM=="dvb", GROUP="video"
+ SUBSYSTEM=="media", GROUP="video"
+ SUBSYSTEM=="cec", GROUP="video"
+
+-SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="video", MODE="0666"
++SUBSYSTEM=="drm", GROUP="video", MODE="0666"
+ SUBSYSTEM=="kfd", GROUP="video", MODE="0666"
+
+ SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
diff --git a/source/a/eudev/eudev.no.renderD.no.kvm.diff b/source/a/eudev/eudev.no.renderD.no.kvm.diff
deleted file mode 100644
index 0377e2dff..000000000
--- a/source/a/eudev/eudev.no.renderD.no.kvm.diff
+++ /dev/null
@@ -1,32 +0,0 @@
---- ./rules/50-udev-default.rules.orig 2018-09-21 07:22:02.000000000 -0500
-+++ ./rules/50-udev-default.rules 2019-03-01 17:36:14.830219588 -0600
-@@ -31,12 +31,12 @@
-
- SUBSYSTEM=="video4linux", GROUP="video"
- SUBSYSTEM=="graphics", GROUP="video"
--SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video"
-+SUBSYSTEM=="drm", GROUP="video"
- SUBSYSTEM=="dvb", GROUP="video"
- SUBSYSTEM=="media", GROUP="video"
- SUBSYSTEM=="cec", GROUP="video"
-
--SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="video", MODE="0666"
-+SUBSYSTEM=="drm", GROUP="video", MODE="0666"
- SUBSYSTEM=="kfd", GROUP="video", MODE="0666"
-
- SUBSYSTEM=="sound", GROUP="audio", \
-@@ -78,9 +78,10 @@
-
- KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
-
--# The static_node is required on s390x and ppc (they are using MODULE_ALIAS)
--KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"
--
--SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm"
-+## Commented out as these seem to be systemd requirements:
-+## The static_node is required on s390x and ppc (they are using MODULE_ALIAS)
-+#KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"
-+#
-+#SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm"
-
- LABEL="default_end"
diff --git a/source/a/eudev/eudev.no.sgx.diff b/source/a/eudev/eudev.no.sgx.diff
new file mode 100644
index 000000000..79ed1925a
--- /dev/null
+++ b/source/a/eudev/eudev.no.sgx.diff
@@ -0,0 +1,14 @@
+--- ./rules/50-udev-default.rules.orig 2023-05-16 10:08:56.000000000 -0500
++++ ./rules/50-udev-default.rules 2023-05-17 12:45:42.392847645 -0500
+@@ -39,8 +39,9 @@
+ SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="video", MODE="0666"
+ SUBSYSTEM=="kfd", GROUP="video", MODE="0666"
+
+-SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
+-SUBSYSTEM=="misc", KERNEL=="sgx_vepc", GROUP="sgx", MODE="0660"
++# This is obsolete. No sense starting to support it now.
++#SUBSYSTEM=="misc", KERNEL=="sgx_enclave", GROUP="sgx", MODE="0660"
++#SUBSYSTEM=="misc", KERNEL=="sgx_vepc", GROUP="sgx", MODE="0660"
+
+ # When using static_node= with non-default permissions, also update
+ # tmpfiles.d/static-nodes-permissions.conf.in to keep permissions synchronized.
diff --git a/source/a/exfatprogs/exfatprogs.SlackBuild b/source/a/exfatprogs/exfatprogs.SlackBuild
index f8390aa2e..de966a191 100755
--- a/source/a/exfatprogs/exfatprogs.SlackBuild
+++ b/source/a/exfatprogs/exfatprogs.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/f2fs-tools/f2fs-tools.SlackBuild b/source/a/f2fs-tools/f2fs-tools.SlackBuild
index 7a7bea4cc..d98fe5b67 100755
--- a/source/a/f2fs-tools/f2fs-tools.SlackBuild
+++ b/source/a/f2fs-tools/f2fs-tools.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2018, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=f2fs-tools
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
@@ -112,7 +112,7 @@ rm -f $PKG/usr/sbin/sg_write_buffer
# Move libraries out of /usr:
mkdir $PKG/lib${LIBDIRSUFFIX}
( cd $PKG/usr/lib${LIBDIRSUFFIX}
- for file in lib*.so.?.* ; do
+ for file in lib*.so.*.* ; do
mv $file ../../lib${LIBDIRSUFFIX}
ln -sf ../../lib${LIBDIRSUFFIX}/$file .
done
diff --git a/source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch b/source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch
deleted file mode 100644
index c71d2f817..000000000
--- a/source/a/file/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 94ab14414606b794b7ccf60595493cd8715e195b Mon Sep 17 00:00:00 2001
-From: ProgAndy <code@progandy.de>
-Date: Fri, 2 Apr 2021 14:33:18 +0200
-Subject: [PATCH] Fix mime type XZ after "Add checksum for XZ"
-
----
- magic/Magdir/compress | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/magic/Magdir/compress b/magic/Magdir/compress
-index 64d11a73..aef4bb49 100644
---- a/magic/Magdir/compress
-+++ b/magic/Magdir/compress
-@@ -265,14 +265,13 @@
-
- # http://tukaani.org/xz/xz-file-format.txt
- 0 ustring \xFD7zXZ\x00 XZ compressed data, checksum
-+!:strength * 2
-+!:mime application/x-xz
- >7 byte&0xf 0x0 NONE
- >7 byte&0xf 0x1 CRC32
- >7 byte&0xf 0x4 CRC64
- >7 byte&0xf 0xa SHA-256
-
--!:strength * 2
--!:mime application/x-xz
--
- # https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt
- 0 string LRZI LRZIP compressed data
- >4 byte x - version %d
---
-2.31.1
-
diff --git a/source/a/file/file.SlackBuild b/source/a/file/file.SlackBuild
index 1a5e65011..0a4d05e03 100755
--- a/source/a/file/file.SlackBuild
+++ b/source/a/file/file.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2008, 2009, 2010, 2013, 2015, 2018, 2019 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2008, 2009, 2010, 2013, 2015, 2018, 2019, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=file
VERSION=${VERSION:-$(echo file-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -99,16 +99,7 @@ zcat $CWD/file.zisofs.magic.gz >> magic/Magdir/compress
zcat $CWD/file.crdaregbin.magic.gz >> magic/Magdir/crdaregbin
# Add some regression fixes from upstream:
-zcat $CWD/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch.gz | patch -p1 --verbose || exit 1
-
-# Fix detection of XZ compressed data:
-zcat $CWD/0001-Fix-mime-type-XZ-after-Add-checksum-for-XZ.patch.gz | patch -p1 --verbose || exit 1
+# (none currently)
# This is needed after the default data directory patch above:
autoreconf -vif || exit 1
diff --git a/source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch b/source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch
deleted file mode 100644
index 47c8c2aed..000000000
--- a/source/a/file/git-patches/1c677c04c0fa43ecfeccdb9705dbbd19fb356891.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1c677c04c0fa43ecfeccdb9705dbbd19fb356891 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sun, 4 Apr 2021 21:02:19 +0000
-Subject: [PATCH] Don't count each byte encounter as 1, count the total number
- of bytes found (Anatol Belski). This makes it behave like 5.39.
-
----
- src/encoding.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/src/encoding.c b/src/encoding.c
-index c8b404390..c66703bb6 100644
---- a/src/encoding.c
-+++ b/src/encoding.c
-@@ -35,7 +35,7 @@
- #include "file.h"
-
- #ifndef lint
--FILE_RCSID("@(#)$File: encoding.c,v 1.27 2021/02/05 21:33:49 christos Exp $")
-+FILE_RCSID("@(#)$File: encoding.c,v 1.28 2021/04/04 21:02:19 christos Exp $")
- #endif /* lint */
-
- #include "magic.h"
-@@ -282,8 +282,7 @@ looks_ ## NAME(const unsigned char *buf, size_t nbytes, file_unichar_t *ubuf, \
- } \
- u = 0; \
- for (i = 0; i < __arraycount(dist); i++) { \
-- if (dist[i]) \
-- u++; \
-+ u+= dist[i]; \
- } \
- if (u < 3) \
- return 0; \
diff --git a/source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch b/source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch
deleted file mode 100644
index 61919d5c7..000000000
--- a/source/a/file/git-patches/2f62d5544d13ca32dc09504ec70358db581e9e65.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 2f62d5544d13ca32dc09504ec70358db581e9e65 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Wed, 31 Mar 2021 19:51:14 +0000
-Subject: [PATCH] Improve 8086 relocatable detection (Joerg Jenderek)
-
----
- magic/Magdir/xenix | 20 +++++++++++++++-----
- 1 file changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/magic/Magdir/xenix b/magic/Magdir/xenix
-index 3e248de26..d5ab69e5d 100644
---- a/magic/Magdir/xenix
-+++ b/magic/Magdir/xenix
-@@ -1,6 +1,6 @@
-
- #------------------------------------------------------------------------------
--# $File: xenix,v 1.12 2021/02/23 00:51:10 christos Exp $
-+# $File: xenix,v 1.13 2021/03/31 19:51:14 christos Exp $
- # xenix: file(1) magic for Microsoft Xenix
- #
- # "Middle model" stuff, and "Xenix 8086 relocatable or 80286 small
-@@ -13,25 +13,35 @@
- #
- 0 string core core file (Xenix)
- # URL: http://www.polarhome.com/service/man/?qf=86rel&tf=2&of=Xenix
-+# http://fileformats.archiveteam.org/wiki/OMF
- # Reference: http://www.azillionmonkeys.com/qed/Omfg.pdf
- # Update: Joerg Jenderek
- # recordtype~TranslatorHEADerRecord
- 0 byte 0x80
--# GRR: line above is too general as it catches also Extensible storage engine DataBase
-+# GRR: line above is too general as it catches also Extensible storage engine DataBase,
-+# all lif files like forth.lif hpcc88.lif lex90b.lif ( See ./lif)
-+# and all compressed DEGAS low-res bitmaps like: MUNCHIE.PC1 PIDER1.PC1
- # skip examples like GENA.SND Switch.Snd by looking for record length maximal 1024-3
- >1 uleshort <1022
- # skip examples like GAME.PICTURE Strange.Pic by looking for positive record length
- >>1 uleshort >0
- # skip examples like Xtable.Data FRACTAL.GEN SHR.VIEW by looking for positive string length
- >>>3 ubyte >0
--# skip examples like OMBRE.6 with "UUUUUU" by looking for filename like "hello.c"
-->>>>4 regex [a-zA-Z_/]{1,8}[.] 8086 relocatable (Microsoft)
-+# skip examples like OMBRE.6 with "UUUUUU" name by looking for valid high second record type
-+>>>>(1.s+3) ubyte >0x6D 8086 relocatable (Microsoft)
- #!:mime application/octet-stream
- !:mime application/x-object
--!:ext o/a
-+!:ext obj/o/a
-+# T-module name often source name like "hello.c" or "jmppm32.asm" in JMPPM32.OBJ or
-+# "kbhit" in KBHITS.OBJ or "CAUSEWAY_KERNAL" in CWAPI.OBJ
- >>>>>3 pstring x \b, "%s"
-+# data length probably lower 256 according to TrID obj_omf.trid.xml
-+>>>>>1 uleshort x \b, 1st record data length %u
- # checksum
- #>>>>>(3.b+4) ubyte x \b, checksum 0x%2.2x
-+# second recordtype: 96h~LNAMES 88h~COMENT 8CH~EXTDEF
-+>>>>>(1.s+3) ubyte x \b, 2nd record type 0x%x
-+>>>>>(1.s+4) uleshort x \b, 2nd record data length %u
- 0 leshort 0xff65 x.out
- >2 string __.SYMDEF randomized
- >0 byte x archive
diff --git a/source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch b/source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch
deleted file mode 100644
index 1e80ac99d..000000000
--- a/source/a/file/git-patches/576d713ec955faafdc9d7b783f3f4c27b7bc1793.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 576d713ec955faafdc9d7b783f3f4c27b7bc1793 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Tue, 6 Apr 2021 15:43:11 +0000
-Subject: [PATCH] Add more ash paths from Cormac Stephenson
-
----
- magic/Magdir/commands | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/magic/Magdir/commands b/magic/Magdir/commands
-index 10f8d2b20..5f6be0cce 100644
---- a/magic/Magdir/commands
-+++ b/magic/Magdir/commands
-@@ -1,6 +1,6 @@
-
- #------------------------------------------------------------------------------
--# $File: commands,v 1.63 2020/06/06 15:36:30 christos Exp $
-+# $File: commands,v 1.64 2021/04/06 15:43:11 christos Exp $
- # commands: file(1) magic for various shells and interpreters
- #
- #0 string/w : shell archive or script for antique kernel text
-@@ -38,6 +38,10 @@
- 0 search/1 #!/usr/bin/env\ zsh Paul Falstad's zsh script text executable
- !:mime text/x-shellscript
-
-+0 string/wt #!\ /bin/ash Neil Brown's ash script text executable
-+!:mime text/x-shellscript
-+0 string/wt #!\ /usr/bin/ash Neil Brown's ash script text executable
-+!:mime text/x-shellscript
- 0 string/wt #!\ /usr/local/bin/ash Neil Brown's ash script text executable
- !:mime text/x-shellscript
- 0 string/wt #!\ /usr/local/bin/ae Neil Brown's ae script text executable
diff --git a/source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch b/source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch
deleted file mode 100644
index f026891fb..000000000
--- a/source/a/file/git-patches/64dcffa715049351327851c8b5a6f3430a32ff39.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 64dcffa715049351327851c8b5a6f3430a32ff39 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sun, 4 Apr 2021 18:24:34 +0000
-Subject: [PATCH] Add arm-coff (Mark Harmstone)
-
----
- magic/Magdir/arm | 41 +++++++++++++++++++++++++++++++++++++++++
- magic/Magdir/coff | 7 ++++++-
- magic/Makefile.am | 3 ++-
- 3 files changed, 49 insertions(+), 2 deletions(-)
- create mode 100644 magic/Magdir/arm
-
-diff --git a/magic/Magdir/arm b/magic/Magdir/arm
-new file mode 100644
-index 000000000..8869d1928
---- /dev/null
-+++ b/magic/Magdir/arm
-@@ -0,0 +1,41 @@
-+#------------------------------------------------------------------------------
-+# $File: arm,v 1.1 2021/04/04 18:24:34 christos Exp $
-+# arm: file(1) magic for ARM COFF
-+#
-+# https://docs.microsoft.com/en-us/windows/win32/debug/pe-format
-+
-+# Aarch64
-+0 leshort 0xaa64
-+# test for unused flag bits in f_flags
-+>18 uleshort&0x8E80 0
-+# use little endian variant of subroutine to
-+# display name+variables+flags for common object formated files
-+>>0 use display-coff
-+!:strength -10
-+
-+# ARM
-+0 leshort 0x01c0
-+# test for unused flag bits in f_flags
-+>18 uleshort&0x8E80 0
-+# use little endian variant of subroutine to
-+# display name+variables+flags for common object formated files
-+>>0 use display-coff
-+!:strength -10
-+
-+# ARM Thumb
-+0 leshort 0x01c2
-+# test for unused flag bits in f_flags
-+>18 uleshort&0x8E80 0
-+# use little endian variant of subroutine to
-+# display name+variables+flags for common object formated files
-+>>0 use display-coff
-+!:strength -10
-+
-+# ARMv7 Thumb
-+0 leshort 0x01c4
-+# test for unused flag bits in f_flags
-+>18 uleshort&0x8E80 0
-+# use little endian variant of subroutine to
-+# display name+variables+flags for common object formated files
-+>>0 use display-coff
-+!:strength -10
-diff --git a/magic/Magdir/coff b/magic/Magdir/coff
-index 18e7b665e..5063bc19e 100644
---- a/magic/Magdir/coff
-+++ b/magic/Magdir/coff
-@@ -1,6 +1,6 @@
-
- #------------------------------------------------------------------------------
--# $File: coff,v 1.4 2021/02/10 00:37:02 christos Exp $
-+# $File: coff,v 1.5 2021/04/04 18:24:34 christos Exp $
- # coff: file(1) magic for Common Object Files not specific to known cpu types or manufactures
- #
- # COFF
-@@ -34,6 +34,11 @@
- # https://msdn.microsoft.com/en-us/library/windows/desktop/ms680313(v=vs.85).aspx
- >>>>0 uleshort 0x0200 Intel ia64
- >>>>0 uleshort 0x8664 Intel amd64
-+# ARM COFF (./arm)
-+>>>>0 uleshort 0xaa64 Aarch64
-+>>>>0 uleshort 0x01c0 ARM
-+>>>>0 uleshort 0x01c2 ARM Thumb
-+>>>>0 uleshort 0x01c4 ARMv7 Thumb
- # TODO for other COFFs
- #>>>>0 uleshort 0xABCD COFF_TEMPLATE
- >>>>0 default x
-diff --git a/magic/Makefile.am b/magic/Makefile.am
-index 0eb5865b7..75d39bbde 100644
---- a/magic/Makefile.am
-+++ b/magic/Makefile.am
-@@ -1,5 +1,5 @@
- #
--# $File: Makefile.am,v 1.166 2021/03/14 16:24:18 christos Exp $
-+# $File: Makefile.am,v 1.167 2021/04/04 18:24:34 christos Exp $
- #
- MAGIC_FRAGMENT_BASE = Magdir
- MAGIC_DIR = $(top_srcdir)/magic
-@@ -29,6 +29,7 @@ $(MAGIC_FRAGMENT_DIR)/application \
- $(MAGIC_FRAGMENT_DIR)/applix \
- $(MAGIC_FRAGMENT_DIR)/apt \
- $(MAGIC_FRAGMENT_DIR)/archive \
-+$(MAGIC_FRAGMENT_DIR)/arm \
- $(MAGIC_FRAGMENT_DIR)/asf \
- $(MAGIC_FRAGMENT_DIR)/assembler \
- $(MAGIC_FRAGMENT_DIR)/asterix \
diff --git a/source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch b/source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch
deleted file mode 100644
index 78f7d31c6..000000000
--- a/source/a/file/git-patches/6b34436ac766dae64749b8d14f18c6910be40131.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 6b34436ac766dae64749b8d14f18c6910be40131 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Mon, 5 Apr 2021 16:36:14 +0000
-Subject: [PATCH] remove "u" from the pattern (Joerg Jenderek)
-
----
- magic/Magdir/mail.news | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/magic/Magdir/mail.news b/magic/Magdir/mail.news
-index 3a2eeb962..6a2229107 100644
---- a/magic/Magdir/mail.news
-+++ b/magic/Magdir/mail.news
-@@ -1,5 +1,5 @@
- #------------------------------------------------------------------------------
--# $File: mail.news,v 1.26 2021/03/21 14:37:03 christos Exp $
-+# $File: mail.news,v 1.27 2021/04/05 16:36:14 christos Exp $
- # mail.news: file(1) magic for mail and news
- #
- # Unfortunately, saved netnews also has From line added in some news software.
-@@ -81,4 +81,4 @@
- # File format spec: https://wiki.dovecot.org/Design/Dcrypt/#File_format
- # From: Stephen Gildea
- 0 string CRYPTED\003\007 Dovecot encrypted message
-->9 byte xu \b, dcrypt version %d
-+>9 byte x \b, dcrypt version %d
diff --git a/source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch b/source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch
deleted file mode 100644
index 9fa3ab4f0..000000000
--- a/source/a/file/git-patches/9e2becec20d023409a1671bf10a682f699350e85.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 9e2becec20d023409a1671bf10a682f699350e85 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sun, 4 Apr 2021 21:03:43 +0000
-Subject: [PATCH] Encoding bug fix.
-
----
- ChangeLog | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/ChangeLog b/ChangeLog
-index 23a93cf4b..2238ba6f8 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -1,3 +1,8 @@
-+2021-04-04 17:02 Christos Zoulas <christos@zoulas.com>
-+
-+ * count the total bytes found not the total byte positions
-+ in order to determine encoding (Anatol Belski)
-+
- 2021-03-30 20:21 Christos Zoulas <christos@zoulas.com>
-
- * release 5.40
diff --git a/source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch b/source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch
deleted file mode 100644
index c0cbf3cb8..000000000
--- a/source/a/file/git-patches/f06015040e7ffb3be21bb7622f9f8291b749aaf9.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-From f06015040e7ffb3be21bb7622f9f8291b749aaf9 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sun, 4 Apr 2021 17:46:17 +0000
-Subject: [PATCH] Fix regression after unsigned/signed printing changes by
- making types unsigned (Richard W.M. Jones)
-
----
- magic/Magdir/filesystems | 54 +++++++++++++++++++--------------------
- magic/Magdir/linux | 30 +++++++++++-----------
- tests/Makefile.am | 1 +
- tests/ext4.result | 1 +
- tests/ext4.testfile | Bin 0 -> 2048 bytes
- 5 files changed, 44 insertions(+), 42 deletions(-)
- create mode 100644 tests/ext4.result
- create mode 100644 tests/ext4.testfile
-
-diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems
-index 0cb45cbfe..81966d6cc 100644
---- a/magic/Magdir/filesystems
-+++ b/magic/Magdir/filesystems
-@@ -1,5 +1,5 @@
- #------------------------------------------------------------------------------
--# $File: filesystems,v 1.140 2021/02/23 00:51:10 christos Exp $
-+# $File: filesystems,v 1.141 2021/04/04 17:46:17 christos Exp $
- # filesystems: file(1) magic for different filesystems
- #
- 0 name partid
-@@ -1739,12 +1739,12 @@
- >>>0x464 lelong >0x0000007 ext4 filesystem data
- # else large INCOMPAT?
- >>0x460 lelong >0x000003f ext4 filesystem data
-->0x468 belong x \b, UUID=%08x
-->0x46c beshort x \b-%04x
-->0x46e beshort x \b-%04x
-->0x470 beshort x \b-%04x
-->0x472 belong x \b-%08x
-->0x476 beshort x \b%04x
-+>0x468 ubelong x \b, UUID=%08x
-+>0x46c ubeshort x \b-%04x
-+>0x46e ubeshort x \b-%04x
-+>0x470 ubeshort x \b-%04x
-+>0x472 ubelong x \b-%08x
-+>0x476 ubeshort x \b%04x
- >0x478 string >0 \b, volume name "%s"
- # General flags for any ext* fs
- >0x460 lelong &0x0000004 (needs journal recovery)
-@@ -1767,12 +1767,12 @@
-
- # f2fs filesystem - Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
- 0x400 lelong 0xF2F52010 F2FS filesystem
-->0x46c belong x \b, UUID=%08x
-->0x470 beshort x \b-%04x
-->0x472 beshort x \b-%04x
-->0x474 beshort x \b-%04x
-->0x476 belong x \b-%08x
-->0x47a beshort x \b%04x
-+>0x46c ubelong x \b, UUID=%08x
-+>0x470 ubeshort x \b-%04x
-+>0x472 ubeshort x \b-%04x
-+>0x474 ubeshort x \b-%04x
-+>0x476 ubelong x \b-%08x
-+>0x47a ubeshort x \b%04x
- >0x147c lestring16 x \b, volume name "%s"
-
- # Minix filesystems - Juan Cespedes <cespedes@debian.org>
-@@ -2296,20 +2296,20 @@
- >>0x10060 string >\0 lockproto %s)
-
- # Russell Coker <russell@coker.com.au>
--0x10040 string _BHRfS_M BTRFS Filesystem
-->0x1012b string >\0 label "%s",
-->0x10090 lelong x sectorsize %d,
-->0x10094 lelong x nodesize %d,
-->0x10098 lelong x leafsize %d,
-->0x10020 belong x UUID=%08x-
-->0x10024 beshort x \b%04x-
-->0x10026 beshort x \b%04x-
-->0x10028 beshort x \b%04x-
-->0x1002a beshort x \b%04x
-->0x1002c belong x \b%08x,
-->0x10078 lequad x %lld/
-->0x10070 lequad x \b%lld bytes used,
-->0x10088 lequad x %lld devices
-+0x10040 string _BHRfS_M BTRFS Filesystem
-+>0x1012b string >\0 label "%s",
-+>0x10090 lelong x sectorsize %d,
-+>0x10094 lelong x nodesize %d,
-+>0x10098 lelong x leafsize %d,
-+>0x10020 ubelong x UUID=%08x-
-+>0x10024 ubeshort x \b%04x-
-+>0x10026 ubeshort x \b%04x-
-+>0x10028 ubeshort x \b%04x-
-+>0x1002a ubeshort x \b%04x
-+>0x1002c ubelong x \b%08x,
-+>0x10078 lequad x %lld/
-+>0x10070 lequad x \b%lld bytes used,
-+>0x10088 lequad x %lld devices
-
- # dvdisaster's .ecc
- # From: "Nelson A. de Oliveira" <naoliv@gmail.com>
-diff --git a/magic/Magdir/linux b/magic/Magdir/linux
-index 693cef6f5..f25243e20 100644
---- a/magic/Magdir/linux
-+++ b/magic/Magdir/linux
-@@ -1,6 +1,6 @@
-
- #------------------------------------------------------------------------------
--# $File: linux,v 1.77 2021/02/24 23:05:02 christos Exp $
-+# $File: linux,v 1.78 2021/04/04 17:46:17 christos Exp $
- # linux: file(1) magic for Linux files
- #
- # Values for Linux/i386 binaries, from Daniel Quinlan <quinlan@yggdrasil.com>
-@@ -83,20 +83,20 @@
-
- # format v1, supported since 1998
- 0 name linux-swap
-->0x400 lelong 1 little endian, version %u,
-->>0x404 lelong x size %u pages,
-->>0x408 lelong x %u bad pages,
-->0x400 belong 1 big endian, version %u,
-->>0x404 belong x size %u pages,
-->>0x408 belong x %u bad pages,
-->0x41c string \0 no label,
-->0x41c string >\0 LABEL=%s,
-->0x40c belong x UUID=%08x
-->0x410 beshort x \b-%04x
-->0x412 beshort x \b-%04x
-->0x414 beshort x \b-%04x
-->0x416 belong x \b-%08x
-->0x41a beshort x \b%04x
-+>0x400 lelong 1 little endian, version %u,
-+>>0x404 lelong x size %u pages,
-+>>0x408 lelong x %u bad pages,
-+>0x400 belong 1 big endian, version %u,
-+>>0x404 belong x size %u pages,
-+>>0x408 belong x %u bad pages,
-+>0x41c string \0 no label,
-+>0x41c string >\0 LABEL=%s,
-+>0x40c ubelong x UUID=%08x
-+>0x410 ubeshort x \b-%04x
-+>0x412 ubeshort x \b-%04x
-+>0x414 ubeshort x \b-%04x
-+>0x416 ubelong x \b-%08x
-+>0x41a ubeshort x \b%04x
-
- 0xff6 string SWAPSPACE2 Linux swap file, 4k page size,
- >0 use linux-swap
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index b38a25b3d..a63c2f65a 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -7,6 +7,7 @@ regex-eol.magic \
- CVE-2014-1943.testfile \
- JW07022A.mp3.testfile \
- escapevel.testfile \
-+ext4.testfile \
- fit-map-data.testfile \
- gedcom.testfile \
- hddrawcopytool.testfile \
diff --git a/source/a/findutils/findutils.SlackBuild b/source/a/findutils/findutils.SlackBuild
index 9db39fc43..3b23a6818 100755
--- a/source/a/findutils/findutils.SlackBuild
+++ b/source/a/findutils/findutils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2009, 2010, 2018, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=findutils
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -64,7 +64,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf findutils-$VERSION
-tar xvf $CWD/findutils-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/findutils-$VERSION.tar.?z || exit 1
cd findutils-$VERSION || exit 1
chown -R root:root .
@@ -79,14 +79,10 @@ find . \
# like to be yelled at.
zcat $CWD/findutils.no.default.options.warnings.diff.gz | patch -p1 --verbose || exit 1
-# Don't include updatedb, locate, frcode:
-zcat $CWD/findutils.nolocate.diff.gz | patch -p1 --verbose || exit 1
-
-autoreconf -vif
-
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--build=$ARCH-slackware-linux || exit 1
@@ -95,12 +91,23 @@ make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
make install-man DESTDIR=$PKG || exit 1
+# Remove stray directory:
+rmdir $PKG/var 2> /dev/null
+
# Now there is only FTS find, but make the old symlink in case any scripts
# out there are using it:
( cd $PKG/usr/bin
ln -sf find ftsfind
)
+# Don't include updatedb, locate, frcode:
+rm -f $PKG/usr/bin/{locate,updatedb}
+rm -f $PKG/usr/libexec/frcode
+rmdir $PKG/usr/libexec 2> /dev/null
+rm -f $PKG/usr/man/man1/{locate.1,updatedb.1}
+rm -f $PKG/usr/man/man5/locatedb.5
+rmdir $PKG/usr/man/man5 2> /dev/null
+
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/a/findutils/findutils.nolocate.diff b/source/a/findutils/findutils.nolocate.diff
deleted file mode 100644
index 8e1e29867..000000000
--- a/source/a/findutils/findutils.nolocate.diff
+++ /dev/null
@@ -1,83 +0,0 @@
---- ./doc/find.texi.orig 2021-01-10 13:04:33.075733220 -0600
-+++ ./doc/find.texi 2021-01-10 13:05:57.327728560 -0600
-@@ -7,8 +7,6 @@
- @c @setchapternewpage odd
- @c %**end of header
-
--@include dblocation.texi
--
- @iftex
- @finalout
- @end iftex
---- ./doc/Makefile.am.orig 2021-01-01 18:46:51.000000000 -0600
-+++ ./doc/Makefile.am 2021-01-10 13:04:33.075733220 -0600
-@@ -16,11 +16,9 @@
-
- info_TEXINFOS = find.texi find-maint.texi
- find_TEXINFOS = perm.texi parse-datetime.texi regexprops.texi fdl.texi
--BUILT_SOURCES = dblocation.texi
--nodist_find_TEXINFOS = dblocation.texi
- find_maint_TEXINFOS = fdl.texi
- MOSTLYCLEANFILES = find.cps
--CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz dblocation.texi \
-+CLEANFILES = find.txt find_mono.html findutils.texi_html_node.tar.gz \
- find_mono.html findutils.texi_html_node.tar.gz \
- find-info.tar.gz find.texi.tar.gz \
- find.txt tmp-doc-install find_mono.html.gz
-@@ -72,10 +70,6 @@
- findutils.texi_html_node.tar.gz: find.html
- tar zcf $@ find.html
-
--
--dblocation.texi: ../locate/dblocation.texi
-- $(LN_S) ../locate/dblocation.texi $@
--
- find-info.tar.gz:
- $(MKDIR_P) tmp-doc-install/info
- $(MAKE) $(AM_MAKEFLAGS) \
---- ./configure.ac.orig 2021-01-05 16:55:23.000000000 -0600
-+++ ./configure.ac 2021-01-10 13:04:33.074733220 -0600
-@@ -92,7 +92,6 @@
-
- dnl for gnulib
- gl_EARLY
--AC_PROG_LN_S
- AC_PROG_INSTALL
- AC_CHECK_TOOLS([AR], [ar])
- AC_CHECK_TOOLS([RANLIB], [ranlib], [:])
-@@ -309,8 +308,6 @@
- gl/Makefile
- gl/lib/Makefile
- lib/Makefile
--locate/Makefile
--locate/testsuite/Makefile
- m4/Makefile
- po/Makefile.in
- po/Makefile
---- ./Makefile.am.orig 2021-01-01 18:46:51.000000000 -0600
-+++ ./Makefile.am 2021-01-10 13:04:33.076733220 -0600
-@@ -35,7 +35,7 @@
-
-
- # "gnulib-tests" is the gnulib unit test dir.
--SUBDIRS = gl build-aux lib find xargs locate doc po m4 gnulib-tests
-+SUBDIRS = gl build-aux lib find xargs doc po m4 gnulib-tests
-
- ALL_RECURSIVE_TARGETS =
-
---- ./Makefile.in.orig 2021-01-09 10:35:32.000000000 -0600
-+++ ./Makefile.in 2021-01-10 13:04:33.075733220 -0600
-@@ -2200,11 +2200,11 @@
- DISTCLEANFILES = tool-versions.txt
-
- # "gnulib-tests" is the gnulib unit test dir.
--SUBDIRS = gl build-aux lib find xargs locate doc po m4 gnulib-tests
-+SUBDIRS = gl build-aux lib find xargs doc po m4 gnulib-tests
- ALL_RECURSIVE_TARGETS = check-root
- ACLOCAL_AMFLAGS = -I gl/m4 -I m4
- TESTFILE_SUFFIXES = .exp .xo .xe .xi
--built_programs = find oldfind xargs frcode locate updatedb
-+built_programs = find oldfind xargs
-
- # Indirections required so that we'll still be able to know the
- # complete list of our tests even if the user overrides TESTS
diff --git a/source/a/gawk/gawk.SlackBuild b/source/a/gawk/gawk.SlackBuild
index f1a8dd30e..63d668eb7 100755
--- a/source/a/gawk/gawk.SlackBuild
+++ b/source/a/gawk/gawk.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=gawk
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
diff --git a/source/a/genpower/genpower.halt.diff b/source/a/genpower/genpower.halt.diff
deleted file mode 100644
index 05c6a23f1..000000000
--- a/source/a/genpower/genpower.halt.diff
+++ /dev/null
@@ -1,32 +0,0 @@
---- ./genpowerfail.orig 2008-12-02 17:49:36.000000000 -0600
-+++ ./genpowerfail 2008-12-02 18:22:37.000000000 -0600
-@@ -36,23 +36,23 @@
- stats=`head -1 $statpath`
- case "$stats" in
- FAIL) # Power is down
-- shutdown -r +2 "THE POWER IS DOWN! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
-+ shutdown -h +2 "THE POWER IS DOWN! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
- ;;
- SCRAM) # Battery is low
-- shutdown -r now "THE POWER IS DOWN! BATTERY POWER IS LOW! EMERGENCY SHUTDOWN!" < /dev/console &
-+ shutdown -h now "THE POWER IS DOWN! BATTERY POWER IS LOW! EMERGENCY SHUTDOWN!" < /dev/console &
- ;;
- CABLE) # Possible bad cable
-- shutdown -r +1 "POSSIBLE BAD CABLE! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
-+ shutdown -h +1 "POSSIBLE BAD CABLE! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
- ;;
- *) # Unknown message, assume power is down
-- shutdown -r +2 "THE POWER IS DOWN! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
-+ shutdown -h +2 "THE POWER IS DOWN! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
- ;;
-
- esac
- else
-- # genowerfail called, and upsstatus dosen't exist.
-+ # genpowerfail called, and upsstatus dosen't exist.
- # Assume user is using powerd, and shutdown.
-- shutdown -r +2 "THE POWER IS DOWN! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
-+ shutdown -h +2 "THE POWER IS DOWN! SHUTTING DOWN SYSTEM! PLEASE LOG OFF NOW!" < /dev/console &
-
- fi
- ;;
diff --git a/source/a/genpower/genpower.var.diff b/source/a/genpower/genpower.var.diff
deleted file mode 100644
index fa3c9e998..000000000
--- a/source/a/genpower/genpower.var.diff
+++ /dev/null
@@ -1,34 +0,0 @@
---- ./genpowerfail.orig Wed Apr 10 18:25:07 2002
-+++ ./genpowerfail Wed Apr 10 19:14:27 2002
-@@ -6,19 +6,19 @@
- # This script is also being run when the power comes
- # up again (if it does in time!)
- #
--# Version: /etc/genpowerfail 1.0.1
-+# Version: /sbin/genpowerfail 1.0.1
- #
- # Author: Tom Webster <webster@kaiwan.com>
- #
-
- # Set the path.
--PATH=/sbin:/etc:/bin:/usr/bin
-+PATH=/sbin:/bin:/usr/bin:/usr/sbin
-
- # Set location of upsstatus file
- statpath="/etc/upsstatus"
-
- # Set location of file containing PID of running shutdowns
--spidpath="/etc/shutdownpid"
-+spidpath="/var/run/shutdownpid"
-
- # See what happened.
- case "$1" in
-@@ -63,7 +63,7 @@
- shutdown -c "THE POWER IS BACK"
- ;;
- *)
-- echo "Usage: /etc/genpowerfail {start|stop}"
-+ echo "Usage: /sbin/genpowerfail {start|stop}"
- exit 1
- ;;
- esac
diff --git a/source/a/genpower/slack-desc b/source/a/genpower/slack-desc
deleted file mode 100644
index 242614456..000000000
--- a/source/a/genpower/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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------------------------------------------------------|
-genpower: genpower (UPS monitoring daemon)
-genpower:
-genpower: The genpower daemon, genpowerd, will monitor the status of a serial
-genpower: line connected to a UPS (Uninterruptible Power Supply). If a power
-genpower: failure is detected, genpowerd will notify the system to take the
-genpower: needed steps to react to the condition of the UPS. This may include
-genpower: shutting the system down, or canceling a pending shutdown if the
-genpower: power is restored.
-genpower:
-genpower:
-genpower:
diff --git a/source/a/gettext/gettext-tools.SlackBuild b/source/a/gettext/gettext-tools.SlackBuild
index 8cda0d009..80bcbdc94 100755
--- a/source/a/gettext/gettext-tools.SlackBuild
+++ b/source/a/gettext/gettext-tools.SlackBuild
@@ -23,8 +23,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=gettext-tools
-VERSION=0.21
-BUILD=${BUILD:-3}
+VERSION=0.22.5
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
diff --git a/source/a/gettext/gettext.SlackBuild b/source/a/gettext/gettext.SlackBuild
index 6cd772780..77aeee327 100755
--- a/source/a/gettext/gettext.SlackBuild
+++ b/source/a/gettext/gettext.SlackBuild
@@ -23,8 +23,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=gettext
-VERSION=0.21
-BUILD=${BUILD:-3}
+VERSION=0.22.5
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
diff --git a/source/a/glibc-zoneinfo/glibc-zoneinfo.SlackBuild b/source/a/glibc-zoneinfo/glibc-zoneinfo.SlackBuild
index 07df3be21..fbbf71430 100755
--- a/source/a/glibc-zoneinfo/glibc-zoneinfo.SlackBuild
+++ b/source/a/glibc-zoneinfo/glibc-zoneinfo.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/gpm/gpm-1.20.1-weak-wgetch.patch b/source/a/gpm/gpm-1.20.1-weak-wgetch.patch
index 2546e17f7..cf10ee6b2 100644
--- a/source/a/gpm/gpm-1.20.1-weak-wgetch.patch
+++ b/source/a/gpm/gpm-1.20.1-weak-wgetch.patch
@@ -1,5 +1,5 @@
---- gpm-1.20.1/src/lib/libcurses.c.weak-wgetch 2002-12-24 17:57:16.000000000 -0500
-+++ gpm-1.20.1/src/lib/libcurses.c 2004-03-22 15:51:24.000000000 -0500
+--- ./src/lib/libcurses.c.orig 2012-10-26 16:21:38.000000000 -0500
++++ ./src/lib/libcurses.c 2024-03-27 14:48:08.842064533 -0500
@@ -41,7 +41,12 @@
#endif /* HAVE_NCURSES_CURSES_H */
#endif /* HAVE_NCURSES_H */
@@ -14,13 +14,3 @@
int Gpm_Wgetch(WINDOW *win)
{
---- gpm-1.20.1/configure.ac.weak-wgetch 2004-03-22 15:49:51.000000000 -0500
-+++ gpm-1.20.1/configure.ac 2004-03-22 15:51:24.000000000 -0500
-@@ -115,7 +115,7 @@
- AC_CHECK_LIB($i, wgetch,,,$TERMLIBS)
- else :; fi
- done
-- SHARED_LIBS="$LIBS $TERMLIBS -lc"
-+ SHARED_LIBS="-lc"
- LIBS=$SAVELIBS ;;
- esac
diff --git a/source/a/gpm/gpm.SlackBuild b/source/a/gpm/gpm.SlackBuild
index 42ea90a9d..d2f27c7f5 100755
--- a/source/a/gpm/gpm.SlackBuild
+++ b/source/a/gpm/gpm.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2013, 2014, 2018, 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2013, 2014, 2018, 2021, 2023, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=gpm
VERSION=1.20.7
-BUILD=${BUILD:-9}
+BUILD=${BUILD:-10}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -80,30 +80,20 @@ zcat $CWD/gpm-1.20.5-close-fds.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/gpm-1.20.1-select-1.patch.gz | patch -p1 --verbose || exit 1
zcat $CWD/gpm.types.diff.gz | patch -p1 --verbose || exit 1
zcat $CWD/gpm.gcc7.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gpm.configure.diff.gz | patch -p1 --verbose || exit 1
-sh autogen.sh
+# This patch is supposed to resolve a circular dependency between libgpm.so
+# and libncurses.so:
+zcat $CWD/gpm-1.20.1-weak-wgetch.patch.gz | patch -p1 --verbose || exit 1
-# This is *supposed* to prevent linking libgpm.so with -lncurses,
-# but for some reason it doesn't have the desired effect here.
-# Any ideas? The patch is supposed to resolve a circular dependency
-# between libgpm.so and libncurses.so. I don't notice any ill effects
-# here, but perhaps the problem would occur if prelinking was used.
-# Also, ncurses has not shown an ldd link to libgpm for several releases,
-# so perhaps any problem that existed was fixed on their end.
-# NOTE: Since this isn't preventing gpm from linking to ncurses, I'm
-# commenting this patch out until we understand better if it's even
-# useful for anything. Half a patch seems worse than no patch.
-#zcat $CWD/gpm-1.20.1-weak-wgetch.patch.gz | patch -p1 --verbose || exit 1
-
-# Since we just patched configure.ac, run this again to carry the change
-# into configure:
-autoconf
+sh autogen.sh
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --without-curses \
--build=$ARCH-slackware-linux || exit 1
make || exit 1
diff --git a/source/a/gpm/gpm.configure.diff b/source/a/gpm/gpm.configure.diff
new file mode 100644
index 000000000..3dedb8907
--- /dev/null
+++ b/source/a/gpm/gpm.configure.diff
@@ -0,0 +1,25 @@
+--- ./configure.ac.footer.orig 2012-10-26 16:21:38.000000000 -0500
++++ ./configure.ac.footer 2024-03-27 14:43:34.948058406 -0500
+@@ -49,22 +49,6 @@
+ AC_PATH_PROG(MAKEINFO,makeinfo,no)
+ AC_PATH_PROG(DIFF,diff,no)
+ AC_PATH_PROG(SED,sed,no)
+-AC_PATH_PROG(emacs,emacs,no)
+-
+-if test ${ac_cv_path_emacs} = no ; then
+- EMACS=:
+- ELISP=
+-else
+- EMACS=${ac_cv_path_emacs}
+- ELISP="emacs/t-mouse.el emacs/t-mouse.elc"
+-fi
+-
+-if test $EMACS != : ; then
+- ITZ_PATH_SITE_LISP
+- lispdir=${itz_cv_path_site_lisp}
+-else
+- lispdir='${datadir}/emacs/site-lisp'
+-fi
+
+ # Header-checks
+ AC_CHECK_HEADERS(syslog.h linux/input.h linux/joystick.h ncurses.h ncurses/curses.h curses.h)
diff --git a/source/a/gptfdisk/gptfdisk.SlackBuild b/source/a/gptfdisk/gptfdisk.SlackBuild
index 431161a5d..fd62b7f2f 100755
--- a/source/a/gptfdisk/gptfdisk.SlackBuild
+++ b/source/a/gptfdisk/gptfdisk.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2011 Eric Hameleers, Eindhoven, NL
-# Copyright 2011, 2012, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2011, 2012, 2017, 2018, 2022, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
diff --git a/source/a/grep/grep.SlackBuild b/source/a/grep/grep.SlackBuild
index 16e50d5b7..694ef8e84 100755
--- a/source/a/grep/grep.SlackBuild
+++ b/source/a/grep/grep.SlackBuild
@@ -95,6 +95,11 @@ make install DESTDIR=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# Replace the fgrep/egrep scripts with less annoying versions:
+cat $CWD/scripts/fgrep > $PKG/bin/fgrep
+cat $CWD/scripts/egrep > $PKG/bin/egrep
+chmod 755 $PKG/bin/?grep
+
# Make symlinks in /usr/bin:
mkdir -p $PKG/usr/bin
( cd $PKG/usr/bin
diff --git a/source/a/grep/scripts/egrep b/source/a/grep/scripts/egrep
new file mode 100644
index 000000000..513835a72
--- /dev/null
+++ b/source/a/grep/scripts/egrep
@@ -0,0 +1,4 @@
+#!/bin/sh
+#cmd=${0##*/}
+#echo "$cmd: warning: $cmd is obsolescent; using grep -E" >&2
+exec grep -E "$@"
diff --git a/source/a/grep/scripts/fgrep b/source/a/grep/scripts/fgrep
new file mode 100644
index 000000000..e8c4df9a1
--- /dev/null
+++ b/source/a/grep/scripts/fgrep
@@ -0,0 +1,4 @@
+#!/bin/sh
+#cmd=${0##*/}
+#echo "$cmd: warning: $cmd is obsolescent; using grep -F" >&2
+exec grep -F "$@"
diff --git a/source/a/grub/7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763.patch b/source/a/grub/7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763.patch
new file mode 100644
index 000000000..27b2277c4
--- /dev/null
+++ b/source/a/grub/7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763.patch
@@ -0,0 +1,59 @@
+From 7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763 Mon Sep 17 00:00:00 2001
+From: Javier Martinez Canillas <javierm@redhat.com>
+Date: Fri, 11 Jun 2021 21:36:16 +0200
+Subject: fs/ext2: Ignore checksum seed incompat feature
+
+This incompat feature is used to denote that the filesystem stored its
+metadata checksum seed in the superblock. This is used to allow tune2fs
+changing the UUID on a mounted metdata_csum filesystem without having
+to rewrite all the disk metadata. However, the GRUB doesn't use the
+metadata checksum at all. So, it can just ignore this feature if it
+is enabled. This is consistent with the GRUB filesystem code in general
+which just does a best effort to access the filesystem's data.
+
+The checksum seed incompat feature has to be removed from the ignore
+list if the support for metadata checksum verification is added to the
+GRUB ext2 driver later.
+
+Suggested-by: Eric Sandeen <esandeen@redhat.com>
+Suggested-by: Lukas Czerner <lczerner@redhat.com>
+Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
+Reviewed-by: Lukas Czerner <lczerner@redhat.com>
+Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
+---
+ grub-core/fs/ext2.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c
+index e7dd78e..4953a15 100644
+--- a/grub-core/fs/ext2.c
++++ b/grub-core/fs/ext2.c
+@@ -103,6 +103,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
+ #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
+ #define EXT4_FEATURE_INCOMPAT_MMP 0x0100
+ #define EXT4_FEATURE_INCOMPAT_FLEX_BG 0x0200
++#define EXT4_FEATURE_INCOMPAT_CSUM_SEED 0x2000
+ #define EXT4_FEATURE_INCOMPAT_ENCRYPT 0x10000
+
+ /* The set of back-incompatible features this driver DOES support. Add (OR)
+@@ -123,10 +124,15 @@ GRUB_MOD_LICENSE ("GPLv3+");
+ * mmp: Not really back-incompatible - was added as such to
+ * avoid multiple read-write mounts. Safe to ignore for this
+ * RO driver.
++ * checksum seed: Not really back-incompatible - was added to allow tools
++ * such as tune2fs to change the UUID on a mounted metadata
++ * checksummed filesystem. Safe to ignore for now since the
++ * driver doesn't support checksum verification. However, it
++ * has to be removed from this list if the support is added later.
+ */
+ #define EXT2_DRIVER_IGNORED_INCOMPAT ( EXT3_FEATURE_INCOMPAT_RECOVER \
+- | EXT4_FEATURE_INCOMPAT_MMP)
+-
++ | EXT4_FEATURE_INCOMPAT_MMP \
++ | EXT4_FEATURE_INCOMPAT_CSUM_SEED)
+
+ #define EXT3_JOURNAL_MAGIC_NUMBER 0xc03b3998U
+
+--
+cgit v1.1
+
diff --git a/source/a/grub/grub.SlackBuild b/source/a/grub/grub.SlackBuild
index 56f0c0beb..b2bbb7223 100755
--- a/source/a/grub/grub.SlackBuild
+++ b/source/a/grub/grub.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2013, 2016, 2017, 2018, 2019 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2013, 2016, 2017, 2018, 2019, 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -28,13 +28,13 @@ PKGNAM=grub
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
# Better to use _ than ~ in the package filenames version:
PKGVER=$(echo $VERSION | tr '~' '_')
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
@@ -118,6 +118,10 @@ zcat $CWD/a4b495520e4dc41a896a8b916a64eda9970c50ea.patch.gz | patch -p1 --verbos
# Skip processing any files in /etc/grub.d/ that end in .new:
zcat $CWD/0001-skip-new-files-in-etc-grub.d.patch.gz | patch -p1 --verbose || exit 1
+# Since upstream apparently can't be bothered, let's fix using ext* filesystems
+# created with what are now the default options:
+zcat $CWD/7fd5feff97c4b1f446f8fcf6d37aca0c64e7c763.patch.gz | patch -p1 --verbose || exit 1
+
# Regenerate build system to fix dependency on outdated automake:
autoreconf -vif
diff --git a/source/a/gzip/gzip.SlackBuild b/source/a/gzip/gzip.SlackBuild
index 8707648ea..ec91bec31 100755
--- a/source/a/gzip/gzip.SlackBuild
+++ b/source/a/gzip/gzip.SlackBuild
@@ -118,8 +118,8 @@ rm -f $PKG/bin/uncompress
#( cd usr/bin ; ln -sf ../../bin/zcat zcat )
#( cd usr/bin ; rm -rf zcmp )
#( cd usr/bin ; ln -sf zdiff zcmp )
- #( cd usr/bin ; rm -rf zegrep )
- #( cd usr/bin ; ln -sf zgrep zegrep )
+ #( cd usr/bin ; rm -rf zgrep -E )
+ #( cd usr/bin ; ln -sf zgrep zgrep -E )
#( cd usr/bin ; rm -rf zfgrep )
#( cd usr/bin ; ln -sf zgrep zfgrep )
#)
diff --git a/source/a/haveged/haveged.SlackBuild b/source/a/haveged/haveged.SlackBuild
index e7a3fcce1..15d349363 100755
--- a/source/a/haveged/haveged.SlackBuild
+++ b/source/a/haveged/haveged.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright 2014 Erik Falor, West Valley City, Utah, USA
-# Copyright 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2018, 2020, 2021, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=haveged
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -100,7 +100,6 @@ rm -rf $PKG/lib${LIBDIRSUFFIX} $PKG/usr/include $PKG/usr/man/man3
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-rm -rf $PKG/etc/init.d
mkdir -p $PKG/etc/rc.d
cat $CWD/rc.haveged > $PKG/etc/rc.d/rc.haveged.new
chmod 755 $PKG/etc/rc.d/rc.haveged.new
diff --git a/source/a/hostname/hostname.SlackBuild b/source/a/hostname/hostname.SlackBuild
index 83bd53b99..a13e43d07 100755
--- a/source/a/hostname/hostname.SlackBuild
+++ b/source/a/hostname/hostname.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-3}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/hwdata/hwdata.SlackBuild b/source/a/hwdata/hwdata.SlackBuild
index 143ac8c1d..aee55ac3f 100755
--- a/source/a/hwdata/hwdata.SlackBuild
+++ b/source/a/hwdata/hwdata.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for hwdata
# Copyright 2015, 2017 Robby Workman, Tuscaloosa, Alabama, USA
-# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2018, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -80,7 +80,7 @@ find . \
# Grab latest copies of pci and usb ids:
rm -f usb.ids pci.ids
-lftpget https://pci-ids.ucw.cz/v2.2/pci.ids https://usb-ids.gowdy.us/usb.ids
+lftpget https://pci-ids.ucw.cz/v2.2/pci.ids http://www.linux-usb.org/usb.ids
./configure --libdir=/lib || exit 1
#make download # grab latest copies of everything
diff --git a/source/a/inih/inih.SlackBuild b/source/a/inih/inih.SlackBuild
index 12cd64b43..dabd7fcce 100755
--- a/source/a/inih/inih.SlackBuild
+++ b/source/a/inih/inih.SlackBuild
@@ -25,13 +25,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=inih
SRCVER=${SRCVER:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
VERSION=$(echo $SRCVER | tr -d r)
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/genpower/genpower.SlackBuild b/source/a/iniparser/iniparser.SlackBuild
index bfcdf23c1..f4861c874 100755
--- a/source/a/genpower/genpower.SlackBuild
+++ b/source/a/iniparser/iniparser.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,18 +22,19 @@
cd $(dirname $0) ; CWD=$(pwd)
-PKGNAM=genpower
-VERSION=${VERSION:-1.0.5}
-BUILD=${BUILD:-5}
+PKGNAM=iniparser
+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 ;;
+ 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:
- *) export ARCH=$( uname -m ) ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
@@ -44,16 +45,38 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
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-genpower
+PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf genpower-$VERSION
-tar xvf $CWD/genpower-$VERSION.tar.gz || exit 1
-cd genpower-$VERSION || exit 1
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
chown -R root:root .
find . \
@@ -62,51 +85,30 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-find . -type d -name CVS -depth -exec rm -rf {} \+
-
-zcat $CWD/genpower.var.diff.gz | patch -p1 -E --verbose || exit 1
-zcat $CWD/genpower.halt.diff.gz | patch -p1 --verbose || exit 1
+# This is an easy one ;-)
+make
-make -j4 || make || exit 1
-mkdir -p $PKG/sbin
-cat genpowerd > $PKG/sbin/genpowerd
-cat gentest > $PKG/sbin/gentest
-cat genpowerfail > $PKG/sbin/genpowerfail
-mkdir -p $PKG/etc
-cat genpowerd.conf > $PKG/etc/genpowerd.conf.new
-chmod 755 $PKG/sbin/*
+# Install:
+mkdir -p $PKG/usr/include
+cp -a src/iniparser.h src/dictionary.h $PKG/usr/include
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+cp -a libiniparser.so.1 $PKG/usr/lib${LIBDIRSUFFIX}
+ln -sf libiniparser.so.1 $PKG/usr/lib${LIBDIRSUFFIX}/libiniparser.so
-find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+# 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
-mkdir -p $PKG/usr/man/man8
-cat genpowerd.8 | gzip -9c > $PKG/usr/man/man8/genpowerd.8.gz
-cat gentest.8 | gzip -9c > $PKG/usr/man/man8/gentest.8.gz
-
-mkdir -p $PKG/usr/doc/genpower-$VERSION
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- COPYING Change.Log README TODO genpower.docs cables \
- $PKG/usr/doc/genpower-$VERSION
+ AUTHORS* FAQ* LICENSE* README* \
+ example \
+ html \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
mkdir -p $PKG/install
-cat << EOF > $PKG/install/doinst.sh
-#!/bin/bash
-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...
-}
-config etc/genpowerd.conf.new
-EOF
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
-# Build the package:
cd $PKG
-/sbin/makepkg -l y -c n $TMP/genpower-$VERSION-$ARCH-$BUILD.txz
-
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/a/iniparser/iniparser.url b/source/a/iniparser/iniparser.url
new file mode 100644
index 000000000..fe75bfb0e
--- /dev/null
+++ b/source/a/iniparser/iniparser.url
@@ -0,0 +1 @@
+https://github.com/ndevilla/iniparser
diff --git a/source/a/iniparser/slack-desc b/source/a/iniparser/slack-desc
new file mode 100644
index 000000000..e45e2eade
--- /dev/null
+++ b/source/a/iniparser/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------------------------------------------------------|
+iniparser: iniparser (ini file parsing library)
+iniparser:
+iniparser: iniParser is a simple C library offering ini file parsing services.
+iniparser: The library is pretty small (less than 1500 lines of C) and robust,
+iniparser: and does not depend on any other external library to compile. It is
+iniparser: written in ANSI C and should compile easily on most platforms.
+iniparser:
+iniparser: Homepage: https://github.com/ndevilla/iniparser
+iniparser:
+iniparser:
+iniparser:
diff --git a/source/a/inotify-tools/inotify-tools.SlackBuild b/source/a/inotify-tools/inotify-tools.SlackBuild
index df453f6c4..851d0d86f 100755
--- a/source/a/inotify-tools/inotify-tools.SlackBuild
+++ b/source/a/inotify-tools/inotify-tools.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=inotify-tools
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/kbd/doinst.sh b/source/a/kbd/doinst.sh
new file mode 100644
index 000000000..babc7759d
--- /dev/null
+++ b/source/a/kbd/doinst.sh
@@ -0,0 +1,28 @@
+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...
+}
+
+# Leave any new rc.font with the same permissions as the old one:
+# This is a kludge, but it's because there's no --reference option
+# on busybox's 'chmod':
+if [ -e etc/rc.d/rc.font ]; then
+ if [ -x etc/rc.d/rc.font ]; then
+ chmod 755 etc/rc.d/rc.font.new
+ else
+ chmod 644 etc/rc.d/rc.font.new
+ fi
+fi
+# Then config() it:
+config etc/rc.d/rc.font.new
+
+config etc/pam.d/vlock.new
+
diff --git a/source/a/kbd/fix-euro2.patch b/source/a/kbd/fix-euro2.patch
new file mode 100644
index 000000000..572cba740
--- /dev/null
+++ b/source/a/kbd/fix-euro2.patch
@@ -0,0 +1,9 @@
+--- kbd-1.15.5/data/keymaps/i386/include/euro2.map.old 2013-05-08 15:00:25.917752313 +0200
++++ kbd-1.15.5/data/keymaps/i386/include/euro2.map 2013-05-08 15:00:54.943957367 +0200
+@@ -2,5 +2,5 @@
+ # [Say: "loadkeys euro2" to get Euro and cent with AltGr (right alt)
+ # on the positions where many keyboards have E and C.
+ # To get it displayed, use a latin0 (i.e., latin9) font.]
+-altgr keycode 18 = currency
++altgr keycode 18 = euro
+ altgr keycode 46 = cent
diff --git a/source/a/kbd/kbd-2.6.3-backspace-1.patch b/source/a/kbd/kbd-2.6.3-backspace-1.patch
new file mode 100644
index 000000000..8fec17180
--- /dev/null
+++ b/source/a/kbd/kbd-2.6.3-backspace-1.patch
@@ -0,0 +1,250 @@
+Submitted By: Matt Burgess
+Date: 2008-12-06
+Initial Package Version: 1.15
+Upstream Status: Not submitted, possibly incomplete
+Description: Makes Backspace and Delete keys consistent in all i386 keymaps.
+Makes the Backspace key send character code 127, and Delete send a well known
+escape sequence. Obsoletes the /etc/kbd/bs-sends-del file for i386.
+
+Original patch for 1.12 by Alexander Patrakov.
+Updated for 1.13 (drop ru.map, the change is upstream, and add ru_win.map,
+ru-cp1251.map) by Ken Moffat <ken at linuxfromscratch dot org>.
+Re-diffed against 1.15 by Matt Burgess <matthew at linuxfromscratch.org>.
+
+diff -Naur kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-l.map kbd-1.15/data/keymaps/i386/dvorak/dvorak-l.map
+--- kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-l.map 2008-06-20 12:36:01.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/dvorak/dvorak-l.map 2008-12-03 22:27:55.000000000 +0000
+@@ -43,7 +43,7 @@
+ keycode 11 = three numbersign
+ keycode 12 = two at
+ keycode 13 = one exclam
+- keycode 14 = BackSpace Delete
++ keycode 14 = Delete Delete
+ ! --------------------------------------------------------------------------
+ ! Row 3
+ ! --------------------------------------------------------------------------
+diff -Naur kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-r.map kbd-1.15/data/keymaps/i386/dvorak/dvorak-r.map
+--- kbd-1.15.orig/data/keymaps/i386/dvorak/dvorak-r.map 2008-06-20 12:36:01.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/dvorak/dvorak-r.map 2008-12-03 22:28:13.000000000 +0000
+@@ -43,7 +43,7 @@
+ keycode 11 = slash question
+ keycode 12 = bracketleft braceleft
+ keycode 13 = bracketright braceright
+- keycode 14 = BackSpace Delete
++ keycode 14 = Delete Delete
+ ! --------------------------------------------------------------------------
+ ! Row 3
+ ! --------------------------------------------------------------------------
+diff -Naur kbd-1.15.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map kbd-1.15/data/keymaps/i386/fgGIod/tr_f-latin5.map
+--- kbd-1.15.orig/data/keymaps/i386/fgGIod/tr_f-latin5.map 2008-10-23 20:03:58.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/fgGIod/tr_f-latin5.map 2008-12-03 22:40:32.000000000 +0000
+@@ -51,7 +51,7 @@
+ alt keycode 12 = Meta_minus
+ keycode 13 = minus underscore
+ alt keycode 13 = Meta_equal
+-keycode 14 = BackSpace Delete
++keycode 14 = Delete Delete
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Meta_Tab
+ alt keycode 15 = Meta_Tab
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/lt.l4.map kbd-1.15/data/keymaps/i386/qwerty/lt.l4.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/lt.l4.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/lt.l4.map 2008-12-03 22:42:14.000000000 +0000
+@@ -205,7 +205,7 @@
+ # edit this if you want the key above <Enter> to delete symbols above
+ # cursor, not before.
+ keycode 14 = \
+- BackSpace BackSpace BackSpace BackSpace \
++ Delete Delete Delete Delete \
+ Delete Delete Delete Delete \
+ Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
+ Meta_Delete Meta_Delete Meta_Delete Meta_Delete
+@@ -506,7 +506,7 @@
+
+ # Edit this if you want strict VT100 emulation.
+ string F111 = "\033[3$"
+-keycode 111 = Delete F111 Delete F111 \
++keycode 111 = Remove F111 Remove F111 \
+ Remove Remove Remove Remove \
+ Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
+ Boot Boot Boot Boot
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/lt.map kbd-1.15/data/keymaps/i386/qwerty/lt.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/lt.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/lt.map 2008-12-03 22:42:58.000000000 +0000
+@@ -204,7 +204,7 @@
+ # edit this if you want the key above <Enter> to delete symbols above
+ # cursor, not before.
+ keycode 14 = \
+- BackSpace BackSpace BackSpace BackSpace \
++ Delete Delete Delete Delete \
+ Delete Delete Delete Delete \
+ Meta_BackSpace Meta_BackSpace Meta_BackSpace Meta_BackSpace \
+ Meta_Delete Meta_Delete Meta_Delete Meta_Delete
+@@ -505,7 +505,7 @@
+
+ # Edit this if you want strict VT100 emulation.
+ string F111 = "\033[3$"
+-keycode 111 = Delete F111 Delete F111 \
++keycode 111 = Remove F111 Remove F111 \
+ Remove Remove Remove Remove \
+ Meta_Delete Meta_Delete Meta_Delete Meta_Delete \
+ Boot Boot Boot Boot
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/no-latin1.map kbd-1.15/data/keymaps/i386/qwerty/no-latin1.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/no-latin1.map 2008-06-20 12:36:00.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/no-latin1.map 2008-12-03 22:44:25.000000000 +0000
+@@ -3,7 +3,7 @@
+ # Send comments to Kjetil T. Homme <kjetilho@ifi.uio.no>
+ include "linux-with-alt-and-altgr"
+ plain keycode 83 = KP_Comma
+- plain keycode 111 = Delete # "Remove" originally, weird...
++ plain keycode 111 = Remove
+ strings as usual
+
+ keycode 1 = Escape
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru1.map kbd-1.15/data/keymaps/i386/qwerty/ru1.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru1.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ru1.map 2008-12-03 22:45:32.000000000 +0000
+@@ -143,8 +143,8 @@
+
+ # The keycode "0xFF" is too dangerous for many programs (including emacs).
+ # So let it be bracket instead of Hard Sign.
+-# altgr keycode 27 = +0xDF
+-# altgr shift keycode 27 = +0xFF
++altgr keycode 27 = +0xDF
++altgr shift keycode 27 = +0xFF
+ control keycode 27 = Control_bracketright
+ altgr control keycode 27 = Control_bracketright
+ alt keycode 27 = Meta_bracketright
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru2.map kbd-1.15/data/keymaps/i386/qwerty/ru2.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru2.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ru2.map 2008-12-03 22:46:15.000000000 +0000
+@@ -46,7 +46,7 @@
+ alt keycode 12 = Meta_minus
+ keycode 13 = equal plus equal plus
+ alt keycode 13 = Meta_equal
+- keycode 14 = BackSpace BackSpace BackSpace BackSpace
++ keycode 14 = Delete Delete Delete Delete
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Tab Tab Tab
+ alt keycode 15 = Meta_Tab
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru-cp1251.map kbd-1.15/data/keymaps/i386/qwerty/ru-cp1251.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru-cp1251.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ru-cp1251.map 2008-12-03 22:47:12.000000000 +0000
+@@ -39,7 +39,7 @@
+ alt keycode 12 = Meta_minus
+ keycode 13 = equal plus equal plus
+ alt keycode 13 = Meta_equal
+- keycode 14 = BackSpace
++ keycode 14 = Delete
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab
+ alt keycode 15 = Meta_Tab
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru-ms.map kbd-1.15/data/keymaps/i386/qwerty/ru-ms.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru-ms.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ru-ms.map 2008-12-03 22:48:10.000000000 +0000
+@@ -89,8 +89,8 @@
+ altgr alt keycode 13 = Meta_equal
+ shift alt keycode 13 = Meta_plus
+ altgr shift alt keycode 13 = Meta_plus
+- keycode 14 = BackSpace BackSpace BackSpace BackSpace
+-# keycode 14 = Delete Delete Delete Delete
++# keycode 14 = BackSpace BackSpace BackSpace BackSpace
++ keycode 14 = Delete Delete Delete Delete
+ alt keycode 14 = Meta_Delete
+ altgr alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Tab Tab Tab
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ru_win.map kbd-1.15/data/keymaps/i386/qwerty/ru_win.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ru_win.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ru_win.map 2008-12-03 22:49:17.000000000 +0000
+@@ -42,7 +42,7 @@
+ alt keycode 12 = Meta_minus
+ keycode 13 = equal plus equal plus
+ alt keycode 13 = Meta_equal
+- keycode 14 = BackSpace BackSpace BackSpace BackSpace
++ keycode 14 = Delete Delete Delete Delete
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Tab Tab Tab
+ alt keycode 15 = Meta_Tab
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/se-ir209.map kbd-1.15/data/keymaps/i386/qwerty/se-ir209.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/se-ir209.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/se-ir209.map 2008-12-03 22:50:18.000000000 +0000
+@@ -345,7 +345,7 @@
+ keycode 109 = Next Scroll_Forward
+ keycode 110 = Insert
+
+- keycode 111 = Delete # "Remove" originally, weird...
++ keycode 111 = Remove
+ control alt keycode 111 = Boot
+ control altgr keycode 111 = Boot
+
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/se-lat6.map kbd-1.15/data/keymaps/i386/qwerty/se-lat6.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/se-lat6.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/se-lat6.map 2008-12-03 22:50:44.000000000 +0000
+@@ -374,6 +374,6 @@
+ keycode 109 = Next Scroll_Forward
+ keycode 110 = Insert
+
+- keycode 111 = Delete # "Remove" originally, weird...
++ keycode 111 = Remove
+ control alt keycode 111 = Boot
+ control altgr keycode 111 = Boot
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/tr_q-latin5.map kbd-1.15/data/keymaps/i386/qwerty/tr_q-latin5.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/tr_q-latin5.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/tr_q-latin5.map 2008-12-03 22:52:09.000000000 +0000
+@@ -49,7 +49,7 @@
+ alt keycode 12 = Meta_minus
+ keycode 13 = minus underscore
+ alt keycode 13 = Meta_equal
+-keycode 14 = BackSpace Delete
++keycode 14 = Delete Delete
+ alt keycode 14 = Meta_Delete
+ keycode 15 = Tab Meta_Tab
+ alt keycode 15 = Meta_Tab
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua.map kbd-1.15/data/keymaps/i386/qwerty/ua.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ua.map 2008-12-03 22:52:52.000000000 +0000
+@@ -249,7 +249,7 @@
+ shift ctrll ctrlr keycode 13 = plus
+ alt ctrll ctrlr keycode 13 = Meta_equal
+ shift alt ctrll ctrlr keycode 13 = Meta_plus
+-keycode 14 = BackSpace Delete
++keycode 14 = Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ ctrlr keycode 14 = BackSpace
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf.map kbd-1.15/data/keymaps/i386/qwerty/ua-utf.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ua-utf.map 2008-12-03 22:53:36.000000000 +0000
+@@ -250,7 +250,7 @@
+ shift ctrll ctrlr keycode 13 = plus
+ alt ctrll ctrlr keycode 13 = Meta_equal
+ shift alt ctrll ctrlr keycode 13 = Meta_plus
+-keycode 14 = BackSpace Delete
++keycode 14 = Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ ctrlr keycode 14 = BackSpace
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf-ws.map kbd-1.15/data/keymaps/i386/qwerty/ua-utf-ws.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-utf-ws.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ua-utf-ws.map 2008-12-03 22:54:06.000000000 +0000
+@@ -260,7 +260,7 @@
+ shift ctrll ctrlr keycode 13 = plus
+ alt ctrll ctrlr keycode 13 = Meta_equal
+ shift alt ctrll ctrlr keycode 13 = Meta_plus
+-keycode 14 = BackSpace Delete
++keycode 14 = Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ ctrlr keycode 14 = BackSpace
+diff -Naur kbd-1.15.orig/data/keymaps/i386/qwerty/ua-ws.map kbd-1.15/data/keymaps/i386/qwerty/ua-ws.map
+--- kbd-1.15.orig/data/keymaps/i386/qwerty/ua-ws.map 2008-10-23 20:03:59.000000000 +0100
++++ kbd-1.15/data/keymaps/i386/qwerty/ua-ws.map 2008-12-03 22:54:23.000000000 +0000
+@@ -260,7 +260,7 @@
+ shift ctrll ctrlr keycode 13 = plus
+ alt ctrll ctrlr keycode 13 = Meta_equal
+ shift alt ctrll ctrlr keycode 13 = Meta_plus
+-keycode 14 = BackSpace Delete
++keycode 14 = Delete Delete
+ control keycode 14 = BackSpace
+ alt keycode 14 = Meta_Delete
+ ctrlr keycode 14 = BackSpace
diff --git a/source/a/kbd/kbd.SlackBuild b/source/a/kbd/kbd.SlackBuild
index 6d394a44f..8fea0826f 100755
--- a/source/a/kbd/kbd.SlackBuild
+++ b/source/a/kbd/kbd.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
-# Copyright 2005-2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2020, 2023 Patrick J. Volkerding, Sebeka, Minnesota, 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=kbd
-VERSION=1.15.3
-BUILD=${BUILD:-6}
+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
@@ -47,174 +47,138 @@ fi
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
-PKG=$TMP/package-kbd
+PKG=$TMP/package-$PKGNAM
+
+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
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-
-# Add some extra fonts:
-( cd $PKG ; explodepkg $CWD/sources/extraf.tgz )
-
-# Extract source:
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/sources/$PKGNAM-$VERSION.tar.?z* || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION || exit 1
# Make sure ownerships and permissions are sane:
chown -R root:root .
-find . -perm 666 -exec chmod 644 {} \+
-find . -perm 664 -exec chmod 644 {} \+
-find . -perm 600 -exec chmod 644 {} \+
-find . -perm 444 -exec chmod 644 {} \+
-find . -perm 400 -exec chmod 644 {} \+
-find . -perm 440 -exec chmod 644 {} \+
-find . -perm 777 -exec chmod 755 {} \+
-find . -perm 775 -exec chmod 755 {} \+
-find . -perm 511 -exec chmod 755 {} \+
-find . -perm 711 -exec chmod 755 {} \+
-find . -perm 555 -exec chmod 755 {} \+
-
-# Apply patches:
-# These are taken from Fedora's SRPM:
-zcat $CWD/sources/kbd-1.15.2-po.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/sources/kbd-1.15-keycodes-man.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/sources/kbd-1.15-unicode_start.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/sources/kbd-1.15-resizecon-x86_64.patch.gz | patch -p1 --verbose || exit 1
-
-# This is from Mandriva's SRPM:
-zcat $CWD/sources/kbd-1.15.3-fix-es-translation.patch.gz | patch -p1 --verbose || exit 1
-
-# This is from Fedora's spec file:
-# 7-bit maps are obsolete; so are non-euro maps
-( cd data/keymaps/i386
- mv qwerty/fi.map qwerty/fi-old.map
- cp -fav qwerty/fi-latin9.map qwerty/fi.map
- cp -fav qwerty/pt-latin9.map qwerty/pt.map
- cp -fav qwerty/sv-latin1.map qwerty/se-latin1.map
- mv -fv azerty/fr.map azerty/fr-old.map
- cp -fav azerty/fr-latin9.map azerty/fr.map
- cp -fav azerty/fr-latin9.map azerty/fr-latin0.map # legacy alias
-
- # Rename conflicting keymaps
- mv -fv dvorak/no.map dvorak/no-dvorak.map
- mv -fv fgGIod/trf.map fgGIod/trf-fgGIod.map
- mv -fv olpc/es.map olpc/es-olpc.map
- mv -fv olpc/pt.map olpc/pt-olpc.map
- mv -fv qwerty/cz.map qwerty/cz-qwerty.map )
-
-# Apply a euro fix for the nl.map from alienBOB:
-zcat $CWD/sources/nl.euro.diff.gz | patch -p1 || exit 1
-
-# Configure:
-CFLAGS="-fcommon" \
-./configure \
- --prefix=/usr \
- --localedir=/usr/share/locale/ \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --datadir=/usr/share/kbd \
- --enable-nls || exit 1
+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 {} \+
+
+# Thanks, LFS
+zcat $CWD/kbd-2.6.3-backspace-1.patch.gz | patch -p1 --verbose || exit 1
+
+# Thanks, Arch
+zcat $CWD/fix-euro2.patch.gz | patch -p1 --verbose || exit 1
-# Build:
-make $NUMJOBS || exit 1
+# Don't include resizecons or manpage:
+# "it requires the defunct svgalib to provide the video mode files - for
+# normal use setfont sizes the console appropriately"
+# Thanks again LFS
+sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure
+sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in
-# Install into package:
+# 7-bit maps are obsolete; so are non-euro maps
+cp -fav data/keymaps/i386/qwerty/pt-latin9.map \
+ data/keymaps/i386/qwerty/pt.map
+cp -fav data/keymaps/i386/qwerty/sv-latin1.map \
+ data/keymaps/i386/qwerty/se-latin1.map
+mv -fv data/keymaps/i386/azerty/fr.map \
+ data/keymaps/i386/azerty/fr-old.map
+cp -fav data/keymaps/i386/azerty/fr-latin9.map \
+ data/keymaps/i386/azerty/fr.map
+
+# legacy alias
+cp -fav data/keymaps/i386/azerty/fr-latin9.map \
+ data/keymaps/i386/azerty/fr-latin0.map
+
+# Rename conflicting keymaps
+mv -fv data/keymaps/i386/colemak/en-latin9.map \
+ data/keymaps/i386/colemak/colemak.map
+mv -fv data/keymaps/i386/fgGIod/trf.map \
+ data/keymaps/i386/fgGIod/trf-fgGIod.map
+mv -fv data/keymaps/i386/olpc/es.map \
+ data/keymaps/i386/olpc/es-olpc.map
+mv -fv data/keymaps/i386/olpc/pt.map \
+ data/keymaps/i386/olpc/pt-olpc.map
+mv -fv data/keymaps/i386/qwerty/cz.map \
+ data/keymaps/i386/qwerty/cz-qwerty.map
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --localedir=/usr/share/locale/ \
+ --datadir=/usr/share/kbd \
+ --enable-nls \
+ --enable-optional-progs \
+ --enable-libkeymap \
+ --disable-tests \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+# Build and install:
+make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# This is where it's always been in Slackware, so let's move it back:
-( cd $PKG
- mkdir -vpm755 bin
- mv -fv usr/bin/loadkeys bin/
- cd usr/bin ; ln -vsf ../../bin/loadkeys . )
-# Build/install resizecons:
-( cd src
- make resizecons || exit 1
- cp resizecons $PKG/usr/bin
-) || exit 1
+# ro_win.map.gz is useless:
+rm -f $PKG/usr/share/kbd/keymaps/i386/qwerty/ro_win.map.gz
-# ro_win.map.gz is useless
-rm -fv $PKG/usr/share/kbd/keymaps/i386/qwerty/ro_win.map.gz
+# Move vlock to vlock.new:
+mv $PKG/etc/pam.d/vlock $PKG/etc/pam.d/vlock.new
-# The rhpl keyboard layout table is indexed by kbd layout names, so we need a
-# Korean keyboard
-ln -vfs us.map.gz $PKG/usr/share/kbd/keymaps/i386/qwerty/ko.map.gz
+# Add some extra fonts:
+( cd $PKG ; explodepkg $CWD/extraf.tgz )
+
+# Make sure kbdinfo manpage is installed:
+if [ ! -r $PKG/usr/man/man1/kbdinfo.1 ]; then
+ cp -a ./docs/man/man1/kbdinfo.1 $PKG/usr/man/man1
+fi
# Install the setup script that will be run from the Slackware installer:
mkdir -pm755 $PKG/var/log/setup
install -vpm755 $CWD/setup.setconsolefont $PKG/var/log/setup/
install -vpm755 $CWD/setconsolefont $PKG/usr/bin/
-# Copy docs:
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a \
- COPYING* README* doc/* \
- $PKG/usr/doc/$PKGNAM-$VERSION
-rm -f $PKG/usr/doc/$PKGNAM-$VERSION/kbd.FAQ.sgml
-
-# 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 | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
-fi
-
-# Additional keymaps:
-# This is the keymap for Speakup (http://linux-speakup.org) users:
-cat $CWD/sources/speakupmap.map.gz > $PKG/usr/share/kbd/keymaps/i386/qwerty/speakupmap.map.gz
-# Another keymap for Speakup from Thomas Ward, for JFW users.
-tar xvf $CWD/sources/speakup-jfw.tar.gz
-( cd speakup-jfw
- cat speakup-jfw.map | gzip -9c > $PKG/usr/share/kbd/keymaps/i386/qwerty/speakup-jfw.map.gz
- cat readme > $PKG/usr/share/kbd/keymaps/i386/qwerty/speakup-jfw.readme )
-
# Create the default run control script which will set the
# console font to the "default"... though this might not be
# the same state as if setfont were not used at all.
# For that reason, default the script to non-executable.
mkdir -pm755 $PKG/etc/rc.d
cat << EOF > $PKG/etc/rc.d/rc.font.new
-#!/bin/bash
+#!/bin/sh
#
# This selects your default screen font from among the ones in
# /usr/share/kbd/consolefonts.
#
setfont -v
EOF
-chmod 644 $PKG/etc/rc.d/rc.font.new
+chmod 0644 $PKG/etc/rc.d/rc.font.new
-# Create package post-install script:
-mkdir -p $PKG/install
-cat << EOF > $PKG/install/doinst.sh
-
-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...
-}
-
-# Leave any new rc.font with the same permissions as the old one:
-# This is a kludge, but it's because there's no --reference option
-# on busybox's 'chmod':
-if [ -e etc/rc.d/rc.font ]; then
- if [ -x etc/rc.d/rc.font ]; then
- chmod 755 etc/rc.d/rc.font.new
- else
- chmod 644 etc/rc.d/rc.font.new
- fi
-fi
-# Then config() it:
-config etc/rc.d/rc.font.new
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-EOF
+# 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 and link manpages, if any:
if [ -d $PKG/usr/man ]; then
@@ -225,21 +189,27 @@ if [ -d $PKG/usr/man ]; then
ln -s $( readlink $eachpage ).gz $eachpage.gz
rm $eachpage
done
- gzip -9 *.?
+ gzip -9 *.*
)
done
)
fi
-# Install package description:
-install -vpm644 $CWD/slack-desc $PKG/install/
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a AUTHORS COPYING CREDITS NEWS README $PKG/usr/doc/$PKGNAM-$VERSION
-# Strip binaries:
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
+# 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/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+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/a/kbd/kbd.url b/source/a/kbd/kbd.url
new file mode 100644
index 000000000..8a29cba8b
--- /dev/null
+++ b/source/a/kbd/kbd.url
@@ -0,0 +1 @@
+https://www.kernel.org/pub/linux/utils/kbd/
diff --git a/source/a/kbd/setconsolefont b/source/a/kbd/setconsolefont
index c35f0c1de..b73192a11 100644
--- a/source/a/kbd/setconsolefont
+++ b/source/a/kbd/setconsolefont
@@ -6,11 +6,15 @@
# correctly in the installer.
# 2010-04-28, add LatKaCyrHeb-14.psfu.gz <volkerdi>
# 25-Mar-2018, generate font list on the fly <David Woodfall>
+# 02-Oct-2023, don't run setfont if no font was previously loaded <volkerdi>
if [ "$TMP" = "" ]; then
TMP=/var/log/setup/tmp
fi
+# Has this script loaded a font?
+FONT_LOADED=false
+
get_font_list() {
LS_FONTS=$(/bin/ls $T_PX/usr/share/kbd/consolefonts/*.gz \
| rev | cut -f 1 -d / | rev | tail -n +10 | sed "s%$% ''%g" | tr '\n' ' ')
@@ -29,12 +33,16 @@ load_font() {
if [ ! $? = 0 ]; then
if [ -r $T_PX/usr/share/kbd/consolefonts/$1 ]; then
$CHROOT setfont $T_PX/usr/share/kbd/consolefonts/$* 1> /dev/null 2> /dev/null
+ FONT_LOADED=true
elif [ -r $T_PX/usr/lib/kbd/consolefonts/$1 ]; then
$CHROOT setfont $T_PX/usr/lib/kbd/consolefonts/$* 1> /dev/null 2> /dev/null
+ FONT_LOADED=true
elif [ -r /var/adm/mount/live/usr/lib/kbd/consolefonts/$1 ]; then
$CHROOT setfont /var/adm/mount/live/usr/lib/kbd/consolefonts/$* 1> /dev/null 2> /dev/null
+ FONT_LOADED=true
else # load default font
$CHROOT setfont
+ FONT_LOADED=true
fi
fi
}
@@ -67,7 +75,9 @@ out some custom screen fonts?" 5 60
like it, you can make it your new default screen font. You'll be able \
to try as many of these as you like.\" 21 65 12 -- $ALL_FONTS 2> $REPLY"
if [ ! $? = 0 ]; then
- load_font
+ if [ "$FONT_LOADED" = "true" ]; then
+ load_font
+ fi
exit
fi
FONT=`cat $REPLY`
diff --git a/source/a/kbd/sources/kbd-1.15-keycodes-man.patch b/source/a/kbd/sources/kbd-1.15-keycodes-man.patch
deleted file mode 100644
index d18a8c8b5..000000000
--- a/source/a/kbd/sources/kbd-1.15-keycodes-man.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -up kbd-1.15/man/man1/showkey.1_old kbd-1.15/man/man1/showkey.1
---- kbd-1.15/man/man1/showkey.1_old 2008-03-13 17:46:23.000000000 +0100
-+++ kbd-1.15/man/man1/showkey.1 2008-12-10 12:31:38.000000000 +0100
-@@ -80,6 +80,19 @@ corresponds to what the keyboard hardwar
- to know the scan codes sent by various keys it is better to boot a
- 2.4 kernel. Since 2.6.9 there also is the boot option atkbd.softraw=0
- that tells the 2.6 kernel to return the actual scan codes.
-+
-+.SH NOTES
-+The raw scan codes are available only on AT and PS/2 keyboards,
-+and even then they are disabled unless the
-+.B atkbd.softraw=0
-+kernel parameter is used.
-+When the raw scan codes are not available, the kernel uses a fixed built-in
-+table to produce scan codes from keycodes. Thus,
-+.BR setkeycodes (8)
-+can affect the output of
-+.B showkey
-+in scan code dump mode.
-+
- .SH "SEE ALSO"
- .BR loadkeys (1),
- .BR dumpkeys (1),
-diff -up kbd-1.15/man/man8/setkeycodes.8_old kbd-1.15/man/man8/setkeycodes.8
---- kbd-1.15/man/man8/setkeycodes.8_old 2008-12-10 12:31:56.000000000 +0100
-+++ kbd-1.15/man/man8/setkeycodes.8 2008-12-10 12:37:36.000000000 +0100
-@@ -41,6 +41,10 @@ to showkey(1), the command
- will assign the keycode 112 to it, and then loadkeys(1) can be used
- to define the function of this key.
-
-+USB keyboards have standardized keycodes and
-+.B setkeycodes
-+doesn't affect them at all.
-+
- .SH "2.6 KERNELS"
- In 2.6 kernels key codes lie in the range 1-255, instead of 1-127.
- (It might be best to confine oneself to the range 1-239.)
-@@ -54,6 +58,14 @@ None.
- .SH BUGS
- The keycodes of X have nothing to do with those of Linux.
- Unusual keys can be made visible under Linux, but not under X.
-+
-+.B setkeycodes
-+affects only the "first" input device
-+that has modifiable scancode-to-keycode mapping.
-+If there is more than one such device,
-+.B setkeycodes
-+cannot change the mapping of other devices than the "first" one.
-+
- .SH "SEE ALSO"
- .I "dumpkeys (1), loadkeys (1), showkey (1), getkeycodes (8)"
-
diff --git a/source/a/kbd/sources/kbd-1.15-resizecon-x86_64.patch b/source/a/kbd/sources/kbd-1.15-resizecon-x86_64.patch
deleted file mode 100644
index 5e8350a86..000000000
--- a/source/a/kbd/sources/kbd-1.15-resizecon-x86_64.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -up kbd-1.15/configure_old kbd-1.15/configure
---- kbd-1.15/configure_old 2009-01-08 15:11:04.000000000 +0100
-+++ kbd-1.15/configure 2009-01-08 15:11:45.000000000 +0100
-@@ -7637,8 +7637,9 @@ fi
-
-
- case $host_cpu in
-- i?86*) RESIZECONS_PROGS=yes ;;
-- *) RESIZECONS_PROGS=no ;;
-+ i?86*) RESIZECONS_PROGS=yes ;;
-+ x86_64*) RESIZECONS_PROGS=yes ;;
-+ *) RESIZECONS_PROGS=no ;;
- esac
- if test "$RESIZECONS_PROGS" = "yes"; then
- RESIZECONS_PROGS_TRUE=
diff --git a/source/a/kbd/sources/kbd-1.15-unicode_start.patch b/source/a/kbd/sources/kbd-1.15-unicode_start.patch
deleted file mode 100644
index d3dab3fe3..000000000
--- a/source/a/kbd/sources/kbd-1.15-unicode_start.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -up kbd-1.15/src/unicode_start_old kbd-1.15/src/unicode_start
---- kbd-1.15/src/unicode_start_old 2009-01-08 13:34:10.000000000 +0100
-+++ kbd-1.15/src/unicode_start 2009-01-08 14:02:12.000000000 +0100
-@@ -72,6 +72,9 @@ stty iutf8
- # have a Unicode map attached, or explicitly specified, e.g.,
- # by giving `def.uni' as a second argument.
-
-+DEFAULT_UNICODE_FONT=LatArCyrHeb-16
-+# Also drdos8x16 is a good candidate.
-+
- case "$#" in
- 2)
- setfont "$1" -u "$2"
-@@ -80,6 +83,7 @@ case "$#" in
- setfont "$1"
- ;;
- 0)
-+ setfont $DEFAULT_UNICODE_FONT
- ;;
- *)
- echo "usage: unicode_start [font [unicode map]]"
diff --git a/source/a/kbd/sources/kbd-1.15.2-po.patch b/source/a/kbd/sources/kbd-1.15.2-po.patch
deleted file mode 100644
index a32a793f4..000000000
--- a/source/a/kbd/sources/kbd-1.15.2-po.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- ./po/Makefile.in.in.orig 2010-04-10 16:34:12.000000000 -0500
-+++ ./po/Makefile.in.in 2010-04-29 00:19:10.000000000 -0500
-@@ -22,8 +22,9 @@
-
- prefix = @prefix@
- exec_prefix = @exec_prefix@
--datadir = @datadir@
--localedir = $(datadir)/locale
-+datadir = @datadir@
-+localedir = @localedir@
-+gnulocaledir = @localedir@
- gettextsrcdir = $(datadir)/gettext/po
-
- INSTALL = @INSTALL@
diff --git a/source/a/kbd/sources/kbd-1.15.3-fix-es-translation.patch b/source/a/kbd/sources/kbd-1.15.3-fix-es-translation.patch
deleted file mode 100644
index 2d76cd9f3..000000000
--- a/source/a/kbd/sources/kbd-1.15.3-fix-es-translation.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur kbd-1.15.3//po/es.po kbd-1.15.3.tpg//po/es.po
---- kbd-1.15.3//po/es.po 2011-05-14 21:12:49.000000000 +0000
-+++ kbd-1.15.3.tpg//po/es.po 2011-06-19 12:29:55.000000000 +0000
-@@ -1363,7 +1363,7 @@
- #: src/setfont.c:682
- #, c-format
- msgid "Saved %d-char %dx%d font file on %s\n"
--msgstr "Se ha guardado el fichero de tipos %2$dx%3$d de %1$d caracteres en %s\n"
-+msgstr "Se ha guardado el fichero de tipos %dx%d de %d caracteres en %s\n"
-
- #: src/setkeycodes.c:21
- #, c-format
diff --git a/source/a/kbd/sources/nl.euro.diff b/source/a/kbd/sources/nl.euro.diff
deleted file mode 100644
index 655a7e228..000000000
--- a/source/a/kbd/sources/nl.euro.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- ./data/keymaps/i386/qwerty/nl.map.orig 2004-01-03 09:01:22.000000000 -0800
-+++ ./data/keymaps/i386/qwerty/nl.map 2004-05-29 21:16:31.000000000 -0700
-@@ -12,6 +12,7 @@
- keymaps 0-6,8-9,12
- alt_is_meta
- include "qwerty-layout"
-+ altgr keycode 18 = euro
- altgr keycode 19 = paragraph
- altgr keycode 31 = ssharp
- altgr keycode 44 = guillemotleft
diff --git a/source/a/kbd/sources/speakupmap.map b/source/a/kbd/sources/speakupmap.map
deleted file mode 100644
index 9c73e35df..000000000
--- a/source/a/kbd/sources/speakupmap.map
+++ /dev/null
@@ -1,308 +0,0 @@
-# us.map
-# with some additions from quinlan@spectrum.cs.bucknell.edu (Daniel Quinlan)
-# 14 Mar 1994
-keymaps 0-2,4-6,8,9,12,13
-keycode 1 = Escape Escape
- alt keycode 1 = Meta_Escape
-keycode 2 = one exclam
- alt keycode 2 = Meta_one
- alt shift keycode 2 = Meta_exclam
-keycode 3 = two at at
- control keycode 3 = nul
- control shift keycode 3 = nul
- alt keycode 3 = Meta_two
- alt shift keycode 3 = Meta_at
-keycode 4 = three numbersign
- control keycode 4 = Escape
- alt keycode 4 = Meta_three
- alt shift keycode 4 = Meta_numbersign
-keycode 5 = four dollar dollar
- control keycode 5 = Control_backslash
- alt keycode 5 = Meta_four
- alt shift keycode 5 = Meta_dollar
-keycode 6 = five percent
- control keycode 6 = Control_bracketright
- alt keycode 6 = Meta_five
- alt shift keycode 6 = Meta_percent
-keycode 7 = six asciicircum
- control keycode 7 = Control_asciicircum
- alt keycode 7 = Meta_six
- alt shift keycode 7 = Meta_asciicircum
-keycode 8 = seven ampersand braceleft
- control keycode 8 = Control_underscore
- alt keycode 8 = Meta_seven
-keycode 9 = eight asterisk bracketleft
- control keycode 9 = Delete
- alt keycode 9 = Meta_eight
-keycode 10 = nine parenleft bracketright
- alt keycode 10 = Meta_nine
-keycode 11 = zero parenright braceright
- alt keycode 11 = Meta_zero
-keycode 12 = minus underscore backslash
- control keycode 12 = Control_underscore
- control shift keycode 12 = Control_underscore
- alt keycode 12 = Meta_minus
-keycode 13 = equal plus
- alt keycode 13 = Meta_equal
-keycode 14 = Delete Delete
- alt keycode 14 = Meta_Delete
-keycode 15 = Tab Tab
- alt keycode 15 = Meta_Tab
-keycode 16 = q
-keycode 17 = w
-keycode 18 = e
-keycode 19 = r
-keycode 20 = t
-keycode 21 = y
-keycode 22 = u
-keycode 23 = i
-keycode 24 = o
-keycode 25 = p
-keycode 26 = bracketleft braceleft
- control keycode 26 = Escape
- alt keycode 26 = Meta_bracketleft
- alt shift keycode 26 = Meta_braceleft
-keycode 27 = bracketright braceright asciitilde
- control keycode 27 = Control_bracketright
- alt keycode 27 = Meta_bracketright
- alt shift keycode 27 = Meta_braceright
-keycode 28 = Return
- alt keycode 28 = 0x080d
-keycode 29 = Control
-keycode 30 = a
-keycode 31 = s
-keycode 32 = d
-keycode 33 = f
-keycode 34 = g
-keycode 35 = h
-keycode 36 = j
-keycode 37 = k
-keycode 38 = l
-keycode 39 = semicolon colon
- alt keycode 39 = Meta_semicolon
-keycode 40 = apostrophe quotedbl
- control keycode 40 = Control_g
- alt keycode 40 = Meta_apostrophe
-keycode 41 = grave asciitilde
- control keycode 41 = nul
- alt keycode 41 = Meta_grave
-keycode 42 = Shift
-keycode 43 = backslash bar
- control keycode 43 = Control_backslash
- alt keycode 43 = Meta_backslash
- alt shift keycode 43 = Meta_bar
-keycode 44 = z
-keycode 45 = x
-keycode 46 = c
-keycode 47 = v
-keycode 48 = b
-keycode 49 = n
-keycode 50 = m
-keycode 51 = comma less
- alt keycode 51 = Meta_comma
- alt shift keycode 51 = Meta_less
-keycode 52 = period greater
- alt keycode 52 = Meta_period
- alt shift keycode 52 = Meta_greater
-keycode 53 = slash question
- control keycode 53 = Delete
- alt keycode 53 = Meta_slash
-keycode 54 = Shift
-keycode 55 = 0x0d26
-#keycode 55 = KP_Multiply
- altgr keycode 55 = 0x0406
-keycode 56 = Alt
-keycode 57 = space space
- control keycode 57 = nul
- alt keycode 57 = Meta_space
-keycode 58 = Caps_Lock
-keycode 59 = F1 F11 Console_13
- control keycode 59 = F1
- alt keycode 59 = Console_1
- control alt keycode 59 = Console_1
-keycode 60 = F2 F12 Console_14
- control keycode 60 = F2
- alt keycode 60 = Console_2
- control alt keycode 60 = Console_2
-keycode 61 = F3 F13 Console_15
- control keycode 61 = F3
- alt keycode 61 = Console_3
- control alt keycode 61 = Console_3
-keycode 62 = F4 F14 Console_16
- control keycode 62 = F4
- alt keycode 62 = Console_4
- control alt keycode 62 = Console_4
-keycode 63 = F5 F15 Console_17
- control keycode 63 = F5
- alt keycode 63 = Console_5
- control alt keycode 63 = Console_5
-keycode 64 = F6 F16 Console_18
- control keycode 64 = F6
- alt keycode 64 = Console_6
- control alt keycode 64 = Console_6
-keycode 65 = F7 F17 Console_19
- control keycode 65 = F7
- alt keycode 65 = Console_7
- control alt keycode 65 = Console_7
-keycode 66 = F8 F18 Console_20
- control keycode 66 = F8
- alt keycode 66 = Console_8
- control alt keycode 66 = Console_8
-keycode 67 = F9 F19 Console_21
- control keycode 67 = F9
- alt keycode 67 = Console_9
- control alt keycode 67 = Console_9
-keycode 68 = F10 F20 Console_22
- control keycode 68 = F10
- alt keycode 68 = Console_10
- control alt keycode 68 = Console_10
-keycode 69 = Num_Lock
-keycode 70 = Scroll_Lock Show_Memory Show_Registers
- control keycode 70 = Show_State
- alt keycode 70 = Scroll_Lock
-keycode 71 = 0x0d0b
- altgr keycode 71 = 0x0d0f
-#keycode 71 = KP_7
- alt keycode 71 = Ascii_7
-keycode 72 = 0x0d0a
- altgr keycode 72 = 0x0d20
-#keycode 72 = KP_8
- alt keycode 72 = Ascii_8
-keycode 73 = 0x0d0c
- altgr keycode 73 = 0x0d0d
-#keycode 73 = KP_9
- alt keycode 73 = Ascii_9
-keycode 74 = 0x0d1e
- altgr keycode 74 = 0x0d24
-keycode 75 = 0x0d08
- altgr keycode 75 = 0x0d22
-#keycode 75 = KP_4
- alt keycode 75 = Ascii_4
-keycode 76 = 0x0d07
-#keycode 76 = KP_5
- altgr keycode 76 = 0x0d12
- alt keycode 76 = Ascii_5
-keycode 77 = 0x0d09
- altgr keycode 77 = 0x0d23
-#keycode 77 = KP_6
- alt keycode 77 = Ascii_6
-#keycode 78 = KP_Add
-keycode 78 = 0x0d14
- altgr keycode 78 = 0x0d21
-keycode 79 = 0x0d05
-#keycode 79 = KP_1
- altgr keycode 79 = 0x0d10
- alt keycode 79 = Ascii_1
-keycode 80 = 0x0d04
-#keycode 80 = KP_2
- altgr keycode 80 = 0x0d11
- alt keycode 80 = Ascii_2
-keycode 81 = 0x0d06
- altgr keycode 81 = 0x0d0e
-#keycode 81 = KP_3
- alt keycode 81 = Ascii_3
-#keycode 82 = 0x0d14
-keycode 82 = AltGr
-#keycode 82 = KP_0
- alt keycode 82 = Ascii_0
-#keycode 83 = KP_Period
-keycode 83 = 0x0d1b
- altgr keycode 83 = 0x0d1d
- altgr control keycode 83 = Boot
- control alt keycode 83 = Boot
-keycode 84 = Last_Console
-keycode 85 =
-keycode 86 = less greater bar
- alt keycode 86 = Meta_less
-keycode 87 = F11 F11 Console_23
- control keycode 87 = F11
- alt keycode 87 = Console_11
- control alt keycode 87 = Console_11
-keycode 88 = F12 F12 Console_24
- control keycode 88 = F12
- alt keycode 88 = Console_12
- control alt keycode 88 = Console_12
-keycode 89 =
-keycode 90 =
-keycode 91 =
-keycode 92 =
-keycode 93 =
-keycode 94 =
-keycode 95 =
-keycode 96 = 0x0d03
- altgr keycode 96 = 0x0d1c
-#keycode 96 = KP_Enter
-keycode 97 = Control
-keycode 98 = 0x0d27
-#keycode 98 = KP_Divide
- altgr keycode 98 = 0x0d28
-#keycode 99 = Control_backslash
-keycode 99 = 0x0d25
- control keycode 99 = Control_backslash
- alt keycode 99 = Control_backslash
-keycode 100 = Alt
-keycode 101 = Break
-keycode 102 = Find
-keycode 103 = Up
-keycode 104 = Prior
- shift keycode 104 = Scroll_Backward
-keycode 105 = Left
- alt keycode 105 = Decr_Console
-keycode 106 = Right
- alt keycode 106 = Incr_Console
-keycode 107 = Select
-keycode 108 = Down
-keycode 109 = Next
- shift keycode 109 = Scroll_Forward
-keycode 110 = Insert
-keycode 111 = Remove
- altgr control keycode 111 = Boot
- control alt keycode 111 = Boot
-keycode 112 =
-keycode 113 =
-keycode 114 =
-keycode 115 =
-keycode 116 =
-keycode 117 =
-keycode 118 =
-keycode 119 =
-keycode 120 =
-keycode 121 =
-keycode 122 =
-keycode 123 =
-keycode 124 =
-keycode 125 =
-keycode 126 =
-keycode 127 =
-string F1 = "\033[[A"
-string F2 = "\033[[B"
-string F3 = "\033[[C"
-string F4 = "\033[[D"
-string F5 = "\033[[E"
-string F6 = "\033[17~"
-string F7 = "\033[18~"
-string F8 = "\033[19~"
-string F9 = "\033[20~"
-string F10 = "\033[21~"
-string F11 = "\033[23~"
-string F12 = "\033[24~"
-string F13 = "\033[25~"
-string F14 = "\033[26~"
-string F15 = "\033[28~"
-string F16 = "\033[29~"
-string F17 = "\033[31~"
-string F18 = "\033[32~"
-string F19 = "\033[33~"
-string F20 = "\033[34~"
-string Find = "\033[1~"
-string Insert = "\033[2~"
-string Remove = "\033[3~"
-string Select = "\033[4~"
-string Prior = "\033[5~"
-string Next = "\033[6~"
-string F21 = ""
-string F22 = ""
-string F23 = ""
-string F24 = ""
-string F25 = ""
-string F26 = ""
diff --git a/source/a/kernel-firmware/kernel-firmware.SlackBuild b/source/a/kernel-firmware/kernel-firmware.SlackBuild
index 3068b4601..cd45d508d 100755
--- a/source/a/kernel-firmware/kernel-firmware.SlackBuild
+++ b/source/a/kernel-firmware/kernel-firmware.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2011, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2011, 2016, 2018, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,6 +25,10 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=kernel-firmware
ARCH=noarch
BUILD=${BUILD:-1}
+# Compress the firmware blobs?
+# Default is "none" for no compression.
+# Other types known to be currently supported are "xz" and "zstd".
+COMPRESSION=${COMPRESSION:-none}
# 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
@@ -56,29 +60,37 @@ DATE="$(lynx -dump -width=256 https://git.kernel.org/pub/scm/linux/kernel/git/fi
HEADISAT="$(lynx -dump -width=256 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=HEAD | grep " commit " | head -n 1 | cut -f 2 -d ] | cut -b 1-7)"
find . -name ".git*" -exec rm -rf "{}" \+
chown -R root:root .
-mkdir -p lib
-mv linux-firmware lib/firmware
-# Make sure that symlinks are created by running "make install":
-( cd lib/firmware
- echo "Running make DESTDIR=$PKG install..."
- make DESTDIR=$PKG install 2> /dev/null
-)
+mkdir -p lib/firmware
-# Remove sources for carl9170fw:
-( cd $PKG/lib/firmware
- if [ -d carl9170fw ]; then
- mv carl9170fw/COPYRIGHT COPYRIGHT.carl9170fw
- mv carl9170fw/GPL LICENSE.carl9170fw
- rm -rf carl9170fw
- fi
+# Install the firmware from the download directory using "make $INSTALLTARGET":
+case $COMPRESSION in
+ xz) INSTALLTARGET="install-xz" ;;
+ zstd) INSTALLTARGET="install-zst" ;;
+ *) INSTALLTARGET="install" ;;
+esac
+( cd linux-firmware
+ echo "Running make DESTDIR=$PKG ${INSTALLTARGET}..."
+ make DESTDIR=$PKG $INSTALLTARGET 2> /dev/null
)
-# Install documentation link:
-mkdir -p $PKG/usr/doc
-( cd $PKG/usr/doc
- ln -sf /lib/firmware kernel-firmware-${DATE}_${HEADISAT}
+# Install documentation:
+( cd linux-firmware
+ mkdir -p $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}
+ cp -a README $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}/README.linux-firmware
+ cp -a WHENCE $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}/WHENCE.linux-firmware
+ cp -a GPL* LICEN* \
+ $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}
+ cp -a amd-ucode/README $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}/README.amd-ucode
+ cp -a isci/README $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}/README.isci
+ cp -a carl9170fw/COPYRIGHT $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}/COPYRIGHT.carl9170fw
+ cp -a carl9170fw/README $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}/README.carl9170fw
+ cp -a rtw88/README $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}/README.rtw88
+ cp -a wfx/LICENCE.wf200 $PKG/usr/doc/kernel-firmware-${DATE}_${HEADISAT}
)
+# Remove git repo clone:
+rm -rf linux-firmware
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/a/kmod/kmod.SlackBuild b/source/a/kmod/kmod.SlackBuild
index 4a01bd78e..b59ab405c 100755
--- a/source/a/kmod/kmod.SlackBuild
+++ b/source/a/kmod/kmod.SlackBuild
@@ -26,7 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=kmod
-VERSION=${VERSION:-29}
+VERSION=${VERSION:-32}
BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
diff --git a/source/a/kmod/slack-desc b/source/a/kmod/slack-desc
index 091769091..d0ce3e440 100644
--- a/source/a/kmod/slack-desc
+++ b/source/a/kmod/slack-desc
@@ -16,4 +16,4 @@ kmod:
kmod: These tools are designed on top of libkmod, a library that is
kmod: shipped with kmod.
kmod:
-kmod: Homepage: http://www.kernel.org/pub/linux/utils/kernel/kmod/
+kmod: Homepage: https://www.kernel.org/pub/linux/utils/kernel/kmod/
diff --git a/source/a/lbzip2/lbzip2.SlackBuild b/source/a/lbzip2/lbzip2.SlackBuild
index 0a73dc799..a9b2a0f09 100755
--- a/source/a/lbzip2/lbzip2.SlackBuild
+++ b/source/a/lbzip2/lbzip2.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-4}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/less/007521ac3c95bc76.patch b/source/a/less/007521ac3c95bc76.patch
new file mode 100644
index 000000000..663f222c0
--- /dev/null
+++ b/source/a/less/007521ac3c95bc76.patch
@@ -0,0 +1,73 @@
+From 007521ac3c95bc76e3d59c6dbfe75d06c8075c33 Mon Sep 17 00:00:00 2001
+From: Mark Nudelman <markn@greenwoodsoftware.com>
+Date: Thu, 11 Apr 2024 17:49:48 -0700
+Subject: [PATCH] Fix bug when viewing a file whose name contains a newline.
+
+---
+ filename.c | 31 +++++++++++++++++++++++++------
+ 1 file changed, 25 insertions(+), 6 deletions(-)
+
+diff --git a/filename.c b/filename.c
+index f90e0e82..a52c6354 100644
+--- a/filename.c
++++ b/filename.c
+@@ -127,11 +127,20 @@ static constant char * metachars(void)
+ /*
+ * Is this a shell metacharacter?
+ */
+-static int metachar(char c)
++static lbool metachar(char c)
+ {
+ return (strchr(metachars(), c) != NULL);
+ }
+
++/*
++ * Must use quotes rather than escape char for this metachar?
++ */
++static lbool must_quote(char c)
++{
++ /* {{ Maybe the set of must_quote chars should be configurable? }} */
++ return (c == '\n');
++}
++
+ /*
+ * Insert a backslash before each metacharacter in a string.
+ */
+@@ -164,6 +173,9 @@ public char * shell_quoten(constant char *s, size_t slen)
+ * doesn't support escape chars. Use quotes.
+ */
+ use_quotes = TRUE;
++ } else if (must_quote(*p))
++ {
++ len += 3; /* open quote + char + close quote */
+ } else
+ {
+ /*
+@@ -194,15 +206,22 @@ public char * shell_quoten(constant char *s, size_t slen)
+ constant char *es = s + slen;
+ while (s < es)
+ {
+- if (metachar(*s))
++ if (!metachar(*s))
+ {
+- /*
+- * Add the escape char.
+- */
++ *np++ = *s++;
++ } else if (must_quote(*s))
++ {
++ /* Surround the char with quotes. */
++ *np++ = openquote;
++ *np++ = *s++;
++ *np++ = closequote;
++ } else
++ {
++ /* Insert an escape char before the char. */
+ strcpy(np, esc);
+ np += esclen;
++ *np++ = *s++;
+ }
+- *np++ = *s++;
+ }
+ *np = '\0';
+ }
diff --git a/source/a/less/less.SlackBuild b/source/a/less/less.SlackBuild
index 6db39b350..b4ea88c72 100755
--- a/source/a/less/less.SlackBuild
+++ b/source/a/less/less.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=less
VERSION=${VERSION:-$(echo less-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -74,7 +74,9 @@ tar xvf $CWD/less-$VERSION.tar.?z || exit 1
cd less-$VERSION || exit 1
# Fix path in manpage:
-sed -i "s,/usr/local/etc,/etc,g" less.nro
+if [ -r less.nro ]; then
+ sed -i "s,/usr/local/etc,/etc,g" less.nro
+fi
chown -R root:root .
find . \
@@ -83,6 +85,24 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# newline in filenames patch for CVE-2024-32487:
+cat $CWD/007521ac3c95bc76.patch | patch -p1 --verbose || exit 1
+
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
+
+# Prep needed if using the git archive:
+for file in funcs.h less.nro lesskey.nro lessecho.nro ; do
+ if [ ! -r $file ]; then
+ make -f Makefile.aut $file
+ fi
+done
+
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
diff --git a/source/a/less/less.url b/source/a/less/less.url
index ff83ccdc5..34b36062b 100644
--- a/source/a/less/less.url
+++ b/source/a/less/less.url
@@ -1 +1,2 @@
-http://www.greenwoodsoftware.com/less/
+#http://www.greenwoodsoftware.com/less/
+https://github.com/gwsw/less
diff --git a/source/a/less/lesspipe.sh b/source/a/less/lesspipe.sh
index b5d76d48a..6bc9ff64d 100644
--- a/source/a/less/lesspipe.sh
+++ b/source/a/less/lesspipe.sh
@@ -33,7 +33,7 @@ lesspipe() {
*.tgz | *.tar.gz | *.tar.Z | *.tar.z | *.tar.bz2 | *.tbz ) tar tvvf "$1" 2>/dev/null ;;
*.tlz | *.tar.lz ) lzip -dc "$1" 2> /dev/null | tar tvvf - 2> /dev/null ;;
*.txz | *.tar.xz ) xz -dc "$1" 2> /dev/null | tar tvvf - 2> /dev/null ;;
- *.tzst | *.tar.zst | *.tar.zstd ) tar tvvf "$1" 2> /dev/null ;;
+ *.tzst | *.tzz | *.tar.zst | *.tar.zstd ) tar tvvf "$1" 2> /dev/null ;;
*.zip) unzip -l "$1" 2>/dev/null ;;
*.rpm) rpm -qpvl "$1" 2>/dev/null ;;
*.rar) # check if rar is installed first
diff --git a/source/a/lhasa/lhasa.SlackBuild b/source/a/lhasa/lhasa.SlackBuild
index 375947b83..34df02e12 100755
--- a/source/a/lhasa/lhasa.SlackBuild
+++ b/source/a/lhasa/lhasa.SlackBuild
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=lhasa
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/lhasa/slack-desc b/source/a/lhasa/slack-desc
index 854108cc2..f3fa6184e 100644
--- a/source/a/lhasa/slack-desc
+++ b/source/a/lhasa/slack-desc
@@ -15,5 +15,5 @@ lhasa: Currently it is only possible to read from (ie. decompress) archives;
lhasa: generating (compressing) LHA archives may be an enhancement for future
lhasa: versions.
lhasa:
-lhasa: Homepage: http://fragglet.github.com/lhasa/
+lhasa: Homepage: https://fragglet.github.io/
lhasa:
diff --git a/source/a/libblockdev/doinst.sh b/source/a/libblockdev/doinst.sh
index 09fe04bb0..79caef3de 100644
--- a/source/a/libblockdev/doinst.sh
+++ b/source/a/libblockdev/doinst.sh
@@ -11,5 +11,5 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/libblockdev/conf.d/00-default.cfg.new
-config etc/libblockdev/conf.d/10-lvm-dbus.cfg.new
+config etc/libblockdev/3/conf.d/00-default.cfg.new
+config etc/libblockdev/3/conf.d/10-lvm-dbus.cfg.new
diff --git a/source/a/libblockdev/libblockdev.SlackBuild b/source/a/libblockdev/libblockdev.SlackBuild
index 5f815f1d8..aed678d5e 100755
--- a/source/a/libblockdev/libblockdev.SlackBuild
+++ b/source/a/libblockdev/libblockdev.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2017-2019 Robby Workman, Tuscaloosa, Alabama, USA
-# Copyright 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2020, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,14 +24,14 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=libblockdev
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | rev | cut -f 2- -d -)}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
@@ -42,7 +42,7 @@ fi
# 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"
+ echo "$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz"
exit 0
fi
@@ -107,6 +107,8 @@ CXXFLAGS="$SLKCFLAGS" \
--infodir=/usr/info \
--disable-static \
--without-dm \
+ --without-python2 \
+ --with-python3 \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
@@ -114,10 +116,10 @@ make install DESTDIR=$PKG || exit 1
# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-mv $PKG/etc/libblockdev/conf.d/00-default.cfg \
- $PKG/etc/libblockdev/conf.d/00-default.cfg.new
-mv $PKG/etc/libblockdev/conf.d/10-lvm-dbus.cfg \
- $PKG/etc/libblockdev/conf.d/10-lvm-dbus.cfg.new
+mv $PKG/etc/libblockdev/3/conf.d/00-default.cfg \
+ $PKG/etc/libblockdev/3/conf.d/00-default.cfg.new
+mv $PKG/etc/libblockdev/3/conf.d/10-lvm-dbus.cfg \
+ $PKG/etc/libblockdev/3/conf.d/10-lvm-dbus.cfg.new
# 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
@@ -148,4 +150,4 @@ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
diff --git a/source/a/libbytesize/libbytesize.SlackBuild b/source/a/libbytesize/libbytesize.SlackBuild
index 21765d4e3..e5c8c6de3 100755
--- a/source/a/libbytesize/libbytesize.SlackBuild
+++ b/source/a/libbytesize/libbytesize.SlackBuild
@@ -31,7 +31,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/libcgroup/libcgroup.SlackBuild b/source/a/libcgroup/libcgroup.SlackBuild
index 83720f47d..e093f2807 100755
--- a/source/a/libcgroup/libcgroup.SlackBuild
+++ b/source/a/libcgroup/libcgroup.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=libcgroup
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-10}
+BUILD=${BUILD:-11}
# Without this, we get syntax errors starting rc.cgred:
LANG=C
diff --git a/source/a/libcgroup/libcgroup.init.diff b/source/a/libcgroup/libcgroup.init.diff
index 1d1be2cc0..d3e6e7bad 100644
--- a/source/a/libcgroup/libcgroup.init.diff
+++ b/source/a/libcgroup/libcgroup.init.diff
@@ -1,70 +1,10 @@
---- ./scripts/init.d/cgred.in.orig 2014-01-13 08:05:56.000000000 -0600
-+++ ./scripts/init.d/cgred.in 2017-02-28 12:41:11.307424565 -0600
-@@ -39,13 +39,12 @@
- # Sanity checks
- [ -x $CGRED_BIN ] || exit 1
-
--# Source function library & LSB routines
-+# Source function library
- . /etc/rc.d/init.d/functions
--. /lib/lsb/init-functions
-
- # Read in configuration options.
--if [ -f "/etc/sysconfig/cgred.conf" ] ; then
-- . /etc/sysconfig/cgred.conf
-+if [ -f /etc/cgred.conf ] ; then
-+ . /etc/cgred.conf
- OPTIONS="$NODAEMON $LOG"
- if [ -n "$LOG_FILE" ]; then
- OPTIONS="$OPTIONS --logfile=$LOG_FILE"
-@@ -70,13 +69,13 @@
- {
- echo -n $"Starting CGroup Rules Engine Daemon: "
- if [ -f "$lockfile" ]; then
-- log_failure_msg "$servicename is already running with PID `cat ${pidfile}`"
-+ echo "$servicename is already running with PID `cat ${pidfile}`"
- return 0
- fi
- num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l`
- if [ $num -eq 0 ]; then
- echo
-- log_failure_msg $"Cannot find cgroups, is cgconfig service running?"
-+ echo $"Cannot find cgroups, is cgconfig service running?"
- return 1
- fi
- daemon --check $servicename --pidfile $pidfile $CGRED_BIN $OPTIONS
-@@ -97,7 +96,7 @@
- {
- echo -n $"Stopping CGroup Rules Engine Daemon..."
- if [ ! -f $pidfile ]; then
-- log_success_msg
-+ #log_success_msg
- return 0
- fi
- killproc -p $pidfile -TERM "$processname"
-@@ -143,13 +142,13 @@
- echo $"Reloading rules configuration..."
- kill -s 12 `cat ${pidfile}`
- RETVAL=$?
-- if [ $RETVAL -eq 0 ] ; then
-- log_success_msg
-- else
-- log_failure_msg
-- fi
-+ #if [ $RETVAL -eq 0 ] ; then
-+ # log_success_msg
-+ #else
-+ # log_failure_msg
-+ #fi
- else
-- log_failure_msg "$servicename is not running."
-+ echo "$servicename is not running."
- fi
- ;;
- *)
--- ./scripts/init.d/cgconfig.in.orig 2014-01-13 08:05:56.000000000 -0600
-+++ ./scripts/init.d/cgconfig.in 2017-02-28 12:42:13.278423245 -0600
-@@ -36,11 +36,6 @@
++++ ./scripts/init.d/cgconfig.in 2023-08-12 12:55:10.109117713 -0500
+@@ -33,14 +33,10 @@
+ prefix=@prefix@;exec_prefix=@exec_prefix@;sbindir=@sbindir@
+ CGCONFIGPARSER_BIN=$sbindir/cgconfigparser
+ CONFIG_FILE=/etc/cgconfig.conf
++CONFIG_DIR=/etc/cgconfig.d
servicename=cgconfig
lockfile=/var/lock/subsys/$servicename
@@ -76,7 +16,7 @@
# read the config
CREATE_DEFAULT=yes
if [ -e /etc/sysconfig/cgconfig ]; then
-@@ -54,8 +49,8 @@
+@@ -54,8 +50,8 @@
read user ctrl defaultcgroup <<< \
$(grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf)
if [ -n "$defaultcgroup" -a "$defaultcgroup" = "*" ]; then
@@ -87,7 +27,7 @@
defaultcgroup=
fi
fi
-@@ -98,20 +93,20 @@
+@@ -98,20 +94,20 @@
start() {
echo -n "Starting cgconfig service: "
if [ -f "$lockfile" ]; then
@@ -103,7 +43,8 @@
return 6
fi
- $CGCONFIGPARSER_BIN -l $CONFIG_FILE
+- $CGCONFIGPARSER_BIN -l $CONFIG_FILE
++ $CGCONFIGPARSER_BIN -l $CONFIG_FILE -L $CONFIG_DIR
retval=$?
if [ $retval -ne 0 ]; then
- log_failure_msg "Failed to parse " $CONFIG_FILE
@@ -111,7 +52,7 @@
return 1
fi
fi
-@@ -123,18 +118,18 @@
+@@ -123,18 +119,18 @@
touch "$lockfile"
retval=$?
if [ $retval -ne 0 ]; then
@@ -127,10 +68,74 @@
stop() {
echo -n "Stopping cgconfig service: "
- cgclear
-+ /usr/sbin/cgclear -l /etc/cgconfig.conf
++ /usr/sbin/cgclear -l $CONFIG_FILE -L $CONFIG_DIR
rm -f "$lockfile"
- log_success_msg
+ #log_success_msg
return 0
}
+--- ./scripts/init.d/cgred.in.orig 2014-01-13 08:05:56.000000000 -0600
++++ ./scripts/init.d/cgred.in 2023-08-12 12:53:58.042116101 -0500
+@@ -39,13 +39,12 @@
+ # Sanity checks
+ [ -x $CGRED_BIN ] || exit 1
+
+-# Source function library & LSB routines
++# Source function library
+ . /etc/rc.d/init.d/functions
+-. /lib/lsb/init-functions
+
+ # Read in configuration options.
+-if [ -f "/etc/sysconfig/cgred.conf" ] ; then
+- . /etc/sysconfig/cgred.conf
++if [ -f /etc/cgred.conf ] ; then
++ . /etc/cgred.conf
+ OPTIONS="$NODAEMON $LOG"
+ if [ -n "$LOG_FILE" ]; then
+ OPTIONS="$OPTIONS --logfile=$LOG_FILE"
+@@ -70,13 +69,13 @@
+ {
+ echo -n $"Starting CGroup Rules Engine Daemon: "
+ if [ -f "$lockfile" ]; then
+- log_failure_msg "$servicename is already running with PID `cat ${pidfile}`"
++ echo "$servicename is already running with PID `cat ${pidfile}`"
+ return 0
+ fi
+ num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l`
+ if [ $num -eq 0 ]; then
+ echo
+- log_failure_msg $"Cannot find cgroups, is cgconfig service running?"
++ echo $"Cannot find cgroups, is cgconfig service running?"
+ return 1
+ fi
+ daemon --check $servicename --pidfile $pidfile $CGRED_BIN $OPTIONS
+@@ -97,7 +96,7 @@
+ {
+ echo -n $"Stopping CGroup Rules Engine Daemon..."
+ if [ ! -f $pidfile ]; then
+- log_success_msg
++ #log_success_msg
+ return 0
+ fi
+ killproc -p $pidfile -TERM "$processname"
+@@ -143,13 +142,13 @@
+ echo $"Reloading rules configuration..."
+ kill -s 12 `cat ${pidfile}`
+ RETVAL=$?
+- if [ $RETVAL -eq 0 ] ; then
+- log_success_msg
+- else
+- log_failure_msg
+- fi
++ #if [ $RETVAL -eq 0 ] ; then
++ # log_success_msg
++ #else
++ # log_failure_msg
++ #fi
+ else
+- log_failure_msg "$servicename is not running."
++ echo "$servicename is not running."
+ fi
+ ;;
+ *)
diff --git a/source/a/libpwquality/libpwquality.SlackBuild b/source/a/libpwquality/libpwquality.SlackBuild
index c9c08e204..f0d73928d 100755
--- a/source/a/libpwquality/libpwquality.SlackBuild
+++ b/source/a/libpwquality/libpwquality.SlackBuild
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=libpwquality
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/lvm2/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch b/source/a/lvm2/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch
new file mode 100644
index 000000000..e39d7959b
--- /dev/null
+++ b/source/a/lvm2/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch
@@ -0,0 +1,11 @@
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,7 +76,7 @@
+ # it's better suited to appearing in the journal.
+
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --nohints --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+
+ LABEL="lvm_end"
diff --git a/source/a/lvm2/lvm2.SlackBuild b/source/a/lvm2/lvm2.SlackBuild
index d33fe8101..3a8ebb100 100755
--- a/source/a/lvm2/lvm2.SlackBuild
+++ b/source/a/lvm2/lvm2.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2012, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2018, 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -78,12 +78,14 @@ find . \
-exec chmod 644 {} \+
zcat $CWD/create-dm-run-dir.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/lvm2-2.03.20-dm_lvm_rules_no_systemd.patch | patch -p1 --verbose || exit 1
# uid 0 = root
# gid 6 = disk
CFLAGS="$SLKCFLAGS" \
./configure \
--disable-readline \
+ --disable-systemd-journal \
--enable-cmdlib \
--enable-dmeventd \
--libdir=/usr/lib${LIBDIRSUFFIX} \
diff --git a/source/a/lzip/lzip.SlackBuild b/source/a/lzip/lzip.SlackBuild
index 1cce086bf..ad1174a87 100755
--- a/source/a/lzip/lzip.SlackBuild
+++ b/source/a/lzip/lzip.SlackBuild
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=lzip
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/lzlib/lzlib.SlackBuild b/source/a/lzlib/lzlib.SlackBuild
index 3eb875855..e59333d91 100755
--- a/source/a/lzlib/lzlib.SlackBuild
+++ b/source/a/lzlib/lzlib.SlackBuild
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=lzlib
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.lz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/mcelog/mcelog.logrotate.size.syntax.diff b/source/a/mcelog/mcelog.logrotate.size.syntax.diff
index 49a511a57..94056af35 100644
--- a/source/a/mcelog/mcelog.logrotate.size.syntax.diff
+++ b/source/a/mcelog/mcelog.logrotate.size.syntax.diff
@@ -1,10 +1,10 @@
---- ./mcelog.logrotate.orig 2021-04-30 09:44:57.000000000 -0500
-+++ ./mcelog.logrotate 2021-05-23 14:16:45.606004778 -0500
+--- ./mcelog.logrotate.orig 2021-12-09 19:12:29.000000000 -0600
++++ ./mcelog.logrotate 2021-12-10 14:44:50.221011659 -0600
@@ -3,7 +3,7 @@
dateext
maxage 365
rotate 99
-- size=+2048k
+- size +2048k
+ size 2048k
notifempty
missingok
diff --git a/source/a/mdadm/mdadm.SlackBuild b/source/a/mdadm/mdadm.SlackBuild
index dbebd1bf8..de41151b0 100755
--- a/source/a/mdadm/mdadm.SlackBuild
+++ b/source/a/mdadm/mdadm.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=mdadm
VERSION=${VERSION:-$(echo mdadm-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/mdadm/mdadm.url b/source/a/mdadm/mdadm.url
index b7132f95a..8e3a8aedd 100644
--- a/source/a/mdadm/mdadm.url
+++ b/source/a/mdadm/mdadm.url
@@ -1 +1,2 @@
-https://www.kernel.org/pub/linux/utils/raid/mdadm
+#https://www.kernel.org/pub/linux/utils/raid/mdadm
+https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/
diff --git a/source/a/minicom/minicom.SlackBuild b/source/a/minicom/minicom.SlackBuild
index 946c55a9a..454e2b28a 100755
--- a/source/a/minicom/minicom.SlackBuild
+++ b/source/a/minicom/minicom.SlackBuild
@@ -23,8 +23,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=minicom
-VERSION=2.8
-BUILD=${BUILD:-3}
+VERSION=2.9
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
diff --git a/source/a/mkinitrd/0003-blacklist.40-usb_modeswitch.rules.patch b/source/a/mkinitrd/0003-blacklist.40-usb_modeswitch.rules.patch
new file mode 100644
index 000000000..86f496e8d
--- /dev/null
+++ b/source/a/mkinitrd/0003-blacklist.40-usb_modeswitch.rules.patch
@@ -0,0 +1,10 @@
+--- ./mkinitrd.orig 2021-10-12 13:50:48.059708275 -0500
++++ ./mkinitrd 2021-10-12 13:51:36.482705596 -0500
+@@ -69,6 +69,7 @@
+ check-mtp-device \
+ check-ptp-camera \
+ udev-configure-printer \
++ rules.d/40-usb_modeswitch.rules \
+ rules.d/60-openobex.rules \
+ rules.d/73-seat-late.rules \
+ rules.d/85-regulatory.rules \
diff --git a/source/a/mkinitrd/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch b/source/a/mkinitrd/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch
new file mode 100644
index 000000000..e24b7c7c4
--- /dev/null
+++ b/source/a/mkinitrd/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch
@@ -0,0 +1,23 @@
+--- ./mkinitrd_command_generator.sh.orig 2021-03-28 13:22:55.628927615 -0500
++++ ./mkinitrd_command_generator.sh 2022-01-24 21:29:00.382517371 -0600
+@@ -302,12 +302,19 @@
+ fi
+
+ # Finally, we should check if base device is
+- # a real block device or a RAID volume:
++ # a real block device or a RAID volume:
+ for MD in $(cat /proc/mdstat | grep -w active | cut -d' ' -f1) ; do
+ if [ "$BASEDEV" = "/dev/$MD" ]; then
+ USING_RAID=1
+ break
+ fi
++ done
++ # Additional check in case $BASEDEV is a partition of /dev/$MD:
++ for BLK in $(sfdisk -ld /dev/$MD 2> /dev/null | grep "^/dev" | cut -d " " -f 1); do
++ if [ "$BASEDEV" = "$BLK" ]; then
++ USING_RAID=1
++ break
++ fi
+ done
+ }
+
diff --git a/source/a/mkinitrd/0005-support-modules-compressed-with-xz.patch b/source/a/mkinitrd/0005-support-modules-compressed-with-xz.patch
new file mode 100644
index 000000000..a746ddf42
--- /dev/null
+++ b/source/a/mkinitrd/0005-support-modules-compressed-with-xz.patch
@@ -0,0 +1,11 @@
+--- ./mkinitrd.orig 2021-04-27 13:53:00.500036921 -0500
++++ ./mkinitrd 2022-01-26 14:31:33.134016601 -0600
+@@ -755,7 +755,7 @@
+ fi
+
+ if ! grep -Eq " $(basename $SRCMOD .ko)(\.| |$)" $SOURCE_TREE/load_kernel_modules 2>/dev/null ; then
+- LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.gz} .ko)" )"
++ LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.ko*})" )"
+
+ # Test to see if arguments should be passed
+ # Over-ride the previously defined LINE variable if so
diff --git a/source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch b/source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch
new file mode 100644
index 000000000..6eb0b2a44
--- /dev/null
+++ b/source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch
@@ -0,0 +1,12 @@
+--- ./mkinitrd.orig 2022-01-26 14:33:29.000000000 -0600
++++ ./mkinitrd 2022-04-26 13:55:17.511004239 -0500
+@@ -778,6 +778,9 @@
+ echo "$LINE" >> $SOURCE_TREE/load_kernel_modules
+ fi
+
++ # Ensure that the destination directory for the module exists:
++ mkdir -p "$(dirname $SOURCE_TREE/$SRCMOD)"
++
+ # Try to add the module to the initrd-tree. This should be done
+ # even if it exists there already as we may have changed compilers
+ # or otherwise caused the modules in the initrd-tree to need
diff --git a/source/a/mkinitrd/0007-kmod30.patch b/source/a/mkinitrd/0007-kmod30.patch
new file mode 100644
index 000000000..484f8c91e
--- /dev/null
+++ b/source/a/mkinitrd/0007-kmod30.patch
@@ -0,0 +1,14 @@
+--- ./mkinitrd.orig 2022-07-09 12:56:10.493030210 -0500
++++ ./mkinitrd 2022-07-09 12:57:38.848032187 -0500
+@@ -702,9 +702,9 @@
+ cp -a /sbin/$i $SOURCE_TREE/sbin ;
+ done
+
+-# Make sure modules.builtin and modules.order are there (for kmod):
++# Make sure modules.builtin, modules.builtin.modinfo, and modules.order are there (for kmod):
+ for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
+- cp /lib/modules/$kver/modules.{builtin,order} \
++ cp /lib/modules/$kver/modules.{builtin,builtin.modinfo,order} \
+ $SOURCE_TREE/lib/modules/$kver
+ done
+
diff --git a/source/a/mkinitrd/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch b/source/a/mkinitrd/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch
new file mode 100644
index 000000000..1f2382895
--- /dev/null
+++ b/source/a/mkinitrd/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch
@@ -0,0 +1,23 @@
+--- ./mkinitrd_command_generator.sh.orig 2023-02-28 15:19:08.085991698 -0600
++++ ./mkinitrd_command_generator.sh 2023-02-28 15:22:03.264982008 -0600
+@@ -308,11 +308,15 @@
+ USING_RAID=1
+ break
+ fi
+- done
+- # Additional check in case $BASEDEV is a partition of /dev/$MD:
+- for BLK in $(sfdisk -ld /dev/$MD 2> /dev/null | grep "^/dev" | cut -d " " -f 1); do
+- if [ "$BASEDEV" = "$BLK" ]; then
+- USING_RAID=1
++ # Additional check in case $BASEDEV is a partition of /dev/$MD:
++ for BLK in $(sfdisk -ld /dev/$MD 2> /dev/null | grep "^/dev" | cut -d " " -f 1); do
++ if [ "$BASEDEV" = "$BLK" ]; then
++ USING_RAID=1
++ break
++ fi
++ done
++ # Break out of outer loop if needed.
++ if [ "$USING_RAID" = "1" ]; then
+ break
+ fi
+ done
diff --git a/source/a/mkinitrd/0009-exclude-99-nfs.rules.patch b/source/a/mkinitrd/0009-exclude-99-nfs.rules.patch
new file mode 100644
index 000000000..bfdbfd5e7
--- /dev/null
+++ b/source/a/mkinitrd/0009-exclude-99-nfs.rules.patch
@@ -0,0 +1,10 @@
+--- ./mkinitrd.orig 2023-08-09 16:25:06.849157479 -0500
++++ ./mkinitrd 2023-08-09 16:26:00.890154489 -0500
+@@ -76,6 +76,7 @@
+ rules.d/60-openobex.rules \
+ rules.d/73-seat-late.rules \
+ rules.d/85-regulatory.rules \
++ rules.d/99-nfs.rules \
+ "
+
+ print_usage() {
diff --git a/source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch b/source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch
new file mode 100644
index 000000000..9d8e2d060
--- /dev/null
+++ b/source/a/mkinitrd/0010-fix-test-for-jfs-xfs-repair-tools.patch
@@ -0,0 +1,26 @@
+--- ./mkinitrd.orig 2023-11-20 12:49:33.502016341 -0600
++++ ./mkinitrd 2023-11-20 12:50:30.142017608 -0600
+@@ -60,6 +60,8 @@
+ # Modified by Piter Punk <piterpunk@slackware.com> 25 April 2022
+ # Add support to specify additional filesystems to be mounted by
+ # initrd. Useful for those that have a separated '/usr'
++# Modified by Patrick Volkerding <volkerdi@slackware.com> 20 Movember 2023
++# Add jfs/xfs repair tools if used for $ROOTFS
+
+ MKINITRD_VERSION=1.4.11
+
+@@ -773,10 +775,11 @@
+ /sbin/modprobe --set-version $kver --show-depends --ignore-install $MODULE 2>/dev/null \
+ | grep "^insmod " | cut -f 2 -d ' ' | while read SRCMOD; do
+
+- # If jfs or xfs filesystems are in use, add the repair tools to the initrd:
+- if [ "$(basename $SRCMOD .ko)" = "jfs" ]; then
++ # If the root filesystem is jfs, add the repair tools to the initrd:
++ if [ "$ROOTFS" = "jfs" ]; then
+ cp -a /sbin/jfs_fsck $SOURCE_TREE/sbin/
+- elif [ "$(basename $SRCMOD .ko)" = "xfs" ]; then
++ # If the root filesystem is xfs, add the repair tools to the initrd:
++ elif [ "$ROOTFS" = "xfs" ]; then
+ cp -a /sbin/xfs_repair $SOURCE_TREE/sbin/
+ fi
+
diff --git a/source/a/mkinitrd/README.initrd b/source/a/mkinitrd/README.initrd
index c10bb6306..eddc2be7a 100644
--- a/source/a/mkinitrd/README.initrd
+++ b/source/a/mkinitrd/README.initrd
@@ -7,7 +7,7 @@ This document describes how to create and install an initrd, which may be
required to use some features of the kernel. Also see "man mkinitrd".
1. What is an initrd?
-2. Why to I need an initrd?
+2. Why do I need an initrd?
3. How do I build the initrd?
4. Now that I've built an initrd, how do I use it?
diff --git a/source/a/mkinitrd/_initrd-tree/dev/mknodes.sh b/source/a/mkinitrd/_initrd-tree/dev/mknodes.sh
index 4370db374..5491535f1 100755
--- a/source/a/mkinitrd/_initrd-tree/dev/mknodes.sh
+++ b/source/a/mkinitrd/_initrd-tree/dev/mknodes.sh
@@ -1,18 +1,18 @@
# Run this script in the root of the skeleton tree
# to re-create the required device nodes
mkdir -p dev
-mknod -m 644 dev/systty c 4 0
+mknod -m 644 dev/console c 5 1
mkdir -p dev
-mknod -m 644 dev/tty1 c 4 1
+mknod -m 644 dev/null c 1 3
mkdir -p dev
mknod -m 644 dev/ram b 1 1
mkdir -p dev
+mknod -m 644 dev/systty c 4 0
+mkdir -p dev
+mknod -m 644 dev/tty1 c 4 1
+mkdir -p dev
mknod -m 644 dev/tty2 c 4 1
mkdir -p dev
mknod -m 644 dev/tty3 c 4 1
mkdir -p dev
-mknod -m 644 dev/null c 1 3
-mkdir -p dev
mknod -m 644 dev/tty4 c 4 1
-mkdir -p dev
-mknod -m 644 dev/console c 5 1
diff --git a/source/a/mkinitrd/init b/source/a/mkinitrd/init
index 7e238ac61..2969c2272 100644
--- a/source/a/mkinitrd/init
+++ b/source/a/mkinitrd/init
@@ -341,6 +341,17 @@ else
/bin/sh
fi
+# Mount additional filesystems
+if [ -f /addfstab ]; then
+ while read DEV MNTPNT FS OPTS DUMP PASSNO ; do
+ if echo $DEV | grep -qE '(LABEL|UUID)=' ; then
+ DEV=$(findfs $DEV)
+ fi
+ echo $DEV "/mnt/"$MNTPNT $FS "ro,"$OPTS $DUMP $PASSNO >> /etc/fstab
+ done < /addfstab
+ mount -a
+fi
+
# Need to make sure OPTIONS+="db_persist" exists for all dm devices
# That should be handled in /sbin/mkinitrd now
/sbin/udevadm info --cleanup-db
diff --git a/source/a/mkinitrd/mkinitrd b/source/a/mkinitrd/mkinitrd
index 3c90f06bd..75d7ced66 100644
--- a/source/a/mkinitrd/mkinitrd
+++ b/source/a/mkinitrd/mkinitrd
@@ -57,6 +57,9 @@
# to add libargon2 and libgcc_s for cryptsetup LUKS2 support; add
# jfs and xfs repair tools to initrd if those filesystems are used;
# fixes and enhancements to docs
+# Modified by Piter Punk <piterpunk@slackware.com> 25 April 2022
+# Add support to specify additional filesystems to be mounted by
+# initrd. Useful for those that have a separated '/usr'
MKINITRD_VERSION=1.4.11
@@ -127,8 +130,11 @@ initrd, and the script is easy to modify. Be creative. :-)
-B Add /sbin/btrfs to enable scanning for a root filesystem that is
part of a Btrfs multi-device filesystem.
-M Add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd
- -P Prepend the output image with the microcode CPIO archive given in arguments.
+ -P Prepend the output image with the microcode CPIO archive given in
+ arguments.
-R Add support for RAID partitions
+ -MNT Additional filesystems to be mounted by initrd. Multiple mount
+ entries can be specified in a list separated by colon (:).
-V Display version number
A simple example: Build an initrd for a reiserfs root partition:
@@ -428,8 +434,11 @@ while [ ! -z "$1" ]; do
exit 1
fi
shift 2
- ;;
-
+ ;;
+ -MNT)
+ MOUNT_LIST="$2"
+ shift 2
+ ;;
-R)
RAID=1
shift
@@ -664,6 +673,14 @@ if [ ! -z "$CRYPT" -o ! -z "$LVM" ]; then
$SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules
fi
+# If there is additional filesystems to be mounted, copy their configuration
+# from system's /etc/fstab:
+if [ ! -z "$MOUNT_LIST" ]; then
+ for MOUNT_POINT in $(echo $MOUNT_LIST | tr : \ ); do
+ grep '^[^#[:space:]]\+[[:space:]]\+'$MOUNT_POINT'[[:space:]]' /etc/fstab
+ done > $SOURCE_TREE/addfstab
+fi
+
# Make module directories:
for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do
if [ ! -d $SOURCE_TREE/lib/modules/$kver ]; then
diff --git a/source/a/mkinitrd/mkinitrd.8 b/source/a/mkinitrd/mkinitrd.8
index 92bd18aa9..3436bfc2e 100644
--- a/source/a/mkinitrd/mkinitrd.8
+++ b/source/a/mkinitrd/mkinitrd.8
@@ -7,7 +7,7 @@
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
.el .TP "\\$1"
..
-.TH MKINITRD 8 "27 March 2010" "Slackware Version 13.1"
+.TH MKINITRD 8 "25 April 2022" "Slackware Version 15.0"
.SH NAME
mkinitrd \- create or rebuilt an initrd (initial ramdisk) using initramfs (simple cpio+gzip).
.SH SYNOPSIS
@@ -221,6 +221,14 @@ available on the system.
.B \-M
This option add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd.
.TP
+.B \-MNT mount_point_list
+List of filesystems to be mounted by initrd. Useful if libraries or commands that
+are outside the root filesystem are needed in early boot. Multiple filesystems can
+be listed separated by colon (:), e.g.
+
+ -MNT /usr:/usr/local
+
+.TP
.B \-V
Display version information and exit.
.SH EXAMPLES
diff --git a/source/a/mkinitrd/mkinitrd.SlackBuild b/source/a/mkinitrd/mkinitrd.SlackBuild
index 58dc341de..e0417bdea 100755
--- a/source/a/mkinitrd/mkinitrd.SlackBuild
+++ b/source/a/mkinitrd/mkinitrd.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2021 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017, 2018, 2021, 2022, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=mkinitrd
VERSION=${VERSION:-1.4.11}
BB=1.32.1
-BUILD=${BUILD:-25}
+BUILD=${BUILD:-34}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -122,6 +122,26 @@ chmod 755 $PKG/sbin/mkinitrd
( cd $PKG/sbin ; zcat $CWD/mkinitrd.tempfile.to.mktemp.patch.gz | patch --verbose || exit 1) || exit 1
# Patch mkinitrd to bail on no temp directory:
( cd $PKG/sbin ; zcat $CWD/0002-bail-if-temp-dir-is-not-created.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+# Don't include 40-usb_modeswitch.rules on the initrd:
+( cd $PKG/sbin ; zcat $CWD/0003-blacklist.40-usb_modeswitch.rules.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+# Support modules compressed with xz:
+( cd $PKG/sbin ; zcat $CWD/0005-support-modules-compressed-with-xz.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+# Ensure target directory for the module exists (cp regression workaround for coreutils-9.1):
+( cd $PKG/sbin ; zcat $CWD/0006-coreutils-9.1-ensure-target-dir-exists.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+rm -f $PKG/sbin/mkinitrd.orig
+# Use -R if we detect the root partition is a partition of a RAID device:
+( cd $PKG/usr/share/mkinitrd ; zcat $CWD/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+rm -f $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh.orig
+# Fix for kmod-30:
+( cd $PKG/sbin ; zcat $CWD/0007-kmod30.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+# Bugfix for previous RAID partition patch:
+( cd $PKG/usr/share/mkinitrd ; zcat $CWD/0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+rm -f $PKG/sbin/mkinitrd.orig
+# Don't include the 99-nfs.rules on the initrd:
+( cd $PKG/sbin ; zcat $CWD/0009-exclude-99-nfs.rules.patch.gz | patch -p1 --verbose || exit 1) || exit 1
+rm -f $PKG/sbin/mkinitrd.orig
+# Fix test for including JFS or XFS repair tools:
+( cd $PKG/sbin ; zcat $CWD/0010-fix-test-for-jfs-xfs-repair-tools.patch.gz | patch -p1 --verbose || exit 1) || exit 1
rm -f $PKG/sbin/mkinitrd.orig
mkdir -p $PKG/usr/man/man{5,8}
diff --git a/source/a/mkinitrd/mkinitrd.conf.5 b/source/a/mkinitrd/mkinitrd.conf.5
index b28a6e080..82f1faeed 100644
--- a/source/a/mkinitrd/mkinitrd.conf.5
+++ b/source/a/mkinitrd/mkinitrd.conf.5
@@ -1,7 +1,7 @@
-.\" mkinitrd.5 Robby Workman <rworkman@slackware.com>
+.\" mkinitrd.conf.5 Robby Workman <rworkman@slackware.com>
.\" 28 August 2010 "
-.TH MKINITRD.CONF 5 "27 March 2010" "Slackware 13.1"
+.TH MKINITRD.CONF 5 "25 April 2022" "Slackware 15.0"
.SH NAME
.B mkinitrd.conf(5)
.SH SYNOPSIS
@@ -239,6 +239,17 @@ Examples:
.br
MICROCODE_ARCH="/boot/intel-ucode.cpio"
+.TP 5
+.I MOUNT_LIST
+Lists additional filesystems to be mounted by initrd. Useful if libraries or
+commands that are outside root filesystem are needed in early boot. Multiple
+filesystems can be listed separated by colon (:). Device, filesystem type and
+options are copied from /etc/fstab.
+.br
+Example:
+.br
+MOUNT_LIST="/usr:/usr/local"
+
.SH FILES
.I /etc/mkinitrd.conf
.br
diff --git a/source/a/mlocate/mlocate.SlackBuild b/source/a/mlocate/mlocate.SlackBuild
index bbd3c34b4..f6d3a85d1 100755
--- a/source/a/mlocate/mlocate.SlackBuild
+++ b/source/a/mlocate/mlocate.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-4}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/mt-st/mt-st.SlackBuild b/source/a/mt-st/mt-st.SlackBuild
index d1d4140eb..f872d1bcd 100755
--- a/source/a/mt-st/mt-st.SlackBuild
+++ b/source/a/mt-st/mt-st.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2018, 2023 Patrick J. Volkerding, Sebeka, Minnesota, 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=mt-st
-VERSION=${VERSION:-1.4}
-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
@@ -66,7 +66,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf mt-st-$VERSION
-tar xvf $CWD/mt-st-$VERSION.tar.xz
+tar xvf $CWD/mt-st-$VERSION.tar.?z
cd mt-st-$VERSION
chown -R root:root .
diff --git a/source/a/ndctl/doinst.sh b/source/a/ndctl/doinst.sh
index 2fe7500eb..2e3807d65 100644
--- a/source/a/ndctl/doinst.sh
+++ b/source/a/ndctl/doinst.sh
@@ -11,4 +11,6 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/ndctl/monitor.conf.new
+config etc/ndctl.conf.d/ndctl.conf.new
+config etc/ndctl.conf.d/monitor.conf.new
+config etc/daxctl.conf.d/daxctl.example.conf.new
diff --git a/source/a/ndctl/ndctl.SlackBuild b/source/a/ndctl/ndctl.SlackBuild
index 8faf65c2d..8c035e31b 100755
--- a/source/a/ndctl/ndctl.SlackBuild
+++ b/source/a/ndctl/ndctl.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 2020 Robby Workman, Tuscaloosa, Alabama, USA
-# Copyright 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2020, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,13 +25,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=ndctl
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
@@ -87,37 +87,35 @@ find . \
-exec chmod 644 {} \+
# Configure, build, and install:
-if [ ! -r configure ]; then
- if [ -x ./autogen.sh ]; then
- NOCONFIGURE=1 ./autogen.sh
- else
- autoreconf -vif
- fi
-fi
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+mkdir meson-build
+cd meson-build
+meson setup \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --libdir=lib${LIBDIRSUFFIX} \
+ --libexecdir=/usr/libexec \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --includedir=/usr/include \
+ --datadir=/usr/share \
+ --mandir=/usr/man \
--sysconfdir=/etc \
--localstatedir=/var \
- --disable-static \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --without-systemd \
- --disable-asciidoctor \
- --with-bash=no \
- --build=$ARCH-slackware-linux || exit 1
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-
-# Don't ship .la files:
-rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+ --buildtype=release \
+ -Dsystemd=disabled \
+ -Dlibtracefs=disabled \
+ .. || exit 1
+ "${NINJA:=ninja}" $NUMJOBS || exit 1
+ DESTDIR=$PKG $NINJA install || exit 1
+cd ..
mkdir $PKG/lib
mv $PKG/etc/modprobe.d $PKG/lib
-mv $PKG/etc/ndctl/monitor.conf $PKG/etc/ndctl/monitor.conf.new
+for file in $PKG/etc/ndctl.conf.d/ndctl.conf $PKG/etc/ndctl.conf.d/monitor.conf $PKG/etc/daxctl.conf.d/daxctl.example.conf ; do
+ mv $file ${file}.new
+done
# We ship bash-completion in /extra, so this won't build using --with-bash=yes
# since it isn't available on a default installation. No matter, we'll just
diff --git a/source/a/ntfs-3g/ntfs-3g.SlackBuild b/source/a/ntfs-3g/ntfs-3g.SlackBuild
index eccbb903c..068743ffe 100755
--- a/source/a/ntfs-3g/ntfs-3g.SlackBuild
+++ b/source/a/ntfs-3g/ntfs-3g.SlackBuild
@@ -29,7 +29,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=ntfs-3g
-SRCNAM=ntfs-3g_ntfsprogs
+SRCNAM=ntfs-3g
VERSION=${VERSION:-$(echo $SRCNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
@@ -83,6 +83,13 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/a/nut/doinst.sh b/source/a/nut/doinst.sh
new file mode 100644
index 000000000..393069f41
--- /dev/null
+++ b/source/a/nut/doinst.sh
@@ -0,0 +1,30 @@
+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...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.nut-drvctl.new
+preserve_perms etc/rc.d/rc.nut-upsd.new
+preserve_perms etc/rc.d/rc.nut-upsmon.new
+
+for file in etc/nut/*.new ; do
+ config $file
+done
diff --git a/source/a/nut/nut.SlackBuild b/source/a/nut/nut.SlackBuild
new file mode 100755
index 000000000..b8c6cd520
--- /dev/null
+++ b/source/a/nut/nut.SlackBuild
@@ -0,0 +1,196 @@
+#!/bin/bash
+
+# Copyright 2010 V'yacheslav Stetskevych <slava18 dont_spam_me gmail com>
+# Copyright 2024 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=nut
+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) 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
+# 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
+
+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-$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 . \
+ \( -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 {} \+
+
+# Configure, build, and install:
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --libexecdir=/usr/lib${LIBDIRSUFFIX}/nut \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc/nut \
+ --localstatedir=/var \
+ --datadir=/usr/share/nut \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/nut-$VERSION \
+ --disable-static \
+ --without-python2 \
+ --with-dev \
+ --with-serial \
+ --with-usb \
+ --with-snmp \
+ --with-neon \
+ --with-wrap \
+ --with-cgi\
+ --with-openssl \
+ --with-libldtl \
+ --with-cgipath=/usr/share/nut/cgi-bin \
+ --with-htmlpath=/usr/share/nut/html \
+ --with-drvpath=/usr/lib${LIBDIRSUFFIX}/nut \
+ --with-statepath=/run/nut \
+ --with-pidpath=/run/nut \
+ --with-altpidpath=/run/nut \
+ --with-udevdir=/lib/udev \
+ --with-user=nut \
+ --with-group=nut \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# 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
+
+# Install the startup scripts:
+mkdir -p $PKG/etc/rc.d
+cp -a $CWD/rc.nut-drvctl $PKG/etc/rc.d/rc.nut-drvctl.new
+cp -a $CWD/rc.nut-upsd $PKG/etc/rc.d/rc.nut-upsd.new
+cp -a $CWD/rc.nut-upsmon $PKG/etc/rc.d/rc.nut-upsmon.new
+chown root:root $PKG/etc/rc.d/rc.nut-*
+chmod 644 $PKG/etc/rc.d/rc.nut-*
+
+# Install the bash_completion script:
+mkdir -p $PKG/usr/share/bash-completion/completions
+cp -a scripts/misc/nut.bash_completion $PKG/usr/share/bash-completion/completions/nut
+chmod 755 $PKG/usr/share/bash-completion/completions/nut
+
+# Create the state directory:
+mkdir -p $PKG/var/state/ups
+chown nut:nut $PKG/var/state/ups
+chmod 770 $PKG/var/state/ups
+
+# Change .sample files to .new:
+for file in $PKG/etc/nut/*.sample ; do
+ mv $file $(echo $file | rev | cut -f 2- -d . | rev).new
+done
+
+# 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
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS* COPYING* ChangeLog INSTALL* LICENSE* MAINTAINERS* NEWS* README* TODO* UPGRADING* \
+ docs \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Redundant:
+rm -rf $PKG/usr/doc/${PKGNAM}-$VERSION/docs/man
+
+# Clean up zero-length in the docs:
+find $PKG/usr/doc -type f -size 0 -exec rm -f "{}" \;
+
+# 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 | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+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/a/nut/rc.nut-drvctl b/source/a/nut/rc.nut-drvctl
new file mode 100644
index 000000000..c310d26c8
--- /dev/null
+++ b/source/a/nut/rc.nut-drvctl
@@ -0,0 +1,32 @@
+#!/bin/sh
+# NUT ups model-specific drivers start-up and shutdown script.
+# This should be started before rc.nut-upsd on the machine connected to the
+# UPS's control port. See /etc/nut/ for configuration files.
+
+# Start upsdrvctl:
+upsdrvctl_start() {
+ # Make sure the runtime directory is there:
+ mkdir -p /run/nut
+ chown -R nut:nut /run/nut
+ chmod 0770 /run/nut
+ # Load NUT driver(s):
+ echo "Starting the NUT UPS driver controller: upsdrvctl -u nut start"
+ upsdrvctl -u nut start
+}
+
+# Stop upsdrvctl:
+upsdrvctl_stop() {
+ echo "Stopping the NUT UPS driver controller."
+ upsdrvctl stop
+}
+
+case "$1" in
+'start')
+ upsdrvctl_start
+ ;;
+'stop')
+ upsdrvctl_stop
+ ;;
+*)
+ echo "usage $0 start|stop"
+esac
diff --git a/source/a/nut/rc.nut-upsd b/source/a/nut/rc.nut-upsd
new file mode 100644
index 000000000..3ca7cdc0b
--- /dev/null
+++ b/source/a/nut/rc.nut-upsd
@@ -0,0 +1,41 @@
+#!/bin/sh
+# NUT upsd start-up and shutdown script.
+# This should be started after rc.nut-drvctl on the machine connected to the
+# UPS's control port. See /etc/nut/ for configuration files.
+
+# Start upsd:
+upsd_start() {
+ # Make sure the runtime directory is there:
+ mkdir -p /run/nut
+ chown -R nut:nut /run/nut
+ chmod 0770 /run/nut
+ # Start the UPS daemon:
+ echo "Starting the NUT UPS information server: upsd -u nut"
+ upsd -u nut
+}
+
+# Stop upsd:
+upsd_stop() {
+ echo "Stopping the NUT UPS information server."
+ upsd -c stop
+}
+
+# Reload configuration files for upsd:
+upsd_reload() {
+ echo "Reloading configuration files for the NUT UPS information server: upsd -c reload"
+ upsd -c reload
+}
+
+case "$1" in
+'start')
+ upsd_start
+ ;;
+'stop')
+ upsd_stop
+ ;;
+'reload')
+ upsd_reload
+ ;;
+*)
+ echo "usage $0 start|stop|reload"
+esac
diff --git a/source/a/nut/rc.nut-upsmon b/source/a/nut/rc.nut-upsmon
new file mode 100644
index 000000000..8fc5ec8f8
--- /dev/null
+++ b/source/a/nut/rc.nut-upsmon
@@ -0,0 +1,46 @@
+#!/bin/sh
+# NUT upsmon start-up and shutdown script.
+# upsmon is the client process that is responsible for the most important part
+# of UPS monitoring--shutting down the system when the power goes out.
+#
+# upsmon should be run on every machine that is powered by the UPS if you wish
+# to support automatic shutdown on battery power.
+#
+# See /etc/nut/ for configuration files.
+
+# Start upsmon:
+upsmon_start() {
+ # Make sure the runtime directory is there:
+ mkdir -p /run/nut
+ chown -R nut:nut /run/nut
+ chmod 0770 /run/nut
+ # Start the NUT UPS monitor and shutdown controller:
+ echo "Starting the NUT UPS monitor and shutdown controller: upsmon -u nut"
+ upsmon -u nut
+}
+
+# Stop upsmon:
+upsmon_stop() {
+ echo "Stopping the NUT UPS monitor and shutdown controller."
+ upsmon -c stop
+}
+
+# Reload configuration files for upsmon:
+upsmon_reload() {
+ echo "Reloading configuration files for the NUT UPS monitor and shutdown controller: upsmon -c reload"
+ upsmon -c reload
+}
+
+case "$1" in
+'start')
+ upsmon_start
+ ;;
+'stop')
+ upsmon_stop
+ ;;
+'reload')
+ upsmon_reload
+ ;;
+*)
+ echo "usage $0 start|stop|reload"
+esac
diff --git a/source/a/nut/slack-desc b/source/a/nut/slack-desc
new file mode 100644
index 000000000..cc5132318
--- /dev/null
+++ b/source/a/nut/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+nut: nut (Network UPS Tools)
+nut:
+nut: The Network UPS Tools is a collection of programs which provide a
+nut: common interface for monitoring and administering UPS hardware.
+nut: It uses a layered apporoach to connect all the components. Drivers
+nut: are provided for a wide assortment of equipment. The primary goal of
+nut: the NUT project is to provide reliable monitoring of UPS hardware
+nut: and ensure safe shutdowns of the systems which are connected.
+nut:
+nut: Homepage: https://www.networkupstools.org
+nut:
diff --git a/source/a/nvi/nvi.SlackBuild b/source/a/nvi/nvi.SlackBuild
index 2d9f4125d..ea7859e52 100755
--- a/source/a/nvi/nvi.SlackBuild
+++ b/source/a/nvi/nvi.SlackBuild
@@ -31,7 +31,7 @@ BUILD=${BUILD:-3}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
@@ -98,7 +98,7 @@ cd build.unix
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
--enable-widechar \
--disable-static \
--program-prefix="n" \
diff --git a/source/a/os-prober/os-prober.SlackBuild b/source/a/os-prober/os-prober.SlackBuild
index 6706508bb..b12e4bb6c 100755
--- a/source/a/os-prober/os-prober.SlackBuild
+++ b/source/a/os-prober/os-prober.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/pam/fedora-patches/pam-1.1.3-nouserenv.patch b/source/a/pam/fedora-patches/pam-1.1.3-nouserenv.patch
deleted file mode 100644
index f3a742c8d..000000000
--- a/source/a/pam/fedora-patches/pam-1.1.3-nouserenv.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-diff -up pam/modules/pam_env/pam_env.c.nouserenv pam/modules/pam_env/pam_env.c
---- pam/modules/pam_env/pam_env.c.nouserenv 2010-10-20 09:59:30.000000000 +0200
-+++ pam/modules/pam_env/pam_env.c 2010-11-01 14:42:01.000000000 +0100
-@@ -10,7 +10,7 @@
- #define DEFAULT_READ_ENVFILE 1
-
- #define DEFAULT_USER_ENVFILE ".pam_environment"
--#define DEFAULT_USER_READ_ENVFILE 1
-+#define DEFAULT_USER_READ_ENVFILE 0
-
- #include "config.h"
-
-diff -up pam/modules/pam_env/pam_env.8.xml.nouserenv pam/modules/pam_env/pam_env.8.xml
---- pam/modules/pam_env/pam_env.8.xml.nouserenv 2010-10-20 09:59:30.000000000 +0200
-+++ pam/modules/pam_env/pam_env.8.xml 2010-11-01 14:42:01.000000000 +0100
-@@ -147,7 +147,10 @@
- <listitem>
- <para>
- Turns on or off the reading of the user specific environment
-- file. 0 is off, 1 is on. By default this option is on.
-+ file. 0 is off, 1 is on. By default this option is off as user
-+ supplied environment variables in the PAM environment could affect
-+ behavior of subsequent modules in the stack without the consent
-+ of the system administrator.
- </para>
- </listitem>
- </varlistentry>
diff --git a/source/a/pam/fedora-patches/pam-1.1.6-limits-user.patch b/source/a/pam/fedora-patches/pam-1.1.6-limits-user.patch
deleted file mode 100644
index 3c17b781a..000000000
--- a/source/a/pam/fedora-patches/pam-1.1.6-limits-user.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff -up Linux-PAM-1.1.6/modules/pam_limits/limits.conf.limits Linux-PAM-1.1.6/modules/pam_limits/limits.conf
---- Linux-PAM-1.1.6/modules/pam_limits/limits.conf.limits 2012-08-15 13:08:43.000000000 +0200
-+++ Linux-PAM-1.1.6/modules/pam_limits/limits.conf 2013-03-14 16:43:37.615087671 +0100
-@@ -1,5 +1,16 @@
- # /etc/security/limits.conf
- #
-+#This file sets the resource limits for the users logged in via PAM.
-+#It does not affect resource limits of the system services.
-+#
-+#Also note that configuration files in /etc/security/limits.d directory,
-+#which are read in alphabetical order, override the settings in this
-+#file in case the domain is the same or more specific.
-+#That means for example that setting a limit for wildcard domain here
-+#can be overriden with a wildcard setting in a config file in the
-+#subdirectory, but a user specific setting here can be overriden only
-+#with a user specific setting in the subdirectory.
-+#
- #Each line describes a limit for a user in the form:
- #
- #<domain> <type> <item> <value>
diff --git a/source/a/pam/fedora-patches/pam-1.1.8-audit-user-mgmt.patch b/source/a/pam/fedora-patches/pam-1.1.8-audit-user-mgmt.patch
deleted file mode 100644
index 277a5699f..000000000
--- a/source/a/pam/fedora-patches/pam-1.1.8-audit-user-mgmt.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -up Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c.audit-user-mgmt Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c
---- Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c.audit-user-mgmt 2013-06-18 16:11:21.000000000 +0200
-+++ Linux-PAM-1.1.8/modules/pam_tally2/pam_tally2.c 2014-10-17 12:09:12.965490940 +0200
-@@ -997,9 +997,9 @@ main( int argc UNUSED, char **argv )
- #ifdef HAVE_LIBAUDIT
- char buf[64];
- int audit_fd = audit_open();
-- snprintf(buf, sizeof(buf), "pam_tally2 uid=%u reset=%hu", uid, cline_reset);
-- audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
-- buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
-+ snprintf(buf, sizeof(buf), "pam_tally2 reset=%hu", cline_reset);
-+ audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
-+ buf, NULL, uid, NULL, NULL, ttyname(STDIN_FILENO), 1);
- if (audit_fd >=0)
- close(audit_fd);
- #endif
-@@ -1040,11 +1040,10 @@ main( int argc UNUSED, char **argv )
- }
- else if ( !cline_reset ) {
- #ifdef HAVE_LIBAUDIT
-- char buf[64];
- int audit_fd = audit_open();
-- snprintf(buf, sizeof(buf), "pam_tally2 uid=all reset=0");
-- audit_log_user_message(audit_fd, AUDIT_USER_ACCT,
-- buf, NULL, NULL, ttyname(STDIN_FILENO), 1);
-+ audit_log_acct_message(audit_fd, AUDIT_USER_MGMT, NULL,
-+ "pam_tally2-reset-all-accts reset=0", "*", -1,
-+ NULL, NULL, ttyname(STDIN_FILENO), 1);
- if (audit_fd >=0)
- close(audit_fd);
- #endif
diff --git a/source/a/pam/fedora-patches/pam-1.1.8-full-relro.patch b/source/a/pam/fedora-patches/pam-1.1.8-full-relro.patch
deleted file mode 100644
index b2d8526f9..000000000
--- a/source/a/pam/fedora-patches/pam-1.1.8-full-relro.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -up Linux-PAM-1.1.8/modules/pam_filter/upperLOWER/Makefile.am.relro Linux-PAM-1.1.8/modules/pam_filter/upperLOWER/Makefile.am
---- Linux-PAM-1.1.8/modules/pam_filter/upperLOWER/Makefile.am.relro 2014-09-10 17:17:20.273401344 +0200
-+++ Linux-PAM-1.1.8/modules/pam_filter/upperLOWER/Makefile.am 2014-09-10 17:17:07.857115369 +0200
-@@ -9,7 +9,7 @@ securelibfilterdir = $(SECUREDIR)/pam_fi
-
- AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
- -I$(srcdir)/.. @PIE_CFLAGS@
--AM_LDFLAGS = @PIE_LDFLAGS@
-+AM_LDFLAGS = -Wl,-z,now @PIE_LDFLAGS@
- LDADD = $(top_builddir)/libpam/libpam.la
-
- securelibfilter_PROGRAMS = upperLOWER
-diff -up Linux-PAM-1.1.8/modules/pam_mkhomedir/Makefile.am.relro Linux-PAM-1.1.8/modules/pam_mkhomedir/Makefile.am
---- Linux-PAM-1.1.8/modules/pam_mkhomedir/Makefile.am.relro 2013-06-18 16:11:21.000000000 +0200
-+++ Linux-PAM-1.1.8/modules/pam_mkhomedir/Makefile.am 2014-09-10 17:18:42.922304935 +0200
-@@ -30,6 +30,8 @@ endif
-
- sbin_PROGRAMS = mkhomedir_helper
- mkhomedir_helper_SOURCES = mkhomedir_helper.c
-+mkhomedir_helper_CFLAGS = $(AM_CFLAGS) @PIE_CFLAGS@
-+mkhomedir_helper_LDFLAGS = -Wl,-z,now @PIE_LDFLAGS@
- mkhomedir_helper_LDADD = $(top_builddir)/libpam/libpam.la
-
- if ENABLE_REGENERATE_MAN
-diff -up Linux-PAM-1.1.8/modules/pam_tally2/Makefile.am.relro Linux-PAM-1.1.8/modules/pam_tally2/Makefile.am
---- Linux-PAM-1.1.8/modules/pam_tally2/Makefile.am.relro 2013-06-18 16:11:21.000000000 +0200
-+++ Linux-PAM-1.1.8/modules/pam_tally2/Makefile.am 2014-09-10 17:22:04.339944040 +0200
-@@ -26,6 +26,8 @@ if HAVE_VERSIONING
- pam_tally2_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
- endif
-
-+pam_tally2_CFLAGS = $(AM_CFLAGS) @PIE_CFLAGS@
-+pam_tally2_LDFLAGS = -Wl,-z,now @PIE_LDFLAGS@
- pam_tally2_LDADD = $(top_builddir)/libpam/libpam.la $(LIBAUDIT)
-
- securelib_LTLIBRARIES = pam_tally2.la
-diff -up Linux-PAM-1.1.8/modules/pam_timestamp/Makefile.am.relro Linux-PAM-1.1.8/modules/pam_timestamp/Makefile.am
---- Linux-PAM-1.1.8/modules/pam_timestamp/Makefile.am.relro 2013-06-18 16:11:21.000000000 +0200
-+++ Linux-PAM-1.1.8/modules/pam_timestamp/Makefile.am 2014-08-13 16:02:49.906688139 +0200
-@@ -36,7 +36,7 @@ pam_timestamp_la_CFLAGS = $(AM_CFLAGS)
- pam_timestamp_check_SOURCES = pam_timestamp_check.c
- pam_timestamp_check_CFLAGS = $(AM_CFLAGS) @PIE_CFLAGS@
- pam_timestamp_check_LDADD = $(top_builddir)/libpam/libpam.la
--pam_timestamp_check_LDFLAGS = @PIE_LDFLAGS@
-+pam_timestamp_check_LDFLAGS = -Wl,-z,now @PIE_LDFLAGS@
-
- hmacfile_SOURCES = hmacfile.c hmacsha1.c sha1.c
- hmacfile_LDADD = $(top_builddir)/libpam/libpam.la
-diff -up Linux-PAM-1.1.8/modules/pam_unix/Makefile.am.relro Linux-PAM-1.1.8/modules/pam_unix/Makefile.am
---- Linux-PAM-1.1.8/modules/pam_unix/Makefile.am.relro 2013-06-18 16:11:21.000000000 +0200
-+++ Linux-PAM-1.1.8/modules/pam_unix/Makefile.am 2014-08-13 16:02:49.906688139 +0200
-@@ -55,13 +55,13 @@ bigcrypt_LDADD = @LIBCRYPT@
- unix_chkpwd_SOURCES = unix_chkpwd.c md5_good.c md5_broken.c bigcrypt.c \
- passverify.c
- unix_chkpwd_CFLAGS = $(AM_CFLAGS) @PIE_CFLAGS@ -DHELPER_COMPILE=\"unix_chkpwd\"
--unix_chkpwd_LDFLAGS = @PIE_LDFLAGS@
-+unix_chkpwd_LDFLAGS = -Wl,-z,now @PIE_LDFLAGS@
- unix_chkpwd_LDADD = @LIBCRYPT@ @LIBSELINUX@ @LIBAUDIT@
-
- unix_update_SOURCES = unix_update.c md5_good.c md5_broken.c bigcrypt.c \
- passverify.c
- unix_update_CFLAGS = $(AM_CFLAGS) @PIE_CFLAGS@ -DHELPER_COMPILE=\"unix_update\"
--unix_update_LDFLAGS = @PIE_LDFLAGS@
-+unix_update_LDFLAGS = -Wl,-z,now @PIE_LDFLAGS@
- unix_update_LDADD = @LIBCRYPT@ @LIBSELINUX@
-
- if ENABLE_REGENERATE_MAN
diff --git a/source/a/pam/fedora-patches/pam-1.3.0-pwhistory-helper.patch b/source/a/pam/fedora-patches/pam-1.3.0-pwhistory-helper.patch
deleted file mode 100644
index 554e5c8f8..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.0-pwhistory-helper.patch
+++ /dev/null
@@ -1,806 +0,0 @@
-diff -up Linux-PAM-1.3.0/modules/pam_pwhistory/Makefile.am.pwhhelper Linux-PAM-1.3.0/modules/pam_pwhistory/Makefile.am
---- Linux-PAM-1.3.0/modules/pam_pwhistory/Makefile.am.pwhhelper 2016-03-24 12:45:42.000000000 +0100
-+++ Linux-PAM-1.3.0/modules/pam_pwhistory/Makefile.am 2016-05-06 15:18:42.307637933 +0200
-@@ -1,5 +1,6 @@
- #
- # Copyright (c) 2008, 2009 Thorsten Kukuk <kukuk@suse.de>
-+# Copyright (c) 2013 Red Hat, Inc.
- #
-
- CLEANFILES = *~
-@@ -9,25 +10,34 @@ EXTRA_DIST = README $(MANS) $(XMLS) tst-
-
- TESTS = tst-pam_pwhistory
-
--man_MANS = pam_pwhistory.8
-+man_MANS = pam_pwhistory.8 pwhistory_helper.8
-
--XMLS = README.xml pam_pwhistory.8.xml
-+XMLS = README.xml pam_pwhistory.8.xml pwhistory_helper.8.xml
-
- securelibdir = $(SECUREDIR)
- secureconfdir = $(SCONFIGDIR)
-
--AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include
--AM_LDFLAGS = -no-undefined -avoid-version -module
-+AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \
-+ -DPWHISTORY_HELPER=\"$(sbindir)/pwhistory_helper\"
-+
-+pam_pwhistory_la_LDFLAGS = -no-undefined -avoid-version -module
- if HAVE_VERSIONING
-- AM_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
-+ pam_pwhistory_la_LDFLAGS += -Wl,--version-script=$(srcdir)/../modules.map
- endif
-
- noinst_HEADERS = opasswd.h
-
- securelib_LTLIBRARIES = pam_pwhistory.la
--pam_pwhistory_la_LIBADD = $(top_builddir)/libpam/libpam.la @LIBCRYPT@
-+pam_pwhistory_la_CFLAGS = $(AM_CFLAGS)
-+pam_pwhistory_la_LIBADD = $(top_builddir)/libpam/libpam.la @LIBCRYPT@ @LIBSELINUX@
- pam_pwhistory_la_SOURCES = pam_pwhistory.c opasswd.c
-
-+sbin_PROGRAMS = pwhistory_helper
-+pwhistory_helper_CFLAGS = $(AM_CFLAGS) -DHELPER_COMPILE=\"pwhistory_helper\" @PIE_CFLAGS@
-+pwhistory_helper_SOURCES = pwhistory_helper.c opasswd.c
-+pwhistory_helper_LDFLAGS = -Wl,-z,now @PIE_LDFLAGS@
-+pwhistory_helper_LDADD = $(top_builddir)/libpam/libpam.la @LIBCRYPT@
-+
- if ENABLE_REGENERATE_MAN
- noinst_DATA = README
- README: pam_pwhistory.8.xml
-diff -up Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.c.pwhhelper Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.c
---- Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.c.pwhhelper 2016-03-24 12:45:42.000000000 +0100
-+++ Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.c 2016-05-06 15:18:42.307637933 +0200
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2008 Thorsten Kukuk <kukuk@suse.de>
-+ * Copyright (c) 2013 Red Hat, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
-@@ -38,6 +39,7 @@
- #endif
-
- #include <pwd.h>
-+#include <shadow.h>
- #include <time.h>
- #include <ctype.h>
- #include <errno.h>
-@@ -47,6 +49,7 @@
- #include <string.h>
- #include <stdlib.h>
- #include <syslog.h>
-+#include <stdarg.h>
- #include <sys/stat.h>
-
- #if defined (HAVE_XCRYPT_H)
-@@ -55,7 +58,14 @@
- #include <crypt.h>
- #endif
-
-+#ifdef HELPER_COMPILE
-+#define pam_modutil_getpwnam(h,n) getpwnam(n)
-+#define pam_modutil_getspnam(h,n) getspnam(n)
-+#define pam_syslog(h,a,...) helper_log_err(a,__VA_ARGS__)
-+#else
-+#include <security/pam_modutil.h>
- #include <security/pam_ext.h>
-+#endif
- #include <security/pam_modules.h>
-
- #include "opasswd.h"
-@@ -76,6 +86,19 @@ typedef struct {
- char *old_passwords;
- } opwd;
-
-+#ifdef HELPER_COMPILE
-+void
-+helper_log_err(int err, const char *format, ...)
-+{
-+ va_list args;
-+
-+ va_start(args, format);
-+ openlog(HELPER_COMPILE, LOG_CONS | LOG_PID, LOG_AUTHPRIV);
-+ vsyslog(err, format, args);
-+ va_end(args);
-+ closelog();
-+}
-+#endif
-
- static int
- parse_entry (char *line, opwd *data)
-@@ -117,8 +140,8 @@ compare_password(const char *newpass, co
- }
-
- /* Check, if the new password is already in the opasswd file. */
--int
--check_old_pass (pam_handle_t *pamh, const char *user,
-+PAMH_ARG_DECL(int
-+check_old_pass, const char *user,
- const char *newpass, int debug)
- {
- int retval = PAM_SUCCESS;
-@@ -128,6 +151,11 @@ check_old_pass (pam_handle_t *pamh, cons
- opwd entry;
- int found = 0;
-
-+#ifndef HELPER_COMPILE
-+ if (SELINUX_ENABLED)
-+ return PAM_PWHISTORY_RUN_HELPER;
-+#endif
-+
- if ((oldpf = fopen (OLD_PASSWORDS_FILE, "r")) == NULL)
- {
- if (errno != ENOENT)
-@@ -213,9 +241,9 @@ check_old_pass (pam_handle_t *pamh, cons
- return retval;
- }
-
--int
--save_old_pass (pam_handle_t *pamh, const char *user, uid_t uid,
-- const char *oldpass, int howmany, int debug UNUSED)
-+PAMH_ARG_DECL(int
-+save_old_pass, const char *user,
-+ int howmany, int debug UNUSED)
- {
- char opasswd_tmp[] = TMP_PASSWORDS_FILE;
- struct stat opasswd_stat;
-@@ -226,10 +254,35 @@ save_old_pass (pam_handle_t *pamh, const
- char *buf = NULL;
- size_t buflen = 0;
- int found = 0;
-+ struct passwd *pwd;
-+ const char *oldpass;
-+
-+ pwd = pam_modutil_getpwnam (pamh, user);
-+ if (pwd == NULL)
-+ return PAM_USER_UNKNOWN;
-
- if (howmany <= 0)
- return PAM_SUCCESS;
-
-+#ifndef HELPER_COMPILE
-+ if (SELINUX_ENABLED)
-+ return PAM_PWHISTORY_RUN_HELPER;
-+#endif
-+
-+ if ((strcmp(pwd->pw_passwd, "x") == 0) ||
-+ ((pwd->pw_passwd[0] == '#') &&
-+ (pwd->pw_passwd[1] == '#') &&
-+ (strcmp(pwd->pw_name, pwd->pw_passwd + 2) == 0)))
-+ {
-+ struct spwd *spw = pam_modutil_getspnam (pamh, user);
-+
-+ if (spw == NULL)
-+ return PAM_USER_UNKNOWN;
-+ oldpass = spw->sp_pwdp;
-+ }
-+ else
-+ oldpass = pwd->pw_passwd;
-+
- if (oldpass == NULL || *oldpass == '\0')
- return PAM_SUCCESS;
-
-@@ -452,7 +505,7 @@ save_old_pass (pam_handle_t *pamh, const
- {
- char *out;
-
-- if (asprintf (&out, "%s:%d:1:%s\n", user, uid, oldpass) < 0)
-+ if (asprintf (&out, "%s:%d:1:%s\n", user, pwd->pw_uid, oldpass) < 0)
- {
- retval = PAM_AUTHTOK_ERR;
- if (oldpf)
-diff -up Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.h.pwhhelper Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.h
---- Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.h.pwhhelper 2016-03-24 12:45:42.000000000 +0100
-+++ Linux-PAM-1.3.0/modules/pam_pwhistory/opasswd.h 2016-05-06 15:18:42.307637933 +0200
-@@ -1,5 +1,6 @@
- /*
- * Copyright (c) 2008 Thorsten Kukuk <kukuk@suse.de>
-+ * Copyright (c) 2013 Red Hat, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
-@@ -36,10 +37,32 @@
- #ifndef __OPASSWD_H__
- #define __OPASSWD_H__
-
--extern int check_old_pass (pam_handle_t *pamh, const char *user,
-- const char *newpass, int debug);
--extern int save_old_pass (pam_handle_t *pamh, const char *user,
-- uid_t uid, const char *oldpass,
-- int howmany, int debug);
-+#define PAM_PWHISTORY_RUN_HELPER PAM_CRED_INSUFFICIENT
-+
-+#ifdef WITH_SELINUX
-+#include <selinux/selinux.h>
-+#define SELINUX_ENABLED is_selinux_enabled()>0
-+#else
-+#define SELINUX_ENABLED 0
-+#endif
-+
-+#ifdef HELPER_COMPILE
-+#define PAMH_ARG_DECL(fname, ...) fname(__VA_ARGS__)
-+#define PAMH_ARG(...) __VA_ARGS__
-+#else
-+#define PAMH_ARG_DECL(fname, ...) fname(pam_handle_t *pamh, __VA_ARGS__)
-+#define PAMH_ARG(...) pamh, __VA_ARGS__
-+#endif
-+
-+#ifdef HELPER_COMPILE
-+void
-+helper_log_err(int err, const char *format, ...);
-+#endif
-+
-+PAMH_ARG_DECL(int
-+check_old_pass, const char *user, const char *newpass, int debug);
-+
-+PAMH_ARG_DECL(int
-+save_old_pass, const char *user, int howmany, int debug);
-
- #endif /* __OPASSWD_H__ */
-diff -up Linux-PAM-1.3.0/modules/pam_pwhistory/pam_pwhistory.c.pwhhelper Linux-PAM-1.3.0/modules/pam_pwhistory/pam_pwhistory.c
---- Linux-PAM-1.3.0/modules/pam_pwhistory/pam_pwhistory.c.pwhhelper 2016-04-04 11:22:28.000000000 +0200
-+++ Linux-PAM-1.3.0/modules/pam_pwhistory/pam_pwhistory.c 2016-05-06 15:19:31.610785512 +0200
-@@ -1,6 +1,7 @@
- /*
- * Copyright (c) 2008, 2012 Thorsten Kukuk
- * Author: Thorsten Kukuk <kukuk@thkukuk.de>
-+ * Copyright (c) 2013 Red Hat, Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
-@@ -46,10 +47,14 @@
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
--#include <shadow.h>
- #include <syslog.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/time.h>
-+#include <sys/resource.h>
-+#include <sys/wait.h>
-+#include <signal.h>
-+#include <fcntl.h>
-
- #include <security/pam_modules.h>
- #include <security/pam_modutil.h>
-@@ -59,6 +64,7 @@
- #include "opasswd.h"
-
- #define DEFAULT_BUFLEN 2048
-+#define MAX_FD_NO 20000
-
- struct options_t {
- int debug;
-@@ -102,6 +108,184 @@ parse_option (pam_handle_t *pamh, const
- pam_syslog (pamh, LOG_ERR, "pam_pwhistory: unknown option: %s", argv);
- }
-
-+static int
-+run_save_helper(pam_handle_t *pamh, const char *user,
-+ int howmany, int debug)
-+{
-+ int retval, child;
-+ struct sigaction newsa, oldsa;
-+
-+ memset(&newsa, '\0', sizeof(newsa));
-+ newsa.sa_handler = SIG_DFL;
-+ sigaction(SIGCHLD, &newsa, &oldsa);
-+
-+ child = fork();
-+ if (child == 0)
-+ {
-+ int i = 0;
-+ struct rlimit rlim;
-+ int dummyfds[2];
-+ static char *envp[] = { NULL };
-+ char *args[] = { NULL, NULL, NULL, NULL, NULL, NULL };
-+
-+ /* replace std file descriptors with a dummy pipe */
-+ if (pipe2(dummyfds, O_NONBLOCK) == 0)
-+ {
-+ dup2(dummyfds[0], STDIN_FILENO);
-+ dup2(dummyfds[1], STDOUT_FILENO);
-+ dup2(dummyfds[1], STDERR_FILENO);
-+ }
-+
-+ if (getrlimit(RLIMIT_NOFILE,&rlim) == 0)
-+ {
-+ if (rlim.rlim_max >= MAX_FD_NO)
-+ rlim.rlim_max = MAX_FD_NO;
-+ for (i = STDERR_FILENO + 1; i < (int)rlim.rlim_max; i++)
-+ {
-+ if (i != dummyfds[0])
-+ close(i);
-+ }
-+ }
-+
-+ /* exec binary helper */
-+ args[0] = strdup(PWHISTORY_HELPER);
-+ args[1] = strdup("save");
-+ args[2] = x_strdup(user);
-+ asprintf(&args[3], "%d", howmany);
-+ asprintf(&args[4], "%d", debug);
-+
-+ execve(args[0], args, envp);
-+
-+ _exit(PAM_SYSTEM_ERR);
-+ }
-+ else if (child > 0)
-+ {
-+ /* wait for child */
-+ int rc = 0;
-+ rc = waitpid(child, &retval, 0); /* wait for helper to complete */
-+ if (rc < 0)
-+ {
-+ pam_syslog(pamh, LOG_ERR, "pwhistory_helper save waitpid returned %d: %m", rc);
-+ retval = PAM_SYSTEM_ERR;
-+ }
-+ else if (!WIFEXITED(retval))
-+ {
-+ pam_syslog(pamh, LOG_ERR, "pwhistory_helper save abnormal exit: %d", retval);
-+ retval = PAM_SYSTEM_ERR;
-+ }
-+ else
-+ {
-+ retval = WEXITSTATUS(retval);
-+ }
-+ }
-+ else
-+ {
-+ retval = PAM_SYSTEM_ERR;
-+ }
-+
-+ sigaction(SIGCHLD, &oldsa, NULL); /* restore old signal handler */
-+
-+ return retval;
-+}
-+
-+static int
-+run_check_helper(pam_handle_t *pamh, const char *user,
-+ const char *newpass, int debug)
-+{
-+ int retval, child, fds[2];
-+ struct sigaction newsa, oldsa;
-+
-+ /* create a pipe for the password */
-+ if (pipe(fds) != 0)
-+ return PAM_SYSTEM_ERR;
-+
-+ memset(&newsa, '\0', sizeof(newsa));
-+ newsa.sa_handler = SIG_DFL;
-+ sigaction(SIGCHLD, &newsa, &oldsa);
-+
-+ child = fork();
-+ if (child == 0)
-+ {
-+ int i = 0;
-+ struct rlimit rlim;
-+ int dummyfds[2];
-+ static char *envp[] = { NULL };
-+ char *args[] = { NULL, NULL, NULL, NULL, NULL };
-+
-+ /* reopen stdin as pipe */
-+ dup2(fds[0], STDIN_FILENO);
-+
-+ /* replace std file descriptors with a dummy pipe */
-+ if (pipe2(dummyfds, O_NONBLOCK) == 0)
-+ {
-+ dup2(dummyfds[1], STDOUT_FILENO);
-+ dup2(dummyfds[1], STDERR_FILENO);
-+ }
-+
-+ if (getrlimit(RLIMIT_NOFILE,&rlim) == 0)
-+ {
-+ if (rlim.rlim_max >= MAX_FD_NO)
-+ rlim.rlim_max = MAX_FD_NO;
-+ for (i = STDERR_FILENO + 1; i < (int)rlim.rlim_max; i++)
-+ {
-+ if (i != dummyfds[0])
-+ close(i);
-+ }
-+ }
-+
-+ /* exec binary helper */
-+ args[0] = strdup(PWHISTORY_HELPER);
-+ args[1] = strdup("check");
-+ args[2] = x_strdup(user);
-+ asprintf(&args[3], "%d", debug);
-+
-+ execve(args[0], args, envp);
-+
-+ _exit(PAM_SYSTEM_ERR);
-+ }
-+ else if (child > 0)
-+ {
-+ /* wait for child */
-+ int rc = 0;
-+ if (newpass == NULL)
-+ newpass = "";
-+
-+ /* send the password to the child */
-+ if (write(fds[1], newpass, strlen(newpass)+1) == -1)
-+ {
-+ pam_syslog(pamh, LOG_ERR, "Cannot send password to helper: %m");
-+ retval = PAM_SYSTEM_ERR;
-+ }
-+ newpass = NULL;
-+ close(fds[0]); /* close here to avoid possible SIGPIPE above */
-+ close(fds[1]);
-+ rc = waitpid(child, &retval, 0); /* wait for helper to complete */
-+ if (rc < 0)
-+ {
-+ pam_syslog(pamh, LOG_ERR, "pwhistory_helper check waitpid returned %d: %m", rc);
-+ retval = PAM_SYSTEM_ERR;
-+ }
-+ else if (!WIFEXITED(retval))
-+ {
-+ pam_syslog(pamh, LOG_ERR, "pwhistory_helper check abnormal exit: %d", retval);
-+ retval = PAM_SYSTEM_ERR;
-+ }
-+ else
-+ {
-+ retval = WEXITSTATUS(retval);
-+ }
-+ }
-+ else
-+ {
-+ close(fds[0]);
-+ close(fds[1]);
-+ retval = PAM_SYSTEM_ERR;
-+ }
-+
-+ sigaction(SIGCHLD, &oldsa, NULL); /* restore old signal handler */
-+
-+ return retval;
-+}
-
- /* This module saves the current crypted password in /etc/security/opasswd
- and then compares the new password with all entries in this file. */
-@@ -109,7 +293,6 @@ parse_option (pam_handle_t *pamh, const
- int
- pam_sm_chauthtok (pam_handle_t *pamh, int flags, int argc, const char **argv)
- {
-- struct passwd *pwd;
- const char *newpass;
- const char *user;
- int retval, tries;
-@@ -154,31 +337,13 @@ pam_sm_chauthtok (pam_handle_t *pamh, in
- return PAM_SUCCESS;
- }
-
-- pwd = pam_modutil_getpwnam (pamh, user);
-- if (pwd == NULL)
-- return PAM_USER_UNKNOWN;
--
-- if ((strcmp(pwd->pw_passwd, "x") == 0) ||
-- ((pwd->pw_passwd[0] == '#') &&
-- (pwd->pw_passwd[1] == '#') &&
-- (strcmp(pwd->pw_name, pwd->pw_passwd + 2) == 0)))
-- {
-- struct spwd *spw = pam_modutil_getspnam (pamh, user);
-- if (spw == NULL)
-- return PAM_USER_UNKNOWN;
-+ retval = save_old_pass (pamh, user, options.remember, options.debug);
-
-- retval = save_old_pass (pamh, user, pwd->pw_uid, spw->sp_pwdp,
-- options.remember, options.debug);
-- if (retval != PAM_SUCCESS)
-- return retval;
-- }
-- else
-- {
-- retval = save_old_pass (pamh, user, pwd->pw_uid, pwd->pw_passwd,
-- options.remember, options.debug);
-- if (retval != PAM_SUCCESS)
-- return retval;
-- }
-+ if (retval == PAM_PWHISTORY_RUN_HELPER)
-+ retval = run_save_helper(pamh, user, options.remember, options.debug);
-+
-+ if (retval != PAM_SUCCESS)
-+ return retval;
-
- newpass = NULL;
- tries = 0;
-@@ -207,8 +372,11 @@ pam_sm_chauthtok (pam_handle_t *pamh, in
- if (options.debug)
- pam_syslog (pamh, LOG_DEBUG, "check against old password file");
-
-- if (check_old_pass (pamh, user, newpass,
-- options.debug) != PAM_SUCCESS)
-+ retval = check_old_pass (pamh, user, newpass, options.debug);
-+ if (retval == PAM_PWHISTORY_RUN_HELPER)
-+ retval = run_check_helper(pamh, user, newpass, options.debug);
-+
-+ if (retval != PAM_SUCCESS)
- {
- if (getuid() || options.enforce_for_root ||
- (flags & PAM_CHANGE_EXPIRED_AUTHTOK))
-diff -up Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.c.pwhhelper Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.c
---- Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.c.pwhhelper 2016-05-06 15:18:42.308637957 +0200
-+++ Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.c 2016-05-06 15:18:42.308637957 +0200
-@@ -0,0 +1,209 @@
-+/*
-+ * Copyright (c) 2013 Red Hat, Inc.
-+ * Author: Tomas Mraz <tmraz@redhat.com>
-+ *
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, and the entire permission notice in its entirety,
-+ * including the disclaimer of warranties.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote
-+ * products derived from this software without specific prior
-+ * written permission.
-+ *
-+ * ALTERNATIVELY, this product may be distributed under the terms of
-+ * the GNU Public License, in which case the provisions of the GPL are
-+ * required INSTEAD OF the above restrictions. (This clause is
-+ * necessary due to a potential bad interaction between the GPL and
-+ * the restrictions contained in a BSD-style copyright.)
-+ *
-+ * THIS SOFTWARE IS PROVIDED ``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.
-+ */
-+
-+#include "config.h"
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <syslog.h>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <signal.h>
-+#include <security/_pam_types.h>
-+#include <security/_pam_macros.h>
-+#include "opasswd.h"
-+
-+#define MAXPASS 200
-+
-+static void
-+su_sighandler(int sig)
-+{
-+#ifndef SA_RESETHAND
-+ /* emulate the behaviour of the SA_RESETHAND flag */
-+ if ( sig == SIGILL || sig == SIGTRAP || sig == SIGBUS || sig = SIGSERV ) {
-+ struct sigaction sa;
-+ memset(&sa, '\0', sizeof(sa));
-+ sa.sa_handler = SIG_DFL;
-+ sigaction(sig, &sa, NULL);
-+ }
-+#endif
-+ if (sig > 0) {
-+ _exit(sig);
-+ }
-+}
-+
-+static void
-+setup_signals(void)
-+{
-+ struct sigaction action; /* posix signal structure */
-+
-+ /*
-+ * Setup signal handlers
-+ */
-+ (void) memset((void *) &action, 0, sizeof(action));
-+ action.sa_handler = su_sighandler;
-+#ifdef SA_RESETHAND
-+ action.sa_flags = SA_RESETHAND;
-+#endif
-+ (void) sigaction(SIGILL, &action, NULL);
-+ (void) sigaction(SIGTRAP, &action, NULL);
-+ (void) sigaction(SIGBUS, &action, NULL);
-+ (void) sigaction(SIGSEGV, &action, NULL);
-+ action.sa_handler = SIG_IGN;
-+ action.sa_flags = 0;
-+ (void) sigaction(SIGTERM, &action, NULL);
-+ (void) sigaction(SIGHUP, &action, NULL);
-+ (void) sigaction(SIGINT, &action, NULL);
-+ (void) sigaction(SIGQUIT, &action, NULL);
-+}
-+
-+static int
-+read_passwords(int fd, int npass, char **passwords)
-+{
-+ int rbytes = 0;
-+ int offset = 0;
-+ int i = 0;
-+ char *pptr;
-+ while (npass > 0)
-+ {
-+ rbytes = read(fd, passwords[i]+offset, MAXPASS-offset);
-+
-+ if (rbytes < 0)
-+ {
-+ if (errno == EINTR) continue;
-+ break;
-+ }
-+ if (rbytes == 0)
-+ break;
-+
-+ while (npass > 0 && (pptr=memchr(passwords[i]+offset, '\0', rbytes))
-+ != NULL)
-+ {
-+ rbytes -= pptr - (passwords[i]+offset) + 1;
-+ i++;
-+ offset = 0;
-+ npass--;
-+ if (rbytes > 0)
-+ {
-+ if (npass > 0)
-+ memcpy(passwords[i], pptr+1, rbytes);
-+ memset(pptr+1, '\0', rbytes);
-+ }
-+ }
-+ offset += rbytes;
-+ }
-+
-+ /* clear up */
-+ if (offset > 0 && npass > 0)
-+ memset(passwords[i], '\0', offset);
-+
-+ return i;
-+}
-+
-+
-+static int
-+check_history(const char *user, const char *debug)
-+{
-+ char pass[MAXPASS + 1];
-+ char *passwords[] = { pass };
-+ int npass;
-+ int dbg = atoi(debug); /* no need to be too fancy here */
-+ int retval;
-+
-+ /* read the password from stdin (a pipe from the pam_pwhistory module) */
-+ npass = read_passwords(STDIN_FILENO, 1, passwords);
-+
-+ if (npass != 1)
-+ { /* is it a valid password? */
-+ helper_log_err(LOG_DEBUG, "no password supplied");
-+ return PAM_AUTHTOK_ERR;
-+ }
-+
-+ retval = check_old_pass(user, pass, dbg);
-+
-+ memset(pass, '\0', MAXPASS); /* clear memory of the password */
-+
-+ return retval;
-+}
-+
-+static int
-+save_history(const char *user, const char *howmany, const char *debug)
-+{
-+ int num = atoi(howmany);
-+ int dbg = atoi(debug); /* no need to be too fancy here */
-+ int retval;
-+
-+ retval = save_old_pass(user, num, dbg);
-+
-+ return retval;
-+}
-+
-+int
-+main(int argc, char *argv[])
-+{
-+ const char *option;
-+ const char *user;
-+
-+ /*
-+ * Catch or ignore as many signal as possible.
-+ */
-+ setup_signals();
-+
-+ /*
-+ * we establish that this program is running with non-tty stdin.
-+ * this is to discourage casual use.
-+ */
-+
-+ if (isatty(STDIN_FILENO) || argc < 4)
-+ {
-+ fprintf(stderr,
-+ "This binary is not designed for running in this way.\n");
-+ sleep(10); /* this should discourage/annoy the user */
-+ return PAM_SYSTEM_ERR;
-+ }
-+
-+ option = argv[1];
-+ user = argv[2];
-+
-+ if (strcmp(option, "check") == 0 && argc == 4)
-+ return check_history(user, argv[3]);
-+ else if (strcmp(option, "save") == 0 && argc == 5)
-+ return save_history(user, argv[3], argv[4]);
-+
-+ return PAM_SYSTEM_ERR;
-+}
-+
-diff -up Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.8.xml.pwhhelper Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.8.xml
---- Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.8.xml.pwhhelper 2016-05-06 15:18:42.308637957 +0200
-+++ Linux-PAM-1.3.0/modules/pam_pwhistory/pwhistory_helper.8.xml 2016-05-06 15:18:42.308637957 +0200
-@@ -0,0 +1,68 @@
-+<?xml version="1.0" encoding='UTF-8'?>
-+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
-+
-+<refentry id="pwhistory_helper">
-+
-+ <refmeta>
-+ <refentrytitle>pwhistory_helper</refentrytitle>
-+ <manvolnum>8</manvolnum>
-+ <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
-+ </refmeta>
-+
-+ <refnamediv id="pwhistory_helper-name">
-+ <refname>pwhistory_helper</refname>
-+ <refpurpose>Helper binary that transfers password hashes from passwd or shadow to opasswd</refpurpose>
-+ </refnamediv>
-+
-+ <refsynopsisdiv>
-+ <cmdsynopsis id="pwhistory_helper-cmdsynopsis">
-+ <command>pwhistory_helper</command>
-+ <arg choice="opt">
-+ ...
-+ </arg>
-+ </cmdsynopsis>
-+ </refsynopsisdiv>
-+
-+ <refsect1 id="pwhistory_helper-description">
-+
-+ <title>DESCRIPTION</title>
-+
-+ <para>
-+ <emphasis>pwhistory_helper</emphasis> is a helper program for the
-+ <emphasis>pam_pwhistory</emphasis> module that transfers password hashes
-+ from passwd or shadow file to the opasswd file and checks a password
-+ supplied by user against the existing hashes in the opasswd file.
-+ </para>
-+
-+ <para>
-+ The purpose of the helper is to enable tighter confinement of
-+ login and password changing services. The helper is thus called only
-+ when SELinux is enabled on the system.
-+ </para>
-+
-+ <para>
-+ The interface of the helper - command line options, and input/output
-+ data format are internal to the <emphasis>pam_pwhistory</emphasis>
-+ module and it should not be called directly from applications.
-+ </para>
-+ </refsect1>
-+
-+ <refsect1 id='pwhistory_helper-see_also'>
-+ <title>SEE ALSO</title>
-+ <para>
-+ <citerefentry>
-+ <refentrytitle>pam_pwhistory</refentrytitle><manvolnum>8</manvolnum>
-+ </citerefentry>
-+ </para>
-+ </refsect1>
-+
-+ <refsect1 id='pwhistory_helper-author'>
-+ <title>AUTHOR</title>
-+ <para>
-+ Written by Tomas Mraz based on the code originally in
-+ <emphasis>pam_pwhistory and pam_unix</emphasis> modules.
-+ </para>
-+ </refsect1>
-+
-+</refentry>
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-coverity.patch b/source/a/pam/fedora-patches/pam-1.3.1-coverity.patch
deleted file mode 100644
index cecf768f6..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-coverity.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-diff --git a/libpam/pam_handlers.c b/libpam/pam_handlers.c
-index 106ef7c..b2e94c7 100644
---- a/libpam/pam_handlers.c
-+++ b/libpam/pam_handlers.c
-@@ -282,7 +282,6 @@ _pam_open_config_file(pam_handle_t *pamh
- {
- char *p;
- FILE *f;
-- int err = 0;
-
- /* Absolute path */
- if (service[0] == '/') {
-diff --git a/libpam_misc/misc_conv.c b/libpam_misc/misc_conv.c
-index be53f34..07dce36 100644
---- a/libpam_misc/misc_conv.c
-+++ b/libpam_misc/misc_conv.c
-@@ -211,7 +211,7 @@ static int read_string(int echo, const char *prompt, char **retstr)
- line[nc] = '\0';
- }
- *retstr = strdup(line);
-- _pam_overwrite(line);
-+ _pam_overwrite_n(line, sizeof(line));
- if (!*retstr) {
- D(("no memory for response string"));
- nc = -1;
-@@ -244,7 +244,7 @@ static int read_string(int echo, const char *prompt, char **retstr)
- D(("the timer appears to have expired"));
-
- *retstr = NULL;
-- _pam_overwrite(line);
-+ _pam_overwrite_n(line, sizeof(line));
-
- cleanexit:
-
-diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
-index 80d885d..3801862 100644
---- a/modules/pam_access/pam_access.c
-+++ b/modules/pam_access/pam_access.c
-@@ -806,7 +806,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
- const char *user=NULL;
- const void *void_from=NULL;
- const char *from;
-- const char const *default_config = PAM_ACCESS_CONFIG;
-+ const char * const default_config = PAM_ACCESS_CONFIG;
- struct passwd *user_pw;
- char hostname[MAXHOSTNAMELEN + 1];
- int rv;
-diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c
-index 4bc4ae7..f8476b4 100644
---- a/modules/pam_limits/pam_limits.c
-+++ b/modules/pam_limits/pam_limits.c
-@@ -342,7 +342,7 @@ static const char *lnames[RLIM_NLIMITS] = {
- #endif
- };
-
--static int str2rlimit(char *name) {
-+static int str2rlimit(const char *name) {
- int i;
- if (!name || *name == '\0')
- return -1;
-@@ -352,7 +352,7 @@ static int str2rlimit(char *name) {
- return -1;
- }
-
--static rlim_t str2rlim_t(char *value) {
-+static rlim_t str2rlim_t(const char *value) {
- unsigned long long rlimit = 0;
-
- if (!value) return (rlim_t)rlimit;
-@@ -384,7 +384,7 @@ static void parse_kernel_limits(pam_handle_t *pamh, struct pam_limit_s *pl, int
- FILE *limitsfile;
- const char *proclimits = "/proc/1/limits";
- char line[256];
-- char *units, *hard, *soft, *name;
-+ const char *units, *hard, *soft, *name;
-
- if (!(limitsfile = fopen(proclimits, "r"))) {
- pam_syslog(pamh, LOG_WARNING, "Could not read %s (%s), using PAM defaults", proclimits, strerror(errno));
-diff --git a/modules/pam_loginuid/pam_loginuid.c b/modules/pam_loginuid/pam_loginuid.c
-index 96bfd98..66d202c 100644
---- a/modules/pam_loginuid/pam_loginuid.c
-+++ b/modules/pam_loginuid/pam_loginuid.c
-@@ -64,7 +64,7 @@ static int set_loginuid(pam_handle_t *pamh, uid_t uid)
- fd = open("/proc/self/uid_map", O_RDONLY);
- if (fd >= 0) {
- count = pam_modutil_read(fd, uid_map, sizeof(uid_map));
-- if (strncmp(uid_map, host_uid_map, count) != 0)
-+ if (count <= 0 || strncmp(uid_map, host_uid_map, count) != 0)
- rc = PAM_IGNORE;
- close(fd);
- }
-diff --git a/modules/pam_mkhomedir/mkhomedir_helper.c b/modules/pam_mkhomedir/mkhomedir_helper.c
-index 9e204c1..4b8d6b7 100644
---- a/modules/pam_mkhomedir/mkhomedir_helper.c
-+++ b/modules/pam_mkhomedir/mkhomedir_helper.c
-@@ -232,6 +232,8 @@ create_homedir(const struct passwd *pwd,
- {
- pam_syslog(NULL, LOG_DEBUG,
- "unable to open or stat src file %s: %m", newsource);
-+ if (srcfd >= 0)
-+ close(srcfd);
- closedir(d);
-
- #ifndef PATH_MAX
-diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
-index f541f89..85f5efa 100644
---- a/modules/pam_namespace/pam_namespace.c
-+++ b/modules/pam_namespace/pam_namespace.c
-@@ -1418,6 +1418,7 @@ static int create_instance(struct polydir_s *polyptr, char *ipath, struct stat *
- if (fstat(fd, &newstatbuf) < 0) {
- pam_syslog(idata->pamh, LOG_ERR, "Error stating %s, %m",
- ipath);
-+ close(fd);
- rmdir(ipath);
- return PAM_SESSION_ERR;
- }
-diff --git a/modules/pam_pwhistory/opasswd.c b/modules/pam_pwhistory/opasswd.c
-index e6cf346..813f579 100644
---- a/modules/pam_pwhistory/opasswd.c
-+++ b/modules/pam_pwhistory/opasswd.c
-@@ -326,6 +326,9 @@ save_old_pass (pam_handle_t *pamh, const char *user, uid_t uid,
- n = strlen (buf);
- #endif /* HAVE_GETLINE / HAVE_GETDELIM */
-
-+ if (n < 1)
-+ break;
-+
- cp = buf;
- save = strdup (buf); /* Copy to write the original data back. */
- if (save == NULL)
-@@ -336,9 +339,6 @@ save_old_pass (pam_handle_t *pamh, const char *user, uid_t uid,
- goto error_opasswd;
- }
-
-- if (n < 1)
-- break;
--
- tmp = strchr (cp, '#'); /* remove comments */
- if (tmp)
- *tmp = '\0';
-diff --git a/modules/pam_rootok/pam_rootok.c b/modules/pam_rootok/pam_rootok.c
-index 17baabe..a9d9140 100644
---- a/modules/pam_rootok/pam_rootok.c
-+++ b/modules/pam_rootok/pam_rootok.c
-@@ -66,14 +66,17 @@ log_callback (int type, const char *fmt, ...)
- int audit_fd;
- va_list ap;
-
-- va_start(ap, fmt);
- #ifdef HAVE_LIBAUDIT
- audit_fd = audit_open();
-
- if (audit_fd >= 0) {
- char *buf;
-+ int ret;
-
-- if (vasprintf (&buf, fmt, ap) < 0)
-+ va_start(ap, fmt);
-+ ret = vasprintf (&buf, fmt, ap);
-+ va_end(ap);
-+ if (ret < 0)
- return 0;
- audit_log_user_avc_message(audit_fd, AUDIT_USER_AVC, buf, NULL, NULL,
- NULL, 0);
-@@ -83,6 +86,7 @@ log_callback (int type, const char *fmt, ...)
- }
-
- #endif
-+ va_start(ap, fmt);
- vsyslog (LOG_USER | LOG_INFO, fmt, ap);
- va_end(ap);
- return 0;
-diff --git a/modules/pam_sepermit/pam_sepermit.c b/modules/pam_sepermit/pam_sepermit.c
-index c653290..f37af0f 100644
---- a/modules/pam_sepermit/pam_sepermit.c
-+++ b/modules/pam_sepermit/pam_sepermit.c
-@@ -353,7 +353,7 @@ sepermit_match(pam_handle_t *pamh, const char *cfgfile, const char *user,
- if (*sense == PAM_SUCCESS) {
- if (ignore)
- *sense = PAM_IGNORE;
-- if (geteuid() == 0 && exclusive && get_loginuid(pamh) == -1)
-+ if (geteuid() == 0 && exclusive && get_loginuid(pamh) == (uid_t)-1)
- if (sepermit_lock(pamh, user, debug) < 0)
- *sense = PAM_AUTH_ERR;
- }
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-motd-multiple-paths.patch b/source/a/pam/fedora-patches/pam-1.3.1-motd-multiple-paths.patch
deleted file mode 100644
index a0b069815..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-motd-multiple-paths.patch
+++ /dev/null
@@ -1,755 +0,0 @@
-diff --git a/modules/pam_motd/pam_motd.8.xml b/modules/pam_motd/pam_motd.8.xml
-index 906c4ed..4e2110c 100644
---- a/modules/pam_motd/pam_motd.8.xml
-+++ b/modules/pam_motd/pam_motd.8.xml
-@@ -21,6 +21,9 @@
- <arg choice="opt">
- motd=<replaceable>/path/filename</replaceable>
- </arg>
-+ <arg choice="opt">
-+ motd_dir=<replaceable>/path/dirname.d</replaceable>
-+ </arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
-@@ -31,10 +34,49 @@
- <para>
- pam_motd is a PAM module that can be used to display
- arbitrary motd (message of the day) files after a successful
-- login. By default the <filename>/etc/motd</filename> file is
-- shown. The message size is limited to 64KB.
-+ login. By default, pam_motd shows files in the
-+ following locations:
-+ </para>
-+ <para>
-+ <simplelist type='vert'>
-+ <member><filename>/etc/motd</filename></member>
-+ <member><filename>/run/motd</filename></member>
-+ <member><filename>/usr/lib/motd</filename></member>
-+ <member><filename>/etc/motd.d/</filename></member>
-+ <member><filename>/run/motd.d/</filename></member>
-+ <member><filename>/usr/lib/motd.d/</filename></member>
-+ </simplelist>
-+ </para>
-+ <para>
-+ Each message size is limited to 64KB.
-+ </para>
-+ <para>
-+ If <filename>/etc/motd</filename> does not exist,
-+ then <filename>/run/motd</filename> is shown. If
-+ <filename>/run/motd</filename> does not exist, then
-+ <filename>/usr/lib/motd</filename> is shown.
-+ </para>
-+ <para>
-+ Similar overriding behavior applies to the directories.
-+ Files in <filename>/etc/motd.d/</filename> override files
-+ with the same name in <filename>/run/motd.d/</filename> and
-+ <filename>/usr/lib/motd.d/</filename>. Files in <filename>/run/motd.d/</filename>
-+ override files with the same name in <filename>/usr/lib/motd.d/</filename>.
-+ </para>
-+ <para>
-+ Files the in the directories listed above are displayed in
-+ lexicographic order by name.
-+ </para>
-+ <para>
-+ To silence a message,
-+ a symbolic link with target <filename>/dev/null</filename>
-+ may be placed in <filename>/etc/motd.d</filename> with
-+ the same filename as the message to be silenced. Example:
-+ Creating a symbolic link as follows silences <filename>/usr/lib/motd.d/my_motd</filename>.
-+ </para>
-+ <para>
-+ <command>ln -s /dev/null /etc/motd.d/my_motd</command>
- </para>
--
- </refsect1>
-
- <refsect1 id="pam_motd-options">
-@@ -47,8 +89,10 @@
- </term>
- <listitem>
- <para>
-- The <filename>/path/filename</filename> file is displayed
-- as message of the day.
-+ The <filename>/path/filename</filename> file is displayed
-+ as message of the day. Multiple paths to try can be
-+ specified as a colon-separated list. By default this option
-+ is set to <filename>/etc/motd:/run/motd:/usr/lib/motd</filename>.
- </para>
- </listitem>
- </varlistentry>
-@@ -59,16 +103,17 @@
- <listitem>
- <para>
- The <filename>/path/dirname.d</filename> directory is scanned
-- and each file contained inside of it is displayed.
-+ and each file contained inside of it is displayed. Multiple
-+ directories to scan can be specified as a colon-separated list.
-+ By default this option is set to <filename>/etc/motd.d:/run/motd.d:/usr/lib/motd.d</filename>.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>
-- When no options are given, the default is to display both
-- <filename>/etc/motd</filename> and the contents of
-- <filename>/etc/motd.d</filename>. Specifying either option (or both)
-- will disable this default behavior.
-+ When no options are given, the default behavior applies for both
-+ options. Specifying either option (or both) will disable the
-+ default behavior for both options.
- </para>
- </refsect1>
-
-diff --git a/modules/pam_motd/pam_motd.c b/modules/pam_motd/pam_motd.c
-index cc828d7..ec3ebd5 100644
---- a/modules/pam_motd/pam_motd.c
-+++ b/modules/pam_motd/pam_motd.c
-@@ -33,8 +33,8 @@
- */
-
- #define PAM_SM_SESSION
--#define DEFAULT_MOTD "/etc/motd"
--#define DEFAULT_MOTD_D "/etc/motd.d"
-+#define DEFAULT_MOTD "/etc/motd:/run/motd:/usr/lib/motd"
-+#define DEFAULT_MOTD_D "/etc/motd.d:/run/motd.d:/usr/lib/motd.d"
-
- #include <security/pam_modules.h>
- #include <security/pam_modutil.h>
-@@ -97,12 +97,234 @@ static void try_to_display_directory(pam_handle_t *pamh, const char *dirname)
- }
- }
-
-+/*
-+ * Split a DELIM-separated string ARG into an array.
-+ * Outputs a newly allocated array of strings OUT_ARG_SPLIT
-+ * and the number of strings OUT_NUM_STRS.
-+ * Returns 0 in case of error, 1 in case of success.
-+ */
-+static int pam_split_string(const pam_handle_t *pamh, char *arg, char delim,
-+ char ***out_arg_split, uint *out_num_strs)
-+{
-+ char *arg_extracted = NULL;
-+ const char *arg_ptr = arg;
-+ char **arg_split = NULL;
-+ char delim_str[2];
-+ int i = 0;
-+ uint num_strs = 0;
-+ int retval = 0;
-+
-+ delim_str[0] = delim;
-+ delim_str[1] = '\0';
-+
-+ if (arg == NULL) {
-+ goto out;
-+ }
-+
-+ while (arg_ptr != NULL) {
-+ num_strs++;
-+ arg_ptr = strchr(arg_ptr + sizeof(const char), delim);
-+ }
-+
-+ arg_split = (char **)calloc(num_strs, sizeof(char *));
-+ if (arg_split == NULL) {
-+ pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate string array");
-+ goto out;
-+ }
-+
-+ arg_extracted = strtok_r(arg, delim_str, &arg);
-+ while (arg_extracted != NULL && i < num_strs) {
-+ arg_split[i++] = arg_extracted;
-+ arg_extracted = strtok_r(NULL, delim_str, &arg);
-+ }
-+
-+ retval = 1;
-+
-+ out:
-+ *out_num_strs = num_strs;
-+ *out_arg_split = arg_split;
-+
-+ return retval;
-+}
-+
-+/* Join A_STR and B_STR, inserting a "/" between them if one is not already trailing
-+ * in A_STR or beginning B_STR. A pointer to a newly allocated string holding the
-+ * joined string is returned in STRP_OUT.
-+ * Returns -1 in case of error, or the number of bytes in the joined string in
-+ * case of success. */
-+static int join_dir_strings(char **strp_out, const char *a_str, const char *b_str)
-+{
-+ int has_sep = 0;
-+ int retval = -1;
-+ char *join_strp = NULL;
-+
-+ if (strp_out == NULL || a_str == NULL || b_str == NULL) {
-+ goto out;
-+ }
-+ if (strlen(a_str) == 0) {
-+ goto out;
-+ }
-+
-+ has_sep = (a_str[strlen(a_str) - 1] == '/') || (b_str[0] == '/');
-+
-+ retval = asprintf(&join_strp, "%s%s%s", a_str,
-+ (has_sep == 1) ? "" : "/", b_str);
-+
-+ if (retval < 0) {
-+ goto out;
-+ }
-+
-+ *strp_out = join_strp;
-+
-+ out:
-+ return retval;
-+}
-+
-+static int compare_strings(const void * a, const void * b)
-+{
-+ const char *a_str = *(char **)a;
-+ const char *b_str = *(char **)b;
-+
-+ if (a_str == NULL && b_str == NULL) {
-+ return 0;
-+ }
-+ else if (a_str == NULL) {
-+ return -1;
-+ }
-+ else if (b_str == NULL) {
-+ return 1;
-+ }
-+ else {
-+ return strcmp(a_str, b_str);
-+ }
-+}
-+
-+static int filter_dirents(const struct dirent *d)
-+{
-+ return (d->d_type == DT_REG || d->d_type == DT_LNK);
-+}
-+
-+static void try_to_display_directories_with_overrides(pam_handle_t *pamh,
-+ char **motd_dir_path_split, int num_motd_dirs)
-+{
-+ struct dirent ***dirscans = NULL;
-+ int *dirscans_sizes = NULL;
-+ int dirscans_size_total = 0;
-+ char **dirnames_all = NULL;
-+ int i;
-+ int i_dirnames = 0;
-+
-+ if (pamh == NULL || motd_dir_path_split == NULL) {
-+ goto out;
-+ }
-+ if (num_motd_dirs < 1) {
-+ goto out;
-+ }
-+
-+ if ((dirscans = (struct dirent ***)calloc(num_motd_dirs,
-+ sizeof(struct dirent **))) == NULL) {
-+ pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate dirent arrays");
-+ goto out;
-+ }
-+ if ((dirscans_sizes = (int *)calloc(num_motd_dirs, sizeof(int))) == NULL) {
-+ pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate dirent array sizes");
-+ goto out;
-+ }
-+
-+ for (i = 0; i < num_motd_dirs; i++) {
-+ dirscans_sizes[i] = scandir(motd_dir_path_split[i], &(dirscans[i]),
-+ filter_dirents, alphasort);
-+ if (dirscans_sizes[i] < 0) {
-+ pam_syslog(pamh, LOG_ERR, "pam_motd: error scanning directory %s", motd_dir_path_split[i]);
-+ dirscans_sizes[i] = 0;
-+ }
-+ dirscans_size_total += dirscans_sizes[i];
-+ }
-+
-+ /* Allocate space for all file names found in the directories, including duplicates. */
-+ if ((dirnames_all = (char **)calloc(dirscans_size_total,
-+ sizeof(char *))) == NULL) {
-+ pam_syslog(pamh, LOG_CRIT, "pam_motd: failed to allocate dirname array");
-+ goto out;
-+ }
-+
-+ for (i = 0; i < dirscans_size_total; i++) {
-+ dirnames_all[i] = NULL;
-+ }
-+
-+ for (i = 0; i < num_motd_dirs; i++) {
-+ int j;
-+
-+ for (j = 0; j < dirscans_sizes[i]; j++) {
-+ dirnames_all[i_dirnames] = dirscans[i][j]->d_name;
-+ i_dirnames++;
-+ }
-+ }
-+
-+ qsort(dirnames_all, dirscans_size_total,
-+ sizeof(const char *), compare_strings);
-+
-+ for (i = 0; i < dirscans_size_total; i++) {
-+ int j;
-+
-+ if (dirnames_all[i] == NULL) {
-+ continue;
-+ }
-+
-+ /* Skip duplicate file names. */
-+ if (i > 0 && strcmp(dirnames_all[i], dirnames_all[i - 1]) == 0) {
-+ continue;
-+ }
-+
-+ for (j = 0; j < num_motd_dirs; j++) {
-+ char *abs_path = NULL;
-+
-+ if (join_dir_strings(&abs_path, motd_dir_path_split[j],
-+ dirnames_all[i]) < 0) {
-+ continue;
-+ }
-+
-+ if (abs_path != NULL) {
-+ int fd = open(abs_path, O_RDONLY, 0);
-+ if (fd >= 0) {
-+ try_to_display_fd(pamh, fd);
-+ close(fd);
-+
-+ /* We displayed a file, skip to the next file name. */
-+ break;
-+ }
-+ }
-+ _pam_drop(abs_path);
-+ }
-+ }
-+
-+ out:
-+ _pam_drop(dirnames_all);
-+ for (i = 0; i < num_motd_dirs; i++) {
-+ int j;
-+ for (j = 0; j < dirscans_sizes[i]; j++) {
-+ _pam_drop(dirscans[i][j]);
-+ }
-+ _pam_drop(dirscans[i]);
-+ }
-+ _pam_drop(dirscans_sizes);
-+ _pam_drop(dirscans);
-+
-+ return;
-+}
-+
- int pam_sm_open_session(pam_handle_t *pamh, int flags,
- int argc, const char **argv)
- {
- int retval = PAM_IGNORE;
- const char *motd_path = NULL;
-+ char *motd_path_copy = NULL;
-+ int num_motd_paths = 0;
-+ char **motd_path_split = NULL;
- const char *motd_dir_path = NULL;
-+ char *motd_dir_path_copy = NULL;
-+ int num_motd_dir_paths = 0;
-+ char **motd_dir_path_split = NULL;
-
- if (flags & PAM_SILENT) {
- return retval;
-@@ -141,16 +363,52 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
- }
-
- if (motd_path != NULL) {
-- int fd = open(motd_path, O_RDONLY, 0);
-+ motd_path_copy = strdup(motd_path);
-+ }
-+
-+ if (motd_path_copy != NULL) {
-+ if (pam_split_string(pamh, motd_path_copy, ':',
-+ &motd_path_split, &num_motd_paths) == 0) {
-+ goto out;
-+ }
-+ }
-+
-+ if (motd_dir_path != NULL) {
-+ motd_dir_path_copy = strdup(motd_dir_path);
-+ }
-
-- if (fd >= 0) {
-- try_to_display_fd(pamh, fd);
-- close(fd);
-+ if (motd_dir_path_copy != NULL) {
-+ if (pam_split_string(pamh, motd_dir_path_copy, ':',
-+ &motd_dir_path_split, &num_motd_dir_paths) == 0) {
-+ goto out;
- }
- }
-
-- if (motd_dir_path != NULL)
-- try_to_display_directory(pamh, motd_dir_path);
-+ if (motd_path_split != NULL) {
-+ int i;
-+
-+ for (i = 0; i < num_motd_paths; i++) {
-+ int fd = open(motd_path_split[i], O_RDONLY, 0);
-+
-+ if (fd >= 0) {
-+ try_to_display_fd(pamh, fd);
-+ close(fd);
-+
-+ /* We found and displayed a file, move onto next filename. */
-+ break;
-+ }
-+ }
-+ }
-+
-+ if (motd_dir_path_split != NULL)
-+ try_to_display_directories_with_overrides(pamh, motd_dir_path_split,
-+ num_motd_dir_paths);
-+
-+ out:
-+ _pam_drop(motd_path_copy);
-+ _pam_drop(motd_path_split);
-+ _pam_drop(motd_dir_path_copy);
-+ _pam_drop(motd_dir_path_split);
-
- return retval;
- }
-diff --git a/xtests/Makefile.am b/xtests/Makefile.am
-index a6d6f8d..4d5aba3 100644
---- a/xtests/Makefile.am
-+++ b/xtests/Makefile.am
-@@ -32,7 +32,10 @@ EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
- tst-pam_substack5.pamd tst-pam_substack5a.pamd tst-pam_substack5.sh \
- tst-pam_assemble_line1.pamd tst-pam_assemble_line1.sh \
- tst-pam_pwhistory1.pamd tst-pam_pwhistory1.sh \
-- tst-pam_time1.pamd time.conf
-+ tst-pam_time1.pamd time.conf \
-+ tst-pam_motd.sh tst-pam_motd1.sh tst-pam_motd2.sh \
-+ tst-pam_motd3.sh tst-pam_motd4.sh tst-pam_motd1.pamd \
-+ tst-pam_motd2.pamd tst-pam_motd3.pamd tst-pam_motd4.pamd
-
- XTESTS = tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 \
- tst-pam_dispatch4 tst-pam_dispatch5 \
-@@ -41,7 +44,7 @@ XTESTS = tst-pam_dispatch1 tst-pam_dispatch2 tst-pam_dispatch3 \
- tst-pam_access1 tst-pam_access2 tst-pam_access3 \
- tst-pam_access4 tst-pam_limits1 tst-pam_succeed_if1 \
- tst-pam_group1 tst-pam_authfail tst-pam_authsucceed \
-- tst-pam_pwhistory1 tst-pam_time1
-+ tst-pam_pwhistory1 tst-pam_time1 tst-pam_motd
-
- NOSRCTESTS = tst-pam_substack1 tst-pam_substack2 tst-pam_substack3 \
- tst-pam_substack4 tst-pam_substack5 tst-pam_assemble_line1
-diff --git a/xtests/tst-pam_motd.c b/xtests/tst-pam_motd.c
-new file mode 100644
-index 0000000..bba2f9d
---- /dev/null
-+++ b/xtests/tst-pam_motd.c
-@@ -0,0 +1,69 @@
-+/*
-+ * Redistribution and use in source and binary forms, with or without
-+ * modification, are permitted provided that the following conditions
-+ * are met:
-+ * 1. Redistributions of source code must retain the above copyright
-+ * notice, and the entire permission notice in its entirety,
-+ * including the disclaimer of warranties.
-+ * 2. Redistributions in binary form must reproduce the above copyright
-+ * notice, this list of conditions and the following disclaimer in the
-+ * documentation and/or other materials provided with the distribution.
-+ * 3. The name of the author may not be used to endorse or promote
-+ * products derived from this software without specific prior
-+ * written permission.
-+ *
-+ * ALTERNATIVELY, this product may be distributed under the terms of
-+ * the GNU Public License, in which case the provisions of the GPL are
-+ * required INSTEAD OF the above restrictions. (This clause is
-+ * necessary due to a potential bad interaction between the GPL and
-+ * the restrictions contained in a BSD-style copyright.)
-+ *
-+ * THIS SOFTWARE IS PROVIDED ``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.
-+ */
-+
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <security/pam_appl.h>
-+#include <security/pam_misc.h>
-+
-+static struct pam_conv conv = {
-+ misc_conv,
-+ NULL
-+};
-+
-+int main(int argc, char *argv[])
-+{
-+ pam_handle_t *pamh=NULL;
-+ char *tst_arg = NULL;
-+ int retval;
-+
-+ if (argc > 1)
-+ tst_arg = argv[1];
-+
-+ retval = pam_start(tst_arg, NULL, &conv, &pamh);
-+
-+ retval = pam_open_session(pamh, 0);
-+
-+ retval = pam_close_session(pamh, 0);
-+
-+ if (pam_end(pamh,retval) != PAM_SUCCESS) { /* close Linux-PAM */
-+ pamh = NULL;
-+ exit(1);
-+ }
-+
-+ return ( retval == PAM_SUCCESS ? 0:1 ); /* indicate success */
-+}
-diff --git a/xtests/tst-pam_motd.sh b/xtests/tst-pam_motd.sh
-new file mode 100755
-index 0000000..9080128
---- /dev/null
-+++ b/xtests/tst-pam_motd.sh
-@@ -0,0 +1,8 @@
-+#!/bin/bash
-+
-+set -e
-+
-+./tst-pam_motd1.sh
-+./tst-pam_motd2.sh
-+./tst-pam_motd3.sh
-+./tst-pam_motd4.sh
-diff --git a/xtests/tst-pam_motd1.pamd b/xtests/tst-pam_motd1.pamd
-new file mode 100644
-index 0000000..ddea82c
---- /dev/null
-+++ b/xtests/tst-pam_motd1.pamd
-@@ -0,0 +1,3 @@
-+#%PAM-1.0
-+session required pam_permit.so
-+session optional pam_motd.so motd=tst-pam_motd1.d/etc/motd motd_dir=tst-pam_motd1.d/etc/motd.d
-diff --git a/xtests/tst-pam_motd1.sh b/xtests/tst-pam_motd1.sh
-new file mode 100755
-index 0000000..cc88854
---- /dev/null
-+++ b/xtests/tst-pam_motd1.sh
-@@ -0,0 +1,36 @@
-+#!/bin/bash
-+
-+TST_DIR="tst-pam_motd1.d"
-+
-+function tst_cleanup() {
-+ rm -rf "${TST_DIR}"
-+ rm -f tst-pam_motd1.out
-+}
-+
-+mkdir -p ${TST_DIR}
-+mkdir -p ${TST_DIR}/etc/motd.d
-+
-+# Verify the case of single motd and motd.d directory works
-+echo "motd: /etc/motd" > ${TST_DIR}/etc/motd
-+echo "motd: /etc/motd.d/test" > ${TST_DIR}/etc/motd.d/test
-+
-+./tst-pam_motd tst-pam_motd1 > tst-pam_motd1.out
-+
-+RET=$?
-+
-+motd_to_show_output=$(cat tst-pam_motd1.out | grep "motd: /etc/motd")
-+if [ -z "${motd_to_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+motd_dir_to_show_output=$(cat tst-pam_motd1.out | grep "motd: /etc/motd.d/test")
-+if [ -z "${motd_dir_to_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+tst_cleanup
-+exit $RET
-diff --git a/xtests/tst-pam_motd2.pamd b/xtests/tst-pam_motd2.pamd
-new file mode 100644
-index 0000000..8200191
---- /dev/null
-+++ b/xtests/tst-pam_motd2.pamd
-@@ -0,0 +1,3 @@
-+#%PAM-1.0
-+session required pam_permit.so
-+session optional pam_motd.so motd=tst-pam_motd2.d/etc/motd:tst-pam_motd2.d/run/motd:tst-pam_motd2.d/usr/lib/motd motd_dir=tst-pam_motd2.d/etc/motd.d:tst-pam_motd2.d/run/motd.d:tst-pam_motd2.d/usr/lib/motd.d
-diff --git a/xtests/tst-pam_motd2.sh b/xtests/tst-pam_motd2.sh
-new file mode 100755
-index 0000000..d26ea92
---- /dev/null
-+++ b/xtests/tst-pam_motd2.sh
-@@ -0,0 +1,53 @@
-+#!/bin/bash
-+
-+TST_DIR="tst-pam_motd2.d"
-+
-+function tst_cleanup() {
-+ rm -rf "${TST_DIR}"
-+ rm -f tst-pam_motd2.out
-+}
-+
-+mkdir -p ${TST_DIR}
-+mkdir -p ${TST_DIR}/etc/motd.d
-+mkdir -p ${TST_DIR}/run/motd.d
-+mkdir -p ${TST_DIR}/usr/lib/motd.d
-+
-+echo "motd: /etc/motd" > ${TST_DIR}/etc/motd
-+echo "motd: /run/motd" > ${TST_DIR}/run/motd
-+echo "motd: /usr/lib/motd" > ${TST_DIR}/usr/lib/motd
-+
-+# Drop a motd file in test directories such that every overriding
-+# condition (for 3 directories in this case) will be seen.
-+echo "motd: e0r0u1 in usr/lib - will show" > ${TST_DIR}/usr/lib/motd.d/e0r0u1.motd
-+echo "motd: e0r1u0 in run - will show" > ${TST_DIR}/run/motd.d/e0r1u0.motd
-+echo "motd: e0r1u1 in usr/lib - not show" > ${TST_DIR}/usr/lib/motd.d/e0r1u1.motd
-+echo "motd: e0r1u1 in run - will show" > ${TST_DIR}/run/motd.d/e0r1u1.motd
-+echo "motd: e1r0u0 in etc - will show" > ${TST_DIR}/etc/motd.d/e1r0u0.motd
-+echo "motd: e1r0u1 in usr/lib - not show" > ${TST_DIR}/usr/lib/motd.d/e1r0u1.motd
-+echo "motd: e1r0u1 in etc - will show" > ${TST_DIR}/etc/motd.d/e1r0u1.motd
-+echo "motd: e1r1u0 in run - not show" > ${TST_DIR}/run/motd.d/e1r1u0.motd
-+echo "motd: e1r1u0 in etc - will show" > ${TST_DIR}/etc/motd.d/e1r1u0.motd
-+echo "motd: e1r1u1 in usr/lib - not show" > ${TST_DIR}/usr/lib/motd.d/e1r1u1.motd
-+echo "motd: e1r1u1 in run - not show" > ${TST_DIR}/run/motd.d/e1r1u1.motd
-+echo "motd: e1r1u1 in etc - will show" > ${TST_DIR}/etc/motd.d/e1r1u1.motd
-+
-+./tst-pam_motd tst-pam_motd2 > tst-pam_motd2.out
-+
-+RET=$?
-+
-+motd_to_show_output=$(cat tst-pam_motd2.out | grep "motd: /etc/motd")
-+if [ -z "${motd_to_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+motd_dir_not_show_output=$(cat tst-pam_motd2.out | grep "not show")
-+if [ -n "${motd_dir_not_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+tst_cleanup
-+exit $RET
-diff --git a/xtests/tst-pam_motd3.pamd b/xtests/tst-pam_motd3.pamd
-new file mode 100644
-index 0000000..a8b8cbf
---- /dev/null
-+++ b/xtests/tst-pam_motd3.pamd
-@@ -0,0 +1,3 @@
-+#%PAM-1.0
-+session required pam_permit.so
-+session optional pam_motd.so motd=tst-pam_motd3.d/etc/motd:tst-pam_motd3.d/run/motd:tst-pam_motd3.d/usr/lib/motd motd_dir=tst-pam_motd3.d/etc/motd.d:tst-pam_motd3.d/run/motd.d:tst-pam_motd3.d/usr/lib/motd.d
-diff --git a/xtests/tst-pam_motd3.sh b/xtests/tst-pam_motd3.sh
-new file mode 100755
-index 0000000..e18856b
---- /dev/null
-+++ b/xtests/tst-pam_motd3.sh
-@@ -0,0 +1,53 @@
-+#!/bin/bash
-+
-+TST_DIR="tst-pam_motd3.d"
-+
-+function tst_cleanup() {
-+ rm -rf "${TST_DIR}"
-+ rm -f tst-pam_motd3.out
-+}
-+
-+mkdir -p ${TST_DIR}
-+mkdir -p ${TST_DIR}/etc/motd.d
-+mkdir -p ${TST_DIR}/run/motd.d
-+mkdir -p ${TST_DIR}/usr/lib/motd.d
-+
-+# Verify motd is still displayed when not overridden
-+echo "motd: test-show in run - show" > ${TST_DIR}/run/motd.d/test-show.motd
-+
-+# Test overridden by a symlink to a file that isn't /dev/null; symlink target should show
-+echo "motd: hidden-by-symlink in usr/lib - not show" > ${TST_DIR}/usr/lib/motd.d/hidden-by-symlink.motd
-+echo "motd: test-from-symlink - show" > ${TST_DIR}/test-from-symlink.motd
-+ln -sr ${TST_DIR}/test-from-symlink.motd ${TST_DIR}/run/motd.d/hidden-by-symlink.motd
-+
-+# Test hidden by a null symlink
-+echo "motd: hidden-by-null-symlink in run - not show" > ${TST_DIR}/run/motd.d/hidden-by-null-symlink.motd
-+ln -s /dev/null ${TST_DIR}/etc/motd.d/hidden-by-null-symlink.motd
-+
-+./tst-pam_motd tst-pam_motd3 > tst-pam_motd3.out
-+
-+RET=$?
-+
-+motd_dir_not_show_output=$(cat tst-pam_motd3.out | grep "not show")
-+if [ -n "${motd_dir_not_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+motd_test_show_output=$(cat tst-pam_motd3.out | grep "test-show.*- show")
-+if [ -z "${motd_test_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+motd_general_symlink_show_output=$(cat tst-pam_motd3.out | grep "test-from-symlink.*- show")
-+if [ -z "${motd_general_symlink_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+tst_cleanup
-+exit $RET
-diff --git a/xtests/tst-pam_motd4.pamd b/xtests/tst-pam_motd4.pamd
-new file mode 100644
-index 0000000..9dc311a
---- /dev/null
-+++ b/xtests/tst-pam_motd4.pamd
-@@ -0,0 +1,3 @@
-+#%PAM-1.0
-+session required pam_permit.so
-+session optional pam_motd.so motd=tst-pam_motd4.d/etc/motd
-diff --git a/xtests/tst-pam_motd4.sh b/xtests/tst-pam_motd4.sh
-new file mode 100755
-index 0000000..6022177
---- /dev/null
-+++ b/xtests/tst-pam_motd4.sh
-@@ -0,0 +1,27 @@
-+#!/bin/bash
-+
-+TST_DIR="tst-pam_motd4.d"
-+
-+function tst_cleanup() {
-+ rm -rf "${TST_DIR}"
-+ rm -f tst-pam_motd4.out
-+}
-+
-+mkdir -p ${TST_DIR}/etc
-+
-+# Verify the case of single motd with no motd_dir given in tst-pam_motd4.pamd
-+echo "motd: /etc/motd" > ${TST_DIR}/etc/motd
-+
-+./tst-pam_motd tst-pam_motd4 > tst-pam_motd4.out
-+
-+RET=$?
-+
-+motd_to_show_output=$(cat tst-pam_motd4.out | grep "motd: /etc/motd")
-+if [ -z "${motd_to_show_output}" ];
-+then
-+ tst_cleanup
-+ exit 1
-+fi
-+
-+tst_cleanup
-+exit $RET
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-noflex.patch b/source/a/pam/fedora-patches/pam-1.3.1-noflex.patch
deleted file mode 100644
index c65d22537..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-noflex.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff -up Linux-PAM-1.3.1/doc/Makefile.am.noflex Linux-PAM-1.3.1/doc/Makefile.am
---- Linux-PAM-1.3.1/doc/Makefile.am.noflex 2017-02-10 11:10:15.000000000 +0100
-+++ Linux-PAM-1.3.1/doc/Makefile.am 2018-05-18 14:53:50.300997606 +0200
-@@ -2,7 +2,7 @@
- # Copyright (c) 2005, 2006 Thorsten Kukuk <kukuk@suse.de>
- #
-
--SUBDIRS = man specs sag adg mwg
-+SUBDIRS = man sag adg mwg
-
- CLEANFILES = *~
-
-diff -up Linux-PAM-1.3.1/Makefile.am.noflex Linux-PAM-1.3.1/Makefile.am
---- Linux-PAM-1.3.1/Makefile.am.noflex 2018-05-18 14:53:50.301997629 +0200
-+++ Linux-PAM-1.3.1/Makefile.am 2018-05-18 14:55:31.576353800 +0200
-@@ -4,7 +4,7 @@
-
- AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 dist-xz check-news
-
--SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
-+SUBDIRS = libpam tests libpamc libpam_misc modules po doc examples xtests
-
- CLEANFILES = *~
-
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-redhat-modules.patch b/source/a/pam/fedora-patches/pam-1.3.1-redhat-modules.patch
deleted file mode 100644
index 4d3f37414..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-redhat-modules.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff -up Linux-PAM-1.3.1/configure.ac.redhat-modules Linux-PAM-1.3.1/configure.ac
---- Linux-PAM-1.3.1/configure.ac.redhat-modules 2018-05-18 12:57:57.000000000 +0200
-+++ Linux-PAM-1.3.1/configure.ac 2018-11-26 12:58:14.623545121 +0100
-@@ -611,10 +611,12 @@ AC_CONFIG_FILES([Makefile libpam/Makefil
- libpam_misc/Makefile conf/Makefile conf/pam_conv1/Makefile \
- po/Makefile.in \
- modules/Makefile \
-+ modules/pam_chroot/Makefile modules/pam_console/Makefile \
-+ modules/pam_postgresok/Makefile \
- modules/pam_access/Makefile modules/pam_cracklib/Makefile \
- modules/pam_debug/Makefile modules/pam_deny/Makefile \
- modules/pam_echo/Makefile modules/pam_env/Makefile \
-- modules/pam_faildelay/Makefile \
-+ modules/pam_faildelay/Makefile modules/pam_faillock/Makefile \
- modules/pam_filter/Makefile modules/pam_filter/upperLOWER/Makefile \
- modules/pam_ftp/Makefile modules/pam_group/Makefile \
- modules/pam_issue/Makefile modules/pam_keyinit/Makefile \
-diff -up Linux-PAM-1.3.1/doc/sag/pam_faillock.xml.redhat-modules Linux-PAM-1.3.1/doc/sag/pam_faillock.xml
---- Linux-PAM-1.3.1/doc/sag/pam_faillock.xml.redhat-modules 2018-11-26 12:58:14.623545121 +0100
-+++ Linux-PAM-1.3.1/doc/sag/pam_faillock.xml 2018-11-26 12:58:14.623545121 +0100
-@@ -0,0 +1,38 @@
-+<?xml version='1.0' encoding='UTF-8'?>
-+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
-+<section id='sag-pam_faillock'>
-+ <title>pam_faillock - temporarily locking access based on failed authentication attempts during an interval</title>
-+ <cmdsynopsis>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//cmdsynopsis[@id = "pam_faillock-cmdsynopsisauth"]/*)'/>
-+ </cmdsynopsis>
-+ <cmdsynopsis>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//cmdsynopsis[@id = "pam_faillock-cmdsynopsisacct"]/*)'/>
-+ </cmdsynopsis>
-+ <section id='sag-pam_faillock-description'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-description"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-options'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-options"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-types'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-types"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-return_values'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-return_values"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-examples'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-examples"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-author'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-author"]/*)'/>
-+ </section>
-+</section>
-diff -up Linux-PAM-1.3.1/modules/Makefile.am.redhat-modules Linux-PAM-1.3.1/modules/Makefile.am
---- Linux-PAM-1.3.1/modules/Makefile.am.redhat-modules 2017-02-10 11:10:15.000000000 +0100
-+++ Linux-PAM-1.3.1/modules/Makefile.am 2018-11-26 12:58:14.623545121 +0100
-@@ -3,13 +3,14 @@
- #
-
- SUBDIRS = pam_access pam_cracklib pam_debug pam_deny pam_echo \
-+ pam_chroot pam_console pam_postgresok pam_faillock \
- pam_env pam_exec pam_faildelay pam_filter pam_ftp \
- pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
- pam_listfile pam_localuser pam_loginuid pam_mail \
- pam_mkhomedir pam_motd pam_namespace pam_nologin \
- pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \
- pam_selinux pam_sepermit pam_shells pam_stress \
-- pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
-+ pam_succeed_if pam_time pam_timestamp \
- pam_tty_audit pam_umask \
- pam_unix pam_userdb pam_warn pam_wheel pam_xauth
-
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-bcrypt_b.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-bcrypt_b.patch
deleted file mode 100644
index bff9d47ea..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-bcrypt_b.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f7abb8c1ef3aa31e6c2564a8aaf69683a77c2016 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
-Date: Thu, 15 Nov 2018 15:01:57 +0100
-Subject: [PATCH] pam_unix: Use bcrypt b-variant for computing new hashes.
-
-Bcrypt hashes used the "$2a$" prefix since 1997.
-However, in 2011 an implementation bug was discovered in bcrypt
-affecting the handling of characters in passphrases with the 8th
-bit set.
-
-Besides fixing the bug, OpenBSD 5.5 introduced the "$2b$" prefix
-for a behavior that exactly matches crypt_blowfish's "$2y$", and
-the crypt_blowfish implementation supports it as well since v1.1.
-
-That said new computed bcrypt hashes should use the "$2b$" prefix.
-
-* modules/pam_unix/passverify.c: Use bcrypt b-variant.
----
- modules/pam_unix/passverify.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
-index 9c1771e2..1f433b3a 100644
---- a/modules/pam_unix/passverify.c
-+++ b/modules/pam_unix/passverify.c
-@@ -385,7 +385,7 @@ PAMH_ARG_DECL(char * create_password_hash,
- /* algoid = "$1" */
- return crypt_md5_wrapper(password);
- } else if (on(UNIX_BLOWFISH_PASS, ctrl)) {
-- algoid = "$2a$";
-+ algoid = "$2b$";
- } else if (on(UNIX_SHA256_PASS, ctrl)) {
- algoid = "$5$";
- } else if (on(UNIX_SHA512_PASS, ctrl)) {
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch
deleted file mode 100644
index 5cbc35b03..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 86eed7ca01864b9fd17099e57f10f2b9b6b568a1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
-Date: Mon, 26 Nov 2018 22:33:17 +0100
-Subject: [PATCH] pam_unix: Report unusable hashes found by checksalt to
- syslog.
-
-libxcrypt can be build-time configured to support (or not support)
-various hashing methods. Future versions will also have support for
-runtime configuration by the system's vendor and/or administrator.
-
-For that reason adminstrator should be notified by pam if users cannot
-log into their account anymore because of such a change in the system's
-configuration of libxcrypt.
-
-Also check for malformed hashes, like descrypt hashes starting with
-"$2...", which might have been generated by unsafe base64 encoding
-functions as used in glibc <= 2.16.
-Such hashes are likely to be rejected by many recent implementations
-of libcrypt.
-
-* modules/pam_unix/passverify.c (verify_pwd_hash): Report unusable
-hashes found by checksalt to syslog.
----
- modules/pam_unix/passverify.c | 36 +++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
-
-diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
-index eb2444bb..2c808eb5 100644
---- a/modules/pam_unix/passverify.c
-+++ b/modules/pam_unix/passverify.c
-@@ -103,6 +103,42 @@ verify_pwd_hash(const char *p, char *hash, unsigned int nullok)
- * Ok, we don't know the crypt algorithm, but maybe
- * libcrypt knows about it? We should try it.
- */
-+#if defined(CRYPT_CHECKSALT_AVAILABLE) && CRYPT_CHECKSALT_AVAILABLE
-+ /* Get the status of the hash from checksalt */
-+ int retval_checksalt = crypt_checksalt(hash);
-+
-+ /*
-+ * Check for hashing methods that are disabled by
-+ * libcrypt configuration and/or system preset.
-+ */
-+ if (retval_checksalt == CRYPT_SALT_METHOD_DISABLED) {
-+ /*
-+ * pam_syslog() needs a pam handle,
-+ * but that's not available here.
-+ */
-+ helper_log_err(LOG_ERR,
-+ "pam_unix(verify_pwd_hash): The method "
-+ "for computing the hash \"%.6s\" has been "
-+ "disabled in libcrypt by the preset from "
-+ "the system's vendor and/or administrator.",
-+ hash);
-+ }
-+ /*
-+ * Check for malformed hashes, like descrypt hashes
-+ * starting with "$2...", which might have been
-+ * generated by unsafe base64 encoding functions
-+ * as used in glibc <= 2.16.
-+ * Such hashes are likely to be rejected by many
-+ * recent implementations of libcrypt.
-+ */
-+ if (retval_checksalt == CRYPT_SALT_INVALID) {
-+ helper_log_err(LOG_ERR,
-+ "pam_unix(verify_pwd_hash): The hash \"%.6s\""
-+ "does not use a method known by the version "
-+ "of libcrypt this system is supplied with.",
-+ hash);
-+ }
-+#endif
- #ifdef HAVE_CRYPT_R
- struct crypt_data *cdata;
- cdata = malloc(sizeof(*cdata));
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-crypt_checksalt.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-crypt_checksalt.patch
deleted file mode 100644
index 0a74e940e..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-crypt_checksalt.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 62425bf2a0c72d0e23139d0b285547a7add26251 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
-Date: Thu, 15 Nov 2018 19:49:44 +0100
-Subject: [PATCH] pam_unix: Add support for crypt_checksalt, if libcrypt
- supports it.
-
-libxcrypt v4.3 has added the crypt_checksalt function to whether
-the prefix at the begining of a given hash string refers to a
-supported hashing method.
-
-Future revisions of this function will add support to check whether
-the hashing method, the prefix refers to, was disabled or considered
-deprecated by the system's factory presets or system administrator.
-Furthermore it will be able to detect whether the parameters, which
-are used by the corresponding hashing method, being encoded in the
-hash string are not considered to be strong enough anymore.
-
-*modules/pam_unix/passverify.c: Add support for crypt_checksalt.
----
- modules/pam_unix/passverify.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
-index 1f433b3a..6132130a 100644
---- a/modules/pam_unix/passverify.c
-+++ b/modules/pam_unix/passverify.c
-@@ -244,7 +244,13 @@ PAMH_ARG_DECL(int check_shadow_expiry,
- D(("account expired"));
- return PAM_ACCT_EXPIRED;
- }
-+#if defined(CRYPT_CHECKSALT_AVAILABLE) && CRYPT_CHECKSALT_AVAILABLE
-+ if (spent->sp_lstchg == 0 ||
-+ crypt_checksalt(spent->sp_pwdp) == CRYPT_SALT_METHOD_LEGACY ||
-+ crypt_checksalt(spent->sp_pwdp) == CRYPT_SALT_TOO_CHEAP) {
-+#else
- if (spent->sp_lstchg == 0) {
-+#endif
- D(("need a new password"));
- *daysleft = 0;
- return PAM_NEW_AUTHTOK_REQD;
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-fix_checksalt_syslog.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-fix_checksalt_syslog.patch
deleted file mode 100644
index 41733ae04..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-fix_checksalt_syslog.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From d8d11db2cef65da5d2afa7acf21aa9c8cd88abed Mon Sep 17 00:00:00 2001
-From: Tomas Mraz <tmraz@fedoraproject.org>
-Date: Tue, 27 Nov 2018 16:11:03 +0100
-Subject: [PATCH] pam_unix: Use pam_syslog instead of helper_log_err.
-
-* modules/pam_unix/passverify.c (verify_pwd_hash): Add pamh argument via
- PAMH_ARG_DECL. Call pam_syslog() instead of helper_log_err().
-* modules/pam_unix/passverify.h: Adjust the declaration of verify_pwd_hash().
-* modules/pam_unix/support.c (_unix_verify_password): Add the pamh argument
- to verify_pwd_hash() call.
----
- modules/pam_unix/passverify.c | 24 +++++++++++++-----------
- modules/pam_unix/passverify.h | 6 +++---
- modules/pam_unix/support.c | 2 +-
- 3 files changed, 17 insertions(+), 15 deletions(-)
-
-diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
-index 2c808eb5..80e32767 100644
---- a/modules/pam_unix/passverify.c
-+++ b/modules/pam_unix/passverify.c
-@@ -65,8 +65,8 @@ strip_hpux_aging(char *hash)
- }
- }
-
--int
--verify_pwd_hash(const char *p, char *hash, unsigned int nullok)
-+PAMH_ARG_DECL(int verify_pwd_hash,
-+ const char *p, char *hash, unsigned int nullok)
- {
- size_t hash_len;
- char *pp = NULL;
-@@ -116,11 +116,10 @@ verify_pwd_hash(const char *p, char *hash, unsigned int nullok)
- * pam_syslog() needs a pam handle,
- * but that's not available here.
- */
-- helper_log_err(LOG_ERR,
-- "pam_unix(verify_pwd_hash): The method "
-- "for computing the hash \"%.6s\" has been "
-- "disabled in libcrypt by the preset from "
-- "the system's vendor and/or administrator.",
-+ pam_syslog(pamh, LOG_ERR,
-+ "The support for password hash \"%.6s\" "
-+ "has been disabled in libcrypt "
-+ "configuration.",
- hash);
- }
- /*
-@@ -132,12 +131,15 @@ verify_pwd_hash(const char *p, char *hash, unsigned int nullok)
- * recent implementations of libcrypt.
- */
- if (retval_checksalt == CRYPT_SALT_INVALID) {
-- helper_log_err(LOG_ERR,
-- "pam_unix(verify_pwd_hash): The hash \"%.6s\""
-- "does not use a method known by the version "
-- "of libcrypt this system is supplied with.",
-+ pam_syslog(pamh, LOG_ERR,
-+ "The password hash \"%.6s\" is unknown to "
-+ "libcrypt.",
- hash);
- }
-+#else
-+#ifndef HELPER_COMPILE
-+ (void)pamh;
-+#endif
- #endif
- #ifdef HAVE_CRYPT_R
- struct crypt_data *cdata;
-diff --git a/modules/pam_unix/passverify.h b/modules/pam_unix/passverify.h
-index 086c28ac..e9a88fbf 100644
---- a/modules/pam_unix/passverify.h
-+++ b/modules/pam_unix/passverify.h
-@@ -12,9 +12,6 @@
-
- #define OLD_PASSWORDS_FILE "/etc/security/opasswd"
-
--int
--verify_pwd_hash(const char *p, char *hash, unsigned int nullok);
--
- int
- is_pwd_shadowed(const struct passwd *pwd);
-
-@@ -65,6 +62,9 @@ read_passwords(int fd, int npass, char **passwords);
- #define PAMH_ARG(...) pamh, __VA_ARGS__
- #endif
-
-+PAMH_ARG_DECL(int verify_pwd_hash,
-+ const char *p, char *hash, unsigned int nullok);
-+
- PAMH_ARG_DECL(char * create_password_hash,
- const char *password, unsigned long long ctrl, int rounds);
-
-diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
-index 6894288d..ea5594d2 100644
---- a/modules/pam_unix/support.c
-+++ b/modules/pam_unix/support.c
-@@ -770,7 +770,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
- }
- }
- } else {
-- retval = verify_pwd_hash(p, salt, off(UNIX__NONULL, ctrl));
-+ retval = verify_pwd_hash(pamh, p, salt, off(UNIX__NONULL, ctrl));
- }
-
- if (retval == PAM_SUCCESS) {
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-gensalt-autoentropy.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-gensalt-autoentropy.patch
deleted file mode 100644
index 8ae4abfd8..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-gensalt-autoentropy.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 05aa693b7db6b818d31e41f0cab1d5fb4f49600e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
-Date: Thu, 15 Nov 2018 15:58:56 +0100
-Subject: [PATCH] pam_unix: Prefer a gensalt function, that supports auto
- entropy.
-
-* modules/pam_unix/pam_unix_passwd.c: Initialize rounds parameter to 0.
-* modules/pam_unix/passverify.c: Prefer gensalt with auto entropy.
-* modules/pam_unix/support.c: Fix sanitizing of rounds parameter.
----
- modules/pam_unix/pam_unix_passwd.c | 2 +-
- modules/pam_unix/passverify.c | 13 +++++++++++++
- modules/pam_unix/support.c | 7 +++++--
- 3 files changed, 19 insertions(+), 3 deletions(-)
-
-Index: Linux-PAM-1.3.1/modules/pam_unix/pam_unix_passwd.c
-===================================================================
---- Linux-PAM-1.3.1.orig/modules/pam_unix/pam_unix_passwd.c
-+++ Linux-PAM-1.3.1/modules/pam_unix/pam_unix_passwd.c
-@@ -607,7 +607,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int
- unsigned int ctrl, lctrl;
- int retval;
- int remember = -1;
-- int rounds = -1;
-+ int rounds = 0;
- int pass_min_len = 0;
-
- /* <DO NOT free() THESE> */
-Index: Linux-PAM-1.3.1/modules/pam_unix/passverify.c
-===================================================================
---- Linux-PAM-1.3.1.orig/modules/pam_unix/passverify.c
-+++ Linux-PAM-1.3.1/modules/pam_unix/passverify.c
-@@ -375,7 +375,12 @@ PAMH_ARG_DECL(char * create_password_has
- const char *password, unsigned int ctrl, int rounds)
- {
- const char *algoid;
-+#if defined(CRYPT_GENSALT_OUTPUT_SIZE) && CRYPT_GENSALT_OUTPUT_SIZE > 64
-+ /* Strings returned by crypt_gensalt_rn will be no longer than this. */
-+ char salt[CRYPT_GENSALT_OUTPUT_SIZE];
-+#else
- char salt[64]; /* contains rounds number + max 16 bytes of salt + algo id */
-+#endif
- char *sp;
- #ifdef HAVE_CRYPT_R
- struct crypt_data *cdata = NULL;
-@@ -406,6 +411,13 @@ PAMH_ARG_DECL(char * create_password_has
- return crypted;
- }
-
-+#if defined(CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY) && CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY
-+ /*
-+ * Any version of libcrypt supporting auto entropy is
-+ * guaranteed to have crypt_gensalt_rn().
-+ */
-+ sp = crypt_gensalt_rn(algoid, rounds, NULL, 0, salt, sizeof(salt));
-+#else
- #ifdef HAVE_CRYPT_GENSALT_R
- if (on(UNIX_BLOWFISH_PASS, ctrl)) {
- char entropy[17];
-@@ -423,6 +435,7 @@ PAMH_ARG_DECL(char * create_password_has
- #ifdef HAVE_CRYPT_GENSALT_R
- }
- #endif
-+#endif /* CRYPT_GENSALT_IMPLEMENTS_AUTO_ENTROPY */
- #ifdef HAVE_CRYPT_R
- sp = NULL;
- cdata = malloc(sizeof(*cdata));
-Index: Linux-PAM-1.3.1/modules/pam_unix/support.c
-===================================================================
---- Linux-PAM-1.3.1.orig/modules/pam_unix/support.c
-+++ Linux-PAM-1.3.1/modules/pam_unix/support.c
-@@ -175,6 +175,7 @@ int _set_ctrl(pam_handle_t *pamh, int fl
-
- if (val) {
- *rounds = strtol(val, NULL, 10);
-+ set(UNIX_ALGO_ROUNDS, ctrl);
- free (val);
- }
- }
-@@ -254,11 +255,13 @@ int _set_ctrl(pam_handle_t *pamh, int fl
- if (*rounds < 4 || *rounds > 31)
- *rounds = 5;
- } else if (on(UNIX_SHA256_PASS, ctrl) || on(UNIX_SHA512_PASS, ctrl)) {
-- if ((*rounds < 1000) || (*rounds == INT_MAX))
-+ if ((*rounds < 1000) || (*rounds == INT_MAX)) {
- /* don't care about bogus values */
-+ *rounds = 0;
- unset(UNIX_ALGO_ROUNDS, ctrl);
-- if (*rounds >= 10000000)
-+ } else if (*rounds >= 10000000) {
- *rounds = 9999999;
-+ }
- }
- }
-
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-no-fallback.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-no-fallback.patch
deleted file mode 100644
index 8755cf602..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-no-fallback.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Index: Linux-PAM-1.3.1/modules/pam_unix/pam_unix.8.xml
-===================================================================
---- Linux-PAM-1.3.1.orig/modules/pam_unix/pam_unix.8.xml
-+++ Linux-PAM-1.3.1/modules/pam_unix/pam_unix.8.xml
-@@ -293,11 +293,10 @@
- <listitem>
- <para>
- When a user changes their password next,
-- encrypt it with the SHA256 algorithm. If the
-- SHA256 algorithm is not known to the <citerefentry>
-+ encrypt it with the SHA256 algorithm. The
-+ SHA256 algorithm must be supported by the <citerefentry>
- <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
-- </citerefentry> function,
-- fall back to MD5.
-+ </citerefentry> function.
- </para>
- </listitem>
- </varlistentry>
-@@ -308,11 +307,10 @@
- <listitem>
- <para>
- When a user changes their password next,
-- encrypt it with the SHA512 algorithm. If the
-- SHA512 algorithm is not known to the <citerefentry>
-+ encrypt it with the SHA512 algorithm. The
-+ SHA512 algorithm must be supported by the <citerefentry>
- <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
-- </citerefentry> function,
-- fall back to MD5.
-+ </citerefentry> function.
- </para>
- </listitem>
- </varlistentry>
-@@ -323,11 +321,10 @@
- <listitem>
- <para>
- When a user changes their password next,
-- encrypt it with the blowfish algorithm. If the
-- blowfish algorithm is not known to the <citerefentry>
-+ encrypt it with the blowfish algorithm. The
-+ blowfish algorithm must be supported by the <citerefentry>
- <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
-- </citerefentry> function,
-- fall back to MD5.
-+ </citerefentry> function.
- </para>
- </listitem>
- </varlistentry>
-@@ -338,11 +335,10 @@
- <listitem>
- <para>
- When a user changes their password next,
-- encrypt it with the gost-yescrypt algorithm. If the
-- gost-yescrypt algorithm is not known to the <citerefentry>
-+ encrypt it with the gost-yescrypt algorithm. The
-+ gost-yescrypt algorithm must be supported by the <citerefentry>
- <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
-- </citerefentry> function,
-- fall back to MD5.
-+ </citerefentry> function.
- </para>
- </listitem>
- </varlistentry>
-@@ -353,11 +349,10 @@
- <listitem>
- <para>
- When a user changes their password next,
-- encrypt it with the yescrypt algorithm. If the
-- yescrypt algorithm is not known to the <citerefentry>
-+ encrypt it with the yescrypt algorithm. The
-+ yescrypt algorithm must be supported by the <citerefentry>
- <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
-- </citerefentry> function,
-- fall back to MD5.
-+ </citerefentry> function.
- </para>
- </listitem>
- </varlistentry>
-Index: Linux-PAM-1.3.1/modules/pam_unix/passverify.c
-===================================================================
---- Linux-PAM-1.3.1.orig/modules/pam_unix/passverify.c
-+++ Linux-PAM-1.3.1/modules/pam_unix/passverify.c
-@@ -466,10 +466,9 @@ PAMH_ARG_DECL(char * create_password_has
- sp = crypt(password, salt);
- #endif
- if (!sp || strncmp(algoid, sp, strlen(algoid)) != 0) {
-- /* libxcrypt/libc doesn't know the algorithm, use MD5 */
-+ /* libxcrypt/libc doesn't know the algorithm, error out */
- pam_syslog(pamh, LOG_ERR,
-- "Algo %s not supported by the crypto backend, "
-- "falling back to MD5\n",
-+ "Algo %s not supported by the crypto backend.\n",
- on(UNIX_YESCRYPT_PASS, ctrl) ? "yescrypt" :
- on(UNIX_GOST_YESCRYPT_PASS, ctrl) ? "gost_yescrypt" :
- on(UNIX_BLOWFISH_PASS, ctrl) ? "blowfish" :
-@@ -481,7 +480,7 @@ PAMH_ARG_DECL(char * create_password_has
- #ifdef HAVE_CRYPT_R
- free(cdata);
- #endif
-- return crypt_md5_wrapper(password);
-+ return NULL;
- }
- sp = x_strdup(sp);
- #ifdef HAVE_CRYPT_R
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-remove-obsolete-_unix_read_password-prototype.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-remove-obsolete-_unix_read_password-prototype.patch
deleted file mode 100644
index 14f285deb..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-remove-obsolete-_unix_read_password-prototype.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From a2b72aeb86f297d349bc9e6a8f059fedf97a499a Mon Sep 17 00:00:00 2001
-From: "Dmitry V. Levin" <ldv@altlinux.org>
-Date: Thu, 31 May 2018 00:20:18 +0000
-Subject: [PATCH] pam_unix: remove obsolete _unix_read_password prototype
-
-The function was removed by commit Linux-PAM-1.3.0~5
-so the function prototype should go as well.
-
-* modules/pam_unix/support.h (_unix_read_password): Remove.
-
-Complements: 7e09188c5dc4 ("pam_unix: Use pam_get_authtok() instead of
-direct pam_prompt() calls.")
----
- modules/pam_unix/support.h | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h
-index b4c279c3..543e9b9f 100644
---- a/modules/pam_unix/support.h
-+++ b/modules/pam_unix/support.h
-@@ -164,13 +164,6 @@ extern int _unix_blankpasswd(pam_handle_t *pamh,unsigned int ctrl,
- const char *name);
- extern int _unix_verify_password(pam_handle_t * pamh, const char *name
- ,const char *p, unsigned int ctrl);
--extern int _unix_read_password(pam_handle_t * pamh
-- ,unsigned int ctrl
-- ,const char *comment
-- ,const char *prompt1
-- ,const char *prompt2
-- ,const char *data_name
-- ,const void **pass);
-
- extern int _unix_run_verify_binary(pam_handle_t *pamh,
- unsigned int ctrl, const char *user, int *daysleft);
diff --git a/source/a/pam/fedora-patches/pam-1.3.1-unix-yescrypt.patch b/source/a/pam/fedora-patches/pam-1.3.1-unix-yescrypt.patch
deleted file mode 100644
index f04a59ce7..000000000
--- a/source/a/pam/fedora-patches/pam-1.3.1-unix-yescrypt.patch
+++ /dev/null
@@ -1,479 +0,0 @@
-From 16bd523f85ede9fa9115f80e826f2d803d7e61d4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
-Date: Thu, 15 Nov 2018 16:38:05 +0100
-Subject: [PATCH] pam_unix: Add support for (gost-)yescrypt hashing methods.
-
-libxcrypt (v4.2 and later) has added support for the yescrypt
-hashing method; gost-yescrypt has been added in v4.3.
-
-* modules/pam_unix/pam_unix.8.xml: Documentation for (gost-)yescrypt.
-* modules/pam_unix/pam_unix_acct.c: Use 64 bit type for control flags.
-* modules/pam_unix/pam_unix_auth.c: Likewise.
-* modules/pam_unix/pam_unix_passwd.c: Likewise.
-* modules/pam_unix/pam_unix_sess.c: Likewise.
-* modules/pam_unix/passverify.c: Add support for (gost-)yescrypt.
-* modules/pam_unix/passverify.h: Use 64 bit type for control flags.
-* modules/pam_unix/support.c: Set sane rounds for (gost-)yescrypt.
-* modules/pam_unix/support.h: Add support for (gost-)yescrypt.
----
- modules/pam_unix/pam_unix.8.xml | 35 +++++++++-
- modules/pam_unix/pam_unix_acct.c | 4 +-
- modules/pam_unix/pam_unix_auth.c | 4 +-
- modules/pam_unix/pam_unix_passwd.c | 12 ++--
- modules/pam_unix/pam_unix_sess.c | 4 +-
- modules/pam_unix/passverify.c | 8 ++-
- modules/pam_unix/passverify.h | 2 +-
- modules/pam_unix/support.c | 33 ++++++----
- modules/pam_unix/support.h | 101 +++++++++++++++--------------
- 9 files changed, 128 insertions(+), 75 deletions(-)
-
-diff --git a/modules/pam_unix/pam_unix.8.xml b/modules/pam_unix/pam_unix.8.xml
-index 1b318f11..cae2aeaa 100644
---- a/modules/pam_unix/pam_unix.8.xml
-+++ b/modules/pam_unix/pam_unix.8.xml
-@@ -331,14 +331,45 @@
- </para>
- </listitem>
- </varlistentry>
-+ <varlistentry>
-+ <term>
-+ <option>gost_yescrypt</option>
-+ </term>
-+ <listitem>
-+ <para>
-+ When a user changes their password next,
-+ encrypt it with the gost-yescrypt algorithm. If the
-+ gost-yescrypt algorithm is not known to the <citerefentry>
-+ <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
-+ </citerefentry> function,
-+ fall back to MD5.
-+ </para>
-+ </listitem>
-+ </varlistentry>
-+ <varlistentry>
-+ <term>
-+ <option>yescrypt</option>
-+ </term>
-+ <listitem>
-+ <para>
-+ When a user changes their password next,
-+ encrypt it with the yescrypt algorithm. If the
-+ yescrypt algorithm is not known to the <citerefentry>
-+ <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
-+ </citerefentry> function,
-+ fall back to MD5.
-+ </para>
-+ </listitem>
-+ </varlistentry>
- <varlistentry>
- <term>
- <option>rounds=<replaceable>n</replaceable></option>
- </term>
- <listitem>
- <para>
-- Set the optional number of rounds of the SHA256, SHA512
-- and blowfish password hashing algorithms to
-+ Set the optional number of rounds of the SHA256, SHA512,
-+ blowfish, gost-yescrypt, and yescrypt password hashing
-+ algorithms to
- <replaceable>n</replaceable>.
- </para>
- </listitem>
-diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
-index fbc84e2f..d8d084ac 100644
---- a/modules/pam_unix/pam_unix_acct.c
-+++ b/modules/pam_unix/pam_unix_acct.c
-@@ -62,7 +62,7 @@
- #include "support.h"
- #include "passverify.h"
-
--int _unix_run_verify_binary(pam_handle_t *pamh, unsigned int ctrl,
-+int _unix_run_verify_binary(pam_handle_t *pamh, unsigned long long ctrl,
- const char *user, int *daysleft)
- {
- int retval=0, child, fds[2];
-@@ -185,7 +185,7 @@ int _unix_run_verify_binary(pam_handle_t *pamh, unsigned int ctrl,
- int
- pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
- {
-- unsigned int ctrl;
-+ unsigned long long ctrl;
- const void *void_uname;
- const char *uname;
- int retval, daysleft;
-diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c
-index 9d9f709d..905fc66c 100644
---- a/modules/pam_unix/pam_unix_auth.c
-+++ b/modules/pam_unix/pam_unix_auth.c
-@@ -96,7 +96,7 @@ setcred_free (pam_handle_t *pamh UNUSED, void *ptr, int err UNUSED)
- int
- pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv)
- {
-- unsigned int ctrl;
-+ unsigned long long ctrl;
- int retval, *ret_data = NULL;
- const char *name;
- const char *p;
-@@ -194,7 +194,7 @@ pam_sm_setcred (pam_handle_t *pamh, int flags,
- {
- int retval;
- const void *pretval = NULL;
-- unsigned int ctrl;
-+ unsigned long long ctrl;
-
- D(("called."));
-
-diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
-index f2c42513..df4c1233 100644
---- a/modules/pam_unix/pam_unix_passwd.c
-+++ b/modules/pam_unix/pam_unix_passwd.c
-@@ -138,7 +138,7 @@ __taddr2port (const struct netconfig *nconf, const struct netbuf *nbuf)
- }
- #endif
-
--static char *getNISserver(pam_handle_t *pamh, unsigned int ctrl)
-+static char *getNISserver(pam_handle_t *pamh, unsigned long long ctrl)
- {
- char *master;
- char *domainname;
-@@ -233,7 +233,7 @@ static char *getNISserver(pam_handle_t *pamh, unsigned int ctrl)
-
- #ifdef WITH_SELINUX
-
--static int _unix_run_update_binary(pam_handle_t *pamh, unsigned int ctrl, const char *user,
-+static int _unix_run_update_binary(pam_handle_t *pamh, unsigned long long ctrl, const char *user,
- const char *fromwhat, const char *towhat, int remember)
- {
- int retval, child, fds[2];
-@@ -388,7 +388,7 @@ static int check_old_password(const char *forwho, const char *newpass)
-
- static int _do_setpass(pam_handle_t* pamh, const char *forwho,
- const char *fromwhat,
-- char *towhat, unsigned int ctrl, int remember)
-+ char *towhat, unsigned long long ctrl, int remember)
- {
- struct passwd *pwd = NULL;
- int retval = 0;
-@@ -512,7 +512,7 @@ static int _do_setpass(pam_handle_t* pamh, const char *forwho,
- return retval;
- }
-
--static int _unix_verify_shadow(pam_handle_t *pamh, const char *user, unsigned int ctrl)
-+static int _unix_verify_shadow(pam_handle_t *pamh, const char *user, unsigned long long ctrl)
- {
- struct passwd *pwent = NULL; /* Password and shadow password */
- struct spwd *spent = NULL; /* file entries for the user */
-@@ -542,7 +542,7 @@ static int _unix_verify_shadow(pam_handle_t *pamh, const char *user, unsigned in
- }
-
- static int _pam_unix_approve_pass(pam_handle_t * pamh
-- ,unsigned int ctrl
-+ ,unsigned long long ctrl
- ,const char *pass_old
- ,const char *pass_new,
- int pass_min_len)
-@@ -600,7 +600,7 @@ static int _pam_unix_approve_pass(pam_handle_t * pamh
- int
- pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv)
- {
-- unsigned int ctrl, lctrl;
-+ unsigned long long ctrl, lctrl;
- int retval;
- int remember = -1;
- int rounds = 0;
-diff --git a/modules/pam_unix/pam_unix_sess.c b/modules/pam_unix/pam_unix_sess.c
-index 03e7dcd9..4b8af530 100644
---- a/modules/pam_unix/pam_unix_sess.c
-+++ b/modules/pam_unix/pam_unix_sess.c
-@@ -67,7 +67,7 @@ int
- pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
- {
- char *user_name, *service;
-- unsigned int ctrl;
-+ unsigned long long ctrl;
- int retval;
- const char *login_name;
-
-@@ -103,7 +103,7 @@ int
- pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
- {
- char *user_name, *service;
-- unsigned int ctrl;
-+ unsigned long long ctrl;
- int retval;
-
- D(("called."));
-diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
-index 95dfe528..39e2bfac 100644
---- a/modules/pam_unix/passverify.c
-+++ b/modules/pam_unix/passverify.c
-@@ -387,7 +387,7 @@ crypt_md5_wrapper(const char *pass_new)
- }
-
- PAMH_ARG_DECL(char * create_password_hash,
-- const char *password, unsigned int ctrl, int rounds)
-+ const char *password, unsigned long long ctrl, int rounds)
- {
- const char *algoid;
- #if defined(CRYPT_GENSALT_OUTPUT_SIZE) && CRYPT_GENSALT_OUTPUT_SIZE > 64
-@@ -404,6 +404,10 @@ PAMH_ARG_DECL(char * create_password_hash,
- if (on(UNIX_MD5_PASS, ctrl)) {
- /* algoid = "$1" */
- return crypt_md5_wrapper(password);
-+ } else if (on(UNIX_YESCRYPT_PASS, ctrl)) {
-+ algoid = "$y$";
-+ } else if (on(UNIX_GOST_YESCRYPT_PASS, ctrl)) {
-+ algoid = "$gy$";
- } else if (on(UNIX_BLOWFISH_PASS, ctrl)) {
- algoid = "$2b$";
- } else if (on(UNIX_SHA256_PASS, ctrl)) {
-@@ -466,6 +470,8 @@ PAMH_ARG_DECL(char * create_password_hash,
- pam_syslog(pamh, LOG_ERR,
- "Algo %s not supported by the crypto backend, "
- "falling back to MD5\n",
-+ on(UNIX_YESCRYPT_PASS, ctrl) ? "yescrypt" :
-+ on(UNIX_GOST_YESCRYPT_PASS, ctrl) ? "gost_yescrypt" :
- on(UNIX_BLOWFISH_PASS, ctrl) ? "blowfish" :
- on(UNIX_SHA256_PASS, ctrl) ? "sha256" :
- on(UNIX_SHA512_PASS, ctrl) ? "sha512" : algoid);
-diff --git a/modules/pam_unix/passverify.h b/modules/pam_unix/passverify.h
-index caf7ae8a..086c28ac 100644
---- a/modules/pam_unix/passverify.h
-+++ b/modules/pam_unix/passverify.h
-@@ -66,7 +66,7 @@ read_passwords(int fd, int npass, char **passwords);
- #endif
-
- PAMH_ARG_DECL(char * create_password_hash,
-- const char *password, unsigned int ctrl, int rounds);
-+ const char *password, unsigned long long ctrl, int rounds);
-
- PAMH_ARG_DECL(int get_account_info,
- const char *name, struct passwd **pwd, struct spwd **spwdent);
-diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
-index 8cbc4217..6894288d 100644
---- a/modules/pam_unix/support.c
-+++ b/modules/pam_unix/support.c
-@@ -107,7 +107,7 @@ search_key (const char *key, const char *filename)
-
- /* this is a front-end for module-application conversations */
-
--int _make_remark(pam_handle_t * pamh, unsigned int ctrl,
-+int _make_remark(pam_handle_t * pamh, unsigned long long ctrl,
- int type, const char *text)
- {
- int retval = PAM_SUCCESS;
-@@ -122,10 +122,11 @@ int _make_remark(pam_handle_t * pamh, unsigned int ctrl,
- * set the control flags for the UNIX module.
- */
-
--int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds,
-- int *pass_min_len, int argc, const char **argv)
-+unsigned long long _set_ctrl(pam_handle_t *pamh, int flags, int *remember,
-+ int *rounds, int *pass_min_len, int argc,
-+ const char **argv)
- {
-- unsigned int ctrl;
-+ unsigned long long ctrl;
- char *val;
- int j;
-
-@@ -243,15 +244,23 @@ int _set_ctrl(pam_handle_t *pamh, int flags, int *remember, int *rounds,
- set(UNIX__NONULL, ctrl);
- }
-
-- /* Set default rounds for blowfish */
-- if (on(UNIX_BLOWFISH_PASS, ctrl) && off(UNIX_ALGO_ROUNDS, ctrl) && rounds != NULL) {
-- *rounds = 5;
-- set(UNIX_ALGO_ROUNDS, ctrl);
-+ /* Set default rounds for blowfish, gost-yescrypt and yescrypt */
-+ if (off(UNIX_ALGO_ROUNDS, ctrl) && rounds != NULL) {
-+ if (on(UNIX_BLOWFISH_PASS, ctrl) ||
-+ on(UNIX_GOST_YESCRYPT_PASS, ctrl) ||
-+ on(UNIX_YESCRYPT_PASS, ctrl)) {
-+ *rounds = 5;
-+ set(UNIX_ALGO_ROUNDS, ctrl);
-+ }
- }
-
- /* Enforce sane "rounds" values */
- if (on(UNIX_ALGO_ROUNDS, ctrl)) {
-- if (on(UNIX_BLOWFISH_PASS, ctrl)) {
-+ if (on(UNIX_GOST_YESCRYPT_PASS, ctrl) ||
-+ on(UNIX_YESCRYPT_PASS, ctrl)) {
-+ if (*rounds < 3 || *rounds > 11)
-+ *rounds = 5;
-+ } else if (on(UNIX_BLOWFISH_PASS, ctrl)) {
- if (*rounds < 4 || *rounds > 31)
- *rounds = 5;
- } else if (on(UNIX_SHA256_PASS, ctrl) || on(UNIX_SHA512_PASS, ctrl)) {
-@@ -532,7 +541,7 @@ int _unix_comesfromsource(pam_handle_t *pamh,
- #include <sys/wait.h>
-
- static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
-- unsigned int ctrl, const char *user)
-+ unsigned long long ctrl, const char *user)
- {
- int retval, child, fds[2];
- struct sigaction newsa, oldsa;
-@@ -658,7 +667,7 @@ static int _unix_run_helper_binary(pam_handle_t *pamh, const char *passwd,
- */
-
- int
--_unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name)
-+_unix_blankpasswd (pam_handle_t *pamh, unsigned long long ctrl, const char *name)
- {
- struct passwd *pwd = NULL;
- char *salt = NULL;
-@@ -706,7 +715,7 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name)
- }
-
- int _unix_verify_password(pam_handle_t * pamh, const char *name
-- ,const char *p, unsigned int ctrl)
-+ ,const char *p, unsigned long long ctrl)
- {
- struct passwd *pwd = NULL;
- char *salt = NULL;
-diff --git a/modules/pam_unix/support.h b/modules/pam_unix/support.h
-index 543e9b9f..e02c05e0 100644
---- a/modules/pam_unix/support.h
-+++ b/modules/pam_unix/support.h
-@@ -22,8 +22,8 @@
-
- typedef struct {
- const char *token;
-- unsigned int mask; /* shall assume 32 bits of flags */
-- unsigned int flag;
-+ unsigned long long mask; /* shall assume 64 bits of flags */
-+ unsigned long long flag;
- unsigned int is_hash_algo;
- } UNIX_Ctrls;
-
-@@ -48,7 +48,7 @@ typedef struct {
-
- /* the generic mask */
-
--#define _ALL_ON_ (~0U)
-+#define _ALL_ON_ (~0ULL)
-
- /* end of macro definitions definitions for the control flags */
-
-@@ -98,47 +98,51 @@ typedef struct {
- #define UNIX_QUIET 28 /* Don't print informational messages */
- #define UNIX_NO_PASS_EXPIRY 29 /* Don't check for password expiration if not used for authentication */
- #define UNIX_DES 30 /* DES, default */
-+#define UNIX_GOST_YESCRYPT_PASS 31 /* new password hashes will use gost-yescrypt */
-+#define UNIX_YESCRYPT_PASS 32 /* new password hashes will use yescrypt */
- /* -------------- */
--#define UNIX_CTRLS_ 31 /* number of ctrl arguments defined */
-+#define UNIX_CTRLS_ 33 /* number of ctrl arguments defined */
-
--#define UNIX_DES_CRYPT(ctrl) (off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl))
-+#define UNIX_DES_CRYPT(ctrl) (off(UNIX_MD5_PASS,ctrl)&&off(UNIX_BIGCRYPT,ctrl)&&off(UNIX_SHA256_PASS,ctrl)&&off(UNIX_SHA512_PASS,ctrl)&&off(UNIX_BLOWFISH_PASS,ctrl)&&off(UNIX_GOST_YESCRYPT_PASS,ctrl)&&off(UNIX_YESCRYPT_PASS,ctrl))
-
- static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
- {
--/* symbol token name ctrl mask ctrl *
-- * ----------------------- ------------------- --------------------- -------- */
--
--/* UNIX__OLD_PASSWD */ {NULL, _ALL_ON_, 01, 0},
--/* UNIX__VERIFY_PASSWD */ {NULL, _ALL_ON_, 02, 0},
--/* UNIX__IAMROOT */ {NULL, _ALL_ON_, 04, 0},
--/* UNIX_AUDIT */ {"audit", _ALL_ON_, 010, 0},
--/* UNIX_USE_FIRST_PASS */ {"use_first_pass", _ALL_ON_^(060), 020, 0},
--/* UNIX_TRY_FIRST_PASS */ {"try_first_pass", _ALL_ON_^(060), 040, 0},
--/* UNIX_AUTHTOK_TYPE */ {"authtok_type=", _ALL_ON_, 0100, 0},
--/* UNIX__PRELIM */ {NULL, _ALL_ON_^(0600), 0200, 0},
--/* UNIX__UPDATE */ {NULL, _ALL_ON_^(0600), 0400, 0},
--/* UNIX__NONULL */ {NULL, _ALL_ON_, 01000, 0},
--/* UNIX__QUIET */ {NULL, _ALL_ON_, 02000, 0},
--/* UNIX_USE_AUTHTOK */ {"use_authtok", _ALL_ON_, 04000, 0},
--/* UNIX_SHADOW */ {"shadow", _ALL_ON_, 010000, 0},
--/* UNIX_MD5_PASS */ {"md5", _ALL_ON_^(0260420000), 020000, 1},
--/* UNIX__NULLOK */ {"nullok", _ALL_ON_^(01000), 0, 0},
--/* UNIX_DEBUG */ {"debug", _ALL_ON_, 040000, 0},
--/* UNIX_NODELAY */ {"nodelay", _ALL_ON_, 0100000, 0},
--/* UNIX_NIS */ {"nis", _ALL_ON_, 0200000, 0},
--/* UNIX_BIGCRYPT */ {"bigcrypt", _ALL_ON_^(0260420000), 0400000, 1},
--/* UNIX_LIKE_AUTH */ {"likeauth", _ALL_ON_, 01000000, 0},
--/* UNIX_REMEMBER_PASSWD */ {"remember=", _ALL_ON_, 02000000, 0},
--/* UNIX_NOREAP */ {"noreap", _ALL_ON_, 04000000, 0},
--/* UNIX_BROKEN_SHADOW */ {"broken_shadow", _ALL_ON_, 010000000, 0},
--/* UNIX_SHA256_PASS */ {"sha256", _ALL_ON_^(0260420000), 020000000, 1},
--/* UNIX_SHA512_PASS */ {"sha512", _ALL_ON_^(0260420000), 040000000, 1},
--/* UNIX_ALGO_ROUNDS */ {"rounds=", _ALL_ON_, 0100000000, 0},
--/* UNIX_BLOWFISH_PASS */ {"blowfish", _ALL_ON_^(0260420000), 0200000000, 1},
--/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000, 0},
--/* UNIX_QUIET */ {"quiet", _ALL_ON_, 01000000000, 0},
--/* UNIX_NO_PASS_EXPIRY */ {"no_pass_expiry", _ALL_ON_, 02000000000, 0},
--/* UNIX_DES */ {"des", _ALL_ON_^(0260420000), 0, 1},
-+/* symbol token name ctrl mask ctrl *
-+ * --------------------------- -------------------- ------------------------- ---------------- */
-+
-+/* UNIX__OLD_PASSWD */ {NULL, _ALL_ON_, 01, 0},
-+/* UNIX__VERIFY_PASSWD */ {NULL, _ALL_ON_, 02, 0},
-+/* UNIX__IAMROOT */ {NULL, _ALL_ON_, 04, 0},
-+/* UNIX_AUDIT */ {"audit", _ALL_ON_, 010, 0},
-+/* UNIX_USE_FIRST_PASS */ {"use_first_pass", _ALL_ON_^(060ULL), 020, 0},
-+/* UNIX_TRY_FIRST_PASS */ {"try_first_pass", _ALL_ON_^(060ULL), 040, 0},
-+/* UNIX_AUTHTOK_TYPE */ {"authtok_type=", _ALL_ON_, 0100, 0},
-+/* UNIX__PRELIM */ {NULL, _ALL_ON_^(0600ULL), 0200, 0},
-+/* UNIX__UPDATE */ {NULL, _ALL_ON_^(0600ULL), 0400, 0},
-+/* UNIX__NONULL */ {NULL, _ALL_ON_, 01000, 0},
-+/* UNIX__QUIET */ {NULL, _ALL_ON_, 02000, 0},
-+/* UNIX_USE_AUTHTOK */ {"use_authtok", _ALL_ON_, 04000, 0},
-+/* UNIX_SHADOW */ {"shadow", _ALL_ON_, 010000, 0},
-+/* UNIX_MD5_PASS */ {"md5", _ALL_ON_^(015660420000ULL), 020000, 1},
-+/* UNIX__NULLOK */ {"nullok", _ALL_ON_^(01000ULL), 0, 0},
-+/* UNIX_DEBUG */ {"debug", _ALL_ON_, 040000, 0},
-+/* UNIX_NODELAY */ {"nodelay", _ALL_ON_, 0100000, 0},
-+/* UNIX_NIS */ {"nis", _ALL_ON_, 0200000, 0},
-+/* UNIX_BIGCRYPT */ {"bigcrypt", _ALL_ON_^(015660420000ULL), 0400000, 1},
-+/* UNIX_LIKE_AUTH */ {"likeauth", _ALL_ON_, 01000000, 0},
-+/* UNIX_REMEMBER_PASSWD */ {"remember=", _ALL_ON_, 02000000, 0},
-+/* UNIX_NOREAP */ {"noreap", _ALL_ON_, 04000000, 0},
-+/* UNIX_BROKEN_SHADOW */ {"broken_shadow", _ALL_ON_, 010000000, 0},
-+/* UNIX_SHA256_PASS */ {"sha256", _ALL_ON_^(015660420000ULL), 020000000, 1},
-+/* UNIX_SHA512_PASS */ {"sha512", _ALL_ON_^(015660420000ULL), 040000000, 1},
-+/* UNIX_ALGO_ROUNDS */ {"rounds=", _ALL_ON_, 0100000000, 0},
-+/* UNIX_BLOWFISH_PASS */ {"blowfish", _ALL_ON_^(015660420000ULL), 0200000000, 1},
-+/* UNIX_MIN_PASS_LEN */ {"minlen=", _ALL_ON_, 0400000000, 0},
-+/* UNIX_QUIET */ {"quiet", _ALL_ON_, 01000000000, 0},
-+/* UNIX_NO_PASS_EXPIRY */ {"no_pass_expiry", _ALL_ON_, 02000000000, 0},
-+/* UNIX_DES */ {"des", _ALL_ON_^(015660420000ULL), 0, 1},
-+/* UNIX_GOST_YESCRYPT_PASS */ {"gost_yescrypt", _ALL_ON_^(015660420000ULL), 04000000000, 1},
-+/* UNIX_YESCRYPT_PASS */ {"yescrypt", _ALL_ON_^(015660420000ULL), 010000000000, 1},
- };
-
- #define UNIX_DEFAULTS (unix_args[UNIX__NONULL].flag)
-@@ -151,20 +155,23 @@ static const UNIX_Ctrls unix_args[UNIX_CTRLS_] =
- _pam_drop(xx); \
- }
-
--extern int _make_remark(pam_handle_t * pamh, unsigned int ctrl
-- ,int type, const char *text);
--extern int _set_ctrl(pam_handle_t * pamh, int flags, int *remember, int *rounds,
-- int *pass_min_len, int argc, const char **argv);
-+extern int _make_remark(pam_handle_t * pamh, unsigned long long ctrl,
-+ int type, const char *text);
-+extern unsigned long long _set_ctrl(pam_handle_t * pamh, int flags,
-+ int *remember, int *rounds,
-+ int *pass_min_len,
-+ int argc, const char **argv);
- extern int _unix_getpwnam (pam_handle_t *pamh,
- const char *name, int files, int nis,
- struct passwd **ret);
- extern int _unix_comesfromsource (pam_handle_t *pamh,
- const char *name, int files, int nis);
--extern int _unix_blankpasswd(pam_handle_t *pamh,unsigned int ctrl,
-+extern int _unix_blankpasswd(pam_handle_t *pamh, unsigned long long ctrl,
- const char *name);
--extern int _unix_verify_password(pam_handle_t * pamh, const char *name
-- ,const char *p, unsigned int ctrl);
-+extern int _unix_verify_password(pam_handle_t * pamh, const char *name,
-+ const char *p, unsigned long long ctrl);
-
- extern int _unix_run_verify_binary(pam_handle_t *pamh,
-- unsigned int ctrl, const char *user, int *daysleft);
-+ unsigned long long ctrl,
-+ const char *user, int *daysleft);
- #endif /* _PAM_UNIX_SUPPORT_H */
diff --git a/source/a/pam/fedora-patches/pam-1.4.0-redhat-modules.patch b/source/a/pam/fedora-patches/pam-1.4.0-redhat-modules.patch
deleted file mode 100644
index fda4eca75..000000000
--- a/source/a/pam/fedora-patches/pam-1.4.0-redhat-modules.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- ./configure.ac.orig 2020-06-08 05:17:27.000000000 -0500
-+++ ./configure.ac 2020-06-13 14:11:04.857950668 -0500
-@@ -712,6 +712,7 @@
- po/Makefile.in \
- Make.xml.rules \
- modules/Makefile \
-+ modules/pam_chroot/Makefile modules/pam_console/Makefile modules/pam_postgresok/Makefile \
- modules/pam_access/Makefile modules/pam_cracklib/Makefile \
- modules/pam_debug/Makefile modules/pam_deny/Makefile \
- modules/pam_echo/Makefile modules/pam_env/Makefile \
---- ./modules/Makefile.am.orig 2020-06-08 05:17:27.000000000 -0500
-+++ ./modules/Makefile.am 2020-06-13 14:12:28.614946035 -0500
-@@ -53,6 +53,8 @@
- SUBDIRS := \
- pam_access \
- $(MAYBE_PAM_CRACKLIB) \
-+ pam_chroot \
-+ pam_console \
- pam_debug \
- pam_deny \
- pam_echo \
-@@ -76,6 +78,7 @@
- $(MAYBE_PAM_NAMESPACE) \
- pam_nologin \
- pam_permit \
-+ pam_postgresok \
- pam_pwhistory \
- $(MAYBE_PAM_RHOSTS) \
- pam_rootok \
diff --git a/source/a/pam/fedora-patches/pam-1.5.0-redhat-modules.patch b/source/a/pam/fedora-patches/pam-1.5.0-redhat-modules.patch
deleted file mode 100644
index 82010bbad..000000000
--- a/source/a/pam/fedora-patches/pam-1.5.0-redhat-modules.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- ./doc/sag/pam_faillock.xml.orig 2020-11-10 09:46:13.000000000 -0600
-+++ ./doc/sag/pam_faillock.xml 2020-11-11 13:54:28.033031520 -0600
-@@ -36,3 +36,41 @@
- href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-author"]/*)'/>
- </section>
- </section>
-+<?xml version='1.0' encoding='UTF-8'?>
-+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
-+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
-+<section id='sag-pam_faillock'>
-+ <title>pam_faillock - temporarily locking access based on failed authentication attempts during an interval</title>
-+ <cmdsynopsis>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//cmdsynopsis[@id = "pam_faillock-cmdsynopsisauth"]/*)'/>
-+ </cmdsynopsis>
-+ <cmdsynopsis>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//cmdsynopsis[@id = "pam_faillock-cmdsynopsisacct"]/*)'/>
-+ </cmdsynopsis>
-+ <section id='sag-pam_faillock-description'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-description"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-options'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-options"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-types'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-types"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-return_values'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-return_values"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-examples'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-examples"]/*)'/>
-+ </section>
-+ <section id='sag-pam_faillock-author'>
-+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
-+ href="../../modules/pam_faillock/pam_faillock.8.xml" xpointer='xpointer(//refsect1[@id = "pam_faillock-author"]/*)'/>
-+ </section>
-+</section>
---- ./configure.ac.orig 2020-11-11 13:54:28.033031520 -0600
-+++ ./configure.ac 2020-11-11 13:56:58.260034880 -0600
-@@ -639,6 +639,8 @@
- po/Makefile.in \
- Make.xml.rules \
- modules/Makefile \
-+ modules/pam_chroot/Makefile modules/pam_console/Makefile \
-+ modules/pam_postgresok/Makefile \
- modules/pam_access/Makefile \
- modules/pam_debug/Makefile modules/pam_deny/Makefile \
- modules/pam_echo/Makefile modules/pam_env/Makefile \
---- ./modules/Makefile.am.orig 2020-11-11 13:54:28.033031520 -0600
-+++ ./modules/Makefile.am 2020-11-11 13:58:24.059036799 -0600
-@@ -44,6 +44,8 @@
-
- SUBDIRS := \
- pam_access \
-+ pam_chroot \
-+ pam_console \
- pam_debug \
- pam_deny \
- pam_echo \
-@@ -67,6 +69,7 @@
- $(MAYBE_PAM_NAMESPACE) \
- pam_nologin \
- pam_permit \
-+ pam_postgresok \
- pam_pwhistory \
- $(MAYBE_PAM_RHOSTS) \
- pam_rootok \
diff --git a/source/a/pam/fedora-patches/pam-1.3.0-unix-nomsg.patch b/source/a/pam/fedora-patches/pam-1.5.3-unix-nomsg.patch
index 33c226773..3a8abbb1a 100644
--- a/source/a/pam/fedora-patches/pam-1.3.0-unix-nomsg.patch
+++ b/source/a/pam/fedora-patches/pam-1.5.3-unix-nomsg.patch
@@ -1,7 +1,8 @@
-diff -up Linux-PAM-1.3.0/modules/pam_unix/pam_unix_passwd.c.nomsg Linux-PAM-1.3.0/modules/pam_unix/pam_unix_passwd.c
---- Linux-PAM-1.3.0/modules/pam_unix/pam_unix_passwd.c.nomsg 2016-04-11 13:08:47.000000000 +0200
-+++ Linux-PAM-1.3.0/modules/pam_unix/pam_unix_passwd.c 2017-04-20 16:51:24.853106709 +0200
-@@ -687,12 +687,6 @@ pam_sm_chauthtok(pam_handle_t *pamh, int
+Index: Linux-PAM-1.5.3/modules/pam_unix/pam_unix_passwd.c
+===================================================================
+--- Linux-PAM-1.5.3.orig/modules/pam_unix/pam_unix_passwd.c
++++ Linux-PAM-1.5.3/modules/pam_unix/pam_unix_passwd.c
+@@ -678,12 +678,6 @@ pam_sm_chauthtok(pam_handle_t *pamh, int
return PAM_SUCCESS;
} else if (off(UNIX__IAMROOT, ctrl) ||
(on(UNIX_NIS, ctrl) && _unix_comesfromsource(pamh, user, 0, 1))) {
diff --git a/source/a/pam/fedora-patches/pam-1.6.0-redhat-modules.patch b/source/a/pam/fedora-patches/pam-1.6.0-redhat-modules.patch
new file mode 100644
index 000000000..66aa8ff48
--- /dev/null
+++ b/source/a/pam/fedora-patches/pam-1.6.0-redhat-modules.patch
@@ -0,0 +1,24 @@
+diff -up Linux-PAM-1.6.0/configure.ac.redhat-modules Linux-PAM-1.6.0/configure.ac
+--- Linux-PAM-1.6.0/configure.ac.redhat-modules 2024-01-23 13:16:34.854753145 +0100
++++ Linux-PAM-1.6.0/configure.ac 2024-01-23 13:17:52.855859922 +0100
+@@ -774,6 +774,8 @@ AC_CONFIG_FILES([Makefile libpam/Makefil
+ po/Makefile.in \
+ Make.xml.rules \
+ modules/Makefile \
++ modules/pam_chroot/Makefile \
++ modules/pam_postgresok/Makefile \
+ modules/pam_access/Makefile \
+ modules/pam_canonicalize_user/Makefile \
+ modules/pam_debug/Makefile modules/pam_deny/Makefile \
+diff -up Linux-PAM-1.6.0/modules/Makefile.am.redhat-modules Linux-PAM-1.6.0/modules/Makefile.am
+--- Linux-PAM-1.6.0/modules/Makefile.am.redhat-modules 2024-01-17 11:29:36.000000000 +0100
++++ Linux-PAM-1.6.0/modules/Makefile.am 2024-01-23 13:16:34.855753147 +0100
+@@ -48,6 +48,8 @@ SUBDIRS := \
+ pam_debug \
+ pam_deny \
+ pam_echo \
++ pam_chroot \
++ pam_postgresok \
+ pam_env \
+ pam_exec \
+ pam_faildelay \
diff --git a/source/a/pam/pam.SlackBuild b/source/a/pam/pam.SlackBuild
index a3499c1c0..25f1cfad1 100755
--- a/source/a/pam/pam.SlackBuild
+++ b/source/a/pam/pam.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2010 Vincent Batts, vbatts@hashbangbash.com
-# Copyright 2010, 2011 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2010, 2011, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -96,27 +96,10 @@ for file in pam-redhat-$PAMRHVER/* ; do
echo "$(basename $file) already exists in modules/, not moving!"
fi
done
-# NOTE: Linux-PAM-1.4.0 already ships with most of these applied:
-#zcat $CWD/fedora-patches/pam-1.3.1-redhat-modules.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.4.0-redhat-modules.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/fedora-patches/pam-1.5.0-redhat-modules.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-noflex.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.1.3-nouserenv.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/fedora-patches/pam-1.1.6-limits-user.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.1.8-full-relro.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.0-pwhistory-helper.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.1.8-audit-user-mgmt.patch.gz | patch -p1 --verbose || exit 1
-zcat $CWD/fedora-patches/pam-1.3.0-unix-nomsg.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-coverity.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-remove-obsolete-_unix_read_password-prototype.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-bcrypt_b.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-gensalt-autoentropy.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-crypt_checksalt.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-yescrypt.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-no-fallback.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-motd-multiple-paths.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch.gz | patch -p1 --verbose || exit 1
-#zcat $CWD/fedora-patches/pam-1.3.1-unix-fix_checksalt_syslog.patch.gz | patch -p1 --verbose || exit 1
+
+# Patches from the Fedora SRPM:
+zcat $CWD/fedora-patches/pam-1.5.3-unix-nomsg.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/fedora-patches/pam-1.6.0-redhat-modules.patch.gz | patch -p1 --verbose || exit 1
# Improve the comments in /etc/environment:
zcat $CWD/patches/pam.etc.environment.better.comments.diff.gz | patch -p1 --verbose || exit 1
@@ -141,6 +124,7 @@ CXXFLAGS="$SLKCFLAGS" \
--disable-rpath \
--disable-selinux \
--disable-static \
+ --enable-lastlog \
--build=$ARCH-slackware-linux || exit 1
# Make these man pages or the build falls over later
@@ -172,6 +156,12 @@ chmod 6755 $PKG/sbin/unix_chkpwd
# This package can own the /etc/pam.d/ directory
mkdir -p $PKG/etc/pam.d
+# Relocate pkgconfig files:
+if [ -d $PKG/lib${LIBDIRSUFFIX}/pkgconfig -a ! -d $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig ]; then
+ mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+ mv $PKG/lib${LIBDIRSUFFIX}/pkgconfig $PKG/usr/lib${LIBDIRSUFFIX}
+fi
+
# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/a/pam/pam.url b/source/a/pam/pam.url
index 07dfcb99b..8dde2e9f0 100644
--- a/source/a/pam/pam.url
+++ b/source/a/pam/pam.url
@@ -1,2 +1,3 @@
-#http://www.linux-pam.org/library/Linux-PAM-1.3.1.tar.bz2
https://github.com/linux-pam/linux-pam/releases
+https://github.com/linux-pam/linux-pam/releases/download/v1.6.1/Linux-PAM-1.6.1.tar.xz
+https://github.com/linux-pam/linux-pam/releases/download/v1.6.1/Linux-PAM-1.6.1.tar.xz.asc
diff --git a/source/a/pciutils/pciutils.SlackBuild b/source/a/pciutils/pciutils.SlackBuild
index 2c90e8a7c..00b705310 100755
--- a/source/a/pciutils/pciutils.SlackBuild
+++ b/source/a/pciutils/pciutils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2013, 2015, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2013, 2015, 2016, 2018, 2022 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=pciutils
-VERSION=${VERSION:-$(echo pciutils-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-$(echo pciutils-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -64,7 +64,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf pciutils-$VERSION
-tar xvf $CWD/pciutils-$VERSION.tar.xz || exit 1
+tar xvf $CWD/pciutils-$VERSION.tar.?z || exit 1
cd pciutils-$VERSION || exit 1
chown -R root:root .
@@ -103,6 +103,13 @@ mkdir $PKG/lib${LIBDIRSUFFIX}
cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
)
+# Add a symlink to the old location:
+if [ ! -x $PKG/sbin/lspci ]; then
+ if [ -x $PKG/usr/bin/lspci ]; then
+ ( cd $PKG/sbin ; ln -sf ../usr/bin/lspci . )
+ fi
+fi
+
mkdir -p $PKG/usr/sbin
mv $PKG/sbin/update-pciids $PKG/usr/sbin/update-pciids
diff --git a/source/a/pciutils/pciutils.url b/source/a/pciutils/pciutils.url
index 60f88af3b..5f2f6c2cc 100644
--- a/source/a/pciutils/pciutils.url
+++ b/source/a/pciutils/pciutils.url
@@ -1,3 +1,4 @@
ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/
http://www.kernel.org/pub/software/utils/pciutils/
ftp://metalab.unc.edu/pub/Linux/hardware/
+https://github.com/pciutils/pciutils
diff --git a/source/a/pcmciautils/config/rc.pcmcia b/source/a/pcmciautils/config/rc.pcmcia
index 1f21be84e..46621da97 100755
--- a/source/a/pcmciautils/config/rc.pcmcia
+++ b/source/a/pcmciautils/config/rc.pcmcia
@@ -14,7 +14,7 @@ DRIVER_OPTS=
case "$1" in
start)
echo "Starting PCMCIA services:"
- fgrep -q pcmcia /proc/devices
+ grep -F -q pcmcia /proc/devices
if [ $? -ne 0 ] ; then
if [ "$DRIVER" = "probe" ]; then
echo " <Probing for PCIC: edit /etc/rc.d/rc.pcmcia>"
diff --git a/source/a/pcmciautils/pcmciautils.SlackBuild b/source/a/pcmciautils/pcmciautils.SlackBuild
index 5d47054c7..b67b3286c 100755
--- a/source/a/pcmciautils/pcmciautils.SlackBuild
+++ b/source/a/pcmciautils/pcmciautils.SlackBuild
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=pcmciautils
VERSION=${VERSION:-018}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/pkgtools/manpages/installpkg.8 b/source/a/pkgtools/manpages/installpkg.8
index 990e15942..9b0cd9fe7 100644
--- a/source/a/pkgtools/manpages/installpkg.8
+++ b/source/a/pkgtools/manpages/installpkg.8
@@ -16,6 +16,9 @@ installpkg \- install Slackware packages.
.B \--warn
]
[
+.B \--dry-run
+]
+[
.B \--md5sum
]
[
@@ -63,6 +66,9 @@ Generate a list of files that would be overwritten to the standard output, but d
not actually install the package. The list is formatted in a suitable fashion to
use as a list of files to backup.
.TP
+.B \--dry-run packagename
+This option does the same thing as --warn.
+.TP
.B \--md5sum packagename
Record the package md5sum in the metadata written in /var/lib/pkgtools/packages.
.TP
@@ -103,8 +109,7 @@ will be used). The default is "tagfile" in the package's directory.
.B \--threads <number>
For xz/plzip compressed packages, set the maximum number of threads to be used for
decompression. Only has an effect if a multithreaded compressor was used, and then
-only on large packages. The default for plzip is the number of CPU threads available.
-The default for xz is 2.
+only on large packages. The default for plzip and xz is the number of CPU threads available.
.TP
.B \--no-overwrite
When extracting the package, do not overwrite existing files. Usually, this option
diff --git a/source/a/pkgtools/manpages/makepkg.8 b/source/a/pkgtools/manpages/makepkg.8
index 488519e1f..6efcab1aa 100644
--- a/source/a/pkgtools/manpages/makepkg.8
+++ b/source/a/pkgtools/manpages/makepkg.8
@@ -66,9 +66,9 @@ option is not provided, makepkg will prompt.
.TP
.B --threads <number>
For xz/plzip compressed packages, set the maximum number of threads to be used for
-compression. Only has an effect on large packages. For plzip, the default is the number
-of CPU threads available. For xz, the default is 2 (due to commonly occuring memory
-related failures on 32-bit with too many threads and multithreaded xz compression).
+compression. Only has an effect on large packages. For plzip the default is the number
+of CPU threads available. For xz the default is to let xz decide how many threads to
+use, except on 32-bit platforms where the default number of threads is 2.
.TP
.B --compress <option>
Supply a custom option to the compressor. This will be used in place of the default, which is: -9
diff --git a/source/a/pkgtools/manpages/removepkg.8 b/source/a/pkgtools/manpages/removepkg.8
index f9b1b9322..25a66dcaa 100644
--- a/source/a/pkgtools/manpages/removepkg.8
+++ b/source/a/pkgtools/manpages/removepkg.8
@@ -36,6 +36,9 @@ removepkg \- remove Slackware packages.
[
.B \--warn
]
+[
+.B \--dry-run
+]
.BI packagename
.SH DESCRIPTION
.B removepkg
@@ -112,6 +115,9 @@ Remove the package displaying only a single description line to stdout.
.B \--warn packagename
Generate a report to the standard output about which files and directories
would be removed, but does not actually remove the package.
+.TP
+.B \--dry-run packagename
+This option does the same thing as --warn.
.SH " "
It's possible to remove a package from a filesystem
other than / by supplying
diff --git a/source/a/pkgtools/manpages/upgradepkg.8 b/source/a/pkgtools/manpages/upgradepkg.8
index 757d60031..73f204af1 100644
--- a/source/a/pkgtools/manpages/upgradepkg.8
+++ b/source/a/pkgtools/manpages/upgradepkg.8
@@ -16,6 +16,9 @@ upgradepkg \- upgrade Slackware packages.
.B --dry-run
]
[
+.B --warn
+]
+[
.B --install-new
]
[
@@ -38,6 +41,9 @@ upgradepkg \- upgrade Slackware packages.
.B --dry-run
]
[
+.B --warn
+]
+[
.B --install-new
]
[
@@ -84,6 +90,9 @@ ROOT=/mnt upgradepkg package.txz (or .tbz, .tgz, .tlz)
Output a report about which packages would be installed or upgraded
but don't actually perform the upgrades.
.TP
+.B \--warn
+This option does the same thing as --warn.
+.TP
.B \--install-new
Normally upgradepkg only upgrades packages that are already installed on the system, and
will skip any packages that do not already have a version installed.
diff --git a/source/a/pkgtools/pkgtools.SlackBuild b/source/a/pkgtools/pkgtools.SlackBuild
index c34f82f50..2c664868f 100755
--- a/source/a/pkgtools/pkgtools.SlackBuild
+++ b/source/a/pkgtools/pkgtools.SlackBuild
@@ -28,9 +28,9 @@ PKG=$TMP/package-pkgtools
PKGNAM=pkgtools
# *** UPDATE THESE WITH EACH BUILD:
-VERSION=15.0
+VERSION=15.1
ARCH=${ARCH:-noarch}
-BUILD=${BUILD:-41}
+BUILD=${BUILD:-10}
# 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
diff --git a/source/a/pkgtools/scripts/installpkg b/source/a/pkgtools/scripts/installpkg
index ee76cf134..7eea53629 100644
--- a/source/a/pkgtools/scripts/installpkg
+++ b/source/a/pkgtools/scripts/installpkg
@@ -167,6 +167,7 @@ Installpkg is used to install a .t{gz,bz,lz,xz} package like this:
installpkg slackware-package-1.0.0-i486-1.tgz (or .tbz, .tlz, .txz)
options: --warn (warn if files will be overwritten, but do not install)
+ --dry-run (same as --warn)
--root /mnt (install someplace else, like /mnt)
--infobox (use dialog to draw an info box)
--terse (display a one-line short description for install)
@@ -231,7 +232,7 @@ fi
# Parse options:
while [ 0 ]; do
- if [ "$1" = "-warn" -o "$1" = "--warn" ]; then
+ if [ "$1" = "-warn" -o "$1" = "--warn" -o "$1" = "-dry-run" -o "$1" = "--dry-run" ]; then
MODE=warn
shift 1
elif [ "$1" = "-md5sum" -o "$1" = "--md5sum" ]; then
@@ -268,8 +269,6 @@ while [ 0 ]; do
elif [ "$1" = "-threads" -o "$1" = "--threads" ]; then
THREADS="$2"
shift 2
- # xz has not yet implemented multi-threaded decompression.
- # Who knows if or how well it will work...
XZ_THREADS_FORCED=yes
elif [ "$1" = "-priority" -o "$1" = "--priority" ]; then
if [ "$2" = "" ]; then
@@ -362,10 +361,11 @@ if [ "$MODE" = "warn" ]; then
fi
;;
'txz' )
- if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then
+ if [ "$XZ_THREADS_FORCED" = "yes" ]; then
packagecompression="xz --threads=${THREADS}"
else
- packagecompression="xz --threads=2"
+ # Let xz determine how many threads to use:
+ packagecompression="xz --threads=0"
fi
;;
esac
@@ -450,10 +450,11 @@ for package in $* ; do
fi
;;
'txz' )
- if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then
+ if [ "$XZ_THREADS_FORCED" = "yes" ]; then
packagecompression="xz --threads=${THREADS}"
else
- packagecompression="xz --threads=2"
+ # Let xz determine how many threads to use:
+ packagecompression="xz --threads=0"
fi
;;
esac
diff --git a/source/a/pkgtools/scripts/makepkg b/source/a/pkgtools/scripts/makepkg
index ddced779e..ed5e9ccf9 100644
--- a/source/a/pkgtools/scripts/makepkg
+++ b/source/a/pkgtools/scripts/makepkg
@@ -146,8 +146,6 @@ while [ 0 ]; do
elif [ "$1" = "-threads" -o "$1" = "--threads" ]; then
THREADS="$2"
shift 2
- # xz has memory issues with threads it seems, so we'll use two threads by
- # default unless we see that something else was user-selected:
XZ_THREADS_FORCED=yes
elif [ "$1" = "-compress" -o "$1" = "--compress" ]; then
COMPRESS_OPTION="$2"
@@ -253,10 +251,13 @@ elif [ ! "$(basename $PACKAGE_NAME .tar.lzma)" = "$PACKAGE_NAME" ]; then
elif [ ! "$(basename $PACKAGE_NAME .txz)" = "$PACKAGE_NAME" ]; then
EXTENSION="txz"
if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then
- # Two threads by default with xz due to memory failures on 32-bit. Not that
- # it matters much... if upstream ever gets around to implementing multi-
- # threaded decompression we'll revisit this default. :-D
- COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c"
+ if [[ "$(uname -m)" =~ (x86_64|aarch64|riscv64) ]]; then
+ # Allow xz to determine how many threads to use:
+ COMPRESSOR="xz ${COMPRESS_OPTION} --threads=0 -c"
+ else
+ # Default to 2 threads on 32-bit platforms:
+ COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c"
+ fi
else
COMPRESSOR="xz ${COMPRESS_OPTION} --threads=${THREADS} -c"
fi
@@ -267,10 +268,13 @@ elif [ ! "$(basename $PACKAGE_NAME .txz)" = "$PACKAGE_NAME" ]; then
elif [ ! "$(basename $PACKAGE_NAME .tar.xz)" = "$PACKAGE_NAME" ]; then
EXTENSION="tar.xz"
if [ ! "$XZ_THREADS_FORCED" = "yes" ]; then
- # Two threads by default with xz due to memory failures on 32-bit. Not that
- # it matters much... if upstream ever gets around to implementing multi-
- # threaded decompression we'll revisit this default. :-D
- COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c"
+ if [[ "$(uname -m)" =~ (x86_64|aarch64|riscv64) ]]; then
+ # Allow xz to determine how many threads to use:
+ COMPRESSOR="xz ${COMPRESS_OPTION} --threads=0 -c"
+ else
+ # Default to 2 threads on 32-bit platforms:
+ COMPRESSOR="xz ${COMPRESS_OPTION} --threads=2 -c"
+ fi
else
COMPRESSOR="xz ${COMPRESS_OPTION} --threads=${THREADS} -c"
fi
@@ -380,7 +384,7 @@ else
fi
if [ "$CHOWN" = "y" ]; then
find . -type d -exec chmod -v 755 {} \;
- find . -type d -exec chown -v root.root {} \;
+ find . -type d -exec chown -v root:root {} \;
fi
# Ensure that the 'root' of the package is chmod 755 because
diff --git a/source/a/pkgtools/scripts/pkgtool b/source/a/pkgtools/scripts/pkgtool
index 7c4fc7668..fe99149f3 100644
--- a/source/a/pkgtools/scripts/pkgtool
+++ b/source/a/pkgtools/scripts/pkgtool
@@ -237,7 +237,7 @@ else # there were no arguments, so we'll get the needed information from the
if [ "$REPLY" = "Setup" ]; then
echo 'dialog --title "SELECT SYSTEM SETUP SCRIPTS" --item-help --checklist \
"Please use the spacebar to select the setup scripts to run. Hit enter when you \
-are done selecting to run the scripts." 17 70 9 \' > $TMP/setupscr
+are done selecting to run the scripts." 0 0 9 \' > $TMP/setupscr
for script in $ADM_DIR/setup/setup.* ; do
BLURB=$(grep '#BLURB' $script | cut -b8-)
if [ "$BLURB" = "" ]; then
diff --git a/source/a/pkgtools/scripts/removepkg b/source/a/pkgtools/scripts/removepkg
index cb7e9119a..161057ea0 100644
--- a/source/a/pkgtools/scripts/removepkg
+++ b/source/a/pkgtools/scripts/removepkg
@@ -351,7 +351,7 @@ remove_packages() {
rm -f $TMP/$PKGNAME
fi
fi
- if fgrep "./" $ADM_DIR/packages/$PKGNAME 1> /dev/null 2>&1; then
+ if grep -F "./" $ADM_DIR/packages/$PKGNAME 1> /dev/null 2>&1; then
TRIGGER="^\.\/"
else
TRIGGER="FILE LIST:"
@@ -360,7 +360,7 @@ remove_packages() {
! [ $TERSE ] && echo "Removing files:"
fi
sed -n "/$TRIGGER/,/^$/p" < $ADM_DIR/packages/$PKGNAME | \
- fgrep -v "FILE LIST:" | sort -u > $TMP/delete_list$$
+ grep -F -v "FILE LIST:" | sort -u > $TMP/delete_list$$
# Pat's new-new && improved pre-removal routine.
cat_except $ADM_DIR/packages $PKGNAME | sort -u > $TMP/required_list$$
if [ -r $ADM_DIR/scripts/$PKGNAME ]; then
@@ -430,7 +430,7 @@ remove_packages() {
}
if [ "$#" = "0" ]; then
- echo "Usage: $(basename $0) [--copy] [--keep] [--preserve] [--skip-douninst] [--terse] [--warn] packagename ..."; exit 1
+ echo "Usage: $(basename $0) [--copy] [--keep] [--preserve] [--skip-douninst] [--terse] [--warn] [--dry-run] packagename ..."; exit 1
fi
while : ; do
@@ -440,8 +440,8 @@ while : ; do
-preserve | --preserve) PRESERVE=true; shift;;
-skip-douninst | --skip-douninst) SKIP_DOUNINST=true; shift;;
-terse | --terse) TERSE=0; shift;;
- -warn | --warn) WARN=true; shift;;
- -* | --*) echo "Usage: $(basename $0) [-copy] [-keep] [-preserve] [-warn] packagename ..."; exit 1;;
+ -warn | --warn | -dry-run | --dry-run) WARN=true; shift;;
+ -* | --*) echo "Usage: $(basename $0) [--copy] [--keep] [--preserve] [--warn] [--dry-run] packagename ..."; exit 1;;
*) break
esac
done
diff --git a/source/a/pkgtools/scripts/setup.80.make-bootdisk b/source/a/pkgtools/scripts/setup.80.make-bootdisk
index 0ed8b9a14..d1dffe98f 100644
--- a/source/a/pkgtools/scripts/setup.80.make-bootdisk
+++ b/source/a/pkgtools/scripts/setup.80.make-bootdisk
@@ -36,7 +36,7 @@ while [ 0 ]; do # the bootdisk menu loop
/sbin/rescan-scsi-bus -l 1>$RDIR 2>$RDIR
# Get a list of removable block devices before the USB stick is inserted:
echo "" > $TMP/remov_prior
- for BDEV in $(ls --indicator-style none /sys/block | egrep -v "loop|ram"); do
+ for BDEV in $(ls --indicator-style none /sys/block | grep -E -v "loop|ram"); do
[ -r /sys/block/$BDEV/removable -a "$(cat /sys/block/$BDEV/removable)" == "1" ] \
&& echo $BDEV >> $TMP/remov_prior
done
@@ -64,7 +64,7 @@ WARNING! The existing contents of the USB stick will be erased. \n\
/sbin/rescan-scsi-bus -l 1>$RDIR 2>$RDIR
# Get a list of removable block devices after the USB stick is inserted:
echo "" > $TMP/remov_after
- for BDEV in $(ls --indicator-style none /sys/block | egrep -v "loop|ram"); do
+ for BDEV in $(ls --indicator-style none /sys/block | grep -E -v "loop|ram"); do
[ -r /sys/block/$BDEV/removable -a "$(cat /sys/block/$BDEV/removable)" == "1" ] \
&& echo $BDEV >> $TMP/remov_after
done
diff --git a/source/a/pkgtools/scripts/setup.services b/source/a/pkgtools/scripts/setup.services
index ee31b6f94..dbc80aee5 100644
--- a/source/a/pkgtools/scripts/setup.services
+++ b/source/a/pkgtools/scripts/setup.services
@@ -42,6 +42,28 @@ if [ -r etc/rc.d/rc.atd ]; then
EOF
fi
+if [ -r etc/rc.d/rc.avahidaemon ]; then
+ if [ -x etc/rc.d/rc.avahidaemon ]; then
+ RC_AVAHIDAEMON=on
+ else
+ RC_AVAHIDAEMON=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.avahidaemon" "Zeroconf implementation" $RC_AVAHIDAEMON "Avahi is a system which facilitates service discovery on a local network." \\
+EOF
+fi
+
+if [ -r etc/rc.d/rc.avahidnsconfd ]; then
+ if [ -x etc/rc.d/rc.avahidnsconfd ]; then
+ RC_AVAHIDNDCONFD=on
+ else
+ RC_AVAHIDNDCONFD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.avahidnsconfd" "Unicast DNS server for Avahi" $RC_AVAHIDNDCONFD "Queries the LAN for DNS servers that can be listed in /etc/resolv.conf." \\
+EOF
+fi
+
if [ -r etc/rc.d/rc.bind ]; then
if [ -x etc/rc.d/rc.bind ]; then
RC_BIND=on
@@ -196,6 +218,17 @@ if [ -r etc/rc.d/rc.mysqld ]; then
EOF
fi
+if [ -r etc/rc.d/rc.nfsd ]; then
+ if [ -x etc/rc.d/rc.nfsd ]; then
+ RC_NFSD=on
+ else
+ RC_NFSD=off
+ fi
+ cat << EOF >> $TMP/tmpscript
+ "rc.nfsd" "The Network File System Daemons" $RC_NFSD "Daemons needed to share files to other machines using NFS." \\
+EOF
+fi
+
if [ -r etc/rc.d/rc.ntpd ]; then
if [ -x etc/rc.d/rc.ntpd ]; then
RC_NTPD=on
@@ -350,7 +383,7 @@ if [ ! $? = 0 ]; then
exit
fi
-for service in rc.atalk rc.atd rc.bind rc.crond rc.cups rc.dovecot rc.dnsmasq rc.fuse rc.hald rc.hplip rc.httpd rc.inetd rc.ip_forward rc.lprng rc.messagebus rc.mysqld rc.ntpd rc.openldap rc.openvpn rc.pcmcia rc.postfix rc.rpc rc.samba rc.saslauthd rc.smartd rc.snmpd rc.sendmail rc.syslog rc.sshd ; do
+for service in rc.atalk rc.atd rc.avahidaemon rc.avahidnsconfd rc.bind rc.crond rc.cups rc.dovecot rc.dnsmasq rc.fuse rc.hald rc.hplip rc.httpd rc.inetd rc.ip_forward rc.lprng rc.messagebus rc.mysqld rc.nfsd rc.ntpd rc.openldap rc.openvpn rc.pcmcia rc.postfix rc.rpc rc.samba rc.saslauthd rc.smartd rc.snmpd rc.sendmail rc.syslog rc.sshd ; do
if [ -f etc/rc.d/$service ]; then
if grep -w $service $TMP/reply 1> /dev/null ; then
chmod 755 etc/rc.d/$service
diff --git a/source/a/pkgtools/scripts/setup.vi-ex b/source/a/pkgtools/scripts/setup.vi-ex
index f79ad91ee..677a332e8 100644
--- a/source/a/pkgtools/scripts/setup.vi-ex
+++ b/source/a/pkgtools/scripts/setup.vi-ex
@@ -3,11 +3,11 @@
T_PX=$1
TMP=/var/log/setup/tmp
rm -f $TMP/exvitype
-dialog --title "CHOOSE DEFAULT EX/VI EDITOR" --default-item "nvi" --menu \
+dialog --title "CHOOSE DEFAULT EX/VI EDITOR" --default-item "vim" --menu \
"This part of the configuration \
process will create ex and vi symlinks in /usr/bin pointing to your default \
-ex/vi editors. On a fresh installation, these will point to nvi by default, \
-as it is lightweight and supports UTF8. You may choose a different default \
+ex/vi editors. On a fresh installation, these will point to vim by default \
+as it is the de facto standard. You may choose a different default \
if you prefer, but please note that elvis does not support UTF8." 14 76 3 \
"elvis" "Slackware's traditional ex/vi, no UTF8 support" \
"nvi" "Classic BSD ex/vi, supports UTF8" \
diff --git a/source/a/pkgtools/scripts/upgradepkg b/source/a/pkgtools/scripts/upgradepkg
index 9ae3ce204..49c5d9da8 100644
--- a/source/a/pkgtools/scripts/upgradepkg
+++ b/source/a/pkgtools/scripts/upgradepkg
@@ -80,6 +80,7 @@ To operate on an alternate directory, such as /mnt:
Options:
--dry-run only display what would be done
+ --warn same as --dry-run
--install-new install new packages also
--reinstall upgrade packages of the same version
--terse display a single line for each package operation
@@ -155,7 +156,7 @@ while [ 0 ]; do
# We're adding a --verbose mode that doesn't filter removepkg as much
VERBOSE="verbose"
shift 1
- elif [ "$1" = "-dry-run" -o "$1" = "--dry-run" ]; then
+ elif [ "$1" = "-dry-run" -o "$1" = "--dry-run" -o "$1" = "-warn" -o "$1" = "--warn" ]; then
# Output a report about which packages would be installed or upgraded
# but don't actually perform the upgrades.
DRY_RUN="true"
diff --git a/source/a/plzip/plzip.SlackBuild b/source/a/plzip/plzip.SlackBuild
index aefb12048..29148dc33 100755
--- a/source/a/plzip/plzip.SlackBuild
+++ b/source/a/plzip/plzip.SlackBuild
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=plzip
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.lz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/procps-ng/doinst.sh b/source/a/procps-ng/doinst.sh
new file mode 100644
index 000000000..b93b9726b
--- /dev/null
+++ b/source/a/procps-ng/doinst.sh
@@ -0,0 +1,16 @@
+config() {
+ for infile in $1; do
+ NEW="$infile"
+ 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...
+ done
+}
+
+config etc/default/sysctl.new
diff --git a/source/a/procps-ng/procps-ng.SlackBuild b/source/a/procps-ng/procps-ng.SlackBuild
index 6ac53fa50..9ff42aeca 100755
--- a/source/a/procps-ng/procps-ng.SlackBuild
+++ b/source/a/procps-ng/procps-ng.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2019 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,11 +23,11 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=procps-ng
-VERSION=${VERSION:-3.3.17}
-PSMISCVER=${PSMISCVER:-23.3}
+VERSION=${VERSION:-4.0.4}
+PSMISCVER=${PSMISCVER:-v23.5}
PROCINFONGVER=${PROCINFONGVER:-2.0.304}
PROCINFOVER=${PROCINFOVER:-18}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -68,11 +68,11 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION procps-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
-cd procps-$VERSION || $PKGNAM-$VERSION || exit 1
-tar xvf $CWD/psmisc-$PSMISCVER.tar.xz || exit 1
-tar xvf $CWD/procinfo-ng-$PROCINFONGVER.tar.xz || exit 1
-tar xvf $CWD/procinfo-$PROCINFOVER.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
+tar xvf $CWD/psmisc-$PSMISCVER.tar.?z || exit 1
+tar xvf $CWD/procinfo-ng-$PROCINFONGVER.tar.?z || exit 1
+tar xvf $CWD/procinfo-$PROCINFOVER.tar.?z || exit 1
chown -R root:root .
find -L . \
@@ -151,12 +151,22 @@ rm -f $PKG/usr/bin/free $PKG/usr/bin/pidof $PKG/usr/bin/ps
ln -sf /bin/free $PKG/usr/bin/free
ln -sf /sbin/pidof $PKG/usr/bin/pidof
ln -sf /bin/ps $PKG/usr/bin/ps
+# WTF changing the name of this
+( cd $PKG/bin ; ln -sf pidwait pwait )
+( cd $PKG/usr/man/man1 ; ln -sf pidwait.1 pwait.1 )
# Create /etc/sysctl.d:
mkdir -p $PKG/etc/sysctl.d
cd psmisc-$PSMISCVER || exit 1
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -205,7 +215,7 @@ make $NUMJOBS || exit 1
make install DESTDIR=$PKG || exit 1
mkdir -p $PKG/usr/doc/procinfo-ng-$PROCINFONGVER
-cp -a GPL-2.txt LGPL-2.1.txt LICENSE.txt COPYING* README* $PKG/usr/doc/procinfo-ng-$PROCINFONGVER
+cp -a GPL* LGPL* LICENSE* $PKG/usr/doc/procinfo-ng-$PROCINFONGVER
# Now install a couple of scripts from the original procinfo package.
cd ../procinfo-$PROCINFOVER || exit 1
@@ -213,33 +223,29 @@ install -m 0755 lsdev.pl $PKG/usr/bin/lsdev
install -m 0755 socklist.pl $PKG/usr/bin/socklist
install -m 0644 lsdev.8 socklist.8 $PKG/usr/man/man8
+# Add the default file for sysctl:
+mkdir -p $PKG/etc/default
+cat $CWD/sysctl.default > $PKG/etc/default/sysctl.new
+
# Strip binaries:
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
-# Compress and link manpages, if any:
-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 | grep -v '\.gz$') ; do
- ln -s $( readlink $eachpage ).gz $eachpage.gz
- rm $eachpage
- done
- gzip -9 *.?
- )
- done
- )
-fi
+# 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
# Back to the procps-ng main source directory...
cd ..
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- AUTHORS ChangeLog COPYING* NEWS README* \
+ AUTHORS* ChangeLog* COPYING* NEWS* README* \
$PKG/usr/doc/$PKGNAM-$VERSION
# If there's a ChangeLog, installing at least part of the recent history
@@ -251,6 +257,7 @@ if [ -r ChangeLog ]; then
fi
mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
diff --git a/source/a/procps-ng/sysctl.default b/source/a/procps-ng/sysctl.default
new file mode 100644
index 000000000..195954452
--- /dev/null
+++ b/source/a/procps-ng/sysctl.default
@@ -0,0 +1,8 @@
+# /etc/default/sysctl
+
+# Default options for /sbin/sysctl in /etc/rc.d/rc.S:
+# -e: Use this option to ignore errors about unknown keys.
+# --system: Load settings from all system configuration files.
+# For more information, see: man sysctl
+
+SYSCTL_OPTIONS="-e --system"
diff --git a/source/a/quota/quota.SlackBuild b/source/a/quota/quota.SlackBuild
index 6d7927120..c810ad876 100755
--- a/source/a/quota/quota.SlackBuild
+++ b/source/a/quota/quota.SlackBuild
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=quota
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/reiserfsprogs/reiserfsprogs.SlackBuild b/source/a/reiserfsprogs/reiserfsprogs.SlackBuild
index 0e0888cc0..117e65e8e 100755
--- a/source/a/reiserfsprogs/reiserfsprogs.SlackBuild
+++ b/source/a/reiserfsprogs/reiserfsprogs.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2015, 2018, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=reiserfsprogs
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -84,7 +84,6 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sbindir=/sbin \
--mandir=/usr/man \
- --disable-shared \
--build=$ARCH-slackware-linux || exit 1
if [ "$ARCH" = "x86_64" ]; then
@@ -95,9 +94,21 @@ fi
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# We're building without the shared libreiserfs so that we don't have to
-# ship the libraries or headers:
-rm -rf $PKG/usr/lib${LIBDIRSUFFIX} $PKG/usr/include
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# No thanks on static library:
+rm $PKG/usr/lib${LIBDIRSUFFIX}/libreiserfscore.a
+
+# Move shared library:
+mkdir $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/source/a/rpm2tgz/patches/0010-no-absolute-filenames-extracting-cpio.patch b/source/a/rpm2tgz/patches/0010-no-absolute-filenames-extracting-cpio.patch
new file mode 100644
index 000000000..779012238
--- /dev/null
+++ b/source/a/rpm2tgz/patches/0010-no-absolute-filenames-extracting-cpio.patch
@@ -0,0 +1,11 @@
+--- ./rpm2targz.orig 2022-01-28 23:26:57.686681986 -0600
++++ ./rpm2targz 2022-01-28 23:28:18.872683802 -0600
+@@ -175,7 +175,7 @@
+ fi
+ mkdir -p $DEST
+ ( cd $DEST
+- cpio -i -m -d < $ofn 1> /dev/null 2> /dev/null
++ cpio -i -m -d --no-absolute-filenames < $ofn 1> /dev/null 2> /dev/null
+ rm -f $ofn
+ find . -type d -perm 700 -exec chmod 755 {} \;
+ )
diff --git a/source/a/rpm2tgz/patches/0011-ignore-rpm2cpio-error-code.patch b/source/a/rpm2tgz/patches/0011-ignore-rpm2cpio-error-code.patch
new file mode 100644
index 000000000..61f5a04ba
--- /dev/null
+++ b/source/a/rpm2tgz/patches/0011-ignore-rpm2cpio-error-code.patch
@@ -0,0 +1,44 @@
+--- ./rpm2targz.orig 2022-01-28 23:51:56.398715512 -0600
++++ ./rpm2targz 2022-01-28 23:53:21.350717413 -0600
+@@ -50,6 +50,7 @@
+ echo " as documention to /usr/doc/\$PRGNAM-\$VERSION/"
+ echo " -d attempt a wellformed slack-desc from the rpm meta data"
+ echo " -c reset all directory permissions to 755 and ownership to root:root."
++ echo " -i continue to repackage even if rpm2cpio reports an error"
+ echo
+ else
+ echo "Usage: $0 <file.rpm>"
+@@ -99,7 +100,7 @@
+ usage
+ fi
+
+-ARGS=$(getopt "hsSndrc" $* )
++ARGS=$(getopt "hisSndrc" $* )
+ set -- ${ARGS}
+ for i; do
+ case "$1" in
+@@ -127,6 +128,10 @@
+ CHOWN="true"
+ shift
+ ;;
++ -i)
++ IGNOREERROR="true"
++ shift
++ ;;
+ --)
+ shift
+ break
+@@ -160,8 +165,11 @@
+ ofn=$TMPDIR/$(basename $i .rpm).cpio
+ if which rpm2cpio 1> /dev/null 2> /dev/null ; then
+ rpm2cpio $i > $ofn 2> /dev/null
+- if [ ! $? = 0 ]; then
+- echo "ERROR: rpm2cpio failed. (maybe $i is not an RPM?)"
++ ERRORCODE=$?
++ if [ ! $ERRORCODE = 0 -a ! "$IGNOREERROR" = "true" ]; then
++ echo "ERROR: rpm2cpio failed (returned error code $ERRORCODE). Maybe $i is not an RPM?"
++ echo "If you wish to try again, you may ignore the error code and force $0 to try to"
++ echo "create a package by adding this option: -i"
+ rm -rf $TMPDIR
+ continue
+ fi
diff --git a/source/a/rpm2tgz/rpm2targz b/source/a/rpm2tgz/rpm2targz
index 5c91c64a4..3778cdc2c 100644
--- a/source/a/rpm2tgz/rpm2targz
+++ b/source/a/rpm2tgz/rpm2targz
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 1997, 1998 Patrick Volkerding, Moorhead, MN USA
# Copyright 2002, 2004 Slackware Linux, Inc., Concord, CA USA
-# Copyright 2006, 2009 Patrick Volkerding, Sebeka, MN USA
+# Copyright 2006, 2009, 2022 Patrick Volkerding, Sebeka, MN USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
diff --git a/source/a/rpm2tgz/rpm2tgz.SlackBuild b/source/a/rpm2tgz/rpm2tgz.SlackBuild
index 1bb9ec115..0fadd0d13 100755
--- a/source/a/rpm2tgz/rpm2tgz.SlackBuild
+++ b/source/a/rpm2tgz/rpm2tgz.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2018, 2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=rpm2tgz
VERSION=1.2.2
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -78,6 +78,15 @@ cat $CWD/rpm2targz > $PKG/usr/bin/rpm2targz
zcat $CWD/patches/0007-Add-support-for-.txz-packages-and-rpm2txz-symlink.patch.gz | patch -p1 || exit 1
zcat $CWD/patches/0008-Avoid-none-values-in-slack-desc.patch.gz | patch -p1 || exit 1
zcat $CWD/patches/0009-Add-c-option-just-as-makepkg-c-y.patch.gz | patch -p1 || exit 1
+ ## NO - cpio is stupid and strips the leading '/' from symlinks to absolute
+ ## paths with --no-absolute-filenames. :-/
+ ## Make sure that if someone created an RPM with absolute filenames that we
+ ## don't allow it to write all over the / directory when we're just trying
+ ## to extract it to make the .tgz:
+ #zcat $CWD/patches/0010-no-absolute-filenames-extracting-cpio.patch.gz | patch -p1 || exit 1
+ # Allow ignoring rpm2cpio error code. Some RPMs can be extracted, but
+ # throw an error anyway.
+ zcat $CWD/patches/0011-ignore-rpm2cpio-error-code.patch.gz | patch -p1 || exit 1
) || exit 1
( cd $PKG/usr/bin ; ln -sf rpm2targz rpm2tgz )
diff --git a/source/a/rpm2tgz/rpmoffset.c b/source/a/rpm2tgz/rpmoffset.c
index fd09e623b..99a5c16cf 100644
--- a/source/a/rpm2tgz/rpmoffset.c
+++ b/source/a/rpm2tgz/rpmoffset.c
@@ -4,22 +4,141 @@
/* Wouldn't it be a lot more sane if we could just untar these things? */
-#include <stdlib.h>
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+#include <stdint.h>
#include <stdio.h>
+#include <string.h>
+
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#endif
+#ifndef BUFSIZ
+# define BUFSIZ 8192
+#endif
-/* These offsets keep getting bigger, so we're going to just bite a 2MB */
-/* chunk of RAM right away so that we have enough. Yeah, horrible */
-/* quick and dirty implementation, but hey -- it gets the job done. */
+#if !defined(__GLIBC__)
+static void *rp_memmem(const void *buf, size_t buflen, const void *pattern, size_t len)
+{
+ char *bf = (char *)buf, *pt = (char *)pattern, *p = bf;
-#define RPMBUFSIZ 2097152
+ while (len <= (buflen - (p - bf))) {
+ if (NULL != (p = memchr(p, (int)(*pt), buflen - (p - bf)))) {
+ if (0 == memcmp(p, pattern, len))
+ return p;
+ else
+ ++p;
+ }
+ else
+ break;
+ }
+ return NULL;
+}
+#define memmem(a,b,c,d) rp_memmem(a,b,c,d)
+#endif
+
+typedef struct {
+ const char *type;
+ const unsigned char *magic;
+ const size_t len;
+} magic_t;
+
+/* LZMA is some fuzzy crap */
+int is_magic_lzma(const char *buf)
+{
+ const unsigned char *ubuf = (const void *)buf;
+ return (ubuf[0] == 0x5d && ubuf[4] < 0x20) &&
+ (!memcmp(buf + 10, "\x00\x00\x00", 3) ||
+ !memcmp(buf + 5, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 8));
+}
+#define magic_lzma_len 13
+
+static const unsigned char magic_gzip[] = { '\037', '\213', '\010' };
+static const unsigned char magic_bzip2[] = { 'B', 'Z', 'h' };
+static const unsigned char magic_xz[] = { 0xFD, '7', 'z', 'X', 'Z', 0x00 };
+static const unsigned char magic_zstd[] = { 0x28, 0xB5, 0x2F, 0xFD };
+static const magic_t magics[] = {
+#define DECLARE_MAGIC_T(t) { .type = #t, .magic = magic_##t, .len = sizeof(magic_##t), },
+ DECLARE_MAGIC_T(gzip)
+ DECLARE_MAGIC_T(bzip2)
+ DECLARE_MAGIC_T(xz)
+ DECLARE_MAGIC_T(zstd)
+#undef DECLARE_MAGIC_T
+};
+#define MAGIC_SIZE_MIN 3
+#define MAGIC_SIZE_MAX 13
+
+static int show_magic;
+
+static int magic_finish(const char *magic, size_t offset)
+{
+ if (show_magic)
+ printf("%s ", magic);
+ printf("%zu\n", offset);
+ return 0;
+}
-main()
+int main(int argc, char *argv[])
{
- char *buff = malloc(RPMBUFSIZ),*eb,*p;
- for (p = buff, eb = buff + read(0,buff,RPMBUFSIZ); p < eb; p++)
- if ((*p == '\037' && p[1] == '\213' && p[2] == '\010') ||
- (*p == 'B' && p[1] == 'Z' && p[2] == 'h' && '1' <= p[3] && p[3] <= '9' ))
- printf("%d\n",p - buff),
- exit(0);
- exit(1);
+ size_t i, read_cnt, offset, left, lzma_offset;
+ FILE *fp = stdin;
+ char p[BUFSIZ];
+
+ if (argc == 2 && !strcmp(argv[1], "-v")) {
+ show_magic = 1;
+ --argc;
+ }
+
+ if (argc != 1) {
+ puts("Usage: rpmoffset < rpmfile");
+ return 1;
+ }
+ /* fp = fopen(argv[1], "r"); */
+
+ lzma_offset = 0;
+ offset = left = 0;
+ while (1) {
+ read_cnt = fread(p + left, 1, sizeof(p) - left, fp);
+ if (read_cnt + left < MAGIC_SIZE_MIN)
+ break;
+
+ for (i = 0; i < ARRAY_SIZE(magics); ++i) {
+ const char *needle;
+
+ if (read_cnt + left < magics[i].len)
+ continue;
+
+ needle = memmem(p, sizeof(p), magics[i].magic, magics[i].len);
+ if (needle)
+ return magic_finish(magics[i].type, offset + (needle - p));
+ }
+
+ /* Scan for LZMA magic, but don't return yet ... */
+ if (!lzma_offset && read_cnt + left >= magic_lzma_len) {
+ for (i = 0; i <= read_cnt + left - magic_lzma_len; ++i)
+ if (is_magic_lzma(p + i)) {
+ lzma_offset = offset + i;
+ break;
+ }
+ }
+
+ memmove(p, p + left + read_cnt - MAGIC_SIZE_MIN + 1, MAGIC_SIZE_MIN - 1);
+
+ offset += read_cnt;
+ if (left == 0) {
+ offset -= MAGIC_SIZE_MIN - 1;
+ left = MAGIC_SIZE_MIN - 1;
+ }
+ }
+
+ /* Delay till the end for LZMA archives since it is too fuzzy */
+ if (lzma_offset)
+ return magic_finish("lzma", lzma_offset);
+
+ if (ferror(stdin))
+ perror(argv[0]);
+
+ return 1;
}
diff --git a/source/a/rpm2tgz/rpmoffset.c.url b/source/a/rpm2tgz/rpmoffset.c.url
new file mode 100644
index 000000000..b335732a5
--- /dev/null
+++ b/source/a/rpm2tgz/rpmoffset.c.url
@@ -0,0 +1 @@
+https://gitweb.gentoo.org/proj/rpm2targz.git/plain/rpmoffset.c?id=9abf939441a6d38c512f8723d1c4e62a1f2af611
diff --git a/source/a/sdparm/sdparm.SlackBuild b/source/a/sdparm/sdparm.SlackBuild
index e330eb2d3..6bd5e3c2e 100755
--- a/source/a/sdparm/sdparm.SlackBuild
+++ b/source/a/sdparm/sdparm.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sdparm
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
diff --git a/source/a/sed/sed.SlackBuild b/source/a/sed/sed.SlackBuild
index 4482837ef..979fa3e46 100755
--- a/source/a/sed/sed.SlackBuild
+++ b/source/a/sed/sed.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sed
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-1}
TMP=${TMP:-/tmp}
PKG=$TMP/package-sed
diff --git a/source/a/shadow/68a722760487d3537905d97d45e5fba189592022.patch b/source/a/shadow/68a722760487d3537905d97d45e5fba189592022.patch
new file mode 100644
index 000000000..3c4ce8342
--- /dev/null
+++ b/source/a/shadow/68a722760487d3537905d97d45e5fba189592022.patch
@@ -0,0 +1,321 @@
+From 68a722760487d3537905d97d45e5fba189592022 Mon Sep 17 00:00:00 2001
+From: Iker Pedrosa <ipedrosa@redhat.com>
+Date: Tue, 8 Aug 2023 16:01:41 +0200
+Subject: [PATCH] libmisc: add readpassphrase source code
+
+Remove libbsd dependency by including the source code of
+readpassphrase() in the project.
+
+Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
+---
+ configure.ac | 17 +---
+ libmisc/Makefile.am | 2 +
+ libmisc/readpassphrase.c | 198 +++++++++++++++++++++++++++++++++++++++
+ libmisc/readpassphrase.h | 45 +++++++++
+ 4 files changed, 246 insertions(+), 16 deletions(-)
+ create mode 100644 libmisc/readpassphrase.c
+ create mode 100644 libmisc/readpassphrase.h
+
+diff --git a/configure.ac b/configure.ac
+index d9cf73037..160719dd5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -45,7 +45,7 @@ AC_CHECK_HEADERS(crypt.h utmp.h \
+ dnl shadow now uses the libc's shadow implementation
+ AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
+
+-AC_CHECK_FUNCS(arc4random_buf futimes \
++AC_CHECK_FUNCS(arc4random_buf futimes readpassphrase \
+ getentropy getrandom getspnam getusershell \
+ initgroups lckpwdf lutimes mempcpy \
+ setgroups updwtmp updwtmpx innetgr \
+@@ -412,21 +412,6 @@ AC_SUBST(LIYESCRYPT)
+ AC_CHECK_LIB(crypt, crypt, [LIYESCRYPT=-lcrypt],
+ [AC_MSG_ERROR([crypt() not found])])
+
+-AC_SEARCH_LIBS([readpassphrase], [bsd], [], [
+- AC_MSG_ERROR([readpassphrase() is missing, either from libc or libbsd])
+-])
+-AS_IF([test "$ac_cv_search_readpassphrase" = "-lbsd"], [
+- PKG_CHECK_MODULES([LIBBSD], [libbsd-overlay])
+-])
+-dnl Make sure either the libc or libbsd provide the header.
+-save_CFLAGS="$CFLAGS"
+-CFLAGS="$CFLAGS $LIBBSD_CFLAGS"
+-AC_CHECK_HEADERS([readpassphrase.h])
+-AS_IF([test "$ac_cv_header_readpassphrase_h" != "yes"], [
+- AC_MSG_ERROR([readpassphrase.h is missing])
+-])
+-CFLAGS="$save_CFLAGS"
+-
+ AC_SUBST(LIBACL)
+ if test "$with_acl" != "no"; then
+ AC_CHECK_HEADERS(acl/libacl.h attr/error_context.h, [acl_header="yes"], [acl_header="no"])
+diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
+index b135447c9..90f1dec8e 100644
+--- a/libmisc/Makefile.am
++++ b/libmisc/Makefile.am
+@@ -64,6 +64,8 @@ libmisc_la_SOURCES = \
+ pwdcheck.c \
+ pwd_init.c \
+ csrand.c \
++ readpassphrase.h \
++ readpassphrase.c \
+ remove_tree.c \
+ rlogin.c \
+ root_flag.c \
+diff --git a/libmisc/readpassphrase.c b/libmisc/readpassphrase.c
+new file mode 100644
+index 000000000..5ff060cca
+--- /dev/null
++++ b/libmisc/readpassphrase.c
+@@ -0,0 +1,198 @@
++/* $OpenBSD: readpassphrase.c,v 1.26 2016/10/18 12:47:18 millert Exp $ */
++
++/*
++ * Copyright (c) 2000-2002, 2007, 2010
++ * Todd C. Miller <Todd.Miller@courtesan.com>
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ * Sponsored in part by the Defense Advanced Research Projects
++ * Agency (DARPA) and Air Force Research Laboratory, Air Force
++ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
++ */
++
++#include <ctype.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <paths.h>
++#include <pwd.h>
++#include <signal.h>
++#include <string.h>
++#include <termios.h>
++#include <unistd.h>
++#include <readpassphrase.h>
++
++#ifndef TCSASOFT
++#define TCSASOFT 0
++#endif
++
++#ifndef _NSIG
++#if defined(NSIG)
++#define _NSIG NSIG
++#else
++/* The SIGRTMAX define might be set to a function such as sysconf(). */
++#define _NSIG (SIGRTMAX + 1)
++#endif
++#endif
++
++static volatile sig_atomic_t signo[_NSIG];
++
++static void handler(int);
++
++char *
++readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
++{
++ ssize_t nr;
++ int input, output, save_errno, i, need_restart;
++ char ch, *p, *end;
++ struct termios term, oterm;
++ struct sigaction sa, savealrm, saveint, savehup, savequit, saveterm;
++ struct sigaction savetstp, savettin, savettou, savepipe;
++
++ /* I suppose we could alloc on demand in this case (XXX). */
++ if (bufsiz == 0) {
++ errno = EINVAL;
++ return(NULL);
++ }
++
++restart:
++ for (i = 0; i < _NSIG; i++)
++ signo[i] = 0;
++ nr = -1;
++ save_errno = 0;
++ need_restart = 0;
++ /*
++ * Read and write to /dev/tty if available. If not, read from
++ * stdin and write to stderr unless a tty is required.
++ */
++ if ((flags & RPP_STDIN) ||
++ (input = output = open(_PATH_TTY, O_RDWR)) == -1) {
++ if (flags & RPP_REQUIRE_TTY) {
++ errno = ENOTTY;
++ return(NULL);
++ }
++ input = STDIN_FILENO;
++ output = STDERR_FILENO;
++ }
++
++ /*
++ * Turn off echo if possible.
++ * If we are using a tty but are not the foreground pgrp this will
++ * generate SIGTTOU, so do it *before* installing the signal handlers.
++ */
++ if (input != STDIN_FILENO && tcgetattr(input, &oterm) == 0) {
++ memcpy(&term, &oterm, sizeof(term));
++ if (!(flags & RPP_ECHO_ON))
++ term.c_lflag &= ~(ECHO | ECHONL);
++#ifdef VSTATUS
++ if (term.c_cc[VSTATUS] != _POSIX_VDISABLE)
++ term.c_cc[VSTATUS] = _POSIX_VDISABLE;
++#endif
++ (void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term);
++ } else {
++ memset(&term, 0, sizeof(term));
++ term.c_lflag |= ECHO;
++ memset(&oterm, 0, sizeof(oterm));
++ oterm.c_lflag |= ECHO;
++ }
++
++ /*
++ * Catch signals that would otherwise cause the user to end
++ * up with echo turned off in the shell. Don't worry about
++ * things like SIGXCPU and SIGVTALRM for now.
++ */
++ sigemptyset(&sa.sa_mask);
++ sa.sa_flags = 0; /* don't restart system calls */
++ sa.sa_handler = handler;
++ (void)sigaction(SIGALRM, &sa, &savealrm);
++ (void)sigaction(SIGHUP, &sa, &savehup);
++ (void)sigaction(SIGINT, &sa, &saveint);
++ (void)sigaction(SIGPIPE, &sa, &savepipe);
++ (void)sigaction(SIGQUIT, &sa, &savequit);
++ (void)sigaction(SIGTERM, &sa, &saveterm);
++ (void)sigaction(SIGTSTP, &sa, &savetstp);
++ (void)sigaction(SIGTTIN, &sa, &savettin);
++ (void)sigaction(SIGTTOU, &sa, &savettou);
++
++ if (!(flags & RPP_STDIN))
++ (void)write(output, prompt, strlen(prompt));
++ end = buf + bufsiz - 1;
++ p = buf;
++ while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') {
++ if (p < end) {
++ if ((flags & RPP_SEVENBIT))
++ ch &= 0x7f;
++ if (isalpha((unsigned char)ch)) {
++ if ((flags & RPP_FORCELOWER))
++ ch = (char)tolower((unsigned char)ch);
++ if ((flags & RPP_FORCEUPPER))
++ ch = (char)toupper((unsigned char)ch);
++ }
++ *p++ = ch;
++ }
++ }
++ *p = '\0';
++ save_errno = errno;
++ if (!(term.c_lflag & ECHO))
++ (void)write(output, "\n", 1);
++
++ /* Restore old terminal settings and signals. */
++ if (memcmp(&term, &oterm, sizeof(term)) != 0) {
++ const int sigttou = signo[SIGTTOU];
++
++ /* Ignore SIGTTOU generated when we are not the fg pgrp. */
++ while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 &&
++ errno == EINTR && !signo[SIGTTOU])
++ continue;
++ signo[SIGTTOU] = sigttou;
++ }
++ (void)sigaction(SIGALRM, &savealrm, NULL);
++ (void)sigaction(SIGHUP, &savehup, NULL);
++ (void)sigaction(SIGINT, &saveint, NULL);
++ (void)sigaction(SIGQUIT, &savequit, NULL);
++ (void)sigaction(SIGPIPE, &savepipe, NULL);
++ (void)sigaction(SIGTERM, &saveterm, NULL);
++ (void)sigaction(SIGTSTP, &savetstp, NULL);
++ (void)sigaction(SIGTTIN, &savettin, NULL);
++ (void)sigaction(SIGTTOU, &savettou, NULL);
++ if (input != STDIN_FILENO)
++ (void)close(input);
++
++ /*
++ * If we were interrupted by a signal, resend it to ourselves
++ * now that we have restored the signal handlers.
++ */
++ for (i = 0; i < _NSIG; i++) {
++ if (signo[i]) {
++ kill(getpid(), i);
++ switch (i) {
++ case SIGTSTP:
++ case SIGTTIN:
++ case SIGTTOU:
++ need_restart = 1;
++ }
++ }
++ }
++ if (need_restart)
++ goto restart;
++
++ if (save_errno)
++ errno = save_errno;
++ return(nr == -1 ? NULL : buf);
++}
++
++static void handler(int s)
++{
++
++ signo[s] = 1;
++}
+diff --git a/libmisc/readpassphrase.h b/libmisc/readpassphrase.h
+new file mode 100644
+index 000000000..336a01156
+--- /dev/null
++++ b/libmisc/readpassphrase.h
+@@ -0,0 +1,45 @@
++/* $OpenBSD: readpassphrase.h,v 1.4 2003/06/03 01:52:39 millert Exp $ */
++
++/*
++ * Copyright (c) 2000, 2002 Todd C. Miller <Todd.Miller@courtesan.com>
++ *
++ * Permission to use, copy, modify, and distribute this software for any
++ * purpose with or without fee is hereby granted, provided that the above
++ * copyright notice and this permission notice appear in all copies.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ * Sponsored in part by the Defense Advanced Research Projects
++ * Agency (DARPA) and Air Force Research Laboratory, Air Force
++ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
++ */
++
++#ifndef LIBBSD_READPASSPHRASE_H
++#define LIBBSD_READPASSPHRASE_H
++
++#define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */
++#define RPP_ECHO_ON 0x01 /* Leave echo on. */
++#define RPP_REQUIRE_TTY 0x02 /* Fail if there is no tty. */
++#define RPP_FORCELOWER 0x04 /* Force input to lower case. */
++#define RPP_FORCEUPPER 0x08 /* Force input to upper case. */
++#define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */
++#define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */
++
++#ifdef LIBBSD_OVERLAY
++#include <sys/cdefs.h>
++#else
++//#include <bsd/sys/cdefs.h>
++#endif
++#include <sys/types.h>
++
++__BEGIN_DECLS
++char * readpassphrase(const char *, char *, size_t, int);
++__END_DECLS
++
++#endif /* !LIBBSD_READPASSPHRASE_H */
diff --git a/source/a/shadow/a6f6da96f4898a34e5ed1475053075172f9915b2.patch b/source/a/shadow/a6f6da96f4898a34e5ed1475053075172f9915b2.patch
new file mode 100644
index 000000000..224d76aef
--- /dev/null
+++ b/source/a/shadow/a6f6da96f4898a34e5ed1475053075172f9915b2.patch
@@ -0,0 +1,52 @@
+From a6f6da96f4898a34e5ed1475053075172f9915b2 Mon Sep 17 00:00:00 2001
+From: Iker Pedrosa <ipedrosa@redhat.com>
+Date: Tue, 8 Aug 2023 16:04:38 +0200
+Subject: [PATCH] Revert "Use freezero(3) where suitable"
+
+This reverts commit 1482224c546cabc3a08ec069c775b116171f182a.
+---
+ libmisc/agetpass.c | 8 ++++++--
+ libmisc/obscure.c | 6 ++++--
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/libmisc/agetpass.c b/libmisc/agetpass.c
+index 1ff9d63b3..fe030076d 100644
+--- a/libmisc/agetpass.c
++++ b/libmisc/agetpass.c
+@@ -118,7 +118,8 @@ agetpass(const char *prompt)
+ return pass;
+
+ fail:
+- freezero(pass, PASS_MAX + 2);
++ memzero(pass, PASS_MAX);
++ free(pass);
+ return NULL;
+ }
+
+@@ -126,5 +127,8 @@ agetpass(const char *prompt)
+ void
+ erase_pass(char *pass)
+ {
+- freezero(pass, PASS_MAX + 2);
++ if (pass == NULL)
++ return;
++ memzero(pass, PASS_MAX);
++ free(pass);
+ }
+diff --git a/libmisc/obscure.c b/libmisc/obscure.c
+index 40aa8efc6..deae4954f 100644
+--- a/libmisc/obscure.c
++++ b/libmisc/obscure.c
+@@ -221,8 +221,10 @@ static /*@observer@*//*@null@*/const char *obscure_msg (
+
+ msg = password_check (old1, new1, pwdp);
+
+- freezero (new1, newlen);
+- freezero (old1, oldlen);
++ memzero (new1, newlen);
++ memzero (old1, oldlen);
++ free (new1);
++ free (old1);
+
+ return msg;
+ }
diff --git a/source/a/shadow/adduser b/source/a/shadow/adduser
index 49c11f87a..834b34ada 100644
--- a/source/a/shadow/adduser
+++ b/source/a/shadow/adduser
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright 1995 Hrvoje Dogan, Croatia.
-# Copyright 2002-2004, 2008, 2009, 2010 Stuart Winter, Surrey, England, UK.
+# Copyright 2002-2004, 2008, 2009, 2010, 2023 Stuart Winter, Surrey, England, UK.
# Copyright 2004, 2008-2010 Slackware Linux, Inc., Concord, CA, USA
# Copyright 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
@@ -30,12 +30,14 @@
# Author : Stuart Winter <mozes@slackware.com>
# Based on the original Slackware adduser by Hrvoje Dogan
# with modifications by Patrick Volkerding
-# Version: 1.16
+# Version: 1.18
##########################################################################
# Usage..: adduser [<new_user_name>]
##########################################################################
# History #
###########
+# v1.18 - 2023-11-25
+# * chown: use new format for supplying user:group.
# v1.17 - 2019-04-01
# * Re-invoking input requests when human error causes failure. <ttk>
# qv: https://www.linuxquestions.org/questions/slackware-14/adduser-shell-script-error-4175650984/
@@ -329,7 +331,7 @@ while [ ! -z "$needinput" ]; do
if [ "$(echo $getyn | grep -i "n")" ]; then
unset needinput
# You're most likely going to only do this if you have the dir *mounted* for this user's $HOME
- getyn="$(get_input " Do you want to chown $LOGIN.$( echo $GID | awk '{print $2}') $HME ? (y/N) ")"
+ getyn="$(get_input " Do you want to chown ${LOGIN}:$( echo $GID | awk '{print $2}') $HME ? (y/N) ")"
if [ "$(echo $getyn | grep -i "y")" ]; then
CHOWNHOMEDIR=$HME # set this to the home directory
fi
@@ -423,7 +425,7 @@ fi
# chown the home dir? We can only do this once the useradd has
# completed otherwise the user name doesn't exist.
if [ ! -z "${CHOWNHOMEDIR}" ]; then
- chown "$LOGIN"."$( echo $GID | awk '{print $2}')" "${CHOWNHOMEDIR}"
+ chown "${LOGIN}":"$( echo $GID | awk '{print $2}')" "${CHOWNHOMEDIR}"
fi
# Set the finger information
diff --git a/source/a/shadow/shadow.SlackBuild b/source/a/shadow/shadow.SlackBuild
index 19163cef2..bcee8f9ee 100755
--- a/source/a/shadow/shadow.SlackBuild
+++ b/source/a/shadow/shadow.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=shadow
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-12}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -99,6 +99,9 @@ zcat $CWD/shadow.CVE-2005-4890.relax.diff.gz | patch -p1 --verbose || exit 1
# short version up to the first '.' on the login prompt:
zcat $CWD/shadow.login.display.short.hostname.diff.gz | patch -p1 --verbose || exit 1
+cat 68a722760487d3537905d97d45e5fba189592022.patch | patch -p1 --verbose || exit 1
+cat a6f6da96f4898a34e5ed1475053075172f9915b2.patch | patch -p1 --verbose || exit 1
+
# Add missing file:
if [ ! -r man/login.defs.d/HOME_MODE.xml ]; then
zcat $CWD/HOME_MODE.xml.gz > man/login.defs.d/HOME_MODE.xml
@@ -118,15 +121,18 @@ fi
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sbindir=/usr/sbin \
--bindir=/usr/bin \
--sysconfdir=/etc \
--mandir=/usr/man \
--docdir=/usr/doc/shadow-$VERSION \
+ --enable-lastlog \
--enable-man \
--enable-subordinate-ids \
--disable-shared \
--with-group-name-max-length=32 \
+ --with-libbsd=no \
$SHADOW_OPTIONS \
$PAM_OPTIONS \
--build=$ARCH-slackware-linux
@@ -136,7 +142,11 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
# Fix user group = 100:
+mkdir -p $PKG/etc/default
zcat $CWD/useradd.gz > $PKG/etc/default/useradd
mv $PKG/etc/default/useradd $PKG/etc/default/useradd.new
diff --git a/source/a/shadow/shadow.login.display.short.hostname.diff b/source/a/shadow/shadow.login.display.short.hostname.diff
index 53a22f8b8..d1383c4f6 100644
--- a/source/a/shadow/shadow.login.display.short.hostname.diff
+++ b/source/a/shadow/shadow.login.display.short.hostname.diff
@@ -1,38 +1,36 @@
-diff -u -r --new-file shadow-4.8.1.orig/libmisc/loginprompt.c shadow-4.8.1/libmisc/loginprompt.c
---- shadow-4.8.1.orig/libmisc/loginprompt.c 2019-07-23 10:26:08.000000000 -0500
-+++ shadow-4.8.1/libmisc/loginprompt.c 2020-02-06 17:29:43.386954096 -0600
-@@ -99,6 +99,15 @@
- }
+--- ./lib/loginprompt.c.orig 2024-02-29 19:50:52.000000000 -0600
++++ ./lib/loginprompt.c 2024-03-09 13:29:58.373925583 -0600
+@@ -71,6 +71,15 @@
}
- (void) gethostname (buf, sizeof buf);
-+ /* Trim away everything after the first '.': */
-+ i = 0;
-+ while (buf[i] != '\0' && i < sizeof(buf) - 1) {
-+ if (buf[i] == '.') {
-+ buf[i] = '\0';
-+ break;
-+ }
-+ i++;
-+ }
- printf (prompt, buf);
- (void) fflush (stdout);
}
-diff -u -r --new-file shadow-4.8.1.orig/src/login.c shadow-4.8.1/src/login.c
---- shadow-4.8.1.orig/src/login.c 2020-01-12 07:58:49.000000000 -0600
-+++ shadow-4.8.1/src/login.c 2020-02-06 17:29:33.191954722 -0600
-@@ -761,6 +761,15 @@
+ (void) gethostname (buf, sizeof buf);
++ /* Trim away everything after the first '.': */
++ i = 0;
++ while (buf[i] != '\0' && i < sizeof(buf) - 1) {
++ if (buf[i] == '.') {
++ buf[i] = '\0';
++ break;
++ }
++ i++;
++ }
+ printf (_("\n%s login: "), buf);
+ (void) fflush (stdout);
+
+--- ./src/login.c.orig 2024-03-09 13:29:58.373925583 -0600
++++ ./src/login.c 2024-03-09 13:31:39.344919998 -0600
+@@ -703,6 +703,15 @@
/* Make the login prompt look like we want it */
if (gethostname (hostn, sizeof (hostn)) == 0) {
-+ /* Trim away everything after the first '.': */
-+ int i = 0;
-+ while (hostn[i] != '\0' && i < sizeof(hostn) - 1) {
-+ if (hostn[i] == '.') {
-+ hostn[i] = '\0';
-+ break;
-+ }
-+ i++;
-+ }
- snprintf (loginprompt,
- sizeof (loginprompt),
- _("%s login: "), hostn);
++ /* Trim away everything after the first '.': */
++ int i = 0;
++ while (hostn[i] != '\0' && i < sizeof(hostn) - 1) {
++ if (hostn[i] == '.') {
++ hostn[i] = '\0';
++ break;
++ }
++ i++;
++ }
+ SNPRINTF(loginprompt, _("%s login: "), hostn);
+ } else {
+ STRTCPY(loginprompt, _("login: "));
diff --git a/source/a/shadow/shadow.url b/source/a/shadow/shadow.url
index 81ac34ebb..b49486f5a 100644
--- a/source/a/shadow/shadow.url
+++ b/source/a/shadow/shadow.url
@@ -1 +1,2 @@
https://github.com/shadow-maint/shadow
+https://github.com/shadow-maint/shadow/releases/download/4.15.1/shadow-4.15.1.tar.xz
diff --git a/source/a/smartmontools/smartmontools.SlackBuild b/source/a/smartmontools/smartmontools.SlackBuild
index 600138c07..4d9726ab7 100755
--- a/source/a/smartmontools/smartmontools.SlackBuild
+++ b/source/a/smartmontools/smartmontools.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=smartmontools
VERSION=${VERSION:-$(echo smartmontools-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/smartmontools/smartmontools.url b/source/a/smartmontools/smartmontools.url
new file mode 100644
index 000000000..30829e65e
--- /dev/null
+++ b/source/a/smartmontools/smartmontools.url
@@ -0,0 +1 @@
+https://sourceforge.net/projects/smartmontools/files/smartmontools
diff --git a/source/a/sysfsutils/sysfsutils.SlackBuild b/source/a/sysfsutils/sysfsutils.SlackBuild
index a9ee96647..c300e14c6 100755
--- a/source/a/sysfsutils/sysfsutils.SlackBuild
+++ b/source/a/sysfsutils/sysfsutils.SlackBuild
@@ -23,8 +23,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sysfsutils
-VERSION=2.1.0
-BUILD=${BUILD:-4}
+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
@@ -57,7 +57,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf sysfsutils-$VERSION
-tar xvf $CWD/sysfsutils-$VERSION.tar.bz2 || exit 1
+tar xvf $CWD/sysfsutils-$VERSION.tar.?z || exit 1
cd sysfsutils-$VERSION || exit 1
chown -R root:root .
find . \
@@ -66,28 +66,41 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+if [ ! -r configure ]; then
+ if [ -x ./autogen ]; then
+ NOCONFIGURE=1 ./autogen
+ else
+ autoreconf -vif
+ fi
+fi
+
./configure \
--prefix=/usr \
--libdir=/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
--enable-static=no \
--build=$ARCH-slackware-linux || exit 1
make || exit 1
make install DESTDIR=$PKG || exit 1
-# Unless things start whining later that this libtool junk is
-# required for some reason, out it goes. Especially in /lib,
-# where probably nothing would find it anyway.
-rm -f $PKG/lib${LIBDIRSUFFIX}/*.la
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
# .so links should really go in /usr/lib:
rm $PKG/lib${LIBDIRSUFFIX}/*.so
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+
# sanity check
if [ ! -L $PKG/lib${LIBDIRSUFFIX}/libsysfs.so.2 ]; then
exit 1
fi
( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -sf /lib${LIBDIRSUFFIX}/libsysfs.so.2 libsysfs.so )
+# pkgconfig directory should go in /usr/lib${LIBDIRSUFFIX}
+if [ -d $PKG/lib${LIBDIRSUFFIX}/pkgconfig -a ! -d $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig ]; then
+ mv $PKG/lib${LIBDIRSUFFIX}/pkgconfig $PKG/usr/lib${LIBDIRSUFFIX}
+fi
+
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -95,8 +108,10 @@ fi
mkdir -p $PKG/usr/doc/sysfsutils-$VERSION
cp -a \
- AUTHORS COPYING CREDITS NEWS README TODO \
+ AUTHORS* COPYING* CREDITS* NEWS* README* TODO* \
+ cmd/GPL* \
docs/* \
+ lib/LGPL* \
$PKG/usr/doc/sysfsutils-$VERSION
# Compress and/or relink manpages:
@@ -119,4 +134,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/sysfsutils-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/a/sysfsutils/sysfsutils.url b/source/a/sysfsutils/sysfsutils.url
index 0491bd2c5..363dc682d 100644
--- a/source/a/sysfsutils/sysfsutils.url
+++ b/source/a/sysfsutils/sysfsutils.url
@@ -1 +1 @@
-http://linux-diag.sourceforge.net/Sysfsutils.html
+https://github.com/linux-ras/sysfsutils
diff --git a/source/a/sysklogd/config/rc.syslog.new b/source/a/sysklogd/config/rc.syslog.new
index d8640bcae..ee9a022b8 100644
--- a/source/a/sysklogd/config/rc.syslog.new
+++ b/source/a/sysklogd/config/rc.syslog.new
@@ -16,12 +16,12 @@ syslogd_start() {
}
syslogd_stop() {
- killall syslogd 2> /dev/null
+ killall --ns $$ -TERM syslogd 2> /dev/null
}
syslogd_restart() {
syslogd_stop
- sleep 1
+ timeout 1 pwait --ns $$ -U root -P 1 syslogd
syslogd_start
}
diff --git a/source/a/sysklogd/sysklogd.SlackBuild b/source/a/sysklogd/sysklogd.SlackBuild
index 7f525b62f..18db0b66d 100755
--- a/source/a/sysklogd/sysklogd.SlackBuild
+++ b/source/a/sysklogd/sysklogd.SlackBuild
@@ -24,13 +24,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sysklogd
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/sysvinit-functions/functions b/source/a/sysvinit-functions/functions
index 580216d1b..470240b0f 100644
--- a/source/a/sysvinit-functions/functions
+++ b/source/a/sysvinit-functions/functions
@@ -548,7 +548,7 @@ resolve_dm_name() {
name="$1"
line=$(/sbin/dmraid -ay -t --ignorelocking | \
- egrep -iv "no block devices found|No RAID disks" | \
+ grep -E -iv "no block devices found|No RAID disks" | \
awk -F ':' "{ if (\$1 ~ /^$name$/) { print \$2; }}")
for x in $line ; do
if [[ "$x" =~ "^/dev/" ]] ; then
diff --git a/source/a/sysvinit-functions/sysvinit-functions.SlackBuild b/source/a/sysvinit-functions/sysvinit-functions.SlackBuild
index 35d576f9f..cfd18bc5e 100755
--- a/source/a/sysvinit-functions/sysvinit-functions.SlackBuild
+++ b/source/a/sysvinit-functions/sysvinit-functions.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sysvinit-functions
VERSION=${VERSION:-8.53}
-BUILD=${BUILD:-5}
+BUILD=${BUILD:-6}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/sysvinit-scripts/default/efivarfs b/source/a/sysvinit-scripts/default/efivarfs
new file mode 100644
index 000000000..973e041d7
--- /dev/null
+++ b/source/a/sysvinit-scripts/default/efivarfs
@@ -0,0 +1,7 @@
+# By default, we will mount efivarfs read-write on /sys/firmware/efi/efivars.
+# This is needed in order to create or modify EFI boot menu entries.
+# If you do not want this, you may set the variable below to 'ro' for
+# read-only, or 'nomount' (or anything else) if you do not want rc.S to mount
+# efivarfs. However, if might still be mounted by /etc/fstab or elsewhere.
+
+EFIVARFS=rw
diff --git a/source/a/sysvinit-scripts/doinst.sh b/source/a/sysvinit-scripts/doinst.sh
index c11a17985..ad6980247 100644
--- a/source/a/sysvinit-scripts/doinst.sh
+++ b/source/a/sysvinit-scripts/doinst.sh
@@ -24,6 +24,7 @@ config etc/rc.d/rc.sysvinit.new
config etc/rc.d/rc.modules.new
config etc/rc.d/rc.modules.local.new
config etc/default/cpufreq.new
+config etc/default/efivarfs.new
( cd etc/rc.d ; rm -rf rc.0 )
( cd etc/rc.d ; ln -sf rc.6 rc.0 )
diff --git a/source/a/sysvinit-scripts/scripts/rc.4 b/source/a/sysvinit-scripts/scripts/rc.4
index 971445ad1..e7e7aa587 100644
--- a/source/a/sysvinit-scripts/scripts/rc.4
+++ b/source/a/sysvinit-scripts/scripts/rc.4
@@ -23,13 +23,13 @@ fi
# gdm is on the machine then the user probably installed it and wants
# to use it by default:
if [ -x /usr/bin/gdm ]; then
- exec /usr/bin/gdm -nodaemon
+ exec /usr/bin/gdm
fi
# Someone thought that gdm looked prettier in /usr/sbin,
# so look there, too:
if [ -x /usr/sbin/gdm ]; then
- exec /usr/sbin/gdm -nodaemon
+ exec /usr/sbin/gdm
fi
# Not there? OK, try to use KDE's kdm session manager:
diff --git a/source/a/sysvinit-scripts/scripts/rc.6 b/source/a/sysvinit-scripts/scripts/rc.6
index 92338d4d8..5fec619c0 100644
--- a/source/a/sysvinit-scripts/scripts/rc.6
+++ b/source/a/sysvinit-scripts/scripts/rc.6
@@ -4,15 +4,21 @@
# 0 (halt) or runlevel 6 (reboot). It kills all processes,
# unmounts file systems and then either halts or reboots.
#
-# Version: @(#)/etc/rc.d/rc.6 2.47 Sat Jan 13 13:37:26 PST 2001
+# Version: @(#)/etc/rc.d/rc.6 15.0 Wed Nov 10 21:19:42 UTC 2021
#
# Author: Miquel van Smoorenburg <miquels@drinkel.nl.mugnet.org>
# Modified by: Patrick J. Volkerding, <volkerdi@slackware.com>
-#
# Set the path.
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+# If we are in an lxc container, set $container to skip parts of the script.
+# Thanks to Matteo Bernardini <ponce@slackbuilds.org> and Chris Willing for
+# the initial work making this script lxc compatible.
+if grep -aq container=lxc /proc/1/environ 2> /dev/null ; then
+ container="lxc"
+fi
+
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
/etc/rc.d/rc.sysvinit
@@ -43,7 +49,7 @@ esac
# Save the system time to the hardware clock using hwclock --systohc.
# This will also create or update the timestamps in /etc/adjtime.
-if [ -x /sbin/hwclock ]; then
+if [ -x /sbin/hwclock -a -z "$container" ]; then
# Check for a broken motherboard RTC clock (where ioports for rtc are
# unknown) to prevent hwclock causing a hang:
if ! grep -q " : rtc" /proc/ioports ; then
@@ -112,15 +118,10 @@ if [ -x /etc/rc.d/rc.openldap ]; then
fi
# Stop the haveged entropy daemon:
-if [ -x /etc/rc.d/rc.haveged ]; then
+if [ -x /etc/rc.d/rc.haveged -a -z "$container" ]; then
/etc/rc.d/rc.haveged stop
fi
-# Stop D-Bus:
-if [ -x /etc/rc.d/rc.messagebus ]; then
- /etc/rc.d/rc.messagebus stop
-fi
-
# Kill any processes (typically gam) that would otherwise prevent
# unmounting NFS volumes:
unset FUSER_DELAY
@@ -138,10 +139,17 @@ fi
# Unmount any NFS, SMB, or CIFS filesystems:
echo "Unmounting remote filesystems:"
/bin/umount -v -a -l -f -r -t nfs,nfs4,smbfs,cifs | tr -d ' ' | grep successfully | sed "s/:successfullyunmounted/ has been successfully unmounted./g"
+# Update PATH hashes:
+hash -r
+
+# Stop D-Bus:
+if [ -x /etc/rc.d/rc.messagebus ]; then
+ /etc/rc.d/rc.messagebus stop
+fi
# Try to shut down pppd:
PS="$(ps ax)"
-if echo "$PS" | /bin/grep -q -w pppd ; then
+if echo "$PS" | grep -q -w pppd ; then
if [ -x /usr/sbin/ppp-off ]; then
/usr/sbin/ppp-off
fi
@@ -156,7 +164,7 @@ fi
# Bring down the networking system, but first make sure that this
# isn't a diskless client with the / partition mounted via NFS:
-if ! /bin/mount | /bin/grep -q -e 'on / type nfs' -e 'on / type nfs4' ; then
+if ! /bin/mount | grep -q -e 'on / type nfs' -e 'on / type nfs4' ; then
if [ -x /etc/rc.d/rc.inet1 ]; then
/etc/rc.d/rc.inet1 stop
fi
@@ -171,8 +179,23 @@ if /bin/ls /etc/dhcpc/*.pid 1> /dev/null 2> /dev/null ; then
sleep 2
fi
+# If there is a firewall_shutdown script, run it. Most firewall setups
+# will not need to be formally shut down, but in case yours needs that
+# (perhaps to do some shutdown-time cleanup or to save the state), then
+# create an /etc/rc.d/rc.firewall_shutdown script to do these things.
+# If your rc.firewall script supports a "stop" parameter, you might only
+# need this in your rc.firewall_shutdown script:
+#
+# /etc/rc.d/rc.firewall stop
+#
+# Or in that case you could also just make rc.firewall_shutdown a symlink
+# to the rc.firewall script, since we also provide the stop parameter here.
+if [ -x /etc/rc.d/rc.firewall_shutdown ]; then
+ /etc/rc.d/rc.firewall_shutdown stop
+fi
+
# Shut down PCMCIA devices:
-if [ -x /etc/rc.d/rc.pcmcia ]; then
+if [ -x /etc/rc.d/rc.pcmcia -a -z "$container" ]; then
/etc/rc.d/rc.pcmcia stop
# The cards might need a little extra time here to deactivate:
/bin/sleep 5
@@ -184,12 +207,12 @@ if [ -x /sbin/accton -a -r /var/log/pacct ]; then
fi
# Terminate acpid before syslog:
-if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid ]; then # quit
+if [ -x /etc/rc.d/rc.acpid -a -r /var/run/acpid.pid -a -z "$container" ]; then # quit
/etc/rc.d/rc.acpid stop
fi
# Stop udev:
-if [ -x /etc/rc.d/rc.udev ]; then
+if [ -x /etc/rc.d/rc.udev -a -z "$container" ]; then
/etc/rc.d/rc.udev force-stop
fi
@@ -204,78 +227,88 @@ if [ ! "$1" = "fast" ]; then
fi
# Try to turn off quota.
-if /bin/grep -q quota /etc/fstab ; then
- if [ -x /sbin/quotaoff ]; then
+if grep -q quota /etc/fstab ; then
+ if [ -x /sbin/quotaoff -a -z "$container" ]; then
echo "Turning off filesystem quotas."
/sbin/quotaoff -a
fi
fi
# Carry a random seed between reboots.
-echo "Saving random seed from /dev/urandom in /etc/random-seed."
-# Use the pool size from /proc, or 4096 bits:
-if [ -r /proc/sys/kernel/random/poolsize ]; then
- /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null
-else
- /bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
+# Doing this properly requires the seedrng utility.
+if [ -z "$container" ]; then
+ # Any old seed that exists here shall be deemed useless:
+ if [ -f /etc/random-seed ]; then
+ rm -f /etc/random-seed
+ sync /etc
+ fi
+ if [ -x /usr/sbin/seedrng ]; then
+ /usr/sbin/seedrng
+ else # we have to fall back on the old method:
+ OLD_UMASK="$(umask)"
+ umask 077
+ mkdir -p /var/lib/seedrng
+ echo "The SeedRNG utility was not found. Generating a non-creditable and"
+ echo "inferior RNG seed: /var/lib/seedrng/seed.no-credit"
+ SEED="$(cat /var/lib/seedrng/seed.* 2>/dev/null | base64)"
+ rm -f /var/lib/seedrng/seed.*
+ sync /var/lib/seedrng
+ POOLSIZE=$(expr $(cat /proc/sys/kernel/random/poolsize 2> /dev/null || echo 4096) / 8)
+ {
+ head -c $POOLSIZE /dev/urandom
+ echo "$SEED" | base64 -d
+ } | sha512sum | cut -d ' ' -f 1 > /var/lib/seedrng/seed.no-credit
+ umask "$OLD_UMASK"
+ unset OLD_UMASK
+ unset SEED
+ fi
fi
-/bin/chmod 600 /etc/random-seed
# Before unmounting file systems write a reboot or halt record to wtmp.
$shutdown_command -w
# Turn off swap:
-if [ ! "$(cat /proc/swaps | wc -l)" = "1" ]; then
+if [ ! "$(cat /proc/swaps | wc -l)" = "1" -a -z "$container" ]; then
echo "Turning off swap."
/sbin/swapoff -a
/bin/sync
fi
# Umount all tmpfs mounts except /dev/shm and under /run:
-cat /proc/mounts | grep " tmpfs " | grep -v -e " /run " -e " /run/" -e " /dev/shm " | while read mount ; do
- umount --recursive -v $(echo $mount | cut -f 2 -d ' ') 2> /dev/null
-done
+if [ -z "$container" ]; then
+ cat /proc/mounts | grep " tmpfs " | grep -v -e " /run " -e " /run/" -e " /dev/shm " | while read mount ; do
+ umount --recursive -v $(echo $mount | cut -f 2 -d ' ') 2> /dev/null
+ done
+fi
# Unmount local file systems:
-echo "Unmounting local file systems:"
-/bin/umount -v -a -t no,proc,sysfs,devtmpfs,fuse.gvfsd-fuse,tmpfs
-
-# JFS needs a sync here or the / partition cannot be remounted read-only.
-# In spite of this, it seems that a JFS root partition will always be checked
-# (and found to be clean) at boot:
-/bin/sync
-
-echo "Remounting root filesystem read-only:"
-/bin/mount -v -n -o remount,ro /
+if [ -z "$container" ]; then
+ echo "Unmounting local file systems:"
+ /bin/umount -v -a -t no,proc,sysfs,devtmpfs,fuse.gvfsd-fuse,tmpfs
+ # Update PATH hashes:
+ hash -r
+ # JFS needs a sync here or the / partition cannot be remounted read-only.
+ # In spite of this, it seems that a JFS root partition will always be checked
+ # (and found to be clean) at boot:
+ /bin/sync
+ echo "Remounting root filesystem read-only:"
+ /bin/mount -v -n -o remount,ro /
+fi
# This never hurts:
/bin/sync
# Close any volumes opened by cryptsetup:
-if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
- cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do
- # NOTE: we only support LUKS formatted volumes (except for swap)!
- LUKS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f1 -d' ')
- DEV=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f2 -d' ')
- OPTS=$(echo $line | tr '\t' ' ' | tr -s ' ' | cut -f4 -d' ')
- if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then
- echo "Locking LUKS crypt volume '${LUKS}':"
- /sbin/cryptsetup luksClose ${LUKS}
- elif echo $OPTS | grep -wq swap ; then
- # If any of the volumes was used as encrypted swap,
- # then run mkswap on the underlying device -
- # in case other Linux installations on this computer should use it:
- echo "Erasing encrypted swap '${LUKS}' and restoring normal swap on ${DEV}:"
- /sbin/cryptsetup remove ${LUKS}
- mkswap $DEV
- fi
- done
+if [ -x /etc/rc.d/rc.luks ]; then
+ /etc/rc.d/rc.luks stop
fi
# Deactivate LVM volume groups:
-if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
- echo "Deactivating LVM volume groups:"
- /sbin/vgchange -an
+if [ -z "$container" ]; then
+ if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
+ echo "Deactivating LVM volume groups:"
+ /sbin/vgchange -an
+ fi
fi
# This never hurts again (especially since root-on-LVM always fails
@@ -290,20 +323,31 @@ fi
# This is to ensure all processes have completed on SMP machines:
wait
-if [ -x /sbin/genpowerd ]; then
- # See if this is a powerfail situation:
- if /bin/egrep -q "FAIL|SCRAM" /etc/upsstatus 2> /dev/null ; then
- # Signal UPS to shut off the inverter:
- /sbin/genpowerd -k
- if [ ! $? = 0 ]; then
- echo
- echo "There was an error signaling the UPS."
- echo "Perhaps you need to edit /etc/genpowerd.conf to configure"
- echo "the serial line and UPS type."
- # Wasting 15 seconds of precious power:
- /bin/sleep 15
- fi
- fi
+if [ "$container" = "lxc" ]; then
+ # Confirm successful shutdown of the container:
+ echo "LXC container stopped."
+fi
+
+# NUT UPS inverter shutdown support:
+# If we see a file /etc/killpower, that means we want to shut off the UPS
+# inverter on the way down. This will save as much battery power as possible
+# and avoid unnecessary full-drain/full-recharge cycles.
+if [ -e /etc/killpower -a -z "$container" ]; then
+ # First we need to restart udev or we won't be able to contact the UPS:
+ echo "Restarting udev to be able to shut the UPS inverter off..."
+ /etc/rc.d/rc.udev start
+ # Wasting precious battery power:
+ sleep 10
+ echo "Shutting down UPS inverter..."
+ upsdrvctl shutdown
+ # The power should shut off during the following sleep, but we'll give a
+ # bit of notice otherwise. Also, be sure to set your machine to start when
+ # the power resumes in the BIOS settings so that it doesn't stay off.
+ sleep 45
+ echo "The UPS power should have stopped by now, but has not."
+ echo "It's possible that the power came back during the shutdown process."
+ echo "Otherwise, check communication with the UPS."
+ sleep 15
fi
# Now halt (poweroff with APM or ACPI enabled kernels) or reboot.
@@ -313,4 +357,3 @@ if [ "$shutdown_command" = "reboot" ]; then
else
/sbin/poweroff
fi
-
diff --git a/source/a/sysvinit-scripts/scripts/rc.M b/source/a/sysvinit-scripts/scripts/rc.M
index 8a1a9b046..d5bc169a8 100644
--- a/source/a/sysvinit-scripts/scripts/rc.M
+++ b/source/a/sysvinit-scripts/scripts/rc.M
@@ -5,7 +5,7 @@
# levels 1 through 6). It usually does mounting of file
# systems et al.
#
-# Version: @(#)/etc/rc.d/rc.M 2.23 Wed Feb 26 19:20:58 PST 2003
+# Version: @(#)/etc/rc.d/rc.M 15.0 Fri Nov 12 18:51:28 UTC 2021
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Heavily modified by Patrick Volkerding <volkerdi@slackware.com>
@@ -14,6 +14,13 @@
# Tell the viewers what's going to happen.
echo "Going multiuser..."
+# If we are in an lxc container, set $container to skip parts of the script.
+# Thanks to Matteo Bernardini <ponce@slackbuilds.org> and Chris Willing for
+# the initial work making this script lxc compatible.
+if grep -aq container=lxc /proc/1/environ 2> /dev/null ; then
+ container="lxc"
+fi
+
# Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links: /sbin/ldconfig &"
@@ -22,17 +29,19 @@ fi
# Call the setterm init script to set screen blanking and power management
# defaults:
-if [ -x /etc/rc.d/rc.setterm ]; then
+if [ -x /etc/rc.d/rc.setterm -a -z "$container" ]; then
/etc/rc.d/rc.setterm
fi
-# Set the hostname.
-if [ -r /etc/HOSTNAME ]; then
- /bin/hostname $(cat /etc/HOSTNAME)
-else
- # fall back on this old default:
- echo "darkstar.example.net" > /etc/HOSTNAME
- /bin/hostname $(cat /etc/HOSTNAME)
+# Set the hostname:
+if [ -z "$container" ]; then
+ if [ -r /etc/HOSTNAME ]; then
+ /bin/hostname $(cat /etc/HOSTNAME)
+ else
+ # fall back on this old default:
+ echo "darkstar.example.net" > /etc/HOSTNAME
+ /bin/hostname $(cat /etc/HOSTNAME)
+ fi
fi
# Set the permissions on /var/log/dmesg according to whether the kernel
@@ -68,7 +77,7 @@ fi
# Hopefully this situation will be unified in the future, but for now
# that's how it is...
#
-if [ -x /etc/rc.d/rc.pcmcia ]; then
+if [ -x /etc/rc.d/rc.pcmcia -a -z "$container" ]; then
/etc/rc.d/rc.pcmcia start
# The cards might need a little extra time here to initialize.
sleep 5
@@ -79,6 +88,18 @@ if [ -x /etc/rc.d/rc.syslog ]; then
/etc/rc.d/rc.syslog start
fi
+# Start the Icecream scheduler. This needs to run on only one machine that is
+# part of the compile cluster:
+if [ -x /etc/rc.d/rc.icecc-scheduler ]; then
+ /etc/rc.d/rc.icecc-scheduler start
+fi
+
+# Start the Icecream daemon. This needs to run on every machine that will be
+# part of the compile cluster (including the machine running the scheduler):
+if [ -x /etc/rc.d/rc.iceccd ]; then
+ /etc/rc.d/rc.iceccd start
+fi
+
# Update the X font indexes:
if [ -x /usr/bin/fc-cache ]; then
echo "Updating X font indexes: /usr/bin/fc-cache -f &"
@@ -90,19 +111,19 @@ fi
# to look for device changes and to generate persistent rules if needed.
if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then
if ! grep -wq nohotplug /proc/cmdline ; then
- if [ -x /etc/rc.d/rc.udev ]; then
+ if [ -x /etc/rc.d/rc.udev -a -z "$container" ]; then
/etc/rc.d/rc.udev start
fi
fi
fi
# Start the haveged entropy daemon:
-if [ -x /etc/rc.d/rc.haveged ]; then
+if [ -x /etc/rc.d/rc.haveged -a -z "$container" ]; then
/etc/rc.d/rc.haveged start
fi
# Start the rngd entropy daemon:
-if [ -x /etc/rc.d/rc.rngd ]; then
+if [ -x /etc/rc.d/rc.rngd -a -z "$container" ]; then
/etc/rc.d/rc.rngd start
fi
@@ -135,11 +156,26 @@ elif [ -x /etc/rc.d/rc.networkmanager ]; then
/etc/rc.d/rc.networkmanager start
fi
+# Start Avahi mDNS/DNS-SD daemon:
+if [ -x /etc/rc.d/rc.avahidaemon ]; then
+ /etc/rc.d/rc.avahidaemon start
+fi
+
+# Start Avahi mDNS/DNS-SD DNS server configuration daemon:
+if [ -x /etc/rc.d/rc.avahidnsconfd ]; then
+ /etc/rc.d/rc.avahidnsconfd start
+fi
+
# Start networking daemons:
if [ -x /etc/rc.d/rc.inet2 ]; then
/etc/rc.d/rc.inet2
fi
+# Unlock any LUKS devices that still aren't unlocked:
+if [ -x /etc/rc.d/rc.luks ]; then
+ /etc/rc.d/rc.luks start
+fi
+
# Mount any additional filesystem types that haven't already been mounted:
mount -a -v 2> /dev/null | grep -v -e "already mounted" -e "ignored" | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep "${dev} " ; done
@@ -167,12 +203,12 @@ chmod 755 / 2> /dev/null
chmod 1777 /tmp /var/tmp
# Start ACPI daemon.
-if [ -x /etc/rc.d/rc.acpid ]; then
+if [ -x /etc/rc.d/rc.acpid -a -z "$container" ]; then
/etc/rc.d/rc.acpid start
fi
# Enable CPU frequency scaling:
-if [ -x /etc/rc.d/rc.cpufreq ]; then
+if [ -x /etc/rc.d/rc.cpufreq -a -z "$container" ]; then
/etc/rc.d/rc.cpufreq start
fi
@@ -258,21 +294,31 @@ fi
# Start smartd, which monitors the status of S.M.A.R.T. compatible
# hard drives and reports any problems:
-if [ -x /etc/rc.d/rc.smartd ]; then
+if [ -x /etc/rc.d/rc.smartd -a -z "$container" ]; then
/etc/rc.d/rc.smartd start
fi
-# Monitor the UPS with genpowerd.
-# To use this, uncomment this section and edit your settings in
-# /etc/genpowerd.conf (serial device, UPS type, etc). For more information,
-# see "man genpowerd" or the extensive documentation in the
-# /usr/doc/genpower-*/ directory.
-# You'll also need to configure a similar block in /etc/rc.d/rc.6 if you want
-# support for stopping the UPS's inverter after the machine halts.
-#if [ -x /sbin/genpowerd ]; then
-# echo "Starting genpowerd daemon..."
-# /sbin/genpowerd
-#fi
+# Load model-specific drivers for NUT (Network Uninterruptible power supply
+# Tools). This should be started on the machine that controls the UPS. See
+# the /etc/nut/ directory for configuration files.
+# If you manage your UPS using a serial port, you'll need to add the nut user
+# to the "dialout" group.
+if [ -x /etc/rc.d/rc.nut-drvctl -a -z "$container" ]; then
+ /etc/rc.d/rc.nut-drvctl start
+fi
+
+# Start the NUT UPS information server. This should be started on the machine
+# that controls the UPS. See the /etc/nut/ directory for configuration files.
+if [ -x /etc/rc.d/rc.nut-upsd -a -z "$container" ]; then
+ /etc/rc.d/rc.nut-upsd start
+fi
+
+# Start the NUT UPS monitor and shutdown controller. This should be run on any
+# machine that is powered by the UPS to monitor the power supply and initiate
+# shutdown if necessary. See the /etc/nut/ directory for configuration files.
+if [ -x /etc/rc.d/rc.nut-upsmon -a -z "$container" ]; then
+ /etc/rc.d/rc.nut-upsmon start
+fi
# Turn on process accounting. To enable process accounting, make sure the
# option for BSD process accounting is enabled in your kernel, and then
@@ -325,21 +371,8 @@ if grep -q quota /etc/fstab ; then
fi
fi
-# Start the SASL authentication server. This provides SASL
-# authentication services for sendmail/postfix:
-if [ -x /etc/rc.d/rc.saslauthd ]; then
- /etc/rc.d/rc.saslauthd start
-fi
-
-# Start the mail server. Try the rc.sendmail script first, then try rc.postfix.
-if [ -x /etc/rc.d/rc.sendmail -a -x usr/sbin/makemap ]; then
- /etc/rc.d/rc.sendmail start
-elif [ -x /etc/rc.d/rc.postfix -a -x usr/sbin/postdrop ]; then
- /etc/rc.d/rc.postfix start
-fi
-
# Load ALSA (sound) defaults:
-if [ -x /etc/rc.d/rc.alsa ]; then
+if [ -x /etc/rc.d/rc.alsa -a -z "$container" ]; then
/etc/rc.d/rc.alsa
fi
@@ -353,14 +386,15 @@ if [ -x /etc/rc.d/rc.keymap ]; then
/etc/rc.d/rc.keymap
fi
-# Start the MySQL database:
+# Start the MariaDB database:
if [ -x /etc/rc.d/rc.mysqld ]; then
/etc/rc.d/rc.mysqld start
fi
-# Start Apache web server:
-if [ -x /etc/rc.d/rc.httpd ]; then
- /etc/rc.d/rc.httpd start
+# Start the SASL authentication server. This provides SASL
+# authentication services for sendmail/postfix:
+if [ -x /etc/rc.d/rc.saslauthd ]; then
+ /etc/rc.d/rc.saslauthd start
fi
# Start OpenLDAP:
@@ -369,8 +403,8 @@ if [ -x /etc/rc.d/rc.openldap ]; then
fi
# Start local LDAP name service daemon (from nss-pam-ldapd):
-if [ -x /etc/rc.d/rc.nslcd ]; then
- /etc/rc.d/rc.nslcd start
+if [ -x /etc/rc.d/rc.nss-pam-ldap ]; then
+ /etc/rc.d/rc.nss-pam-ldap start
fi
# Start Dovecot:
@@ -378,7 +412,19 @@ if [ -x /etc/rc.d/rc.dovecot ]; then
/etc/rc.d/rc.dovecot start
fi
-# Start Samba (a file/print server for Win95/NT machines).
+# Start the mail server. Try the rc.sendmail script first, then try rc.postfix.
+if [ -x /etc/rc.d/rc.sendmail -a -x /usr/sbin/makemap ]; then
+ /etc/rc.d/rc.sendmail start
+elif [ -x /etc/rc.d/rc.postfix -a -x /usr/sbin/postdrop ]; then
+ /etc/rc.d/rc.postfix start
+fi
+
+# Start Apache web server:
+if [ -x /etc/rc.d/rc.httpd ]; then
+ /etc/rc.d/rc.httpd start
+fi
+
+# Start Samba (a file/print server for Windows machines).
# Samba can be started in /etc/inetd.conf instead.
if [ -x /etc/rc.d/rc.samba ]; then
/etc/rc.d/rc.samba start
@@ -389,18 +435,6 @@ if [ -x /etc/rc.d/rc.gpm ]; then
/etc/rc.d/rc.gpm start
fi
-# Start the Icecream scheduler. This needs to run on only one machine that is
-# part of the compile cluster:
-if [ -x /etc/rc.d/rc.icecc-scheduler ]; then
- /etc/rc.d/rc.icecc-scheduler start
-fi
-
-# Start the Icecream daemon. This needs to run on every machine that will be
-# part of the compile cluster (including the machine running the scheduler):
-if [ -x /etc/rc.d/rc.iceccd ]; then
- /etc/rc.d/rc.iceccd start
-fi
-
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
/etc/rc.d/rc.sysvinit
diff --git a/source/a/sysvinit-scripts/scripts/rc.S b/source/a/sysvinit-scripts/scripts/rc.S
index ecf2e5502..85a2ebc31 100644
--- a/source/a/sysvinit-scripts/scripts/rc.S
+++ b/source/a/sysvinit-scripts/scripts/rc.S
@@ -7,26 +7,58 @@
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+# If we are in an lxc container, set $container to skip parts of the script.
+# Thanks to Matteo Bernardini <ponce@slackbuilds.org> and Chris Willing for
+# the initial work making this script lxc compatible.
+if grep -aq container=lxc /proc/1/environ 2> /dev/null ; then
+ container="lxc"
+fi
+
# Mount /proc if it is not already mounted:
-if [ ! -d /proc/sys ]; then
+if [ ! -d /proc/sys -a -z "$container" ]; then
/sbin/mount -v proc /proc -n -t proc 2> /dev/null
fi
# Mount /sys if it is not already mounted:
-if [ ! -d /sys/kernel ]; then
+if [ ! -d /sys/kernel -a -z "$container" ]; then
/sbin/mount -v sysfs /sys -n -t sysfs 2> /dev/null
fi
+# The efivarfs filesystem is used for reading and writing EFI variables, such
+# as the boot menu entries. By default efivarfs will be mounted read-write on
+# the /sys/firmware/efi/efivars directory. To modify this behavior, edit the
+# file: /etc/default/efivarfs
+# Only try to mount if this directory exists (so the kernel supports efivarfs):
+if [ -d /sys/firmware/efi/efivars ]; then
+ # Only try to mount if efivarfs is not already mounted:
+ if ! mount | grep -wq efivarfs ; then
+ # Mount according to /etc/default/efivarfs:
+ if [ -r /etc/default/efivarfs ]; then
+ . /etc/default/efivarfs
+ else # default
+ EFIVARFS=rw
+ fi
+ case "$EFIVARFS" in
+ 'rw')
+ mount -o rw -t efivarfs none /sys/firmware/efi/efivars
+ ;;
+ 'ro')
+ mount -o ro -t efivarfs none /sys/firmware/efi/efivars
+ ;;
+ esac
+ fi
+fi
+
# If /run exists, mount a tmpfs on it (unless the
# initrd has already done so):
-if [ -d /run ]; then
+if [ -d /run -a -z "$container" ]; then
if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then
/sbin/mount -v -n -t tmpfs tmpfs /run -o mode=0755,size=32M,nodev,nosuid,noexec
fi
fi
# Load the loop device kernel module:
-if [ -x /etc/rc.d/rc.loop ]; then
+if [ -x /etc/rc.d/rc.loop -a -z "$container" ]; then
/etc/rc.d/rc.loop start
fi
@@ -40,34 +72,36 @@ fi
# So use it. :-)
if grep -wq sysfs /proc/mounts && grep -q devtmpfs /proc/filesystems ; then
if ! grep -wq nohotplug /proc/cmdline ; then
- if [ -x /etc/rc.d/rc.udev ]; then
+ if [ -x /etc/rc.d/rc.udev -a -z "$container" ]; then
/etc/rc.d/rc.udev start
fi
fi
fi
# Mount Control Groups filesystem interface:
-if grep -wq cgroup /proc/filesystems ; then
- if [ -d /sys/fs/cgroup ]; then
- # See linux-*/Documentation/cgroups/cgroups.txt (section 1.6)
- # Check if we have some tools to autodetect the available cgroup controllers
- if [ -x /bin/cut -a -x /bin/tail ]; then
- # Mount a tmpfs as the cgroup filesystem root
- mount -t tmpfs -o mode=0755,size=8M cgroup_root /sys/fs/cgroup
- # Autodetect available controllers and mount them in subfolders
- controllers="$(/bin/cut -f 1 /proc/cgroups | /bin/tail -n +2)"
- for i in $controllers; do
- mkdir /sys/fs/cgroup/$i
- mount -t cgroup -o $i $i /sys/fs/cgroup/$i
- done
- unset i controllers
+if [ -z "$container" ]; then
+ if grep -wq cgroup /proc/filesystems ; then
+ if [ -d /sys/fs/cgroup ]; then
+ # See linux-*/Documentation/admin-guide/cgroup-v1/cgroups.rst (section 1.6)
+ # Check if we have some tools to autodetect the available cgroup controllers
+ if [ -x /bin/cut -a -x /bin/tail ]; then
+ # Mount a tmpfs as the cgroup filesystem root
+ mount -t tmpfs -o mode=0755,size=8M cgroup_root /sys/fs/cgroup
+ # Autodetect available controllers and mount them in subfolders
+ controllers="$(/bin/cut -f 1 /proc/cgroups | /bin/tail -n +2)"
+ for i in $controllers; do
+ mkdir /sys/fs/cgroup/$i
+ mount -t cgroup -o $i $i /sys/fs/cgroup/$i
+ done
+ unset i controllers
+ else
+ # We can't use autodetection so fall back mounting them all together
+ mount -t cgroup cgroup /sys/fs/cgroup
+ fi
else
- # We can't use autodetection so fall back mounting them all together
- mount -t cgroup cgroup /sys/fs/cgroup
+ mkdir -p /dev/cgroup
+ mount -t cgroup cgroup /dev/cgroup
fi
- else
- mkdir -p /dev/cgroup
- mount -t cgroup cgroup /dev/cgroup
fi
fi
@@ -76,121 +110,55 @@ fi
# /etc/lvm/backup/ (LVM2). This is created by /sbin/vgscan, so to
# use LVM you must run /sbin/vgscan yourself the first time (and
# create some VGs and LVs).
-# Create LVM lock/run directories:
-mkdir -p -m 0700 /run/lvm /run/lock /run/lock/lvm
-if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
- echo "Initializing LVM (Logical Volume Manager):"
- # Check for device-mapper support.
- if ! grep -wq device-mapper /proc/devices ; then
- # Try to load a device-mapper kernel module:
- /sbin/modprobe -q dm-mod
- fi
- # Scan for new volume groups:
- /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null
- if [ $? = 0 ]; then
- # Make volume groups available to the kernel.
- # This should also make logical volumes available.
- /sbin/vgchange -ay --ignorelockingfailure
+if [ -z "$container" ]; then
+ # Create LVM lock/run directories:
+ mkdir -p -m 0700 /run/lvm /run/lock /run/lock/lvm
+ if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
+ echo "Initializing LVM (Logical Volume Manager):"
+ # Check for device-mapper support.
+ if ! grep -wq device-mapper /proc/devices ; then
+ # Try to load a device-mapper kernel module:
+ /sbin/modprobe -q dm-mod
+ fi
+ # Scan for new volume groups:
+ /sbin/vgscan --mknodes --ignorelockingfailure 2> /dev/null
+ if [ $? = 0 ]; then
+ # Make volume groups available to the kernel.
+ # This should also make logical volumes available.
+ /sbin/vgchange -ay --ignorelockingfailure
+ fi
fi
fi
-# Open any volumes created by cryptsetup.
-#
-# Some notes on /etc/crypttab in Slackware:
-# Only LUKS formatted volumes are supported (except for swap)
-# crypttab follows the following format:
-# <luks_name> <device> <password> <options>
-#
-# <luks_name>: This is the name of your LUKS volume.
-# For example: crypt-home
-#
-# <device>: This is the device containing your LUKS volume.
-# For example: /dev/sda2
-#
-# <password>: This is either the volume password in plain text, or the name of
-# a key file. Use 'none' to interactively enter password on boot.
-#
-# <options>: Comma-separated list of options. Note that there must be a
-# password field for any options to be picked up (use a password of 'none' to
-# get a password prompt at boot). The following options are supported:
-#
-# discard -- this will cause --allow-discards to be passed to the cryptsetup
-# program while opening the LUKS volume.
-#
-# ro -- this will cause --readonly to be passed to the cryptsetup program while
-# opening the LUKS volume.
-#
-# swap -- this option cannot be used with other options. The device given will
-# be formatted as a new encrypted volume with a random key on boot, and used as
-# swap.
-#
-if [ -f /etc/crypttab -a -x /sbin/cryptsetup ]; then
- # First, check for device-mapper support.
- if ! grep -wq device-mapper /proc/devices ; then
- # If device-mapper exists as a module, try to load it.
- # Try to load a device-mapper kernel module:
- /sbin/modprobe -q dm-mod
- fi
- # NOTE: we only support LUKS formatted volumes (except for swap)!
- cat /etc/crypttab | grep -v "^#" | grep -v "^$" | while read line; do
- eval LUKSARRAY=( $line )
- LUKS="${LUKSARRAY[0]}"
- DEV="${LUKSARRAY[1]}"
- PASS="${LUKSARRAY[2]}"
- OPTS="${LUKSARRAY[3]}"
- LUKSOPTS=""
- if echo $OPTS | grep -wq ro ; then LUKSOPTS="${LUKSOPTS} --readonly" ; fi
- if echo $OPTS | grep -wq discard ; then LUKSOPTS="${LUKSOPTS} --allow-discards" ; fi
- # Skip LUKS volumes that were already unlocked (in the initrd):
- /sbin/cryptsetup status $LUKS 2>/dev/null | head -n 1 | grep -q "is active" && continue
- if /sbin/cryptsetup isLuks $DEV 2>/dev/null ; then
- if [ -z "${LUKSOPTS}" ]; then
- echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV':"
- else
- echo "Unlocking LUKS encrypted volume '${LUKS}' on device '$DEV' with options '${LUKSOPTS}':"
- fi
- if [ -n "${PASS}" -a "${PASS}" != "none" ]; then
- if [ -f "${PASS}" ]; then
- # A password was given a key-file filename
- /sbin/cryptsetup ${LUKSOPTS} --key-file=${PASS} luksOpen $DEV $LUKS
- else
- # A password was provided in plain text
- echo "${PASS}" | /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS
- fi
- else
- # No password was given, or a password of 'none' was given
- /sbin/cryptsetup ${LUKSOPTS} luksOpen $DEV $LUKS </dev/tty0 >/dev/tty0 2>&1
- fi
- elif echo $OPTS | grep -wq swap ; then
- # If any of the volumes is to be used as encrypted swap,
- # then encrypt it using a random key and run mkswap:
- echo "Creating encrypted swap volume '${LUKS}' on device '$DEV':"
- /sbin/cryptsetup --cipher=aes --key-file=/dev/urandom --key-size=256 create $LUKS $DEV
- mkswap /dev/mapper/$LUKS
- fi
- done
+# Open any volumes created by cryptsetup:
+if [ -x /etc/rc.d/rc.luks -a -f /etc/crypttab -a -x /sbin/cryptsetup -a -z "$container" ]; then
+ /etc/rc.d/rc.luks start
fi
# Enable swapping:
-/sbin/swapon -a 2> /dev/null
+if [ -z "$container" ]; then
+ /sbin/swapon -a 2> /dev/null
+fi
# Set the tick and frequency for the system clock.
# Default values are: TICK=10000 and FREQ=0
-TICK=10000
-FREQ=0
-# If there's a /etc/default/adjtimex config file, source it to override
-# the default TICK and FREQ:
-if [ -r /etc/default/adjtimex ]; then
- . /etc/default/adjtimex
-fi
-if /sbin/adjtimex --tick $TICK --frequency $FREQ; then
- echo "Setting the system clock rate: /sbin/adjtimex --tick $TICK --frequency $FREQ"
-else
- echo "Failed to set system clock with adjtimex, possibly invalid parameters? (TICK=$TICK FREQ=$FREQ)"
+if [ -z "$container" ]; then
+ TICK=10000
+ FREQ=0
+ # If there's a /etc/default/adjtimex config file, source it to override
+ # the default TICK and FREQ:
+ if [ -r /etc/default/adjtimex ]; then
+ . /etc/default/adjtimex
+ fi
+ if /sbin/adjtimex --tick $TICK --frequency $FREQ; then
+ echo "Setting the system clock rate: /sbin/adjtimex --tick $TICK --frequency $FREQ"
+ else
+ echo "Failed to set system clock with adjtimex, possibly invalid parameters? (TICK=$TICK FREQ=$FREQ)"
+ fi
fi
# Set the system time from the hardware clock using hwclock --hctosys.
-if [ -x /sbin/hwclock ]; then
+if [ -x /sbin/hwclock -a -z "$container" ]; then
# Check for a broken motherboard RTC clock (where ioports for rtc are
# unknown) to prevent hwclock causing a hang:
if ! grep -q " : rtc" /proc/ioports ; then
@@ -214,106 +182,113 @@ if [ -x /sbin/hwclock ]; then
fi
# Test to see if the root partition is read-only, like it ought to be.
-READWRITE=no
-if touch /fsrwtestfile 2>/dev/null; then
- rm -f /fsrwtestfile
- READWRITE=yes
-else
- echo "Testing root filesystem status: read-only filesystem"
+if [ -z "$container" ]; then
+ READWRITE=no
+ if touch /fsrwtestfile 2>/dev/null; then
+ rm -f /fsrwtestfile
+ READWRITE=yes
+ else
+ echo "Testing root filesystem status: read-only filesystem"
+ fi
fi
# See if a forced filesystem check was requested at shutdown:
-if [ -r /etc/forcefsck ]; then
+if [ -r /etc/forcefsck -a -z "$container" ]; then
FORCEFSCK="-f"
fi
-# If we're using F2FS for the root filesystem, don't check it as it doesn't
-# allow checking a read-only filesystem:
-if grep -q ' / f2fs ' /proc/mounts ; then
- echo "Remounting root device with read-write enabled."
- /sbin/mount -w -v -n -o remount /
-elif [ ! $READWRITE = yes ]; then
- # Check the root filesystem:
- RETVAL=0
- if [ ! -r /etc/fastboot ]; then
- echo "Checking root filesystem:"
- /sbin/fsck $FORCEFSCK -C -a /
- RETVAL=$?
- fi
- # An error code of 2 or higher will require a reboot.
- if [ $RETVAL -ge 2 ]; then
- # An error code equal to or greater than 4 means that some errors
- # could not be corrected. This requires manual attention, so we
- # offer a chance to try to fix the problem in single-user mode:
- if [ $RETVAL -ge 4 ]; then
- echo
- echo "***********************************************************"
- echo "*** An error occurred during the root filesystem check. ***"
- echo "*** You will now be given a chance to log into the ***"
- echo "*** system in single-user mode to fix the problem. ***"
- echo "*** ***"
- echo "*** If you are using the ext2 filesystem, running ***"
- echo "*** 'e2fsck -v -y <partition>' might help. ***"
- echo "***********************************************************"
- echo
- echo "Once you exit the single-user shell, the system will reboot."
- echo
- PS1="(Repair filesystem) \#"; export PS1
- sulogin
- else # With an error code of 2 or 3, reboot the machine automatically:
- echo
- echo "***********************************"
- echo "*** The filesystem was changed. ***"
- echo "*** The system will now reboot. ***"
- echo "***********************************"
- echo
+# Check the root filesystem:
+if [ -z "$container" ]; then
+ # If we're using F2FS for the root filesystem, don't check it as it doesn't
+ # allow checking a read-only filesystem:
+ if grep -q ' / f2fs ' /proc/mounts ; then
+ echo "Remounting root device with read-write enabled."
+ /sbin/mount -w -v -n -o remount /
+ elif [ ! $READWRITE = yes ]; then
+ # Check the root filesystem:
+ RETVAL=0
+ if [ ! -r /etc/fastboot ]; then
+ echo "Checking root filesystem:"
+ /sbin/fsck $FORCEFSCK -C -a /
+ RETVAL=$?
fi
- echo "Unmounting file systems."
- /sbin/umount -a -r
- /sbin/mount -n -o remount,ro /
- echo "Rebooting system."
- reboot -f
- fi
- # Remount the root filesystem in read-write mode
- echo "Remounting root device with read-write enabled."
- /sbin/mount -w -v -n -o remount /
- if [ $? -gt 0 ] ; then
- echo "FATAL: Attempt to remount root device as read-write failed! This is going to"
- echo "cause serious problems."
- fi
-else
- echo "Testing root filesystem status: read-write filesystem"
- echo
- echo "ERROR: Root partition has already been mounted read-write. Cannot check!"
- echo
- echo "For filesystem checking to work properly, your system must initially mount"
- echo "the root partition as read only. If you're booting with LILO, add a line:"
- echo
- echo " read-only"
- echo
- echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
-fi # Done checking root filesystem
+ # An error code of 2 or higher will require a reboot.
+ if [ $RETVAL -ge 2 ]; then
+ # An error code equal to or greater than 4 means that some errors
+ # could not be corrected. This requires manual attention, so we
+ # offer a chance to try to fix the problem in single-user mode:
+ if [ $RETVAL -ge 4 ]; then
+ echo
+ echo "***********************************************************"
+ echo "*** An error occurred during the root filesystem check. ***"
+ echo "*** You will now be given a chance to log into the ***"
+ echo "*** system in single-user mode to fix the problem. ***"
+ echo "*** ***"
+ echo "*** If you are using the ext2 filesystem, running ***"
+ echo "*** 'e2fsck -v -y <partition>' might help. ***"
+ echo "***********************************************************"
+ echo
+ echo "Once you exit the single-user shell, the system will reboot."
+ echo
+ PS1="(Repair filesystem) \#"; export PS1
+ sulogin
+ else # With an error code of 2 or 3, reboot the machine automatically:
+ echo
+ echo "***********************************"
+ echo "*** The filesystem was changed. ***"
+ echo "*** The system will now reboot. ***"
+ echo "***********************************"
+ echo
+ fi
+ echo "Unmounting file systems."
+ /sbin/umount -a -r
+ /sbin/mount -n -o remount,ro /
+ echo "Rebooting system."
+ reboot -f
+ fi
+ # Remount the root filesystem in read-write mode
+ echo "Remounting root device with read-write enabled."
+ /sbin/mount -w -v -n -o remount /
+ if [ $? -gt 0 ] ; then
+ echo "FATAL: Attempt to remount root device as read-write failed! This is going to"
+ echo "cause serious problems."
+ fi
+ else
+ echo "Testing root filesystem status: read-write filesystem"
+ echo
+ echo "ERROR: Root partition has already been mounted read-write. Cannot check!"
+ echo
+ echo "For filesystem checking to work properly, your system must initially mount"
+ echo "the root partition as read only. If you're booting with LILO, add a line:"
+ echo
+ echo " read-only"
+ echo
+ echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
+ fi # Done checking root filesystem
+fi
# If /etc/mtab is a symlink (probably to /proc/mounts) then we don't want to mess with it.
if [ ! -L /etc/mtab -o ! -r /etc/mtab ]; then
# /etc/mtab is a file (or doesn't exist), so we'll handle it the old way:
# Any /etc/mtab that exists here is old, so we start with a new one:
/bin/rm -f /etc/mtab{,~,.tmp} && /bin/touch /etc/mtab
- # Add /, /proc, /sys, and /dev/shm mounts to /etc/mtab:
- /sbin/mount -f -w /
- if [ -d /proc/sys ]; then
- /sbin/mount -f -t proc proc /proc
- fi
- if [ -d /sys/bus ]; then
- /sbin/mount -f -t sysfs sysfs /sys
- fi
- if grep -q '^[^ ]\+ /dev/shm ' /proc/mounts 2> /dev/null ; then
- /sbin/mount -f -t tmpfs tmpfs /dev/shm
+ if [ -z "$container" ]; then
+ # Add /, /proc, /sys, and /dev/shm mounts to /etc/mtab:
+ /sbin/mount -f -w /
+ if [ -d /proc/sys ]; then
+ /sbin/mount -f -t proc proc /proc
+ fi
+ if [ -d /sys/bus ]; then
+ /sbin/mount -f -t sysfs sysfs /sys
+ fi
+ if grep -q '^[^ ]\+ /dev/shm ' /proc/mounts 2> /dev/null ; then
+ /sbin/mount -f -t tmpfs tmpfs /dev/shm
+ fi
fi
fi
# Configure ISA Plug-and-Play devices:
-if [ -r /etc/isapnp.conf ]; then
+if [ -r /etc/isapnp.conf -a -z "$container" ]; then
if [ -x /sbin/isapnp ]; then
/sbin/isapnp /etc/isapnp.conf
fi
@@ -321,48 +296,64 @@ fi
# Run the kernel module script. This updates the module dependencies and
# also supports manually loading kernel modules through rc.modules.local.
-if [ -x /etc/rc.d/rc.modules ]; then
+if [ -x /etc/rc.d/rc.modules -a -z "$container" ]; then
/etc/rc.d/rc.modules
fi
# Configure kernel parameters:
-if [ -x /sbin/sysctl -a -r /etc/sysctl.conf ]; then
- echo "Configuring kernel parameters: /sbin/sysctl -e --system"
- /sbin/sysctl -e --system
-elif [ -x /sbin/sysctl ]; then
- echo "Configuring kernel parameters: /sbin/sysctl -e --system"
+if [ -r /etc/default/sysctl ]; then
+ # Source user defined options:
+ . /etc/default/sysctl
+else
+ SYSCTL_OPTIONS="-e --system"
+fi
+if [ -x /sbin/sysctl -a -r /etc/sysctl.conf -a -z "$container" ]; then
+ echo "Configuring kernel parameters: /sbin/sysctl $SYSCTL_OPTIONS"
+ /sbin/sysctl $SYSCTL_OPTIONS
+elif [ -x /sbin/sysctl -a -z "$container" ]; then
+ echo "Configuring kernel parameters: /sbin/sysctl $SYSCTL_OPTIONS"
# Don't say "Applying /etc/sysctl.conf" or complain if the file doesn't exist
- /sbin/sysctl -e --system 2> /dev/null | grep -v "Applying /etc/sysctl.conf"
+ /sbin/sysctl $SYSCTL_OPTIONS 2> /dev/null | grep -v "Applying /etc/sysctl.conf"
fi
+unset SYSCTL_OPTIONS
# Check all the non-root filesystems:
-if [ ! -r /etc/fastboot ]; then
+if [ ! -r /etc/fastboot -a -z "$container" ]; then
echo "Checking non-root filesystems:"
- /sbin/fsck $FORCEFSCK -C -R -A -a
+ if [ -z "$FORCEFSCK" ]; then
+ /sbin/fsck -C -M -R -A -a
+ else
+ /sbin/fsck $FORCEFSCK -C -R -A -a
+ fi
fi
# Mount usbfs only if it is found in /etc/fstab:
-if grep -wq usbfs /proc/filesystems; then
- if ! grep -wq usbfs /proc/mounts ; then
- if grep -wq usbfs /etc/fstab; then
- /sbin/mount -v /proc/bus/usb
+if [ -z "$container" ]; then
+ if grep -wq usbfs /proc/filesystems; then
+ if ! grep -wq usbfs /proc/mounts ; then
+ if grep -wq usbfs /etc/fstab; then
+ /sbin/mount -v /proc/bus/usb
+ fi
fi
fi
fi
-# Mount non-root file systems in fstab, but not NFS or SMB
-# because TCP/IP is not yet configured, and not proc or sysfs
-# because those have already been mounted. Also check that
-# devpts is not already mounted before attempting to mount
-# it. With a 2.6.x or newer kernel udev mounts devpts.
-echo "Mounting non-root local filesystems:"
-if /bin/grep -wq devpts /proc/mounts ; then
+# Mount non-root file systems in fstab, but not NFS or SMB because TCP/IP is
+# not yet configured, and not proc or sysfs because those have already been
+# mounted. Also check that devpts is not already mounted before attempting to
+# mount it.
+if [ -z "$container" ]; then
+ SKIPFS="nonfs,nosmbfs,nocifs,noproc,nosysfs"
+ if /bin/grep -wq devpts /proc/mounts ; then
+ SKIPFS="${SKIPFS},nodevpts"
+ fi
+ echo "Mounting non-root local filesystems:"
# This pipe after the mount command is just to convert the new
# mount verbose output back to the old format that contained
# more useful information:
- /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep " ${dev} " ; done
-else
- /sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs | grep successfully | cut -f 1 -d : | tr -d ' ' | while read dev ; do mount | grep " ${dev} " ; done
+ ( /sbin/mount -a -v -o remount -O ro -v -t ${SKIPFS} ; /sbin/mount -a -v -t ${SKIPFS} ) | \
+ grep successfully | cut -f 1 -d : | tr -d ' ' | \
+ while read dev ; do mount | grep " ${dev} " ; done
fi
# Make sure that /var/run is a symbolic link pointing to /run:
@@ -373,12 +364,8 @@ fi
# Enable swapping again. This is needed in case a swapfile is used,
# as it can't be enabled until the filesystem it resides on has been
# mounted read-write.
-/sbin/swapon -a 2> /dev/null
-
-# Start libcgroup services:
-if [ -x /etc/rc.d/rc.cgconfig -a -x /etc/rc.d/rc.cgred -a -d /sys/fs/cgroup ]; then
- /etc/rc.d/rc.cgconfig start ; echo " /usr/sbin/cgconfigparser -l /etc/cgconfig.conf"
- /etc/rc.d/rc.cgred start
+if [ -z "$container" ]; then
+ /sbin/swapon -a 2> /dev/null
fi
# Clean up some temporary files:
@@ -396,6 +383,12 @@ if [ -d /var/lock/subsys ]; then
rm -f /var/lock/subsys/*
fi
+# Start libcgroup services:
+if [ -x /etc/rc.d/rc.cgconfig -a -x /etc/rc.d/rc.cgred -a -d /sys/fs/cgroup ]; then
+ /etc/rc.d/rc.cgconfig start ; echo " /usr/sbin/cgconfigparser -l /etc/cgconfig.conf"
+ /etc/rc.d/rc.cgred start
+fi
+
# Create /tmp/{.ICE-unix,.X11-unix} if they are not present:
if [ ! -e /tmp/.ICE-unix ]; then
mkdir -p /tmp/.ICE-unix
@@ -405,6 +398,8 @@ if [ ! -e /tmp/.X11-unix ]; then
mkdir -p /tmp/.X11-unix
chmod 1777 /tmp/.X11-unix
fi
+# Clear /tmp/{.ICE-unix,.X11-unix}:
+rm -f /tmp/.ICE-unix/* /tmp/.X11-unix/*
# Create a fresh utmp file:
touch /var/run/utmp
@@ -417,8 +412,17 @@ mkdir -p /var/run/faillock
# Update the current kernel level in the /etc/motd (Message Of The Day) file,
# if the first line of that file begins with the word 'Linux'.
# You are free to modify the rest of the file as you see fit.
-if [ -x /bin/sed ]; then
- /bin/sed -i "{1s/^Linux.*/$(/bin/uname -sr)\./}" /etc/motd
+# We'll only do this if /etc/motd already exists, is writable, and the first
+# line starts with "Linux" followed by a version number that needs to be
+# updated.
+#
+if [ -w /etc/motd ]; then
+ if head -n 1 /etc/motd | grep -q "^Linux" ; then
+ # Replace the kernel version if it is not correct:
+ if [ ! "$(/bin/uname -r)." = "$(head -n 1 /etc/motd | cut -f 2 -d ' ')" ]; then
+ sed -i "{1s/^Linux.*/$(/bin/uname -sr)\./}" /etc/motd
+ fi
+ fi
fi
# If there are SystemV init scripts for this runlevel, run them.
@@ -430,19 +434,54 @@ fi
# CAREFUL! This can make some systems hang if the rc.serial script isn't
# set up correctly. If this happens, you may have to edit the file from a
# boot disk, and/or set it as non-executable:
-if [ -x /etc/rc.d/rc.serial ]; then
+if [ -x /etc/rc.d/rc.serial -a -z "$container" ]; then
/etc/rc.d/rc.serial start
fi
# Carry an entropy pool between reboots to improve randomness.
-if [ -f /etc/random-seed ]; then
- echo "Using /etc/random-seed to initialize /dev/urandom."
- cat /etc/random-seed > /dev/urandom
-fi
-# Use the pool size from /proc, or 4096 bits:
-if [ -r /proc/sys/kernel/random/poolsize ]; then
- dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(expr $(cat /proc/sys/kernel/random/poolsize) / 8) 2> /dev/null
-else
- dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
+# To do this properly, we need to utilize the "seedrng" utility, since that
+# supports the ioctls in recent kernels that allow the RNG to be initialized
+# after seeding. Otherwise using the script methods that were previously
+# recommended in the kernel source, it could take a long time for entropy
+# written to /dev/urandom to actually add to the entropy, and the new seed
+# that's output immediately afterward might actually have less entropy. This
+# would only be an issue in case a power failure occured before a proper
+# shutdown, or if a proper shutdown happened before enough time had gone by
+# to generate good entropy. We'll favor using seedrng, but if it's missing
+# (shouldn't be) then we'll fall back on using the script method.
+if [ -z "$container" ]; then
+ # If the old /etc/random-seed exists and no seedrng-generated seeds exist,
+ # then we might as well use it for non-creditable entropy:
+ OLD_UMASK="$(umask)"
+ umask 077
+ if [ -f /etc/random-seed ]; then
+ echo "Appending /etc/random-seed to /var/lib/seedrng/seed.no-credit."
+ SEED="$(base64 /etc/random-seed)"
+ rm -f /etc/random-seed
+ sync /etc
+ mkdir -p /var/lib/seedrng
+ echo "$SEED" | base64 -d >> /var/lib/seedrng/seed.no-credit
+ fi
+ # If we have the seedrng utility, we will use it to initialize the RNG:
+ if [ -x /usr/sbin/seedrng ]; then
+ /usr/sbin/seedrng
+ else # we have to fall back on the old method:
+ echo "The SeedRNG utility was not found. Seeding the RNG with an inferior method."
+ SEED="$(cat /var/lib/seedrng/seed.* 2> /dev/null | base64)"
+ rm -f /var/lib/seedrng/seed.*
+ sync /var/lib/seedrng
+ echo "$SEED" | base64 -d > /dev/urandom
+ # The seed saved below isn't going to be as large as the pool size.
+ # Nevertheless we'll try to get a little entropy saved from our
+ # previous seed(s) plus some bits from /dev/urandom (which *might* have
+ # some additional entropy in it). It's probably better than nothing.
+ echo "Saving a new uncreditable seed: /var/lib/seedrng/seed.no-credit"
+ POOLSIZE=$(expr $(cat /proc/sys/kernel/random/poolsize 2> /dev/null || echo 4096) / 8)
+ {
+ head -c $POOLSIZE /dev/urandom
+ echo "$SEED" | base64 -d
+ } | sha512sum | cut -d ' ' -f 1 > /var/lib/seedrng/seed.no-credit
+ fi
+ unset SEED
+ umask "$OLD_UMASK"
fi
-chmod 600 /etc/random-seed
diff --git a/source/a/sysvinit-scripts/scripts/rc.cpufreq b/source/a/sysvinit-scripts/scripts/rc.cpufreq
index 10d713f09..82936d545 100644
--- a/source/a/sysvinit-scripts/scripts/rc.cpufreq
+++ b/source/a/sysvinit-scripts/scripts/rc.cpufreq
@@ -29,25 +29,25 @@
# also provides information about the recent load.
SCALING_GOVERNOR=ondemand
-# For CPUs using intel_pstate, always use the performance governor. This also
-# provides power savings on Intel processors while avoiding the ramp-up lag
+# For CPUs using intel_pstate or amd-pstate-epp, always use the performance
+# governor. This also provides power savings while avoiding the ramp-up lag
# present when using the powersave governor (which is the default if ondemand
# is requested on these machines):
-if [ "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver 2> /dev/null)" = "intel_pstate" ]; then
+if [ "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver 2> /dev/null)" = "intel_pstate" -o "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver 2> /dev/null)" = "amd-pstate-epp" ]; then
SCALING_GOVERNOR="performance"
fi
-# If rc.cpufreq is given an option, use it for the CPU scaling governor instead:
-if [ ! -z "$1" -a "$1" != "start" ]; then
- SCALING_GOVERNOR=$1
-fi
-
# To force a particular option without having to edit this file, uncomment the
# line in /etc/default/cpufreq and edit it to select the desired option:
if [ -r /etc/default/cpufreq ]; then
. /etc/default/cpufreq
fi
+# If rc.cpufreq is given an option, use it for the CPU scaling governor instead:
+if [ ! -z "$1" -a "$1" != "start" ]; then
+ SCALING_GOVERNOR=$1
+fi
+
# If you need to load a specific CPUFreq driver, load it here. Most likely you don't.
#/sbin/modprobe acpi-cpufreq
diff --git a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild
index ae1f2346a..8180d4381 100755
--- a/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild
+++ b/source/a/sysvinit-scripts/sysvinit-scripts.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2022 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,9 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sysvinit-scripts
-VERSION=${VERSION:-15.0}
+VERSION=${VERSION:-15.1}
ARCH=noarch
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-16}
# 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
@@ -56,6 +56,9 @@ chown root:root $PKG/etc/inittab.new
mkdir -p $PKG/etc/default
cat $CWD/default/cpufreq > $PKG/etc/default/cpufreq.new
+# Install /etc/default/efivarfs.new:
+cat $CWD/default/efivarfs > $PKG/etc/default/efivarfs.new
+
mkdir -p $PKG/install
zcat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/a/sysvinit/sysvinit.SlackBuild b/source/a/sysvinit/sysvinit.SlackBuild
index 1f382d2fb..472af2e51 100755
--- a/source/a/sysvinit/sysvinit.SlackBuild
+++ b/source/a/sysvinit/sysvinit.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2022 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -52,7 +52,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf sysvinit-$VERSION
-tar xvf $CWD/sysvinit-$VERSION.tar.xz || exit 1
+tar xvf $CWD/sysvinit-$VERSION.tar.?z || exit 1
cd sysvinit-$VERSION
chown -R root:root .
@@ -68,13 +68,15 @@ zcat $CWD/sysvinit.paths.diff.gz | patch -p1 -E --verbose --backup --suffix=.ori
# Fix failure to show program version:
zcat $CWD/sysvinit.always.define.version.diff.gz | patch -p1 --verbose || exit 1
-# This seems to be a recurring theme:
-zcat $CWD/sysvinit.wrong.version.in.init.c.again.diff.gz | patch -p1 --verbose || exit 1
-
# Use /dev/initctl instead of /run/initctl ; this is a named pipe and probably
# should be in /dev anyway, but more importantly, having the upgraded package
# expect it in /run breaks shutdown/reboot without manual intervention:
-zcat $CWD/sysvinit.use_dev_initctl_not_run_initctl.diff.gz | patch -p1 --verbose || exit 1
+for replace in src/shutdown.c src/Makefile src/initreq.h src/init.c doc/initctl doc/Install man/init.8 man/initctl.5 man/po/* ; do
+ sed -i "s|run/initctl|dev/initctl|g" $replace
+done
+
+# Since they usually don't update the version here, let's try to make sure:
+sed -i "s/define VERSION.*/define VERSION \"$VERSION\"/g" src/init.c
mkdir -p $PKG/usr/doc/sysvinit-$VERSION
cp -a COPYING* COPYRIGHT* README* \
@@ -114,7 +116,7 @@ mkdir -p $PKG/usr/man/man{1,5,8}
for page in last.1 ; do
cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
done
-for page in inittab.5 initscript.5 ; do
+for page in initctl.5 inittab.5 initscript.5 ; do
cat $page | gzip -9c > $PKG/usr/man/man5/$page.gz
done
for page in halt.8 init.8 killall5.8 poweroff.8 reboot.8 runlevel.8 \
@@ -130,4 +132,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
# Build the package:
cd $PKG
makepkg -l y -c n $TMP/sysvinit-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/a/sysvinit/sysvinit.always.define.version.diff b/source/a/sysvinit/sysvinit.always.define.version.diff
index aadac9f08..68f1ba5ce 100644
--- a/source/a/sysvinit/sysvinit.always.define.version.diff
+++ b/source/a/sysvinit/sysvinit.always.define.version.diff
@@ -1,11 +1,11 @@
---- ./src/init.c.orig 2019-02-24 17:26:33.000000000 -0600
-+++ ./src/init.c 2019-03-01 14:07:19.842729825 -0600
+--- ./src/init.c.orig 2021-12-13 13:21:26.000000000 -0600
++++ ./src/init.c 2021-12-14 15:04:45.163064496 -0600
@@ -12,9 +12,7 @@
/*
Version information is not placed in the top-level Makefile by default
*/
-#ifndef VERSION
- #define VERSION "2.94"
+ #define VERSION "3.01"
-#endif
/*
* This file is part of the sysvinit suite,
diff --git a/source/a/sysvinit/sysvinit.url b/source/a/sysvinit/sysvinit.url
index b923c17ae..16d6bf765 100644
--- a/source/a/sysvinit/sysvinit.url
+++ b/source/a/sysvinit/sysvinit.url
@@ -1 +1,2 @@
-http://download.savannah.nongnu.org/releases/sysvinit
+#http://download.savannah.nongnu.org/releases/sysvinit
+https://github.com/slicer69/sysvinit/
diff --git a/source/a/sysvinit/sysvinit.use_dev_initctl_not_run_initctl.diff b/source/a/sysvinit/sysvinit.use_dev_initctl_not_run_initctl.diff
deleted file mode 100644
index 47c55cef7..000000000
--- a/source/a/sysvinit/sysvinit.use_dev_initctl_not_run_initctl.diff
+++ /dev/null
@@ -1,258 +0,0 @@
---- ./src/shutdown.c.orig 2019-06-15 12:02:34.000000000 -0500
-+++ ./src/shutdown.c 2019-06-16 22:04:35.734002893 -0500
-@@ -192,7 +192,7 @@
-
- /*
- * Open the fifo and write the command.
-- * Make sure we don't hang on opening /run/initctl
-+ * Make sure we don't hang on opening /dev/initctl
- */
- memset(&sa, 0, sizeof(sa));
- sa.sa_handler = alrm_handler;
---- ./src/Makefile.orig 2019-06-15 12:02:34.000000000 -0500
-+++ ./src/Makefile 2019-06-16 22:04:35.736002893 -0500
-@@ -231,8 +231,8 @@
- #
- # This part is skipped on Debian systems, the
- # debian.preinst script takes care of it.
-- @if [ ! -p /run/initctl ]; then \
-- echo "Creating /run/initctl"; \
-- rm -f /run/initctl; \
-- mknod -m 600 /run/initctl p; fi
-+ @if [ ! -p /dev/initctl ]; then \
-+ echo "Creating /dev/initctl"; \
-+ rm -f /dev/initctl; \
-+ mknod -m 600 /dev/initctl p; fi
- endif
---- ./src/initreq.h.orig 2019-06-15 12:02:34.000000000 -0500
-+++ ./src/initreq.h 2019-06-16 22:04:35.737002893 -0500
-@@ -1,5 +1,5 @@
- /*
-- * initreq.h Interface to talk to init through /run/initctl.
-+ * initreq.h Interface to talk to init through /dev/initctl.
- *
- * Copyright (C) 1995-2004 Miquel van Smoorenburg
- *
-@@ -26,7 +26,7 @@
- #include <sys/param.h>
-
- #ifndef INIT_FIFO
--#define INIT_FIFO "/run/initctl"
-+#define INIT_FIFO "/dev/initctl"
- #endif
-
- #define INIT_MAGIC 0x03091969
---- ./src/init.c.orig 2019-06-15 12:02:35.000000000 -0500
-+++ ./src/init.c 2019-06-16 22:04:35.742002893 -0500
-@@ -146,7 +146,7 @@
- int maxproclen; /* Maximal length of argv[0] with \0 */
- struct utmp utproto; /* Only used for sizeof(utproto.ut_id) */
- char *console_dev; /* Console device. */
--int pipe_fd = -1; /* /run/initctl */
-+int pipe_fd = -1; /* /dev/initctl */
- int did_boot = 0; /* Did we already do BOOT* stuff? */
- int main(int, char **);
-
-@@ -2386,13 +2386,13 @@
- int quit = 0;
-
- /*
-- * First, try to create /run/initctl if not present.
-+ * First, try to create /dev/initctl if not present.
- */
- if (stat(INIT_FIFO, &st2) < 0 && errno == ENOENT)
- (void)mkfifo(INIT_FIFO, 0600);
-
- /*
-- * If /run/initctl is open, stat the file to see if it
-+ * If /dev/initctl is open, stat the file to see if it
- * is still the _same_ inode.
- */
- if (pipe_fd >= 0) {
-@@ -2406,7 +2406,7 @@
- }
-
- /*
-- * Now finally try to open /run/initctl if pipe_fd is -1
-+ * Now finally try to open /dev/initctl if pipe_fd is -1
- * if it is -2, then we leave it closed
- */
- if (pipe_fd == -1) {
-@@ -2715,7 +2715,7 @@
- }
- if (ISMEMBER(got_signals, SIGUSR1)) {
- /*
-- * SIGUSR1 means close and reopen /run/initctl
-+ * SIGUSR1 means close and reopen /dev/initctl
- */
- INITDBG(L_VB, "got SIGUSR1");
- if (pipe_fd)
-@@ -2963,7 +2963,7 @@
- strerror(errno));
-
- /* Open the fifo and write a command. */
-- /* Make sure we don't hang on opening /run/initctl */
-+ /* Make sure we don't hang on opening /dev/initctl */
- SETSIG(sa, SIGALRM, signal_handler, 0);
- alarm(3);
- if ((fd = open(INIT_FIFO, O_WRONLY)) >= 0) {
---- ./doc/initctl.orig 2019-06-15 12:02:34.000000000 -0500
-+++ ./doc/initctl 2019-06-16 22:04:35.743002893 -0500
-@@ -1,5 +1,5 @@
- This document describes the communiction pipe set up by SysV init
--at /run/initctl. This named pipe allows programs with the proper
-+at /dev/initctl. This named pipe allows programs with the proper
- permissions (typically programs run by root have read+write access to
- the pipe) to send signals to the init program (PID 1).
-
-@@ -58,13 +58,13 @@
- might need to process our request. For example, when setting environment
- variables.
-
--When setting an environment variable through init's /run/initctl pipe,
-+When setting an environment variable through init's /dev/initctl pipe,
- the data variable should have the format VARIABLE=VALUE. The string
- should be terminated with a NULL '\0' character.
-
-
- The following C code example shows how to send a set environment variable
--request to the init process using the /run/initctl pipe. This example
-+request to the init process using the /dev/initctl pipe. This example
- is simplified and skips the error checking. A more comlpete example can be
- found in the shutdown.c program's init_setnv() function.
-
-@@ -86,7 +86,7 @@
-
-
-
--Usually the /run/initctl pipe would only be used by low-level programs to
-+Usually the /dev/initctl pipe would only be used by low-level programs to
- request a power-related shutdown or change the runlevel, like telinit
- would do. Most of the time there is no need to talk to init directly, but
- this gives us an extenable approach so init can be taught how to learn
---- ./doc/Install.orig 2019-06-15 12:02:34.000000000 -0500
-+++ ./doc/Install 2019-06-16 22:04:35.743002893 -0500
-@@ -66,7 +66,7 @@
- manual page on shutdown to find out more about this.
-
- Running from a read-only file system (CDROM?):
--* All communication to init goes through the FIFO /run/initctl.
-+* All communication to init goes through the FIFO /dev/initctl.
- There should be no problem using a read-only root file system
- If you use a Linux kernel > 1.3.66. Older kernels don't allow
- writing to a FIFO on a read-only file system.
---- ./man/init.8.orig 2019-06-15 12:02:34.000000000 -0500
-+++ ./man/init.8 2019-06-16 22:04:35.744002893 -0500
-@@ -147,7 +147,7 @@
- the letter \fBF\fP.
- .PP
- Usage of \fBSIGPWR\fP and \fB/etc/powerstatus\fP is discouraged. Someone
--wanting to interact with \fBinit\fP should use the \fB/run/initctl\fP
-+wanting to interact with \fBinit\fP should use the \fB/dev/initctl\fP
- control channel - see the initctl manual page for more documentation
- about this.
- .PP
-@@ -258,7 +258,7 @@
- immediately exits with a return code of zero.
- .PP
- .SH INTERFACE
--Init listens on a \fIfifo\fP in /dev, \fI/run/initctl\fP, for messages.
-+Init listens on a \fIfifo\fP in /dev, \fI/dev/initctl\fP, for messages.
- \fBTelinit\fP uses this to communicate with init. The interface is not
- very well documented or finished. Those interested should study the
- \fIinitreq.h\fP file in the \fIsrc/\fP subdirectory of the \fBinit\fP
-@@ -272,11 +272,11 @@
- .TP 0.5i
- .B SIGUSR1
- On receipt of this signals, init closes and re-opens its control fifo,
--\fB/run/initctl\fP. Useful for bootscripts when /dev is remounted.
-+\fB/dev/initctl\fP. Useful for bootscripts when /dev is remounted.
- .TP 0.5i
- .B SIGUSR2
- When init receives SIGUSR2, init closes and leaves the control fifo,
--\fB/run/initctl\fP, closed. This may be used to make sure init is not
-+\fB/dev/initctl\fP, closed. This may be used to make sure init is not
- holding open any files. However, it also prevents init from switching
- runlevels. Which means commands like shutdown no longer work.
- The fifo can be re-opened by sending init the SIGUSR1 signal.
-@@ -304,7 +304,7 @@
- /dev/console
- /var/run/utmp
- /var/log/wtmp
--/run/initctl
-+/dev/initctl
- .fi
- .\"}}}
- .\"{{{ Warnings
---- ./man/initctl.5.orig 2019-06-15 12:02:34.000000000 -0500
-+++ ./man/initctl.5 2019-06-16 22:05:29.658002895 -0500
-@@ -16,13 +16,13 @@
- .\"
- .TH INITCTL 5 "April 13, 2018" "" "Linux System Administrator's Manual"
- .SH NAME
--initctl \- /run/initctl is a named pipe which passes commands to SysV init.
-+initctl \- /dev/initctl is a named pipe which passes commands to SysV init.
- .SH SYNOPSIS
--/run/initctl
-+/dev/initctl
- .SH DESCRIPTION
-
- This document describes the communiction pipe set up by SysV init
--at /run/initctl. This named pipe allows programs with the proper
-+at /dev/initctl. This named pipe allows programs with the proper
- permissions (typically programs run by root have read+write access to
- the pipe) to send signals to the init program (PID 1).
-
-@@ -86,14 +86,14 @@
- might need to process our request. For example, when setting environment
- variables.
-
--When setting an environment variable through init's /run/initctl pipe,
-+When setting an environment variable through init's /dev/initctl pipe,
- the data variable should have the format VARIABLE=VALUE. The string
- should be terminated with a NULL character.
-
- .SH EXAMPLES
-
- The following C code example shows how to send a set environment variable
--request to the init process using the /run/initctl pipe. This example
-+request to the init process using the /dev/initctl pipe. This example
- is simplified and skips the error checking. A more comlpete example can be
- found in the shutdown.c program's init_setnv() function.
-
-@@ -117,18 +117,18 @@
-
- .sp
- .SH NOTES
--Usually the /run/initctl pipe would only be used by low-level programs to
-+Usually the /dev/initctl pipe would only be used by low-level programs to
- request a power-related shutdown or change the runlevel, like telinit
- would do. Most of the time there is no need to talk to init directly, but
- this gives us an extenable approach so init can be taught how to learn
- more commands.
- .PP
--The commands passed through the /run/initctl pipe must be sent in a specific
-+The commands passed through the /dev/initctl pipe must be sent in a specific
- binary format and be of a specific length. Larger data structures or ones
- not using the proper format will be ignored. Typically, only root has the
- ability to write to the initctl pipe for security reasons.
- .PP
--The /run/initctl pipe can be closed by sending init (PID 1) the SIGUSR2
-+The /dev/initctl pipe can be closed by sending init (PID 1) the SIGUSR2
- signal. This closes the pipe and leaves it closed. This may be useful
- for making sure init is not keeping any files open. However, when the
- pipe is closed, init no longer receives signals, such as those sent by
-@@ -136,11 +136,11 @@
- change its runlevel directly. The pipe may be re-opened by sending init (PID 1)
- the SIGUSR1 signal.
- .PP
--If the /run/initctl pipe is closed then it may still be possible to bring
-+If the /dev/initctl pipe is closed then it may still be possible to bring
- down the system using the shutdown command's -n flag, but this is not
- always clean and not recommended.
- .SH FILES
--/run/initctl
-+/dev/initctl
- /sbin/init
- .SH AUTHOR
- Jesse Smith <jsmith@resonatingmedia.com>
diff --git a/source/a/sysvinit/sysvinit.wrong.version.in.init.c.again.diff b/source/a/sysvinit/sysvinit.wrong.version.in.init.c.again.diff
deleted file mode 100644
index 653aab81b..000000000
--- a/source/a/sysvinit/sysvinit.wrong.version.in.init.c.again.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./src/init.c.orig 2019-06-16 22:06:19.677002897 -0500
-+++ ./src/init.c 2019-06-16 22:07:43.515002900 -0500
-@@ -12,7 +12,7 @@
- /*
- Version information is not placed in the top-level Makefile by default
- */
--#define VERSION "2.94"
-+#define VERSION "2.99"
- /*
- * This file is part of the sysvinit suite,
- * Copyright (C) 1991-2004 Miquel van Smoorenburg.
diff --git a/source/a/tar/tar-1.13.bzip2.diff b/source/a/tar/tar-1.13.bzip2.diff
deleted file mode 100644
index 891301d14..000000000
--- a/source/a/tar/tar-1.13.bzip2.diff
+++ /dev/null
@@ -1,56 +0,0 @@
-diff -Nur tar-1.13.orig/src/tar.c tar-1.13/src/tar.c
---- tar-1.13.orig/src/tar.c 1999-07-07 00:49:50.000000000 -0500
-+++ tar-1.13/src/tar.c 2017-12-22 00:39:37.515271544 -0600
-@@ -16,6 +16,8 @@
- with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-+/* Patched to integrate bzip2 as compression filter (option -j) */
-+
- #include "system.h"
-
- #include <getopt.h>
-@@ -164,6 +166,8 @@
- {"block-number", no_argument, NULL, 'R'},
- {"block-size", required_argument, NULL, OBSOLETE_BLOCKING_FACTOR},
- {"blocking-factor", required_argument, NULL, 'b'},
-+ {"bzip2", required_argument, NULL, 'j'},
-+ {"bunzip2", required_argument, NULL, 'j'},
- {"catenate", no_argument, NULL, 'A'},
- {"checkpoint", no_argument, &checkpoint_option, 1},
- {"compare", no_argument, NULL, 'd'},
-@@ -340,6 +344,7 @@
- PATTERN at list/extract time, a globbing PATTERN\n\
- -o, --old-archive, --portability write a V7 format archive\n\
- --posix write a POSIX conformant archive\n\
-+ -j, --bzip2, --bunzip2 filter the archive through bzip2\n\
- -z, --gzip, --ungzip filter the archive through gzip\n\
- -Z, --compress, --uncompress filter the archive through compress\n\
- --use-compress-program=PROG filter through PROG (must accept -d)\n"),
-@@ -410,13 +415,13 @@
- | Parse the options for tar. |
- `----------------------------*/
-
--/* Available option letters are DEHIJQY and aejnqy. Some are reserved:
-+/* Available option letters are DEHIJQY and aenqy. Some are reserved:
-
- y per-file gzip compression
- Y per-block gzip compression */
-
- #define OPTION_STRING \
-- "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxz"
-+ "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hijklmoprstuvwxz"
-
- static void
- set_subcommand_option (enum subcommand subcommand)
-@@ -788,6 +793,10 @@
- FATAL_ERROR ((0, errno, "%s", optarg));
- break;
-
-+ case 'j':
-+ set_use_compress_program_option ("bzip2");
-+ break;
-+
- case 'z':
- set_use_compress_program_option ("gzip");
- break;
diff --git a/source/a/tar/tar.SlackBuild b/source/a/tar/tar.SlackBuild
index 5e4afdaff..b01d00eda 100755
--- a/source/a/tar/tar.SlackBuild
+++ b/source/a/tar/tar.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2005-2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,12 +20,10 @@
# 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 tar
-
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=tar
-VERSION=1.34
+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) "}
@@ -66,40 +64,6 @@ else
SLKCFLAGS="-O2"
fi
-# This old version is the only one that won't clobber symlinks, e.g.:
-# someone moves /opt to /usr/opt and makes a symlink. With newer
-# versions of tar, installing any new package will remove the /opt
-# symlink and plop down a new directory there.
-# Well, there's a lot of other bugs (the remote stuff particularly I'm
-# told is flaky) in tar-1.13, so it'll only be here now for use by the
-# Slackware package utils. And, we'll even let people remove it and
-# the pkgutils will still try to work (but eventually they'll pay the
-# price :)
-#
-# NOTE: The latest versions of tar can supposedly work for the pkgtools,
-# but some changes to add new options to the scripts might be required.
-#
-# Until tar-1.13 won't compile any more, it might be safer to keep using
-# it, though.
-cd $TMP
-rm -rf tar-1.13
-tar xvf $CWD/tar-1.13.tar.gz || exit 1
-cd tar-1.13 || exit 1
-zcat $CWD/tar-1.13.bzip2.diff.gz | patch -p1 --verbose || exit 1
-# The original config.{guess,sub} do not work on x86_64
-cp -p --verbose /usr/share/libtool/build-aux/config.{guess,sub} .
-chown -R root:root .
-CFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --disable-nls \
- --build=$ARCH-slackware-linux || exit 1
-make $NUMJOBS || make || exit 1
-mkdir -p $PKG/bin
-cat src/tar > $PKG/bin/tar-1.13
-chmod 0755 $PKG/bin/tar-1.13
-# End building of tar-1.13
-
cd $TMP
rm -rf tar-$VERSION
tar xvf $CWD/tar-$VERSION.tar.xz || exit 1
@@ -134,6 +98,7 @@ make install DESTDIR=$PKG || exit 1
xargs strip --strip-unneeded 2> /dev/null
)
+mkdir -p $PKG/bin
mv $PKG/usr/bin/tar $PKG/bin
( cd $PKG/usr/bin ; ln -sf /bin/tar . )
( cd $PKG/bin ; ln -sf tar tar-$VERSION )
@@ -171,4 +136,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $TMP/tar-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/a/tcsh/tcsh.SlackBuild b/source/a/tcsh/tcsh.SlackBuild
index a681a6642..b911dd7ff 100755
--- a/source/a/tcsh/tcsh.SlackBuild
+++ b/source/a/tcsh/tcsh.SlackBuild
@@ -64,11 +64,6 @@ rm -rf ${PKGNAM}-$VERSION
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z || exit 1
cd ${PKGNAM}-$VERSION || exit 1
-# The LS_COLORS variable shared by tcsh has new options in recent
-# versions of coreutils that cause tcsh to exit, so disable the
-# built-in color ls:
-zcat $CWD/${PKGNAM}.nobuiltincolorls.diff.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/source/a/tcsh/tcsh.nobuiltincolorls.diff b/source/a/tcsh/tcsh.nobuiltincolorls.diff
deleted file mode 100644
index 2fd1c2896..000000000
--- a/source/a/tcsh/tcsh.nobuiltincolorls.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./config_f.h.orig 2005-03-04 07:46:04.000000000 -0600
-+++ ./config_f.h 2006-02-09 14:30:59.000000000 -0600
-@@ -174,7 +174,7 @@
- * COLOR_LS_F Do you want to use builtin color ls-F ?
- *
- */
--#define COLOR_LS_F
-+#undef COLOR_LS_F
-
- /*
- * COLORCAT Do you want to colorful message ?
diff --git a/source/a/time/time.SlackBuild b/source/a/time/time.SlackBuild
index 6b1a123e6..b278e4a1d 100755
--- a/source/a/time/time.SlackBuild
+++ b/source/a/time/time.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-4}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/tree/tree.SlackBuild b/source/a/tree/tree.SlackBuild
index ef41594e0..b30978246 100755
--- a/source/a/tree/tree.SlackBuild
+++ b/source/a/tree/tree.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2007-2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2007-2023 Patrick J. Volkerding, Sebeka, Minnesota, 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=tree
-VERSION=1.8.0
-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
@@ -83,9 +83,13 @@ mkdir -p $PKG/usr/bin
cat tree > $PKG/usr/bin/tree
chmod 755 $PKG/usr/bin/tree
-mkdir -p $PKG/usr/man/man1 $PKG/usr/man/fr/man1
+mkdir -p $PKG/usr/man/man1
gzip -9c doc/tree.1 > $PKG/usr/man/man1/tree.1.gz
-gzip -9c doc/tree.1.fr > $PKG/usr/man/fr/man1/tree.1.gz
+
+if [ -r doc/tree.fr.1 ]; then
+ mkdir -p $PKG/usr/man/fr/man1
+ gzip -9c doc/tree.fr.1 > $PKG/usr/man/fr/man1/tree.1.gz
+fi
mkdir -p $PKG/usr/doc/tree-$VERSION
cp -a \
@@ -102,4 +106,3 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $TMP/tree-$VERSION-$ARCH-$BUILD.txz
-
diff --git a/source/a/tree/tree.url b/source/a/tree/tree.url
index 44d8578b1..96d094ba6 100644
--- a/source/a/tree/tree.url
+++ b/source/a/tree/tree.url
@@ -1 +1 @@
-http://mama.indstate.edu/users/ice/tree
+https://gitlab.com/OldManProgrammer/unix-tree
diff --git a/source/a/udisks/slack-desc b/source/a/udisks/slack-desc
deleted file mode 100644
index d3093b536..000000000
--- a/source/a/udisks/slack-desc
+++ /dev/null
@@ -1,19 +0,0 @@
-# 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------------------------------------------------------|
-udisks: udisks (storage device daemon)
-udisks:
-udisks: The udisks project provides a storage daemon that implements D-Bus
-udisks: interfaces that can be used to query and manipulate storage devices.
-udisks:
-udisks: It also includes a command-line tool, udisks(1), that can be used to
-udisks: query and control the daemon.
-udisks:
-udisks: Homepage: http://www.freedesktop.org/wiki/Software/udisks
-udisks:
-udisks:
diff --git a/source/a/udisks/udisks.glibc228.diff b/source/a/udisks/udisks.glibc228.diff
deleted file mode 100644
index 43f6bf29a..000000000
--- a/source/a/udisks/udisks.glibc228.diff
+++ /dev/null
@@ -1,52 +0,0 @@
---- ./src/device.c.orig 2014-03-10 03:57:48.000000000 -0500
-+++ ./src/device.c 2018-09-18 19:06:22.494073271 -0500
-@@ -33,6 +33,7 @@
- #include <sys/stat.h>
- #include <sys/time.h>
- #include <sys/resource.h>
-+#include <sys/sysmacros.h>
- #include <fcntl.h>
- #include <pwd.h>
- #include <grp.h>
---- ./src/daemon.c.orig 2014-03-10 03:57:48.000000000 -0500
-+++ ./src/daemon.c 2018-09-18 19:06:22.490073271 -0500
-@@ -45,6 +45,7 @@
- #include <sys/socket.h>
- #include <sys/un.h>
- #include <sys/utsname.h>
-+#include <sys/sysmacros.h>
- #include <net/if_arp.h>
- #include <fcntl.h>
- #include <signal.h>
---- ./src/mount-monitor.c.orig 2014-03-10 03:58:42.000000000 -0500
-+++ ./src/mount-monitor.c 2018-09-18 19:06:22.495073271 -0500
-@@ -28,7 +28,9 @@
- #include <errno.h>
- #include <string.h>
- #include <sys/types.h>
-+#include <sys/sysmacros.h>
- #include <sys/stat.h>
-+
- #include <mntent.h>
-
- #include <glib.h>
---- ./tools/umount-udisks.c.orig 2014-03-10 03:57:48.000000000 -0500
-+++ ./tools/umount-udisks.c 2018-09-18 19:06:22.497073271 -0500
-@@ -30,6 +30,7 @@
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/sysmacros.h>
- #include <fcntl.h>
- #include <pwd.h>
- #include <grp.h>
---- ./tools/udisks.c.orig 2014-03-10 03:57:48.000000000 -0500
-+++ ./tools/udisks.c 2018-09-18 19:06:22.496073271 -0500
-@@ -31,6 +31,7 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <sys/wait.h>
-+#include <sys/sysmacros.h>
- #include <fcntl.h>
- #include <pwd.h>
- #include <grp.h>
diff --git a/source/a/udisks/udisks.no.pci-db.diff b/source/a/udisks/udisks.no.pci-db.diff
deleted file mode 100644
index ebb773c68..000000000
--- a/source/a/udisks/udisks.no.pci-db.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-From c73b5ab54378ec6d7df9948c46ce87f98587af9a Mon Sep 17 00:00:00 2001
-From: Tom Gundersen <teg@jklm.no>
-Date: Wed, 21 Nov 2012 02:36:47 +0100
-Subject: [PATCH] udev: remove redundant call to deprecated pci-db
-
-The binary is no longer shipped with systemd/udev. The functionality
-is taken over by a builtin, which is ran for all devices, rendering
-this rule superfluous.
-
-Cc: Jan de Groot <jgc@archlinux.org>
-Signed-off-by: Tom Gundersen <teg@jklm.no>
----
- data/80-udisks.rules | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/data/80-udisks.rules b/data/80-udisks.rules
-index d1c8c5d..4bf2b37 100644
---- a/data/80-udisks.rules
-+++ b/data/80-udisks.rules
-@@ -1,10 +1,6 @@
- # Do not edit this file, it will be overwritten on updates
- #
-
--# import names for PCI storage controllers
--#
--SUBSYSTEM=="pci", ACTION=="add|change", ENV{ID_MODEL_FROM_DATABASE}=="", ATTR{class}=="0x01*", IMPORT{program}="pci-db %p"
--
- # Set eSATA port type for known eSATA CardBus adapters - first we want to ensure
- # the device is on a cardbus controller (upper PCI device) - then we check
- # vid/pid (lower PCI device)
---
-1.8.0.1
diff --git a/source/a/udisks/udisks.url b/source/a/udisks/udisks.url
deleted file mode 100644
index cef0134ba..000000000
--- a/source/a/udisks/udisks.url
+++ /dev/null
@@ -1 +0,0 @@
-http://hal.freedesktop.org/releases/
diff --git a/source/a/udisks2/udisks2.SlackBuild b/source/a/udisks2/udisks2.SlackBuild
index cb9030bea..1c7c8b258 100755
--- a/source/a/udisks2/udisks2.SlackBuild
+++ b/source/a/udisks2/udisks2.SlackBuild
@@ -32,7 +32,7 @@ BUILD=${BUILD:-1}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/upower/upower.SlackBuild b/source/a/upower/upower.SlackBuild
index 22dcb2cca..a3a9a8a21 100755
--- a/source/a/upower/upower.SlackBuild
+++ b/source/a/upower/upower.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for upower
# Copyright 2010, 2011, 2015 Robby Workman, Tuscaloosa, Alabama, USA
+# Copyright 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -48,7 +49,7 @@ fi
# 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"
+ echo "$PKGNAM-$(echo $VERSION | sed "s/v//g")-$ARCH-$BUILD.txz"
exit 0
fi
@@ -90,21 +91,30 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
+# Configure, build, and install:
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+mkdir meson-build
+cd meson-build
+meson setup \
--prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --libdir=lib${LIBDIRSUFFIX} \
+ --libexecdir=/usr/libexec \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --includedir=/usr/include \
+ --datadir=/usr/share \
+ --mandir=/usr/man \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PKGNAM-$VERSION \
- --disable-static \
- --enable-man-pages \
- --build=$TARGET || exit 1
-
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
+ --buildtype=release \
+ -Dsystemdsystemunitdir=no \
+ -Dudevhwdbdir=/lib/udev/hwdb.d \
+ -Dudevrulesdir=/lib/udev/rules.d \
+ .. || exit 1
+ "${NINJA:=ninja}" $NUMJOBS || exit 1
+ DESTDIR=$PKG $NINJA install || exit 1
+cd ..
# Add upower policy allowing users in the 'power' group
# to suspend/hibernate the computer:
@@ -113,9 +123,6 @@ install -m 0644 -o root \
$CWD/10-enable-upower-suspend.rules \
$PKG/usr/share/polkit-1/rules.d/10-enable-upower-suspend.rules.new
-# Don't ship .la files:
-rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -125,14 +132,14 @@ mv $PKG/etc/UPower/UPower.conf $PKG/etc/UPower/UPower.conf.new
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/$PKGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PKGNAM-$(echo $VERSION | sed "s/v//g")
cp -a \
AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ $PKG/usr/doc/$PKGNAM-$(echo $VERSION | sed "s/v//g")
mkdir -p $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/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | sed "s/v//g")-$ARCH-$BUILD.txz
diff --git a/source/a/usbutils/usbutils.url b/source/a/usbutils/usbutils.url
index 57e0013b2..294e15c5d 100644
--- a/source/a/usbutils/usbutils.url
+++ b/source/a/usbutils/usbutils.url
@@ -1 +1 @@
-http://www.kernel.org/pub/linux/utils/usb/usbutils/
+https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbutils.git/
diff --git a/source/a/userspace-rcu/slack-desc b/source/a/userspace-rcu/slack-desc
new file mode 100644
index 000000000..4774e2f5c
--- /dev/null
+++ b/source/a/userspace-rcu/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------------------------------------------------------|
+userspace-rcu: userspace-rcu (userspace read-copy-update library)
+userspace-rcu:
+userspace-rcu: Read-copy update (RCU) is a synchronization mechanism that achieves
+userspace-rcu: scalability improvements by allowing reads to occur concurrently with
+userspace-rcu: updates.
+userspace-rcu:
+userspace-rcu: Homepage: https://liburcu.org
+userspace-rcu:
+userspace-rcu:
+userspace-rcu:
+userspace-rcu:
diff --git a/source/a/udisks/udisks.SlackBuild b/source/a/userspace-rcu/userspace-rcu.SlackBuild
index 66420a2b1..b255163a4 100755
--- a/source/a/udisks/udisks.SlackBuild
+++ b/source/a/userspace-rcu/userspace-rcu.SlackBuild
@@ -1,8 +1,6 @@
#!/bin/bash
-# Slackware build script for udisks
-
-# Copyright 2010, 2011, 2014, 2015, 2020 Robby Workman, Tuscaloosa, Alabama, USA
+# Copyright 2023 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -11,7 +9,7 @@
# 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
+# 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,
@@ -22,26 +20,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
-
cd $(dirname $0) ; CWD=$(pwd)
-PKGNAM=udisks
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-9}
-
-NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
+PKGNAM=userspace-rcu
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i586 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ 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:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
@@ -52,47 +45,54 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
exit 0
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 -mtune=i686"
+ 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="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
-case "$ARCH" in
- arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
- *) TARGET=$ARCH-slackware-linux ;;
-esac
-
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.xz
+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 \) \
- -exec chmod 755 {} \+ -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \+
-
-zcat $CWD/udisks.no.pci-db.diff.gz | patch -p1 --verbose || exit 1
-zcat $CWD/udisks.glibc228.diff.gz | patch -p1 --verbose || exit 1
-
+ \( -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 {} \+
+
+# Configure, build, and install:
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -100,35 +100,54 @@ CXXFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man \
--docdir=/usr/doc/$PKGNAM-$VERSION \
- --build=$TARGET
-
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
-# Move the bash completion file to the system directory
-# Put bash-completion file in system directory:
-mkdir -p $PKG/usr/share/bash-completion/completions/
-mv $PKG/etc/profile.d/udisks-bash-completion.sh \
- $PKG/usr/share/bash-completion/completions/udisks
-rmdir --parents $PKG/etc/profile.d
+# Move libraries out of /usr:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ # Move libraries and symlinks:
+ for file in lib*.so.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+)
-# Move the dbus config file to the system directory
-mkdir -p $PKG/usr/share/dbus-1/system.d/
-mv $PKG/etc/dbus-1/system.d/* $PKG/usr/share/dbus-1/system.d/
-rmdir --parents $PKG/etc/dbus-1/system.d/
+# 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
+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/$PKGNAM-$VERSION
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \
- AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README \
- $PKG/usr/doc/$PKGNAM-$VERSION
+ ChangeLog CodingStyle* COPYING* LICENSE* README* \
+ *gpl*txt \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Find this stuff in the source tarball:
+rm -rf $PKG/usr/doc/${PKGNAM}-$VERSION/examples
+
+# 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 | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/a/userspace-rcu/userspace-rcu.url b/source/a/userspace-rcu/userspace-rcu.url
new file mode 100644
index 000000000..0aac2d4fd
--- /dev/null
+++ b/source/a/userspace-rcu/userspace-rcu.url
@@ -0,0 +1 @@
+https://liburcu.org
diff --git a/source/a/utempter/utempter.SlackBuild b/source/a/utempter/utempter.SlackBuild
index 767e3d2b8..e5eeb3096 100755
--- a/source/a/utempter/utempter.SlackBuild
+++ b/source/a/utempter/utempter.SlackBuild
@@ -27,8 +27,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=utempter
-VERSION=1.2.0
-BUILD=${BUILD:-3}
+VERSION=1.2.1
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/source/a/util-linux/doinst.sh b/source/a/util-linux/doinst.sh
index 8277c0e65..03c23f87c 100644
--- a/source/a/util-linux/doinst.sh
+++ b/source/a/util-linux/doinst.sh
@@ -22,7 +22,7 @@ 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
+for configfile in chfn.new chsh.new login.new remote.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
@@ -31,3 +31,11 @@ done
if [ -r etc/default/su.new ]; then
config etc/default/su.new
fi
+
+# Since libmount has dropped all support for an /etc/mtab file, if we find that
+# we'll need to replace it with a symlink to /proc/mounts:
+if [ ! -L etc/mtab ]; then
+ rm -f etc/mtab
+ ( cd etc ; ln -sf /proc/mounts mtab )
+fi
+
diff --git a/source/a/util-linux/seedrng.8 b/source/a/util-linux/seedrng.8
new file mode 100644
index 000000000..79ab81fd0
--- /dev/null
+++ b/source/a/util-linux/seedrng.8
@@ -0,0 +1,41 @@
+.TH seedrng 8
+.SH NAME
+seedrng \- seed the Linux kernel random number generator
+.SH SYNOPSIS
+.B seedrng
+.SH DESCRIPTION
+.B SeedRNG
+SeedRNG is a simple program made for seeding the Linux kernel random
+number generator from seed files. The program takes no arguments, must
+be run as root, and always attempts to do something useful.
+
+This program is useful in light of the fact that the Linux kernel RNG
+cannot be initialized from shell scripts, and new seeds cannot be safely
+generated from boot time shell scripts either.
+
+It should be run once at init time and once at shutdown time. It can be
+run at other times without detriment as well. Whenever it is run, it writes
+existing seed files into the RNG pool, and then creates a new seed file.
+If the RNG is initialized at the time of creating a new seed file, then that
+new seed file is marked as "creditable", which means it can be used to
+initialize the RNG. Otherwise, it is marked as "non-creditable", in which
+case it is still used to seed the RNG's pool, but will not initialize the
+RNG.
+
+In order to ensure that entropy only ever stays the same or increases from
+one seed file to the next, old seed values are hashed together with new seed
+values when writing new seed files:
+
+.BR
+new_seed = new_seed[:-32] || HASH(fixed_prefix || real_time || boot_time || old_seed_len || old_seed || new_seed_len || new_seed)
+
+The seed is stored in /var/lib/seedrng/, which can be adjusted at
+compile time. If the SEEDRNG_SKIP_CREDIT environment variable is set to 1,
+true, yes, or y, then seeds never credit the RNG, even if the seed file
+is creditable.
+
+.SH FILES
+.IR /var/lib/seedrng/seed.credit
+.IR /var/lib/seedrng/seed.no-credit
+.SH AUTHOR
+Jason A. Donenfeld <Jason@zx2c4.com>
diff --git a/source/a/util-linux/seedrng.c b/source/a/util-linux/seedrng.c
new file mode 100644
index 000000000..852ed48c3
--- /dev/null
+++ b/source/a/util-linux/seedrng.c
@@ -0,0 +1,441 @@
+// SPDX-License-Identifier: (GPL-2.0 OR Apache-2.0 OR MIT OR BSD-1-Clause OR CC0-1.0)
+/*
+ * Copyright (C) 2022 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
+ */
+
+#include <linux/random.h>
+#include <sys/random.h>
+#include <sys/ioctl.h>
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#include <poll.h>
+#include <unistd.h>
+#include <time.h>
+#include <errno.h>
+#include <endian.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifndef LOCALSTATEDIR
+#define LOCALSTATEDIR "/var/lib"
+#endif
+#ifndef RUNSTATEDIR
+#define RUNSTATEDIR "/var/run"
+#endif
+
+#define SEED_DIR LOCALSTATEDIR "/seedrng"
+#define CREDITABLE_SEED SEED_DIR "/seed.credit"
+#define NON_CREDITABLE_SEED SEED_DIR "/seed.no-credit"
+#define LOCK_FILE RUNSTATEDIR "/seedrng.lock"
+
+enum blake2s_lengths {
+ BLAKE2S_BLOCK_LEN = 64,
+ BLAKE2S_HASH_LEN = 32,
+ BLAKE2S_KEY_LEN = 32
+};
+
+enum seedrng_lengths {
+ MAX_SEED_LEN = 512,
+ MIN_SEED_LEN = BLAKE2S_HASH_LEN
+};
+
+struct blake2s_state {
+ uint32_t h[8];
+ uint32_t t[2];
+ uint32_t f[2];
+ uint8_t buf[BLAKE2S_BLOCK_LEN];
+ unsigned int buflen;
+ unsigned int outlen;
+};
+
+#define le32_to_cpup(a) le32toh(*(a))
+#define cpu_to_le32(a) htole32(a)
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif
+#ifndef DIV_ROUND_UP
+#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
+#endif
+
+static inline void cpu_to_le32_array(uint32_t *buf, unsigned int words)
+{
+ while (words--) {
+ *buf = cpu_to_le32(*buf);
+ ++buf;
+ }
+}
+
+static inline void le32_to_cpu_array(uint32_t *buf, unsigned int words)
+{
+ while (words--) {
+ *buf = le32_to_cpup(buf);
+ ++buf;
+ }
+}
+
+static inline uint32_t ror32(uint32_t word, unsigned int shift)
+{
+ return (word >> (shift & 31)) | (word << ((-shift) & 31));
+}
+
+static const uint32_t blake2s_iv[8] = {
+ 0x6A09E667UL, 0xBB67AE85UL, 0x3C6EF372UL, 0xA54FF53AUL,
+ 0x510E527FUL, 0x9B05688CUL, 0x1F83D9ABUL, 0x5BE0CD19UL
+};
+
+static const uint8_t blake2s_sigma[10][16] = {
+ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 },
+ { 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 },
+ { 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 },
+ { 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 },
+ { 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 },
+ { 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 },
+ { 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 },
+ { 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 },
+ { 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13, 0 },
+};
+
+static void blake2s_set_lastblock(struct blake2s_state *state)
+{
+ state->f[0] = -1;
+}
+
+static void blake2s_increment_counter(struct blake2s_state *state, const uint32_t inc)
+{
+ state->t[0] += inc;
+ state->t[1] += (state->t[0] < inc);
+}
+
+static void blake2s_init_param(struct blake2s_state *state, const uint32_t param)
+{
+ int i;
+
+ memset(state, 0, sizeof(*state));
+ for (i = 0; i < 8; ++i)
+ state->h[i] = blake2s_iv[i];
+ state->h[0] ^= param;
+}
+
+static void blake2s_init(struct blake2s_state *state, const size_t outlen)
+{
+ blake2s_init_param(state, 0x01010000 | outlen);
+ state->outlen = outlen;
+}
+
+static void blake2s_compress(struct blake2s_state *state, const uint8_t *block, size_t nblocks, const uint32_t inc)
+{
+ uint32_t m[16];
+ uint32_t v[16];
+ int i;
+
+ while (nblocks > 0) {
+ blake2s_increment_counter(state, inc);
+ memcpy(m, block, BLAKE2S_BLOCK_LEN);
+ le32_to_cpu_array(m, ARRAY_SIZE(m));
+ memcpy(v, state->h, 32);
+ v[ 8] = blake2s_iv[0];
+ v[ 9] = blake2s_iv[1];
+ v[10] = blake2s_iv[2];
+ v[11] = blake2s_iv[3];
+ v[12] = blake2s_iv[4] ^ state->t[0];
+ v[13] = blake2s_iv[5] ^ state->t[1];
+ v[14] = blake2s_iv[6] ^ state->f[0];
+ v[15] = blake2s_iv[7] ^ state->f[1];
+
+#define G(r, i, a, b, c, d) do { \
+ a += b + m[blake2s_sigma[r][2 * i + 0]]; \
+ d = ror32(d ^ a, 16); \
+ c += d; \
+ b = ror32(b ^ c, 12); \
+ a += b + m[blake2s_sigma[r][2 * i + 1]]; \
+ d = ror32(d ^ a, 8); \
+ c += d; \
+ b = ror32(b ^ c, 7); \
+} while (0)
+
+#define ROUND(r) do { \
+ G(r, 0, v[0], v[ 4], v[ 8], v[12]); \
+ G(r, 1, v[1], v[ 5], v[ 9], v[13]); \
+ G(r, 2, v[2], v[ 6], v[10], v[14]); \
+ G(r, 3, v[3], v[ 7], v[11], v[15]); \
+ G(r, 4, v[0], v[ 5], v[10], v[15]); \
+ G(r, 5, v[1], v[ 6], v[11], v[12]); \
+ G(r, 6, v[2], v[ 7], v[ 8], v[13]); \
+ G(r, 7, v[3], v[ 4], v[ 9], v[14]); \
+} while (0)
+ ROUND(0);
+ ROUND(1);
+ ROUND(2);
+ ROUND(3);
+ ROUND(4);
+ ROUND(5);
+ ROUND(6);
+ ROUND(7);
+ ROUND(8);
+ ROUND(9);
+
+#undef G
+#undef ROUND
+
+ for (i = 0; i < 8; ++i)
+ state->h[i] ^= v[i] ^ v[i + 8];
+
+ block += BLAKE2S_BLOCK_LEN;
+ --nblocks;
+ }
+}
+
+static void blake2s_update(struct blake2s_state *state, const void *inp, size_t inlen)
+{
+ const size_t fill = BLAKE2S_BLOCK_LEN - state->buflen;
+ const uint8_t *in = inp;
+
+ if (!inlen)
+ return;
+ if (inlen > fill) {
+ memcpy(state->buf + state->buflen, in, fill);
+ blake2s_compress(state, state->buf, 1, BLAKE2S_BLOCK_LEN);
+ state->buflen = 0;
+ in += fill;
+ inlen -= fill;
+ }
+ if (inlen > BLAKE2S_BLOCK_LEN) {
+ const size_t nblocks = DIV_ROUND_UP(inlen, BLAKE2S_BLOCK_LEN);
+ blake2s_compress(state, in, nblocks - 1, BLAKE2S_BLOCK_LEN);
+ in += BLAKE2S_BLOCK_LEN * (nblocks - 1);
+ inlen -= BLAKE2S_BLOCK_LEN * (nblocks - 1);
+ }
+ memcpy(state->buf + state->buflen, in, inlen);
+ state->buflen += inlen;
+}
+
+static void blake2s_final(struct blake2s_state *state, uint8_t *out)
+{
+ blake2s_set_lastblock(state);
+ memset(state->buf + state->buflen, 0, BLAKE2S_BLOCK_LEN - state->buflen);
+ blake2s_compress(state, state->buf, 1, state->buflen);
+ cpu_to_le32_array(state->h, ARRAY_SIZE(state->h));
+ memcpy(out, state->h, state->outlen);
+}
+
+static size_t determine_optimal_seed_len(void)
+{
+ size_t ret = 0;
+ char poolsize_str[11] = { 0 };
+ int fd = open("/proc/sys/kernel/random/poolsize", O_RDONLY);
+
+ if (fd < 0 || read(fd, poolsize_str, sizeof(poolsize_str) - 1) < 0) {
+ fprintf(stderr, "WARNING: Unable to determine pool size, falling back to %u bits: %s\n", MIN_SEED_LEN * 8, strerror(errno));
+ ret = MIN_SEED_LEN;
+ } else
+ ret = DIV_ROUND_UP(strtoul(poolsize_str, NULL, 10), 8);
+ if (fd >= 0)
+ close(fd);
+ if (ret < MIN_SEED_LEN)
+ ret = MIN_SEED_LEN;
+ else if (ret > MAX_SEED_LEN)
+ ret = MAX_SEED_LEN;
+ return ret;
+}
+
+static int read_new_seed(uint8_t *seed, size_t len, bool *is_creditable)
+{
+ ssize_t ret;
+ int urandom_fd;
+
+ *is_creditable = false;
+ ret = getrandom(seed, len, GRND_NONBLOCK);
+ if (ret == (ssize_t)len) {
+ *is_creditable = true;
+ return 0;
+ } else if (ret < 0 && errno == ENOSYS) {
+ struct pollfd random_fd = {
+ .fd = open("/dev/random", O_RDONLY),
+ .events = POLLIN
+ };
+ if (random_fd.fd < 0)
+ return -errno;
+ *is_creditable = poll(&random_fd, 1, 0) == 1;
+ close(random_fd.fd);
+ } else if (getrandom(seed, len, GRND_INSECURE) == (ssize_t)len)
+ return 0;
+ urandom_fd = open("/dev/urandom", O_RDONLY);
+ if (urandom_fd < 0)
+ return -errno;
+ ret = read(urandom_fd, seed, len);
+ if (ret == (ssize_t)len)
+ ret = 0;
+ else
+ ret = -errno ? -errno : -EIO;
+ close(urandom_fd);
+ return ret;
+}
+
+static int seed_rng(uint8_t *seed, size_t len, bool credit)
+{
+ struct {
+ int entropy_count;
+ int buf_size;
+ uint8_t buffer[MAX_SEED_LEN];
+ } req = {
+ .entropy_count = credit ? len * 8 : 0,
+ .buf_size = len
+ };
+ int random_fd, ret;
+
+ if (len > sizeof(req.buffer))
+ return -EFBIG;
+ memcpy(req.buffer, seed, len);
+
+ random_fd = open("/dev/random", O_RDWR);
+ if (random_fd < 0)
+ return -errno;
+ ret = ioctl(random_fd, RNDADDENTROPY, &req);
+ if (ret)
+ ret = -errno ? -errno : -EIO;
+ close(random_fd);
+ return ret;
+}
+
+static int seed_from_file_if_exists(const char *filename, bool credit, struct blake2s_state *hash)
+{
+ uint8_t seed[MAX_SEED_LEN];
+ ssize_t seed_len;
+ int fd, dfd, ret = 0;
+
+ fd = open(filename, O_RDONLY);
+ if (fd < 0 && errno == ENOENT)
+ return 0;
+ else if (fd < 0) {
+ ret = -errno;
+ fprintf(stderr, "ERROR: Unable to open seed file: %s\n", strerror(errno));
+ return ret;
+ }
+ dfd = open(SEED_DIR, O_DIRECTORY | O_RDONLY);
+ if (dfd < 0) {
+ ret = -errno;
+ close(fd);
+ fprintf(stderr, "ERROR: Unable to open seed directory: %s\n", strerror(errno));
+ return ret;
+ }
+ seed_len = read(fd, seed, sizeof(seed));
+ if (seed_len < 0) {
+ ret = -errno;
+ fprintf(stderr, "ERROR: Unable to read seed file: %s\n", strerror(errno));
+ }
+ close(fd);
+ if (ret) {
+ close(dfd);
+ return ret;
+ }
+ if ((unlink(filename) < 0 || fsync(dfd) < 0) && seed_len) {
+ ret = -errno;
+ fprintf(stderr, "ERROR: Unable to remove seed after reading, so not seeding: %s\n", strerror(errno));
+ }
+ close(dfd);
+ if (ret)
+ return ret;
+ if (!seed_len)
+ return 0;
+
+ blake2s_update(hash, &seed_len, sizeof(seed_len));
+ blake2s_update(hash, seed, seed_len);
+
+ fprintf(stdout, "Seeding %zd bits %s crediting\n", seed_len * 8, credit ? "and" : "without");
+ ret = seed_rng(seed, seed_len, credit);
+ if (ret < 0)
+ fprintf(stderr, "ERROR: Unable to seed: %s\n", strerror(-ret));
+ return ret;
+}
+
+static bool skip_credit(void)
+{
+ const char *skip = getenv("SEEDRNG_SKIP_CREDIT");
+ return skip && (!strcmp(skip, "1") || !strcasecmp(skip, "true") ||
+ !strcasecmp(skip, "yes") || !strcasecmp(skip, "y"));
+}
+
+int main(int argc __attribute__((unused)), char *argv[] __attribute__((unused)))
+{
+ static const char seedrng_prefix[] = "SeedRNG v1 Old+New Prefix";
+ static const char seedrng_failure[] = "SeedRNG v1 No New Seed Failure";
+ int ret, fd = -1, lock, program_ret = 0;
+ uint8_t new_seed[MAX_SEED_LEN];
+ size_t new_seed_len;
+ bool new_seed_creditable;
+ struct timespec realtime = { 0 }, boottime = { 0 };
+ struct blake2s_state hash;
+
+ umask(0077);
+ if (getuid()) {
+ fprintf(stderr, "ERROR: This program requires root\n");
+ return 1;
+ }
+
+ blake2s_init(&hash, BLAKE2S_HASH_LEN);
+ blake2s_update(&hash, seedrng_prefix, strlen(seedrng_prefix));
+ clock_gettime(CLOCK_REALTIME, &realtime);
+ clock_gettime(CLOCK_BOOTTIME, &boottime);
+ blake2s_update(&hash, &realtime, sizeof(realtime));
+ blake2s_update(&hash, &boottime, sizeof(boottime));
+
+ if (mkdir(SEED_DIR, 0700) < 0 && errno != EEXIST) {
+ fprintf(stderr, "ERROR: Unable to create \"%s\" directory: %s\n", SEED_DIR, strerror(errno));
+ return 1;
+ }
+
+ lock = open(LOCK_FILE, O_WRONLY | O_CREAT, 0000);
+ if (lock < 0 || flock(lock, LOCK_EX) < 0) {
+ fprintf(stderr, "ERROR: Unable to open lock file: %s\n", strerror(errno));
+ program_ret = 1;
+ goto out;
+ }
+
+ ret = seed_from_file_if_exists(NON_CREDITABLE_SEED, false, &hash);
+ if (ret < 0)
+ program_ret |= 1 << 1;
+ ret = seed_from_file_if_exists(CREDITABLE_SEED, !skip_credit(), &hash);
+ if (ret < 0)
+ program_ret |= 1 << 2;
+
+ new_seed_len = determine_optimal_seed_len();
+ ret = read_new_seed(new_seed, new_seed_len, &new_seed_creditable);
+ if (ret < 0) {
+ fprintf(stderr, "ERROR: Unable to read new seed: %s\n", strerror(-ret));
+ new_seed_len = BLAKE2S_HASH_LEN;
+ strncpy((char *)new_seed, seedrng_failure, new_seed_len);
+ program_ret |= 1 << 3;
+ }
+ blake2s_update(&hash, &new_seed_len, sizeof(new_seed_len));
+ blake2s_update(&hash, new_seed, new_seed_len);
+ blake2s_final(&hash, new_seed + new_seed_len - BLAKE2S_HASH_LEN);
+
+ fprintf(stdout, "Saving %zu bits of %s seed for next boot\n", new_seed_len * 8, new_seed_creditable ? "creditable" : "non-creditable");
+ fd = open(NON_CREDITABLE_SEED, O_WRONLY | O_CREAT | O_TRUNC, 0400);
+ if (fd < 0) {
+ fprintf(stderr, "ERROR: Unable to open seed file for writing: %s\n", strerror(errno));
+ program_ret |= 1 << 4;
+ goto out;
+ }
+ if (write(fd, new_seed, new_seed_len) != (ssize_t)new_seed_len || fsync(fd) < 0) {
+ fprintf(stderr, "ERROR: Unable to write seed file: %s\n", strerror(errno));
+ program_ret |= 1 << 5;
+ goto out;
+ }
+ if (new_seed_creditable && rename(NON_CREDITABLE_SEED, CREDITABLE_SEED) < 0) {
+ fprintf(stderr, "WARNING: Unable to make new seed creditable: %s\n", strerror(errno));
+ program_ret |= 1 << 6;
+ }
+out:
+ if (fd >= 0)
+ close(fd);
+ if (lock >= 0)
+ close(lock);
+ return program_ret;
+}
diff --git a/source/a/util-linux/util-linux.SlackBuild b/source/a/util-linux/util-linux.SlackBuild
index a06357512..540a19229 100755
--- a/source/a/util-linux/util-linux.SlackBuild
+++ b/source/a/util-linux/util-linux.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2017, 2018, 2020, 2021 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2017, 2018, 2020, 2021, 2022, 2023, 2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -93,6 +93,12 @@ if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
for file in $CWD/pam.d/* ; do
cp -a ${file} $PKG/etc/pam.d/
done
+ # In case someone is using the '-h' option to /bin/login, we will require
+ # another copy of /etc/pam.d/login called /etc/pam.d/remote. Make this copy
+ # if it doesn't exist already:
+ if [ ! -r $PKG/etc/pam.d/remote ]; then
+ cp -a $PKG/etc/pam.d/login $PKG/etc/pam.d/remote
+ fi
if [ "$SHIP_SU" = "YES" ]; then
# Add su default file to ensure using ENV_SUPATH with 'su':
mkdir -p $PKG/etc/default
@@ -113,6 +119,8 @@ else
SHIP_SU=NO
LOGIN_OPTIONS="--disable-login"
fi
+# Put any PAM modules in the proper directory:
+sed -i "s|securelibdir = \$(libdir)/security|securelibdir = /lib${LIBDIRSUFFIX}/security|g" pam_lastlog2/src/Makemodule.am
# 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
@@ -123,15 +131,7 @@ zcat $CWD/util-linux.fdisk-no-solaris.diff.gz | patch -p1 --verbose || exit 1
# /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(){
+CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -145,7 +145,6 @@ configure_with_python(){
--enable-fdformat \
--enable-kill \
--disable-last \
- --enable-libmount-support-mtab \
--enable-line \
--enable-mesg \
--enable-partx \
@@ -159,14 +158,11 @@ configure_with_python(){
--enable-use-tty-group \
--enable-libblkid \
--enable-libmount \
+ --disable-libmount-mountfd-support \
--enable-libuuid \
--disable-uuidd \
- --with-python=$1 \
- --build=$ARCH-slackware-linux
-}
-
-CFLAGS="$SLKCFLAGS" \
- configure_with_python 2 || exit 1
+ --with-python=3 \
+ --build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install $NUMJOBS DESTDIR=$PKG || exit 1
@@ -179,15 +175,6 @@ 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
@@ -195,6 +182,7 @@ rm $PKG/sbin/nologin $PKG/usr/man/man8/nologin.8 $PKG/sbin/sulogin $PKG/usr/man/
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
@@ -309,6 +297,10 @@ 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
+# Build seedrng, a utility for seeding the kernel random number generator:
+cc -O2 -std=gnu99 $CWD/seedrng.c -o $PKG/usr/sbin/seedrng
+zcat $CWD/seedrng.8.gz > $PKG/usr/man/man8/seedrng.8
+
# These have always traditionally been available before /usr
# might be mounted:
( cd $PKG/usr/bin
@@ -335,7 +327,6 @@ cd $TMP/util-linux-$VERSION # Go back home :)
# tunelp was removed by upstream:
#ln -s ../sbin/tunelp .
ln -s ../../bin/more .
- ln -s ../../sbin/raw .
cd $PKG/usr/man/man1
#ln -s ziptool.1 jaztool.1
cd $PKG/usr/man/man8
@@ -369,7 +360,7 @@ gzip -9 $PKG/usr/info/*
mkdir -p $PKG/usr/doc/util-linux-$VERSION
cp -a AUTHORS COPYING* DEPRECATED NEWS README* \
- Documentation/v${VERSION}-ReleaseNotes \
+ Documentation/releases/v${VERSION}-ReleaseNotes \
Documentation/licenses/* Documentation/{TODO,*.txt} \
$PKG/usr/doc/util-linux-$VERSION
diff --git a/source/a/volume_key/volume_key.SlackBuild b/source/a/volume_key/volume_key.SlackBuild
index f72871334..bcb3c0e2e 100755
--- a/source/a/volume_key/volume_key.SlackBuild
+++ b/source/a/volume_key/volume_key.SlackBuild
@@ -25,13 +25,13 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=volume_key
VERSION=${VERSION:-$(echo $PKGNAM-$PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-8}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
@@ -105,6 +105,8 @@ CXXFLAGS="$SLKCFLAGS" \
--mandir=/usr/man \
--infodir=/usr/info \
--disable-static \
+ --without-python \
+ --with-python3 \
--build=$ARCH-slackware-linux || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
diff --git a/source/a/xfsprogs/xfsprogs.SlackBuild b/source/a/xfsprogs/xfsprogs.SlackBuild
index fe5d5e8f9..8c79ed459 100755
--- a/source/a/xfsprogs/xfsprogs.SlackBuild
+++ b/source/a/xfsprogs/xfsprogs.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2012, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2012, 2017, 2018, 2023 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -106,6 +106,9 @@ mv $PKG/usr/doc/xfsprogs $PKG/usr/doc/xfsprogs-$VERSION
cp -a README doc/COPYING doc/CREDITS doc/PORTING \
$PKG/usr/doc/xfsprogs-$VERSION
+# Not sure why these don't get installed automatically, but they should:
+cp -a LICENSES/* $PKG/usr/doc/xfsprogs-$VERSION
+
rm -f $PKG/usr/doc/xfsprogs-$VERSION/CHANGES.gz
# If there's a ChangeLog, installing at least part of the recent history
@@ -142,7 +145,7 @@ chmod 755 $PKG/lib${LIBDIRSUFFIX}/*
# Strip libraries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-strip -g $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+#strip -g $PKG/usr/lib${LIBDIRSUFFIX}/*.a
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/source/a/xz/f9cf4c05edd14dedfe63833f8ccbe41b55823b00.patch b/source/a/xz/f9cf4c05edd14dedfe63833f8ccbe41b55823b00.patch
new file mode 100644
index 000000000..12ce12c41
--- /dev/null
+++ b/source/a/xz/f9cf4c05edd14dedfe63833f8ccbe41b55823b00.patch
@@ -0,0 +1,25 @@
+From f9cf4c05edd14dedfe63833f8ccbe41b55823b00 Mon Sep 17 00:00:00 2001
+From: Lasse Collin <lasse.collin@tukaani.org>
+Date: Sat, 30 Mar 2024 14:36:28 +0200
+Subject: [PATCH] CMake: Fix sabotaged Landlock sandbox check.
+
+It never enabled it.
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 1f019167..0e4d464f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1001,7 +1001,7 @@ if(NOT SANDBOX_FOUND AND ENABLE_SANDBOX MATCHES "^ON$|^landlock$")
+ #include <linux/landlock.h>
+ #include <sys/syscall.h>
+ #include <sys/prctl.h>
+-.
++
+ void my_sandbox(void)
+ {
+ (void)prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0);
+--
+2.20.1
diff --git a/source/a/xz/slack-desc b/source/a/xz/slack-desc
index 30a6bb342..87680c1e5 100644
--- a/source/a/xz/slack-desc
+++ b/source/a/xz/slack-desc
@@ -15,5 +15,5 @@ xz: LZMA compression easy to use on free (as in freedom) operating
xz: systems.
xz:
xz: The people most responsible for xz are Igor Pavlov, Ville Koskinen,
-xz: and Lasse Collin. Homepage: http://tukaani.org/xz/
+xz: and Lasse Collin. Homepage: https://tukaani.org/xz/
xz:
diff --git a/source/a/xz/xz.SlackBuild b/source/a/xz/xz.SlackBuild
index a0616e524..f1b732bbc 100755
--- a/source/a/xz/xz.SlackBuild
+++ b/source/a/xz/xz.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2009, 2010, 2011, 2012, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010, 2011, 2012, 2018, 2024 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=xz
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-3}
# Automatically determine the architecture we're building on:
@@ -80,7 +80,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
cd $PKGNAM-$VERSION
chown -R root:root .
find . \
@@ -89,6 +89,22 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
+# Change default verbosity from V_WARNING to V_ERROR to prevent spamming
+# the screen with messages concerning steps that xz it taking to reduce
+# memory use (these aren't indicating any sort of failure, so...)
+zcat $CWD/xz.default.verbosity.V_ERROR.diff.gz | patch -p1 --verbose || exit 1
+
+# More fallout from the incident:
+cat $CWD/f9cf4c05edd14dedfe63833f8ccbe41b55823b00.patch | patch -p1 --verbose || exit 1
+
+if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
diff --git a/source/a/xz/xz.default.verbosity.V_ERROR.diff b/source/a/xz/xz.default.verbosity.V_ERROR.diff
new file mode 100644
index 000000000..c6c3aef45
--- /dev/null
+++ b/source/a/xz/xz.default.verbosity.V_ERROR.diff
@@ -0,0 +1,11 @@
+--- ./src/xz/message.c.orig 2023-01-11 10:51:42.000000000 -0600
++++ ./src/xz/message.c 2023-01-19 13:52:39.484987693 -0600
+@@ -22,7 +22,7 @@
+ static unsigned int files_total;
+
+ /// Verbosity level
+-static enum message_verbosity verbosity = V_WARNING;
++static enum message_verbosity verbosity = V_ERROR;
+
+ /// Filename which we will print with the verbose messages
+ static const char *filename;
diff --git a/source/a/xz/xz.url b/source/a/xz/xz.url
new file mode 100644
index 000000000..ce0a00766
--- /dev/null
+++ b/source/a/xz/xz.url
@@ -0,0 +1 @@
+https://github.com/tukaani-project/xz/tags
diff --git a/source/a/zerofree/zerofree.SlackBuild b/source/a/zerofree/zerofree.SlackBuild
index 023116521..1bc920ba6 100755
--- a/source/a/zerofree/zerofree.SlackBuild
+++ b/source/a/zerofree/zerofree.SlackBuild
@@ -30,7 +30,7 @@ BUILD=${BUILD:-3}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ arm*) readelf /usr/bin/file -A | grep -E -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
diff --git a/source/a/zoo/zoo.SlackBuild b/source/a/zoo/zoo.SlackBuild
index a94a53fbc..cf3576065 100755
--- a/source/a/zoo/zoo.SlackBuild
+++ b/source/a/zoo/zoo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2018, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,8 +24,8 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=zoo
VERSION=2.10
-DEBPATCH=22
-BUILD=${BUILD:-4}
+DEBPATCH=28
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -53,7 +53,7 @@ mkdir -p $TMP $PKG
cd $TMP
rm -rf zoo-$VERSION
-tar xzvf $CWD/zoo-$VERSION.tar.gz
+tar xvf $CWD/zoo-$VERSION.tar.?z
cd zoo-$VERSION
chown -R root:root .
@@ -63,7 +63,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
-tar xf $CWD/zoo_${VERSION}-${DEBPATCH}.debian.tar.gz
+tar xf $CWD/zoo_${VERSION}-${DEBPATCH}.debian.tar.?z
for diff in debian/patches/*patch ; do
cat $diff | patch -p1 --verbose --backup --suffix=.orig || exit 1
done