summaryrefslogtreecommitdiffstats
path: root/patches/source
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source')
-rwxr-xr-xpatches/source/MPlayer/MPlayer.SlackBuild488
-rw-r--r--patches/source/MPlayer/slack-desc20
-rwxr-xr-xpatches/source/apr-util/apr-util.SlackBuild124
-rw-r--r--patches/source/apr-util/apr-util.url2
-rw-r--r--patches/source/apr-util/slack-desc19
-rwxr-xr-xpatches/source/apr/apr.SlackBuild110
-rw-r--r--patches/source/apr/apr.url2
-rw-r--r--patches/source/apr/slack-desc19
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00178
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00260
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-003318
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00453
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-005131
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00646
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00746
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00874
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-00982
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01061
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01146
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-012151
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01352
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01447
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01581
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01646
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01747
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01874
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-01947
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02060
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02161
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02261
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02362
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02445
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-025143
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02658
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02747
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-02852
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-029524
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-030178
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03180
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03275
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03357
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03446
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03566
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03692
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-037112
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03847
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-03958
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04056
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04147
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04257
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04365
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04470
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04553
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04655
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04749
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-048104
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04943
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-050217
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-051173
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-05259
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-053132
-rw-r--r--patches/source/bash/bash.CVE-2016-0634.bash43-047150
-rw-r--r--patches/source/bash/bash.CVE-2016-7543.bash43-04854
-rwxr-xr-xpatches/source/bash/bash.SlackBuild173
-rw-r--r--patches/source/bash/doinst.sh18
-rw-r--r--patches/source/bash/slack-desc19
-rw-r--r--patches/source/bind/3link.sh136
-rwxr-xr-xpatches/source/bind/bind.SlackBuild166
-rw-r--r--patches/source/bind/bind.so_bsdcompat.diff11
-rw-r--r--patches/source/bind/caching-example/localhost.zone11
-rw-r--r--patches/source/bind/caching-example/named.conf31
-rw-r--r--patches/source/bind/caching-example/named.local10
-rw-r--r--patches/source/bind/caching-example/named.root90
-rw-r--r--patches/source/bind/doinst.sh36
-rw-r--r--patches/source/bind/rc.bind112
-rw-r--r--patches/source/bind/slack-desc19
-rw-r--r--patches/source/blueman/blueman-open114
-rw-r--r--patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff12
-rw-r--r--patches/source/blueman/blueman.CVE-2015-8612.diff21
-rwxr-xr-xpatches/source/blueman/blueman.SlackBuild134
-rw-r--r--patches/source/blueman/doinst.sh23
-rw-r--r--patches/source/blueman/slack-desc19
-rw-r--r--patches/source/bluez/bluez-4.99.tar.sign17
-rw-r--r--patches/source/bluez/bluez-run_udev_helper.patch14
-rw-r--r--patches/source/bluez/bluez.CVE-2017-1000251.diff27
-rwxr-xr-xpatches/source/bluez/bluez.SlackBuild196
-rw-r--r--patches/source/bluez/bluez.enable.audio.socket.diff12
-rw-r--r--patches/source/bluez/config/bluetooth.modprobe3
-rw-r--r--patches/source/bluez/config/bluetooth.sh7
-rw-r--r--patches/source/bluez/config/rc.bluetooth29
-rw-r--r--patches/source/bluez/doinst.sh28
-rw-r--r--patches/source/bluez/slack-desc19
-rwxr-xr-xpatches/source/btrfs-progs/btrfs-progs.SlackBuild127
-rw-r--r--patches/source/btrfs-progs/slack-desc19
-rwxr-xr-xpatches/source/ca-certificates/ca-certificates.SlackBuild91
-rw-r--r--patches/source/ca-certificates/doinst.sh19
-rw-r--r--patches/source/ca-certificates/patches/fixup_DESTDIR.diff49
-rw-r--r--patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff12
-rw-r--r--patches/source/ca-certificates/setup.11.cacerts3
-rw-r--r--patches/source/ca-certificates/slack-desc19
-rwxr-xr-xpatches/source/cairo/cairo.SlackBuild132
-rwxr-xr-xpatches/source/cairo/paredown.sh51
-rw-r--r--patches/source/cairo/slack-desc20
-rw-r--r--patches/source/cups/cups-1.5.4-usb-quirks.diff319
-rw-r--r--patches/source/cups/cups-blacklist-usblp.conf10
-rwxr-xr-xpatches/source/cups/cups.SlackBuild203
-rw-r--r--patches/source/cups/cups.url1
-rw-r--r--patches/source/cups/doinst.sh34
-rw-r--r--patches/source/cups/slack-desc19
-rw-r--r--patches/source/cups/str4609-1.5.patch341
-rwxr-xr-xpatches/source/curl/cacert-fetch.sh1
-rw-r--r--patches/source/curl/cacert.pem3338
-rwxr-xr-xpatches/source/curl/curl.SlackBuild152
-rw-r--r--patches/source/curl/slack-desc19
-rw-r--r--patches/source/dhcp/dhclient-script.PATH.diff13
-rwxr-xr-xpatches/source/dhcp/dhcp-remove-bind-tarball.sh49
-rwxr-xr-xpatches/source/dhcp/dhcp.SlackBuild179
-rw-r--r--patches/source/dhcp/doinst.sh21
-rw-r--r--patches/source/dhcp/slack-desc19
-rw-r--r--patches/source/dhcpcd/COPYRIGHT26
-rwxr-xr-xpatches/source/dhcpcd/dhcpcd.SlackBuild133
-rw-r--r--patches/source/dhcpcd/doinst.sh15
-rw-r--r--patches/source/dhcpcd/patches/Actually-validate-the-search-list.patch25
-rw-r--r--patches/source/dhcpcd/patches/dhcpcd.conf-Don-t-invoke-wpa_supplicant-by-default.patch26
-rw-r--r--patches/source/dhcpcd/patches/dhcpcd.dho_optionsoverloaded.dos.patch11
-rw-r--r--patches/source/dhcpcd/slack-desc19
-rwxr-xr-xpatches/source/dnsmasq/dnsmasq.SlackBuild107
-rw-r--r--patches/source/dnsmasq/dnsmasq.leasedir.diff24
-rw-r--r--patches/source/dnsmasq/doinst.sh26
-rw-r--r--patches/source/dnsmasq/rc.dnsmasq36
-rw-r--r--patches/source/dnsmasq/slack-desc19
-rw-r--r--patches/source/emacs/doinst.sh10
-rwxr-xr-xpatches/source/emacs/emacs.SlackBuild190
-rw-r--r--patches/source/emacs/slack-desc12
-rwxr-xr-xpatches/source/expat/expat.SlackBuild101
-rw-r--r--patches/source/expat/slack-desc19
-rwxr-xr-xpatches/source/flac/flac.SlackBuild124
-rw-r--r--patches/source/flac/flac.man.diff12
-rw-r--r--patches/source/flac/slack-desc19
-rw-r--r--patches/source/freetype/freetype.CVE-2017-8287.diff31
-rwxr-xr-xpatches/source/freetype/freetype.SlackBuild123
-rw-r--r--patches/source/freetype/freetype.illadvisederror.diff31
-rw-r--r--patches/source/freetype/freetype.subpixel.rendering.diff11
-rw-r--r--patches/source/freetype/slack-desc19
-rw-r--r--patches/source/gdk-pixbuf2/doinst.sh1
-rw-r--r--patches/source/gdk-pixbuf2/gdk-pixbuf.CVE-2015-4491.diff64
-rw-r--r--patches/source/gdk-pixbuf2/gdk-pixbuf.pnglz.diff12
-rwxr-xr-xpatches/source/gdk-pixbuf2/gdk-pixbuf2.SlackBuild153
-rw-r--r--patches/source/gdk-pixbuf2/slack-desc19
-rw-r--r--patches/source/gdk-pixbuf2/update-gdk-pixbuf-loaders60
-rw-r--r--patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch68
-rw-r--r--patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch159
-rw-r--r--patches/source/gegl/gegl-0.2.0-libopenraw.patch71
-rw-r--r--patches/source/gegl/gegl-0.2.0-linker-flags.patch36
-rw-r--r--patches/source/gegl/gegl-0.2.0-lua-5.2.patch53
-rw-r--r--patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch195
-rwxr-xr-xpatches/source/gegl/gegl.SlackBuild116
-rw-r--r--patches/source/gegl/slack-desc19
-rwxr-xr-xpatches/source/gimp/gimp.SlackBuild135
-rw-r--r--patches/source/gimp/slack-desc19
-rw-r--r--patches/source/git/git-2.14.1.tar.signbin0 -> 543 bytes
-rwxr-xr-xpatches/source/git/git.SlackBuild170
-rw-r--r--patches/source/git/git.url1
-rw-r--r--patches/source/git/slack-desc19
-rw-r--r--patches/source/glibc-zoneinfo/doinst.sh57
-rwxr-xr-xpatches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild147
-rw-r--r--patches/source/glibc-zoneinfo/slack-desc19
-rwxr-xr-xpatches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh60
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/00132
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/01585
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/0228
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/03585
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/0433
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/parts/README2
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig3
-rw-r--r--patches/source/glibc-zoneinfo/timezone-scripts/timeconfig1363
-rw-r--r--patches/source/glibc/doinst.sh-glibc197
-rw-r--r--patches/source/glibc/doinst.sh-glibc-solibs137
-rw-r--r--patches/source/glibc/doinst.sh-glibc-zoneinfo17
-rw-r--r--patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff26
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2012-4412.diff116
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2012-4424.diff400
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-2207.diff241
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4237.diff286
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4332.diff64
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4458.diff52
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2013-4788.diff460
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-0475.diff404
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-4043.diff142
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-5119.diff206
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2014-6040.diff153
-rw-r--r--patches/source/glibc/glibc-2.17_CVE-2015-7547.diff571
-rw-r--r--patches/source/glibc/glibc-2.17_gcc48-unsafe-optim.diff49
-rw-r--r--patches/source/glibc/glibc-2.17_hardening.diff33
-rw-r--r--patches/source/glibc/glibc-2.17_strcoll-change.diff802
-rwxr-xr-xpatches/source/glibc/glibc-cvs-checkout.sh3
-rw-r--r--patches/source/glibc/glibc.CVE-2013-0242.diff189
-rw-r--r--patches/source/glibc/glibc.CVE-2013-1914.diff53
-rw-r--r--patches/source/glibc/glibc.CVE-2013-2207.diff241
-rw-r--r--patches/source/glibc/glibc.CVE-2013-4332.diff64
-rw-r--r--patches/source/glibc/glibc.CVE-2015-0235.glibc217.diff217
-rwxr-xr-xpatches/source/glibc/glibc.SlackBuild536
-rw-r--r--patches/source/glibc/glibc.disable.broken.optimized.memcpy.diff30
-rw-r--r--patches/source/glibc/glibc.getcwd.max.macro.diff10
-rw-r--r--patches/source/glibc/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch1212
-rw-r--r--patches/source/glibc/glibc.git-96611391ad8823ba58405325d78cefeae5cdf699-CVE-2010-3847b.patch27
-rw-r--r--patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff49
-rw-r--r--patches/source/glibc/glibc.locale.no-archive.diff10
-rw-r--r--patches/source/glibc/glibc.make-3.82.diff28
-rw-r--r--patches/source/glibc/glibc.nis-netgroups.diff12
-rw-r--r--patches/source/glibc/glibc.revert.to.fix.build.breakages.diff13
-rw-r--r--patches/source/glibc/glibc.ru_RU.CP1251.diff10
-rw-r--r--patches/source/glibc/is_IS.diff19
-rwxr-xr-xpatches/source/glibc/profile.d/glibc.csh.new9
-rwxr-xr-xpatches/source/glibc/profile.d/glibc.sh.new8
-rw-r--r--patches/source/glibc/slack-desc.glibc19
-rw-r--r--patches/source/glibc/slack-desc.glibc-debug19
-rw-r--r--patches/source/glibc/slack-desc.glibc-i18n19
-rw-r--r--patches/source/glibc/slack-desc.glibc-profile19
-rw-r--r--patches/source/glibc/slack-desc.glibc-solibs19
-rw-r--r--patches/source/glibc/slack-desc.glibc-solibs-linuxthreads18
-rw-r--r--patches/source/glibc/slack-desc.glibc-zoneinfo19
-rw-r--r--patches/source/glibc/slack-desc.glibc-zoneinfo.olson19
-rw-r--r--patches/source/glibc/timezone-scripts/output-updated-timeconfig.sh53
-rw-r--r--patches/source/glibc/timezone-scripts/parts/00131
-rw-r--r--patches/source/glibc/timezone-scripts/parts/011658
-rw-r--r--patches/source/glibc/timezone-scripts/parts/0228
-rw-r--r--patches/source/glibc/timezone-scripts/parts/031658
-rw-r--r--patches/source/glibc/timezone-scripts/parts/0432
-rw-r--r--patches/source/glibc/timezone-scripts/parts/README2
-rw-r--r--patches/source/glibc/timezone-scripts/setup.timeconfig3
-rw-r--r--patches/source/glibc/timezone-scripts/timeconfig3695
-rwxr-xr-xpatches/source/gnupg/gnupg.SlackBuild115
-rw-r--r--patches/source/gnupg/slack-desc.gnupg19
-rwxr-xr-xpatches/source/gnupg2/gnupg2.SlackBuild163
-rw-r--r--patches/source/gnupg2/slack-desc19
-rwxr-xr-xpatches/source/gnutls/gnutls.SlackBuild150
-rw-r--r--patches/source/gnutls/slack-desc19
-rw-r--r--patches/source/grub/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch45
-rw-r--r--patches/source/grub/doinst.sh16
-rw-r--r--patches/source/grub/etc.default.grub28
-rwxr-xr-xpatches/source/grub/grub.SlackBuild195
-rw-r--r--patches/source/grub/grub.dejavusansmono.gfxterm.font.diff43
-rw-r--r--patches/source/grub/grub.e75fdee420a7ad95e9a465c9699adc2e2e970440.terminate.efi.several.times.diff75
-rw-r--r--patches/source/grub/initrd_naming.patch13
-rw-r--r--patches/source/grub/slack-desc19
-rw-r--r--patches/source/grub/txtHRnXiHYUrM.txt49
-rw-r--r--patches/source/gtk+2/doinst.sh28
-rw-r--r--patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff26
-rw-r--r--patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff264
-rw-r--r--patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff264
-rwxr-xr-xpatches/source/gtk+2/gtk+2.SlackBuild198
-rw-r--r--patches/source/gtk+2/gtk.CVE-2013-7447.diff29
-rw-r--r--patches/source/gtk+2/gtk.xid.nowarningflood.diff12
-rwxr-xr-xpatches/source/gtk+2/profile.d/gtk+.csh2
-rwxr-xr-xpatches/source/gtk+2/profile.d/gtk+.sh4
-rw-r--r--patches/source/gtk+2/slack-desc19
-rw-r--r--patches/source/gtk+2/update-gtk-immodules12
-rw-r--r--patches/source/gtk+2/update-gtk-immodules-2.048
-rw-r--r--patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch15
-rw-r--r--patches/source/httpd/doinst.sh71
-rwxr-xr-xpatches/source/httpd/httpd.SlackBuild246
-rw-r--r--patches/source/httpd/httpd.runasapache.diff13
-rw-r--r--patches/source/httpd/httpd.url2
-rw-r--r--patches/source/httpd/logrotate.httpd12
-rw-r--r--patches/source/httpd/rc.httpd44
-rw-r--r--patches/source/httpd/slack-desc19
-rw-r--r--patches/source/imagemagick/blob.c.undef.have_popen.diff10
-rwxr-xr-xpatches/source/imagemagick/imagemagick.SlackBuild183
-rw-r--r--patches/source/imagemagick/policy.xml.diff26
-rw-r--r--patches/source/imagemagick/slack-desc19
-rw-r--r--patches/source/inputproto/arch.use.flags9
-rw-r--r--patches/source/inputproto/build/inputproto1
-rw-r--r--patches/source/inputproto/configure/configure13
-rwxr-xr-xpatches/source/inputproto/inputproto.SlackBuild2
-rw-r--r--patches/source/inputproto/modularize279
-rw-r--r--patches/source/inputproto/noarch75
-rw-r--r--patches/source/inputproto/package-blacklist44
-rw-r--r--patches/source/inputproto/slack-desc/inputproto19
-rwxr-xr-xpatches/source/inputproto/x11.SlackBuild381
-rw-r--r--patches/source/irssi/doinst.sh12
-rwxr-xr-xpatches/source/irssi/irssi.SlackBuild143
-rw-r--r--patches/source/irssi/slack-desc19
-rwxr-xr-xpatches/source/jasper/jasper.SlackBuild137
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3520.patch928
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-CVE-2008-3522.patch14
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-CVE-2011-4516-CVE-2011-4517-CERT-VU-887409.patch23
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-BAD_SIZEOF.patch17
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-CHECKED_RETURN.patch141
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-FORWARD_NULL.patch44
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-NULL_RETURNS.patch61
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-RESOURCE_LEAK.patch202
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-UNREACHABLE.patch37
-rw-r--r--patches/source/jasper/patches/jasper-1.900.1-Coverity-UNUSED_VALUE.patch41
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8137.patch57
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8138.patch14
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8157.patch12
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-8158.patch329
-rw-r--r--patches/source/jasper/patches/jasper-CVE-2014-9029.patch29
-rw-r--r--patches/source/jasper/patches/jpc_dec.c.patch18
-rw-r--r--patches/source/jasper/patches/patch-libjasper-stepsizes-overflow.diff14
-rw-r--r--patches/source/jasper/slack-desc19
-rwxr-xr-xpatches/source/kdelibs/KDE.SlackBuild532
-rw-r--r--patches/source/kdelibs/KDE.options58
-rw-r--r--patches/source/kdelibs/build/kdelibs1
-rw-r--r--patches/source/kdelibs/cmake/kdelibs17
-rw-r--r--patches/source/kdelibs/doinst.sh/kdelibs9
-rwxr-xr-xpatches/source/kdelibs/kdelibs.SlackBuild2
-rw-r--r--patches/source/kdelibs/modularize268
-rw-r--r--patches/source/kdelibs/modules/kdelibs1
-rw-r--r--patches/source/kdelibs/noarch5
-rw-r--r--patches/source/kdelibs/package-blacklist9
-rw-r--r--patches/source/kdelibs/patch/kdelibs.patch17
-rw-r--r--patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch62
-rw-r--r--patches/source/kdelibs/patch/kdelibs/kdelibs.CVE-2017-8422.diff201
-rw-r--r--patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch11
-rw-r--r--patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch15
-rw-r--r--patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch56
-rw-r--r--patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch31
-rw-r--r--patches/source/kdelibs/post-install/kdelibs.post-install2
-rw-r--r--patches/source/kdelibs/slack-desc/kdelibs19
-rw-r--r--patches/source/libX11/arch.use.flags9
-rw-r--r--patches/source/libX11/build/libX111
-rw-r--r--patches/source/libX11/configure/libX1112
-rwxr-xr-xpatches/source/libX11/libX11.SlackBuild2
-rw-r--r--patches/source/libX11/modularize279
-rw-r--r--patches/source/libX11/noarch75
-rw-r--r--patches/source/libX11/package-blacklist44
-rw-r--r--patches/source/libX11/post-install/libX11.post-install2
-rw-r--r--patches/source/libX11/slack-desc/libX1119
-rwxr-xr-xpatches/source/libX11/x11.SlackBuild381
-rw-r--r--patches/source/libXcursor/arch.use.flags7
-rwxr-xr-xpatches/source/libXcursor/build/increment.sh17
-rw-r--r--patches/source/libXcursor/build/libXcursor1
-rw-r--r--patches/source/libXcursor/configure/configure12
-rwxr-xr-xpatches/source/libXcursor/libXcursor.SlackBuild26
-rw-r--r--patches/source/libXcursor/modularize272
-rw-r--r--patches/source/libXcursor/noarch76
-rw-r--r--patches/source/libXcursor/package-blacklist43
-rw-r--r--patches/source/libXcursor/slack-desc/libXcursor19
-rwxr-xr-xpatches/source/libXcursor/x11-build-script.sh374
-rw-r--r--patches/source/libXext/arch.use.flags9
-rw-r--r--patches/source/libXext/build/libXext1
-rw-r--r--patches/source/libXext/configure/configure13
-rwxr-xr-xpatches/source/libXext/libXext.SlackBuild2
-rw-r--r--patches/source/libXext/modularize279
-rw-r--r--patches/source/libXext/noarch75
-rw-r--r--patches/source/libXext/package-blacklist44
-rw-r--r--patches/source/libXext/slack-desc/libXext19
-rwxr-xr-xpatches/source/libXext/x11.SlackBuild381
-rw-r--r--patches/source/libXfixes/arch.use.flags9
-rw-r--r--patches/source/libXfixes/build/libXfixes1
-rw-r--r--patches/source/libXfixes/configure/configure13
-rwxr-xr-xpatches/source/libXfixes/libXfixes.SlackBuild2
-rw-r--r--patches/source/libXfixes/modularize279
-rw-r--r--patches/source/libXfixes/noarch75
-rw-r--r--patches/source/libXfixes/package-blacklist44
-rw-r--r--patches/source/libXfixes/slack-desc/libXfixes19
-rwxr-xr-xpatches/source/libXfixes/x11.SlackBuild381
-rw-r--r--patches/source/libXfont/arch.use.flags7
-rwxr-xr-xpatches/source/libXfont/build/increment.sh17
-rw-r--r--patches/source/libXfont/build/libXfont1
-rw-r--r--patches/source/libXfont/configure/configure12
-rwxr-xr-xpatches/source/libXfont/libXfont.SlackBuild26
-rw-r--r--patches/source/libXfont/modularize272
-rw-r--r--patches/source/libXfont/noarch76
-rw-r--r--patches/source/libXfont/package-blacklist43
-rw-r--r--patches/source/libXfont/patch/libXfont.patch1
-rw-r--r--patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff85
-rw-r--r--patches/source/libXfont/slack-desc/libXfont19
-rwxr-xr-xpatches/source/libXfont/x11-build-script.sh374
-rw-r--r--patches/source/libXi/arch.use.flags9
-rw-r--r--patches/source/libXi/build/libXi1
-rw-r--r--patches/source/libXi/configure/configure13
-rwxr-xr-xpatches/source/libXi/libXi.SlackBuild2
-rw-r--r--patches/source/libXi/modularize279
-rw-r--r--patches/source/libXi/noarch75
-rw-r--r--patches/source/libXi/package-blacklist44
-rw-r--r--patches/source/libXi/slack-desc/libXi19
-rw-r--r--patches/source/libXi/slack-desc/libXinerama19
-rwxr-xr-xpatches/source/libXi/x11.SlackBuild381
-rw-r--r--patches/source/libXrandr/arch.use.flags9
-rw-r--r--patches/source/libXrandr/build/libXrandr1
-rw-r--r--patches/source/libXrandr/configure/configure13
-rwxr-xr-xpatches/source/libXrandr/libXrandr.SlackBuild2
-rw-r--r--patches/source/libXrandr/modularize279
-rw-r--r--patches/source/libXrandr/noarch75
-rw-r--r--patches/source/libXrandr/package-blacklist44
-rw-r--r--patches/source/libXrandr/slack-desc/libXrandr19
-rwxr-xr-xpatches/source/libXrandr/x11.SlackBuild381
-rw-r--r--patches/source/libXrender/arch.use.flags9
-rw-r--r--patches/source/libXrender/build/libXrender1
-rw-r--r--patches/source/libXrender/configure/configure13
-rwxr-xr-xpatches/source/libXrender/libXrender.SlackBuild2
-rw-r--r--patches/source/libXrender/modularize279
-rw-r--r--patches/source/libXrender/noarch75
-rw-r--r--patches/source/libXrender/package-blacklist44
-rw-r--r--patches/source/libXrender/slack-desc/libXrender19
-rwxr-xr-xpatches/source/libXrender/x11.SlackBuild381
-rw-r--r--patches/source/libXres/arch.use.flags9
-rw-r--r--patches/source/libXres/build/libXres1
-rw-r--r--patches/source/libXres/configure/configure13
-rwxr-xr-xpatches/source/libXres/libXres.SlackBuild2
-rw-r--r--patches/source/libXres/modularize279
-rw-r--r--patches/source/libXres/noarch75
-rw-r--r--patches/source/libXres/package-blacklist44
-rw-r--r--patches/source/libXres/slack-desc/libXres19
-rwxr-xr-xpatches/source/libXres/x11.SlackBuild381
-rw-r--r--patches/source/libXtst/arch.use.flags9
-rw-r--r--patches/source/libXtst/build/libXtst1
-rw-r--r--patches/source/libXtst/configure/configure13
-rwxr-xr-xpatches/source/libXtst/libXtst.SlackBuild2
-rw-r--r--patches/source/libXtst/modularize279
-rw-r--r--patches/source/libXtst/noarch75
-rw-r--r--patches/source/libXtst/package-blacklist44
-rw-r--r--patches/source/libXtst/slack-desc/libXtst19
-rwxr-xr-xpatches/source/libXtst/x11.SlackBuild381
-rw-r--r--patches/source/libXv/arch.use.flags9
-rw-r--r--patches/source/libXv/build/libXv1
-rw-r--r--patches/source/libXv/configure/configure13
-rwxr-xr-xpatches/source/libXv/libXv.SlackBuild2
-rw-r--r--patches/source/libXv/modularize279
-rw-r--r--patches/source/libXv/noarch75
-rw-r--r--patches/source/libXv/package-blacklist44
-rw-r--r--patches/source/libXv/slack-desc/libXv19
-rw-r--r--patches/source/libXv/slack-desc/libXvMC19
-rwxr-xr-xpatches/source/libXv/x11.SlackBuild381
-rw-r--r--patches/source/libXvMC/arch.use.flags9
-rw-r--r--patches/source/libXvMC/build/libXvMC1
-rw-r--r--patches/source/libXvMC/configure/configure13
-rwxr-xr-xpatches/source/libXvMC/libXvMC.SlackBuild2
-rw-r--r--patches/source/libXvMC/modularize279
-rw-r--r--patches/source/libXvMC/noarch75
-rw-r--r--patches/source/libXvMC/package-blacklist44
-rw-r--r--patches/source/libXvMC/slack-desc/libXvMC19
-rwxr-xr-xpatches/source/libXvMC/x11.SlackBuild381
-rwxr-xr-xpatches/source/libarchive/libarchive.SlackBuild108
-rw-r--r--patches/source/libarchive/slack-desc19
-rwxr-xr-xpatches/source/libevent/libevent.SlackBuild154
-rw-r--r--patches/source/libevent/slack-desc19
-rwxr-xr-xpatches/source/libgcrypt/libgcrypt.SlackBuild124
-rw-r--r--patches/source/libgcrypt/slack-desc19
-rwxr-xr-xpatches/source/libidn/libidn.SlackBuild137
-rw-r--r--patches/source/libidn/slack-desc19
-rwxr-xr-xpatches/source/libiodbc/libiodbc.SlackBuild126
-rw-r--r--patches/source/libiodbc/libiodbc.disable.rpath.diff11
-rw-r--r--patches/source/libiodbc/slack-desc19
-rw-r--r--patches/source/libjpeg/jpeg.CVE-2013-6629.diff32
-rwxr-xr-xpatches/source/libjpeg/libjpeg.SlackBuild112
-rw-r--r--patches/source/libjpeg/slack-desc19
-rwxr-xr-xpatches/source/libpcap/libpcap.SlackBuild128
-rw-r--r--patches/source/libpcap/slack-desc19
-rwxr-xr-xpatches/source/libpng/libpng.SlackBuild134
-rw-r--r--patches/source/libpng/libpng.url1
-rw-r--r--patches/source/libpng/slack-desc19
-rwxr-xr-xpatches/source/libsndfile/libsndfile.SlackBuild106
-rw-r--r--patches/source/libsndfile/slack-desc19
-rw-r--r--patches/source/libsoup/libsoup.CVE-2017-2885.diff43
-rwxr-xr-xpatches/source/libsoup/libsoup.SlackBuild100
-rw-r--r--patches/source/libsoup/slack-desc19
-rwxr-xr-xpatches/source/libssh/libssh.SlackBuild113
-rw-r--r--patches/source/libssh/slack-desc19
-rwxr-xr-xpatches/source/libtasn1/libtasn1.SlackBuild124
-rw-r--r--patches/source/libtasn1/slack-desc19
-rwxr-xr-xpatches/source/libvorbis/libvorbis.SlackBuild102
-rw-r--r--patches/source/libvorbis/slack-desc19
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch17
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch27
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch11
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch16
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch61
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch13
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch38
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch13
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch118
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch56
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch23
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch30
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch14
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch36
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch21
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch32
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch18
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch14
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch520
-rw-r--r--patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch10
-rwxr-xr-xpatches/source/libwmf/libwmf.SlackBuild142
-rw-r--r--patches/source/libwmf/libwmf.png14.diff11
-rw-r--r--patches/source/libwmf/slack-desc19
-rw-r--r--patches/source/libxcb/arch.use.flags9
-rw-r--r--patches/source/libxcb/build/libxcb1
-rw-r--r--patches/source/libxcb/configure/libxcb14
-rwxr-xr-xpatches/source/libxcb/libxcb.SlackBuild2
-rw-r--r--patches/source/libxcb/modularize279
-rw-r--r--patches/source/libxcb/noarch75
-rw-r--r--patches/source/libxcb/package-blacklist44
-rw-r--r--patches/source/libxcb/post-install/libxcb.post-install66
-rw-r--r--patches/source/libxcb/slack-desc/libxcb19
-rwxr-xr-xpatches/source/libxcb/x11.SlackBuild381
-rwxr-xr-xpatches/source/libxml2/libxml2.SlackBuild112
-rw-r--r--patches/source/libxml2/libxml2.do-not-check-crc.diff35
-rw-r--r--patches/source/libxml2/slack-desc19
-rwxr-xr-xpatches/source/libxslt/libxslt.SlackBuild100
-rw-r--r--patches/source/libxslt/slack-desc19
-rwxr-xr-xpatches/source/libyaml/libyaml.SlackBuild114
-rw-r--r--patches/source/libyaml/libyaml.url1
-rw-r--r--patches/source/libyaml/slack-desc19
-rwxr-xr-xpatches/source/llvm/llvm.SlackBuild173
-rw-r--r--patches/source/llvm/llvm.rpath.fix.diff14
-rw-r--r--patches/source/llvm/llvm.url2
-rw-r--r--patches/source/llvm/slack-desc19
-rwxr-xr-xpatches/source/loudmouth/loudmouth.SlackBuild133
-rw-r--r--patches/source/loudmouth/slack-desc19
-rw-r--r--patches/source/lynx/doinst.sh13
-rwxr-xr-xpatches/source/lynx/lynx.SlackBuild155
-rw-r--r--patches/source/lynx/lynx.cfg.diff31
-rw-r--r--patches/source/lynx/slack-desc19
-rw-r--r--patches/source/mailx/doinst.sh14
-rw-r--r--patches/source/mailx/heirloom-mailx-12.5-fixes-1.patch232
-rwxr-xr-xpatches/source/mailx/mailx.SlackBuild142
-rw-r--r--patches/source/mailx/slack-desc19
-rw-r--r--patches/source/mariadb/doinst.sh28
-rwxr-xr-xpatches/source/mariadb/mariadb.SlackBuild190
-rw-r--r--patches/source/mariadb/mirror.url1
-rw-r--r--patches/source/mariadb/rc.mysqld89
-rw-r--r--patches/source/mariadb/slack-desc19
-rwxr-xr-xpatches/source/mcabber/mcabber.SlackBuild128
-rw-r--r--patches/source/mcabber/slack-desc19
-rw-r--r--patches/source/mercurial/doinst.sh13
-rwxr-xr-xpatches/source/mercurial/mercurial.SlackBuild109
-rw-r--r--patches/source/mercurial/slack-desc22
-rw-r--r--patches/source/minicom/config.sub-x86_64.diff20
-rw-r--r--patches/source/minicom/doinst.sh15
-rw-r--r--patches/source/minicom/lrzsz_0.12.21-5.diff4194
-rwxr-xr-xpatches/source/minicom/minicom.SlackBuild160
-rw-r--r--patches/source/minicom/minicom.users36
-rw-r--r--patches/source/minicom/slack-desc19
-rw-r--r--patches/source/mkinitrd/README.initrd99
l---------patches/source/mkinitrd/busybox-dot-config1
-rw-r--r--patches/source/mkinitrd/busybox-dot-config.1.20.x1024
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch25
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch11
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch67
-rw-r--r--patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch123
-rwxr-xr-xpatches/source/mkinitrd/init350
-rw-r--r--patches/source/mkinitrd/mkinitrd740
-rw-r--r--patches/source/mkinitrd/mkinitrd.8279
-rwxr-xr-xpatches/source/mkinitrd/mkinitrd.SlackBuild146
-rw-r--r--patches/source/mkinitrd/mkinitrd.conf.5244
-rw-r--r--patches/source/mkinitrd/mkinitrd.conf.sample21
-rw-r--r--patches/source/mkinitrd/mkinitrd_command_generator.8187
-rw-r--r--patches/source/mkinitrd/mkinitrd_command_generator.sh872
-rw-r--r--patches/source/mkinitrd/slack-desc19
-rw-r--r--patches/source/mozilla-firefox/firefox.moz_plugin_path.diff17
-rwxr-xr-xpatches/source/mozilla-firefox/gold/gold2
l---------patches/source/mozilla-firefox/gold/ld1
-rw-r--r--patches/source/mozilla-firefox/mimeTypes.rdf28
-rw-r--r--patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff45
-rwxr-xr-xpatches/source/mozilla-firefox/mozilla-firefox.SlackBuild326
-rw-r--r--patches/source/mozilla-firefox/mozilla-firefox.desktop80
-rw-r--r--patches/source/mozilla-firefox/slack-desc19
-rw-r--r--patches/source/mozilla-nss/MPL-1.1.txt470
-rw-r--r--patches/source/mozilla-nss/faq.html364
-rw-r--r--patches/source/mozilla-nss/gpl-2.0.txt339
-rw-r--r--patches/source/mozilla-nss/lgpl-2.1.txt504
-rwxr-xr-xpatches/source/mozilla-nss/mozilla-nss.SlackBuild186
-rw-r--r--patches/source/mozilla-nss/nss-config.in145
-rw-r--r--patches/source/mozilla-nss/slack-desc19
-rwxr-xr-xpatches/source/mozilla-thunderbird/gold/gold2
l---------patches/source/mozilla-thunderbird/gold/ld1
-rw-r--r--patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch18
-rwxr-xr-xpatches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild240
-rw-r--r--patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop84
-rw-r--r--patches/source/mozilla-thunderbird/slack-desc19
-rw-r--r--patches/source/mozilla-thunderbird/thunderbird.pngbin0 -> 47617 bytes
-rw-r--r--patches/source/mutt/doinst.sh13
-rw-r--r--patches/source/mutt/mutt.CVE-2014-9116.diff34
-rwxr-xr-xpatches/source/mutt/mutt.SlackBuild128
-rw-r--r--patches/source/mutt/slack-desc19
-rw-r--r--patches/source/ntp/doinst.sh28
-rwxr-xr-xpatches/source/ntp/ntp.SlackBuild158
-rw-r--r--patches/source/ntp/ntp.conf72
-rw-r--r--patches/source/ntp/ntp.keys2
-rw-r--r--patches/source/ntp/ntp.nano.diff17
-rw-r--r--patches/source/ntp/rc.ntpd71
-rw-r--r--patches/source/ntp/slack-desc19
-rw-r--r--patches/source/openssh/doinst.sh49
-rw-r--r--patches/source/openssh/openssh-7.4p1-libwrap.diff137
-rw-r--r--patches/source/openssh/openssh.CVE-2017-15906.patch19
-rwxr-xr-xpatches/source/openssh/openssh.SlackBuild169
-rw-r--r--patches/source/openssh/rc.sshd59
-rw-r--r--patches/source/openssh/slack-desc19
-rw-r--r--patches/source/openssl/certwatch130
-rw-r--r--patches/source/openssl/doinst.sh-openssl26
-rw-r--r--patches/source/openssl/doinst.sh-openssl-solibs12
-rwxr-xr-xpatches/source/openssl/openssl.SlackBuild213
-rw-r--r--patches/source/openssl/openssl.optsx86.diff11
-rw-r--r--patches/source/openssl/openssl.soname.diff11
-rw-r--r--patches/source/openssl/openssl0/certwatch130
-rw-r--r--patches/source/openssl/openssl0/doinst.sh-openssl21
-rw-r--r--patches/source/openssl/openssl0/doinst.sh-openssl-solibs12
-rwxr-xr-xpatches/source/openssl/openssl0/openssl.SlackBuild202
-rw-r--r--patches/source/openssl/openssl0/openssl.no.weak.sslv2.ciphers.diff51
-rw-r--r--patches/source/openssl/openssl0/openssl.no.weak.sslv3.ciphers.diff356
-rw-r--r--patches/source/openssl/openssl0/openssl.optsx86.diff11
-rw-r--r--patches/source/openssl/openssl0/openssl.soname.diff11
-rwxr-xr-xpatches/source/openssl/openssl0/openssl0.build205
-rw-r--r--patches/source/openssl/openssl0/slack-desc.openssl19
-rw-r--r--patches/source/openssl/openssl0/slack-desc.openssl-solibs19
-rw-r--r--patches/source/openssl/slack-desc.openssl19
-rw-r--r--patches/source/openssl/slack-desc.openssl-solibs19
-rw-r--r--patches/source/openvpn/README26
-rw-r--r--patches/source/openvpn/doinst.sh25
-rwxr-xr-xpatches/source/openvpn/openvpn.SlackBuild169
-rw-r--r--patches/source/openvpn/openvpn.url2
-rw-r--r--patches/source/openvpn/rc.openvpn111
-rw-r--r--patches/source/openvpn/slack-desc19
-rw-r--r--patches/source/openvpn/slackware.conf178
-rw-r--r--patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch178
-rwxr-xr-xpatches/source/patch/patch.SlackBuild131
-rw-r--r--patches/source/patch/slack-desc19
-rwxr-xr-xpatches/source/pcre/pcre.SlackBuild149
-rw-r--r--patches/source/pcre/slack-desc19
-rw-r--r--patches/source/php/doinst.sh28
-rwxr-xr-xpatches/source/php/fetch-php.sh2
-rw-r--r--patches/source/php/mod_php.conf.example29
-rw-r--r--patches/source/php/php-fpm.conf.diff28
-rwxr-xr-xpatches/source/php/php.SlackBuild311
-rw-r--r--patches/source/php/php.ini-development.diff61
-rw-r--r--patches/source/php/slack-desc19
-rw-r--r--patches/source/pidgin/doinst.sh10
-rw-r--r--patches/source/pidgin/fix-gmain_h-compile-error.diff17
-rwxr-xr-xpatches/source/pidgin/pidgin.SlackBuild230
-rw-r--r--patches/source/pidgin/slack-desc19
-rw-r--r--patches/source/ppp/doinst.sh21
-rw-r--r--patches/source/ppp/options.new276
-rw-r--r--patches/source/ppp/ppp.CVE-2014-3158.diff30
-rw-r--r--patches/source/ppp/ppp.CVE-2015-3310.diff11
-rwxr-xr-xpatches/source/ppp/ppp.SlackBuild176
-rw-r--r--patches/source/ppp/ppp.crypt.diff64
-rw-r--r--patches/source/ppp/ppp.slack.diff28
-rw-r--r--patches/source/ppp/pppsetup-1.98.backupfiles.diff26
-rw-r--r--patches/source/ppp/pppsetup-1.98.moredevs.diff105
-rw-r--r--patches/source/ppp/pppsetup-1.98.pppoff.diff19
-rw-r--r--patches/source/ppp/pppsetup-1.98.slack.diff1709
-rw-r--r--patches/source/ppp/radius.msdict81
-rw-r--r--patches/source/ppp/realms22
-rw-r--r--patches/source/ppp/servers4
-rw-r--r--patches/source/ppp/slack-desc19
-rw-r--r--patches/source/proftpd/doinst.sh18
-rw-r--r--patches/source/proftpd/etc/ftpusers22
-rw-r--r--patches/source/proftpd/etc/proftpd.conf74
-rwxr-xr-xpatches/source/proftpd/proftpd.SlackBuild138
-rw-r--r--patches/source/proftpd/slack-desc19
-rwxr-xr-xpatches/source/python/python.SlackBuild167
-rw-r--r--patches/source/python/python.no-static-library.diff49
-rw-r--r--patches/source/python/python.readline.set_pre_input_hook.diff12
-rw-r--r--patches/source/python/python.x86_64.diff174
-rw-r--r--patches/source/python/slack-desc19
-rw-r--r--patches/source/qt/Qt.pc16
-rw-r--r--patches/source/qt/README9
-rw-r--r--patches/source/qt/doinst.sh10
-rw-r--r--patches/source/qt/profile.d/qt4.csh22
-rw-r--r--patches/source/qt/profile.d/qt4.sh23
-rwxr-xr-xpatches/source/qt/qt.SlackBuild311
-rw-r--r--patches/source/qt/qt.fix.broken.gif.crash.diff16
-rw-r--r--patches/source/qt/qt.glib-honor-ExcludeSocketNotifiers-flag.diff63
-rw-r--r--patches/source/qt/qt.mysql.h.diff12
-rw-r--r--patches/source/qt/qt.qclipboard_delay.patch12
-rw-r--r--patches/source/qt/qt.qclipboard_fix_recursive.patch94
-rw-r--r--patches/source/qt/qt.qsystemtrayicon-plugin-system.diff1466
-rw-r--r--patches/source/qt/qt.webkit-no_Werror.patch11
-rw-r--r--patches/source/qt/slack-desc19
-rw-r--r--patches/source/randrproto/arch.use.flags9
-rw-r--r--patches/source/randrproto/build/randrproto1
-rw-r--r--patches/source/randrproto/configure/configure13
-rw-r--r--patches/source/randrproto/modularize279
-rw-r--r--patches/source/randrproto/noarch75
-rw-r--r--patches/source/randrproto/package-blacklist44
-rwxr-xr-xpatches/source/randrproto/randrproto.SlackBuild2
-rw-r--r--patches/source/randrproto/slack-desc/randrproto19
-rwxr-xr-xpatches/source/randrproto/x11.SlackBuild381
-rwxr-xr-xpatches/source/rsync/rsync.SlackBuild110
-rw-r--r--patches/source/rsync/slack-desc19
-rwxr-xr-xpatches/source/ruby/ruby.SlackBuild130
-rw-r--r--patches/source/ruby/slack-desc19
-rw-r--r--patches/source/rxvt/rxvt-integer-overflow-fix.patch11
-rwxr-xr-xpatches/source/rxvt/rxvt.SlackBuild127
-rw-r--r--patches/source/rxvt/rxvt.utempter.diff277
-rw-r--r--patches/source/rxvt/slack-desc19
-rw-r--r--patches/source/samba/doinst.sh18
-rw-r--r--patches/source/samba/pytalloc-util.pc11
-rw-r--r--patches/source/samba/rc.samba46
-rw-r--r--patches/source/samba/samba-4.4.16-CVE-2018-1057.patch903
-rw-r--r--patches/source/samba/samba-4.5.14-security-2017-11-21.patch110
-rwxr-xr-xpatches/source/samba/samba.SlackBuild224
-rw-r--r--patches/source/samba/samba.install.talloc.tevent.tdb.diff102
-rw-r--r--patches/source/samba/samba.url2
-rw-r--r--patches/source/samba/slack-desc19
-rw-r--r--patches/source/samba/smb.conf.default223
-rw-r--r--patches/source/samba/smb.conf.default.orig223
-rw-r--r--patches/source/samba/smb.conf.diff29
-rw-r--r--patches/source/samba/talloc.pc11
-rw-r--r--patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch504
-rwxr-xr-xpatches/source/seamonkey/autoconf/autoconf.build81
-rw-r--r--patches/source/seamonkey/doinst.sh11
-rwxr-xr-xpatches/source/seamonkey/gold/gold2
l---------patches/source/seamonkey/gold/ld1
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc11
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc11
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc12
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-nss.pc11
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc10
-rw-r--r--patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc12
-rw-r--r--patches/source/seamonkey/seamonkey-icon.pngbin0 -> 12796 bytes
-rw-r--r--patches/source/seamonkey/seamonkey-mail-icon.pngbin0 -> 185 bytes
-rw-r--r--patches/source/seamonkey/seamonkey-mail.desktop8
-rwxr-xr-xpatches/source/seamonkey/seamonkey.SlackBuild294
-rw-r--r--patches/source/seamonkey/seamonkey.desktop9
-rw-r--r--patches/source/seamonkey/slack-desc19
-rw-r--r--patches/source/sendmail/Build29
-rwxr-xr-xpatches/source/sendmail/SlackBuild-sendmail168
-rwxr-xr-xpatches/source/sendmail/SlackBuild-sendmail-cf57
-rw-r--r--patches/source/sendmail/linux.uucp.mc8
-rw-r--r--patches/source/sendmail/sendmail-slackware-tls-sasl.mc61
-rw-r--r--patches/source/sendmail/sendmail-slackware-tls.mc56
-rw-r--r--patches/source/sendmail/sendmail-slackware.mc42
-rwxr-xr-xpatches/source/sendmail/sendmail.SlackBuild3
-rw-r--r--patches/source/sendmail/site.config.m48
-rw-r--r--patches/source/sendmail/slack-desc.sendmail19
-rw-r--r--patches/source/sendmail/slack-desc.sendmail-cf19
-rw-r--r--patches/source/shadow/adduser445
-rw-r--r--patches/source/shadow/doinst.sh17
-rw-r--r--patches/source/shadow/login.defs389
-rw-r--r--patches/source/shadow/patches/README_PATCHES10
-rw-r--r--patches/source/shadow/patches/unused/r3299.diff12
-rw-r--r--patches/source/shadow/shadow.CVE-2005-4890.relax.diff35
-rwxr-xr-xpatches/source/shadow/shadow.SlackBuild175
-rw-r--r--patches/source/shadow/shadow.glibc217-crypt.diff258
-rw-r--r--patches/source/shadow/shadow.url1
-rw-r--r--patches/source/shadow/slack-desc19
-rw-r--r--patches/source/shadow/useradd8
-rw-r--r--patches/source/stunnel/doinst.sh12
-rw-r--r--patches/source/stunnel/generate-stunnel-key.sh13
-rw-r--r--patches/source/stunnel/slack-desc19
-rwxr-xr-xpatches/source/stunnel/stunnel.SlackBuild140
-rwxr-xr-xpatches/source/subversion/get-svn-book.sh9
-rw-r--r--patches/source/subversion/slack-desc19
-rw-r--r--patches/source/subversion/subversion.CVE-2015-5343.diff16
-rw-r--r--patches/source/subversion/subversion.CVE-2016-2167.diff11
-rw-r--r--patches/source/subversion/subversion.CVE-2016-2168.diff32
-rw-r--r--patches/source/subversion/subversion.CVE-2017-9800.diff105
-rwxr-xr-xpatches/source/subversion/subversion.SlackBuild183
-rw-r--r--patches/source/sudo/doinst.sh14
-rw-r--r--patches/source/sudo/slack-desc19
-rwxr-xr-xpatches/source/sudo/sudo.SlackBuild122
-rw-r--r--patches/source/tcpdump/slack-desc19
-rwxr-xr-xpatches/source/tcpdump/tcpdump.SlackBuild104
-rw-r--r--patches/source/udisks/slack-desc19
-rwxr-xr-xpatches/source/udisks/udisks.SlackBuild119
-rw-r--r--patches/source/udisks/udisks.url1
-rw-r--r--patches/source/udisks2/doinst.sh12
-rw-r--r--patches/source/udisks2/slack-desc19
-rwxr-xr-xpatches/source/udisks2/udisks2.SlackBuild139
-rw-r--r--patches/source/vim/doinst.sh5
-rw-r--r--patches/source/vim/gvim.desktop120
-rw-r--r--patches/source/vim/gvim.pngbin0 -> 8249 bytes
-rw-r--r--patches/source/vim/patches/7.4.001489
-rw-r--r--patches/source/vim/patches/7.4.00277
-rw-r--r--patches/source/vim/patches/7.4.003100
-rw-r--r--patches/source/vim/patches/7.4.004232
-rw-r--r--patches/source/vim/patches/7.4.00548
-rw-r--r--patches/source/vim/patches/7.4.00666
-rw-r--r--patches/source/vim/patches/7.4.00795
-rw-r--r--patches/source/vim/patches/7.4.00871
-rw-r--r--patches/source/vim/patches/7.4.00964
-rw-r--r--patches/source/vim/patches/7.4.01079
-rw-r--r--patches/source/vim/patches/7.4.011100
-rw-r--r--patches/source/vim/patches/7.4.012202
-rw-r--r--patches/source/vim/patches/7.4.01399
-rw-r--r--patches/source/vim/patches/7.4.014102
-rw-r--r--patches/source/vim/patches/7.4.015106
-rw-r--r--patches/source/vim/patches/7.4.016221
-rw-r--r--patches/source/vim/patches/7.4.01778
-rw-r--r--patches/source/vim/patches/7.4.01845
-rw-r--r--patches/source/vim/patches/7.4.01961
-rw-r--r--patches/source/vim/patches/7.4.02082
-rw-r--r--patches/source/vim/patches/7.4.02186
-rw-r--r--patches/source/vim/patches/7.4.022148
-rw-r--r--patches/source/vim/patches/7.4.02353
-rw-r--r--patches/source/vim/patches/7.4.02461
-rw-r--r--patches/source/vim/patches/7.4.02562
-rw-r--r--patches/source/vim/patches/7.4.02665
-rw-r--r--patches/source/vim/patches/7.4.02789
-rw-r--r--patches/source/vim/patches/7.4.028753
-rw-r--r--patches/source/vim/patches/7.4.02963
-rw-r--r--patches/source/vim/patches/7.4.030109
-rw-r--r--patches/source/vim/patches/7.4.03154
-rw-r--r--patches/source/vim/patches/7.4.03282
-rw-r--r--patches/source/vim/patches/7.4.033116
-rw-r--r--patches/source/vim/patches/7.4.034180
-rw-r--r--patches/source/vim/patches/7.4.03553
-rw-r--r--patches/source/vim/patches/7.4.036273
-rw-r--r--patches/source/vim/patches/7.4.037130
-rw-r--r--patches/source/vim/patches/7.4.038116
-rw-r--r--patches/source/vim/patches/7.4.039217
-rw-r--r--patches/source/vim/patches/7.4.04068
-rw-r--r--patches/source/vim/patches/7.4.04161
-rw-r--r--patches/source/vim/patches/7.4.04271
-rw-r--r--patches/source/vim/patches/7.4.04389
-rw-r--r--patches/source/vim/patches/7.4.04483
-rw-r--r--patches/source/vim/patches/7.4.045111
-rw-r--r--patches/source/vim/patches/7.4.04680
-rw-r--r--patches/source/vim/patches/7.4.04756
-rw-r--r--patches/source/vim/patches/7.4.04896
-rw-r--r--patches/source/vim/patches/7.4.04967
-rw-r--r--patches/source/vim/patches/7.4.05090
-rw-r--r--patches/source/vim/patches/7.4.05167
-rw-r--r--patches/source/vim/patches/7.4.052197
-rw-r--r--patches/source/vim/patches/7.4.05345
-rw-r--r--patches/source/vim/patches/7.4.05453
-rw-r--r--patches/source/vim/patches/7.4.055138
-rw-r--r--patches/source/vim/patches/7.4.05651
-rw-r--r--patches/source/vim/patches/7.4.057252
-rw-r--r--patches/source/vim/patches/7.4.05867
-rw-r--r--patches/source/vim/patches/7.4.05953
-rw-r--r--patches/source/vim/patches/7.4.06071
-rw-r--r--patches/source/vim/patches/7.4.061144
-rw-r--r--patches/source/vim/patches/7.4.06287
-rw-r--r--patches/source/vim/patches/7.4.063105
-rw-r--r--patches/source/vim/patches/7.4.064bin0 -> 5346 bytes
-rw-r--r--patches/source/vim/patches/7.4.06570
-rw-r--r--patches/source/vim/patches/7.4.066354
-rw-r--r--patches/source/vim/patches/7.4.067126
-rw-r--r--patches/source/vim/patches/7.4.068131
-rw-r--r--patches/source/vim/patches/7.4.0692559
-rw-r--r--patches/source/vim/patches/7.4.07047
-rw-r--r--patches/source/vim/patches/7.4.0711302
-rw-r--r--patches/source/vim/patches/7.4.07261
-rw-r--r--patches/source/vim/patches/7.4.073404
-rw-r--r--patches/source/vim/patches/7.4.07467
-rw-r--r--patches/source/vim/patches/7.4.075290
-rw-r--r--patches/source/vim/patches/7.4.07666
-rw-r--r--patches/source/vim/patches/7.4.07763
-rw-r--r--patches/source/vim/patches/7.4.078114
-rw-r--r--patches/source/vim/patches/7.4.079470
-rw-r--r--patches/source/vim/patches/7.4.08052
-rw-r--r--patches/source/vim/patches/7.4.08152
-rw-r--r--patches/source/vim/patches/7.4.082344
-rw-r--r--patches/source/vim/patches/7.4.083136
-rw-r--r--patches/source/vim/patches/7.4.084184
-rw-r--r--patches/source/vim/patches/7.4.085118
-rw-r--r--patches/source/vim/patches/7.4.086145
-rw-r--r--patches/source/vim/patches/7.4.08756
-rw-r--r--patches/source/vim/patches/7.4.088564
-rw-r--r--patches/source/vim/patches/7.4.08947
-rw-r--r--patches/source/vim/patches/7.4.090223
-rw-r--r--patches/source/vim/patches/7.4.09159
-rw-r--r--patches/source/vim/patches/7.4.09262
-rw-r--r--patches/source/vim/patches/7.4.09372
-rw-r--r--patches/source/vim/patches/7.4.094139
-rw-r--r--patches/source/vim/patches/7.4.09573
-rw-r--r--patches/source/vim/patches/7.4.09696
-rw-r--r--patches/source/vim/patches/7.4.09750
-rw-r--r--patches/source/vim/patches/7.4.098243
-rw-r--r--patches/source/vim/patches/7.4.099113
-rw-r--r--patches/source/vim/patches/7.4.10082
-rw-r--r--patches/source/vim/patches/7.4.10193
-rw-r--r--patches/source/vim/patches/7.4.10284
-rw-r--r--patches/source/vim/patches/7.4.10393
-rw-r--r--patches/source/vim/patches/7.4.104107
-rw-r--r--patches/source/vim/patches/7.4.10558
-rw-r--r--patches/source/vim/patches/7.4.10668
-rw-r--r--patches/source/vim/patches/7.4.107639
-rw-r--r--patches/source/vim/patches/7.4.108215
-rw-r--r--patches/source/vim/patches/7.4.109123
-rw-r--r--patches/source/vim/patches/7.4.110102
-rw-r--r--patches/source/vim/patches/7.4.11163
-rw-r--r--patches/source/vim/patches/7.4.11270
-rw-r--r--patches/source/vim/patches/7.4.113101
-rw-r--r--patches/source/vim/patches/7.4.11456
-rw-r--r--patches/source/vim/patches/7.4.11552
-rw-r--r--patches/source/vim/patches/7.4.11646
-rw-r--r--patches/source/vim/patches/7.4.117263
-rw-r--r--patches/source/vim/patches/7.4.11890
-rw-r--r--patches/source/vim/patches/7.4.119245
-rw-r--r--patches/source/vim/patches/7.4.12053
-rw-r--r--patches/source/vim/patches/7.4.12148
-rw-r--r--patches/source/vim/patches/7.4.122215
-rw-r--r--patches/source/vim/patches/7.4.12364
-rw-r--r--patches/source/vim/patches/7.4.12463
-rw-r--r--patches/source/vim/patches/7.4.12557
-rw-r--r--patches/source/vim/patches/7.4.12668
-rw-r--r--patches/source/vim/patches/7.4.12767
-rw-r--r--patches/source/vim/patches/7.4.12866
-rw-r--r--patches/source/vim/patches/7.4.12956
-rw-r--r--patches/source/vim/patches/7.4.13069
-rw-r--r--patches/source/vim/patches/7.4.131113
-rw-r--r--patches/source/vim/patches/7.4.13254
-rw-r--r--patches/source/vim/patches/7.4.13374
-rw-r--r--patches/source/vim/patches/7.4.13453
-rw-r--r--patches/source/vim/patches/7.4.13551
-rw-r--r--patches/source/vim/patches/7.4.13675
-rw-r--r--patches/source/vim/patches/7.4.137239
-rw-r--r--patches/source/vim/patches/7.4.13855
-rw-r--r--patches/source/vim/patches/7.4.13976
-rw-r--r--patches/source/vim/patches/7.4.140174
-rw-r--r--patches/source/vim/patches/7.4.14188
-rw-r--r--patches/source/vim/patches/7.4.142186
-rw-r--r--patches/source/vim/patches/7.4.143214
-rw-r--r--patches/source/vim/patches/7.4.14452
-rw-r--r--patches/source/vim/patches/7.4.14575
-rw-r--r--patches/source/vim/patches/7.4.14667
-rw-r--r--patches/source/vim/patches/7.4.147bin0 -> 2583 bytes
-rw-r--r--patches/source/vim/patches/7.4.14883
-rw-r--r--patches/source/vim/patches/7.4.149822
-rw-r--r--patches/source/vim/patches/7.4.15093
-rw-r--r--patches/source/vim/patches/7.4.1511470
-rw-r--r--patches/source/vim/patches/7.4.152708
-rw-r--r--patches/source/vim/patches/7.4.153176
-rw-r--r--patches/source/vim/patches/7.4.154153
-rw-r--r--patches/source/vim/patches/7.4.15583
-rw-r--r--patches/source/vim/patches/7.4.15649
-rw-r--r--patches/source/vim/patches/7.4.15753
-rw-r--r--patches/source/vim/patches/7.4.158140
-rw-r--r--patches/source/vim/patches/7.4.159116
-rw-r--r--patches/source/vim/patches/7.4.16066
-rw-r--r--patches/source/vim/patches/7.4.16175
-rw-r--r--patches/source/vim/patches/7.4.16245
-rw-r--r--patches/source/vim/patches/7.4.16375
-rw-r--r--patches/source/vim/patches/7.4.16478
-rw-r--r--patches/source/vim/patches/7.4.16571
-rw-r--r--patches/source/vim/patches/7.4.16653
-rw-r--r--patches/source/vim/patches/7.4.167195
-rw-r--r--patches/source/vim/patches/7.4.16891
-rw-r--r--patches/source/vim/patches/7.4.16953
-rw-r--r--patches/source/vim/patches/7.4.17090
-rw-r--r--patches/source/vim/patches/7.4.171841
-rw-r--r--patches/source/vim/patches/7.4.172346
-rw-r--r--patches/source/vim/patches/7.4.17361
-rw-r--r--patches/source/vim/patches/7.4.17494
-rw-r--r--patches/source/vim/patches/7.4.175180
-rw-r--r--patches/source/vim/patches/7.4.17691
-rw-r--r--patches/source/vim/patches/7.4.17748
-rw-r--r--patches/source/vim/patches/7.4.17862
-rw-r--r--patches/source/vim/patches/7.4.17957
-rw-r--r--patches/source/vim/patches/7.4.18076
-rw-r--r--patches/source/vim/patches/7.4.18168
-rw-r--r--patches/source/vim/patches/7.4.18256
-rw-r--r--patches/source/vim/patches/7.4.18349
-rw-r--r--patches/source/vim/patches/7.4.184250
-rw-r--r--patches/source/vim/patches/7.4.18564
-rw-r--r--patches/source/vim/patches/7.4.186164
-rw-r--r--patches/source/vim/patches/7.4.187136
-rw-r--r--patches/source/vim/patches/7.4.188617
-rw-r--r--patches/source/vim/patches/7.4.18952
-rw-r--r--patches/source/vim/patches/7.4.19070
-rw-r--r--patches/source/vim/patches/7.4.191689
-rw-r--r--patches/source/vim/patches/7.4.19244
-rw-r--r--patches/source/vim/patches/7.4.193106
-rw-r--r--patches/source/vim/patches/7.4.19453
-rw-r--r--patches/source/vim/patches/7.4.195164
-rw-r--r--patches/source/vim/patches/7.4.19651
-rw-r--r--patches/source/vim/patches/7.4.1971052
-rw-r--r--patches/source/vim/patches/7.4.198103
-rw-r--r--patches/source/vim/patches/7.4.199106
-rw-r--r--patches/source/vim/patches/7.4.20068
-rw-r--r--patches/source/vim/patches/7.4.201273
-rw-r--r--patches/source/vim/patches/7.4.202281
-rw-r--r--patches/source/vim/patches/7.4.203203
-rw-r--r--patches/source/vim/patches/7.4.204113
-rw-r--r--patches/source/vim/patches/7.4.205113
-rw-r--r--patches/source/vim/patches/7.4.20672
-rw-r--r--patches/source/vim/patches/7.4.207176
-rw-r--r--patches/source/vim/patches/7.4.20836
-rw-r--r--patches/source/vim/patches/7.4.20963
-rw-r--r--patches/source/vim/patches/7.4.210133
-rw-r--r--patches/source/vim/patches/7.4.21168
-rw-r--r--patches/source/vim/patches/7.4.2125720
-rw-r--r--patches/source/vim/patches/7.4.213211
-rw-r--r--patches/source/vim/patches/7.4.21450
-rw-r--r--patches/source/vim/patches/7.4.21587
-rw-r--r--patches/source/vim/patches/7.4.21673
-rw-r--r--patches/source/vim/patches/7.4.21785
-rw-r--r--patches/source/vim/patches/7.4.218578
-rw-r--r--patches/source/vim/patches/7.4.219100
-rw-r--r--patches/source/vim/patches/7.4.220106
-rw-r--r--patches/source/vim/patches/7.4.22162
-rw-r--r--patches/source/vim/patches/7.4.22283
-rw-r--r--patches/source/vim/patches/7.4.2236557
-rw-r--r--patches/source/vim/patches/7.4.224210
-rw-r--r--patches/source/vim/patches/7.4.22583
-rw-r--r--patches/source/vim/patches/7.4.226136
-rw-r--r--patches/source/vim/patches/7.4.22787
-rw-r--r--patches/source/vim/patches/7.4.228189
-rw-r--r--patches/source/vim/patches/7.4.229141
-rw-r--r--patches/source/vim/patches/7.4.23053
-rw-r--r--patches/source/vim/patches/7.4.231267
-rw-r--r--patches/source/vim/patches/7.4.232109
-rw-r--r--patches/source/vim/patches/7.4.23380
-rw-r--r--patches/source/vim/patches/7.4.23495
-rw-r--r--patches/source/vim/patches/7.4.235552
-rw-r--r--patches/source/vim/patches/7.4.236159
-rw-r--r--patches/source/vim/patches/7.4.237127
-rw-r--r--patches/source/vim/patches/7.4.238505
-rw-r--r--patches/source/vim/patches/7.4.23955
-rw-r--r--patches/source/vim/patches/7.4.24057
-rw-r--r--patches/source/vim/patches/7.4.241386
-rw-r--r--patches/source/vim/patches/7.4.242520
-rw-r--r--patches/source/vim/patches/7.4.2431109
-rw-r--r--patches/source/vim/patches/7.4.24460
-rw-r--r--patches/source/vim/patches/7.4.24552
-rw-r--r--patches/source/vim/patches/7.4.246121
-rw-r--r--patches/source/vim/patches/7.4.247227
-rw-r--r--patches/source/vim/patches/7.4.248515
-rw-r--r--patches/source/vim/patches/7.4.249bin0 -> 6037 bytes
-rw-r--r--patches/source/vim/patches/7.4.25052
-rw-r--r--patches/source/vim/patches/7.4.251164
-rw-r--r--patches/source/vim/patches/7.4.25247
-rw-r--r--patches/source/vim/patches/7.4.25376
-rw-r--r--patches/source/vim/patches/7.4.254183
-rw-r--r--patches/source/vim/patches/7.4.255108
-rw-r--r--patches/source/vim/patches/7.4.25683
-rw-r--r--patches/source/vim/patches/7.4.25764
-rw-r--r--patches/source/vim/patches/7.4.258114
-rw-r--r--patches/source/vim/patches/7.4.25953
-rw-r--r--patches/source/vim/patches/7.4.260281
-rw-r--r--patches/source/vim/patches/7.4.261106
-rw-r--r--patches/source/vim/patches/7.4.262314
-rw-r--r--patches/source/vim/patches/7.4.26344
-rw-r--r--patches/source/vim/patches/7.4.264176
-rw-r--r--patches/source/vim/patches/7.4.265153
-rw-r--r--patches/source/vim/patches/7.4.26646
-rw-r--r--patches/source/vim/patches/7.4.267438
-rw-r--r--patches/source/vim/patches/7.4.268108
-rw-r--r--patches/source/vim/patches/7.4.269213
-rw-r--r--patches/source/vim/patches/7.4.27062
-rw-r--r--patches/source/vim/patches/7.4.27152
-rw-r--r--patches/source/vim/patches/7.4.272148
-rw-r--r--patches/source/vim/patches/7.4.27357
-rw-r--r--patches/source/vim/patches/7.4.27446
-rw-r--r--patches/source/vim/patches/7.4.27556
-rw-r--r--patches/source/vim/patches/7.4.276302
-rw-r--r--patches/source/vim/patches/7.4.27780
-rw-r--r--patches/source/vim/patches/7.4.278183
-rw-r--r--patches/source/vim/patches/7.4.279616
-rw-r--r--patches/source/vim/patches/7.4.280125
-rw-r--r--patches/source/vim/patches/7.4.28180
-rw-r--r--patches/source/vim/patches/7.4.28248
-rw-r--r--patches/source/vim/patches/7.4.28356
-rw-r--r--patches/source/vim/patches/7.4.28453
-rw-r--r--patches/source/vim/patches/7.4.28549
-rw-r--r--patches/source/vim/patches/7.4.28652
-rw-r--r--patches/source/vim/patches/7.4.28747
-rw-r--r--patches/source/vim/patches/7.4.28846
-rw-r--r--patches/source/vim/patches/7.4.289122
-rw-r--r--patches/source/vim/patches/7.4.290156
-rw-r--r--patches/source/vim/patches/7.4.29156
-rw-r--r--patches/source/vim/patches/7.4.292139
-rw-r--r--patches/source/vim/patches/7.4.293301
-rw-r--r--patches/source/vim/patches/7.4.294125
-rw-r--r--patches/source/vim/patches/7.4.295144
-rw-r--r--patches/source/vim/patches/7.4.29653
-rw-r--r--patches/source/vim/patches/7.4.29776
-rw-r--r--patches/source/vim/patches/7.4.29852
-rw-r--r--patches/source/vim/patches/7.4.299458
-rw-r--r--patches/source/vim/patches/7.4.30062
-rw-r--r--patches/source/vim/patches/7.4.30153
-rw-r--r--patches/source/vim/patches/7.4.30278
-rw-r--r--patches/source/vim/patches/7.4.30385
-rw-r--r--patches/source/vim/patches/7.4.30445
-rw-r--r--patches/source/vim/patches/7.4.305.gzbin0 -> 2653 bytes
-rw-r--r--patches/source/vim/patches/7.4.30684
-rw-r--r--patches/source/vim/patches/7.4.307147
-rw-r--r--patches/source/vim/patches/7.4.30847
-rw-r--r--patches/source/vim/patches/7.4.30988
-rw-r--r--patches/source/vim/patches/7.4.310373
-rw-r--r--patches/source/vim/patches/7.4.311127
-rw-r--r--patches/source/vim/patches/7.4.312194
-rw-r--r--patches/source/vim/patches/7.4.313320
-rw-r--r--patches/source/vim/patches/7.4.314178
-rw-r--r--patches/source/vim/patches/7.4.315229
-rw-r--r--patches/source/vim/patches/7.4.31652
-rw-r--r--patches/source/vim/patches/7.4.31757
-rw-r--r--patches/source/vim/patches/7.4.31852
-rw-r--r--patches/source/vim/patches/7.4.31955
-rw-r--r--patches/source/vim/patches/7.4.320143
-rw-r--r--patches/source/vim/patches/7.4.32171
-rw-r--r--patches/source/vim/patches/7.4.32292
-rw-r--r--patches/source/vim/patches/7.4.32396
-rw-r--r--patches/source/vim/patches/7.4.324190
-rw-r--r--patches/source/vim/patches/7.4.32562
-rw-r--r--patches/source/vim/patches/7.4.32651
-rw-r--r--patches/source/vim/patches/7.4.327163
-rw-r--r--patches/source/vim/patches/7.4.32882
-rw-r--r--patches/source/vim/patches/7.4.32955
-rw-r--r--patches/source/vim/patches/7.4.3301131
-rw-r--r--patches/source/vim/patches/7.4.33147
-rw-r--r--patches/source/vim/patches/7.4.332118
-rw-r--r--patches/source/vim/patches/7.4.33372
-rw-r--r--patches/source/vim/patches/7.4.334112
-rw-r--r--patches/source/vim/patches/7.4.335108
-rw-r--r--patches/source/vim/patches/7.4.336100
-rw-r--r--patches/source/vim/patches/7.4.33751
-rw-r--r--patches/source/vim/patches/7.4.3381830
-rw-r--r--patches/source/vim/patches/7.4.33979
-rw-r--r--patches/source/vim/patches/7.4.34097
-rw-r--r--patches/source/vim/patches/7.4.341178
-rw-r--r--patches/source/vim/patches/7.4.34267
-rw-r--r--patches/source/vim/patches/7.4.34360
-rw-r--r--patches/source/vim/patches/7.4.344180
-rw-r--r--patches/source/vim/patches/7.4.34573
-rw-r--r--patches/source/vim/patches/7.4.34661
-rw-r--r--patches/source/vim/patches/7.4.34774
-rw-r--r--patches/source/vim/patches/7.4.34858
-rw-r--r--patches/source/vim/patches/7.4.349111
-rw-r--r--patches/source/vim/patches/7.4.350139
-rw-r--r--patches/source/vim/patches/7.4.351160
-rw-r--r--patches/source/vim/patches/7.4.352101
-rw-r--r--patches/source/vim/patches/7.4.353489
-rw-r--r--patches/source/vim/patches/7.4.35456
-rw-r--r--patches/source/vim/patches/7.4.355929
-rw-r--r--patches/source/vim/patches/7.4.35638
-rw-r--r--patches/source/vim/patches/7.4.35752
-rw-r--r--patches/source/vim/patches/7.4.358290
-rw-r--r--patches/source/vim/patches/7.4.359103
-rw-r--r--patches/source/vim/patches/7.4.36080
-rw-r--r--patches/source/vim/patches/7.4.36148
-rw-r--r--patches/source/vim/patches/7.4.36253
-rw-r--r--patches/source/vim/patches/7.4.363160
-rw-r--r--patches/source/vim/patches/7.4.36470
-rw-r--r--patches/source/vim/patches/7.4.365159
-rw-r--r--patches/source/vim/patches/7.4.36653
-rw-r--r--patches/source/vim/patches/7.4.36767
-rw-r--r--patches/source/vim/patches/7.4.36879
-rw-r--r--patches/source/vim/patches/7.4.36970
-rw-r--r--patches/source/vim/patches/7.4.370316
-rw-r--r--patches/source/vim/patches/7.4.37159
-rw-r--r--patches/source/vim/patches/7.4.372188
-rw-r--r--patches/source/vim/patches/7.4.37398
-rw-r--r--patches/source/vim/patches/7.4.37471
-rw-r--r--patches/source/vim/patches/7.4.37559
-rw-r--r--patches/source/vim/patches/7.4.37657
-rw-r--r--patches/source/vim/patches/7.4.377144
-rw-r--r--patches/source/vim/patches/7.4.378336
-rw-r--r--patches/source/vim/patches/7.4.37945
-rw-r--r--patches/source/vim/patches/7.4.380115
-rw-r--r--patches/source/vim/patches/7.4.38145
-rw-r--r--patches/source/vim/patches/7.4.38252
-rw-r--r--patches/source/vim/patches/7.4.38352
-rw-r--r--patches/source/vim/patches/7.4.38447
-rw-r--r--patches/source/vim/patches/7.4.38576
-rw-r--r--patches/source/vim/patches/7.4.386186
-rw-r--r--patches/source/vim/patches/7.4.387199
-rw-r--r--patches/source/vim/patches/7.4.38898
-rw-r--r--patches/source/vim/patches/7.4.389490
-rw-r--r--patches/source/vim/patches/7.4.39051
-rw-r--r--patches/source/vim/patches/7.4.391118
-rw-r--r--patches/source/vim/patches/7.4.39286
-rw-r--r--patches/source/vim/patches/7.4.3931946
-rw-r--r--patches/source/vim/patches/7.4.39456
-rw-r--r--patches/source/vim/patches/7.4.39599
-rw-r--r--patches/source/vim/patches/7.4.396291
-rw-r--r--patches/source/vim/patches/7.4.397150
-rw-r--r--patches/source/vim/patches/7.4.39852
-rw-r--r--patches/source/vim/patches/7.4.3995059
-rw-r--r--patches/source/vim/slack-desc.vim19
-rw-r--r--patches/source/vim/slack-desc.vim-gvim19
-rwxr-xr-xpatches/source/vim/vim-gvim.SlackBuild222
-rw-r--r--patches/source/vim/vim-runtime-syntax-20131002.diff0
-rwxr-xr-xpatches/source/vim/vim.SlackBuild228
-rw-r--r--patches/source/vim/vim.vimrc.diff12
-rw-r--r--patches/source/wget/doinst.sh14
-rw-r--r--patches/source/wget/slack-desc19
-rwxr-xr-xpatches/source/wget/wget.SlackBuild109
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch174
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch250
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch184
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch79
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch64
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch132
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch43
-rw-r--r--patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch82
-rw-r--r--patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt226
-rw-r--r--patches/source/wpa_supplicant/README.slackware55
-rw-r--r--patches/source/wpa_supplicant/config/dot.config37
-rw-r--r--patches/source/wpa_supplicant/config/wpa_gui.desktop7
-rw-r--r--patches/source/wpa_supplicant/config/wpa_gui.pngbin0 -> 5124 bytes
-rw-r--r--patches/source/wpa_supplicant/config/wpa_supplicant.conf2
-rw-r--r--patches/source/wpa_supplicant/config/wpa_supplicant.logrotate6
-rw-r--r--patches/source/wpa_supplicant/doinst.sh15
-rw-r--r--patches/source/wpa_supplicant/patches/assoc-timeout.diff16
-rw-r--r--patches/source/wpa_supplicant/patches/dbus-service-file-args.diff20
-rw-r--r--patches/source/wpa_supplicant/patches/flush-debug-output.diff50
-rw-r--r--patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff16
-rw-r--r--patches/source/wpa_supplicant/slack-desc18
-rwxr-xr-xpatches/source/wpa_supplicant/wpa_supplicant.SlackBuild181
-rw-r--r--patches/source/xcb-proto/arch.use.flags9
-rw-r--r--patches/source/xcb-proto/build/xcb-proto1
-rw-r--r--patches/source/xcb-proto/configure/configure13
-rw-r--r--patches/source/xcb-proto/modularize279
-rw-r--r--patches/source/xcb-proto/noarch75
-rw-r--r--patches/source/xcb-proto/package-blacklist44
-rw-r--r--patches/source/xcb-proto/post-install/xcb-proto.post-install5
-rw-r--r--patches/source/xcb-proto/slack-desc/xcb-proto19
-rwxr-xr-xpatches/source/xcb-proto/x11.SlackBuild381
-rwxr-xr-xpatches/source/xcb-proto/xcb-proto.SlackBuild2
-rw-r--r--patches/source/xextproto/arch.use.flags9
-rw-r--r--patches/source/xextproto/build/xextproto1
-rw-r--r--patches/source/xextproto/configure/configure13
-rw-r--r--patches/source/xextproto/modularize279
-rw-r--r--patches/source/xextproto/noarch75
-rw-r--r--patches/source/xextproto/package-blacklist44
-rw-r--r--patches/source/xextproto/slack-desc/xextproto19
-rwxr-xr-xpatches/source/xextproto/x11.SlackBuild381
-rwxr-xr-xpatches/source/xextproto/xextproto.SlackBuild2
-rw-r--r--patches/source/xfce4-weather-plugin/slack-desc19
-rwxr-xr-xpatches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild107
-rw-r--r--patches/source/xfce4-weather-plugin/xfce4-weather-plugin.url1
-rw-r--r--patches/source/xorg-server/arch.use.flags7
-rw-r--r--patches/source/xorg-server/build/xorg-server1
-rw-r--r--patches/source/xorg-server/configure/xorg-server50
-rw-r--r--patches/source/xorg-server/makepkg/xorg-server47
-rw-r--r--patches/source/xorg-server/modularize265
-rw-r--r--patches/source/xorg-server/noarch76
-rw-r--r--patches/source/xorg-server/package-blacklist39
-rw-r--r--patches/source/xorg-server/patch/xorg-server.patch43
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0001-Missing-parens-in-REQUEST_FIXED_SIZE-macro-CVE-2014-.patch32
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0001-glx-check-return-from-__glXGetAnswerBuffer.patch173
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0001-unchecked-malloc-may-allow-unauthed-client-to-crash-.patch41
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0002-dix-GetHosts-bounds-check-using-wrong-pointer-value-.patch35
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0002-dix-integer-overflow-in-ProcPutImage-CVE-2014-8092-1.patch38
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0003-dix-integer-overflow-in-GetHosts-CVE-2014-8092-2-4.patch50
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0004-dix-integer-overflow-in-RegionSizeof-CVE-2014-8092-3.patch129
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0005-dix-integer-overflow-in-REQUEST_FIXED_SIZE-CVE-2014-.patch35
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0006-dri2-integer-overflow-in-ProcDRI2GetBuffers-CVE-2014.patch36
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0007-dbe-unvalidated-lengths-in-DbeSwapBuffers-calls-CVE-.patch74
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0008-Xi-unvalidated-lengths-in-Xinput-extension-CVE-2014-.patch552
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0009-xcmisc-unvalidated-length-in-SProcXCMiscGetXIDList-C.patch28
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0010-Xv-unvalidated-lengths-in-XVideo-extension-swapped-p.patch180
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0011-randr-unvalidated-lengths-in-RandR-extension-swapped.patch52
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0012-render-check-request-size-before-reading-it-CVE-2014.patch37
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0013-render-unvalidated-lengths-in-Render-extn.-swapped-p.patch141
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0014-xfixes-unvalidated-length-in-SProcXFixesSelectSelect.patch28
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0015-Add-request-length-checking-test-cases-for-some-Xinp.patch214
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0016-Add-request-length-checking-test-cases-for-some-Xinp.patch90
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0017-Add-REQUEST_FIXED_SIZE-testcases-to-test-misc.c.patch75
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0018-glx-Be-more-paranoid-about-variable-length-requests-.patch48
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0019-glx-Be-more-strict-about-rejecting-invalid-image-siz.patch166
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0020-glx-Additional-paranoia-in-__glXGetAnswerBuffer-__GL.patch60
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0021-glx-Fix-image-size-computation-for-EXT_texture_integ.patch60
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0022-glx-Add-safe_-add-mul-pad-v3-CVE-2014-8093-4-6.patch83
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0023-glx-Length-checking-for-GLXRender-requests-v2-CVE-20.patch76
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0024-glx-Integer-overflow-protection-for-non-generated-re.patch226
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0025-glx-Top-level-length-checking-for-swapped-VendorPriv.patch52
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0026-glx-Request-length-checks-for-SetClientInfoARB-CVE-2.patch75
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0027-glx-Length-checking-for-non-generated-vendor-private.patch46
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0028-glx-Length-checking-for-non-generated-single-request.patch565
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0029-glx-Fix-mask-truncation-in-__glXGetAnswerBuffer-CVE-.patch35
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0030-glx-Length-checking-for-RenderLarge-requests-v2-CVE-.patch159
-rw-r--r--patches/source/xorg-server/patch/xorg-server/0031-glx-Pass-remaining-request-length-into-varsize-v2-CV.patch935
-rw-r--r--patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff14
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff40
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff36
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff31
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff42
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff46
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff95
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff116
-rw-r--r--patches/source/xorg-server/post-install/xorg-server.post-install66
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server19
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server-xephyr19
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server-xnest19
-rw-r--r--patches/source/xorg-server/slack-desc/xorg-server-xvfb19
-rwxr-xr-xpatches/source/xorg-server/x11.SlackBuild381
-rwxr-xr-xpatches/source/xorg-server/xorg-server.SlackBuild2
-rw-r--r--patches/source/xproto/arch.use.flags9
-rw-r--r--patches/source/xproto/build/xproto1
-rw-r--r--patches/source/xproto/configure/configure13
-rw-r--r--patches/source/xproto/modularize279
-rw-r--r--patches/source/xproto/noarch75
-rw-r--r--patches/source/xproto/package-blacklist44
-rw-r--r--patches/source/xproto/post-install/xproto.post-install2
-rw-r--r--patches/source/xproto/slack-desc/xproto19
-rwxr-xr-xpatches/source/xproto/x11.SlackBuild381
-rwxr-xr-xpatches/source/xproto/xproto.SlackBuild2
-rwxr-xr-xpatches/source/xscreensaver/dump.android.osx.sources.sh14
-rw-r--r--patches/source/xscreensaver/setuid.c274
-rw-r--r--patches/source/xscreensaver/slack-desc19
-rw-r--r--patches/source/xscreensaver/xscreensaver-getimage-file-5.14555
-rwxr-xr-xpatches/source/xscreensaver/xscreensaver.SlackBuild141
-rw-r--r--patches/source/xscreensaver/xscreensaver.electricsheep.diff20
-rw-r--r--patches/source/xscreensaver/xscreensaver.no.expiration.date.diff29
-rw-r--r--patches/source/xscreensaver/xscreensaver.setuid.diff179
-rw-r--r--patches/source/yptools/nsswitch.conf-nis45
-rw-r--r--patches/source/yptools/rc.yp123
-rw-r--r--patches/source/yptools/slack-desc19
-rw-r--r--patches/source/yptools/yp-tools-2.14-glibc217-crypt.diff86
-rwxr-xr-xpatches/source/yptools/yptools.SlackBuild292
1299 files changed, 178759 insertions, 0 deletions
diff --git a/patches/source/MPlayer/MPlayer.SlackBuild b/patches/source/MPlayer/MPlayer.SlackBuild
new file mode 100755
index 00000000..0eb4bb10
--- /dev/null
+++ b/patches/source/MPlayer/MPlayer.SlackBuild
@@ -0,0 +1,488 @@
+#!/bin/sh
+# $Id: MPlayer.SlackBuild,v 1.27 2012/07/01 13:07:08 root Exp root $
+# Copyright 2006, 2007, 2008, 2010, 2011, 2012 Eric Hameleers, Eindhoven, NL
+# Copyright 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# 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.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@slackware.com>
+# For: MPlayer
+# Descr: a movie player for LINUX
+# URL: http://www.mplayerhq.hu/
+# Needs:
+# Changelog:
+# 1.0rc1-1: 05/Nov/2006 by Eric Hameleers <alien@slackware.com>
+# * Initial build.
+# 1.0rc1-2: 07/Nov/2006 by Eric Hameleers <alien@slackware.com>
+# * Removed MPlayer's internal libdvdcss code from the build, so
+# that MPlayer no longer plays encrypted DVD's by default (and the
+# package is now safe to upload to public repositories).
+# If it is allowed in your country, you can either install
+# libdvdcss (which is picked up automatically by MPlayer), or
+# rebuild MPlayer yourself using this SlackBuild - and set the
+# variable REMOVECSS="no" first (see further down).
+# Use this commandline if you can't or won't modify the script:
+# REMOVECSS="no" ./MPlayer.SlackBuild
+# 1.0rc1-3: 08/Nov/2006 by Eric Hameleers <alien@slackware.com>
+# * Install the mplayer.conf into correct location '/etc/mplayer/'
+# 1.0rc1-4: 15/mar/2007 by Eric Hameleers <alien@slackware.com>
+# * Differentiate between versions of X11 (modular X has another
+# install-prefix); update default skin; enable mplayer menu;
+# add security fix
+# 1.0rc1-5: 07/jun/2007 by Eric Hameleers <alien@slackware.com>
+# * Add security fix.
+# 1.0rc2-1: 09/oct/2007 by Eric Hameleers <alien@slackware.com>
+# * New version.
+# 1.0rc2-2: 01/feb/2008 by Eric Hameleers <alien@slackware.com>
+# * Apply 4 security fixes.
+# 1.0rc2-3: 10/mar/2008 by Eric Hameleers <alien@slackware.com>
+# * Apply a patch that allows compilation against the ivtv driver
+# in the 2.6.24.x kernels.
+# r28148-1: 14/dec/2008 by Eric Hameleers <alien@slackware.com>
+# * Build SVN snapshot - remove support for *all* patented or
+# questionable software if "USE_PATENTS" is set to "NO" - think
+# of DECSS dvd decryption code, and mp3/aac/amr audio encoders.
+# r28929-1: 10/mar/2009 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# r29301-1: 12/may/2009 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# r29301-1: 12/may/2009 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 20100926-1: 26/sep/2010 by Eric Hameleers <alien@slackware.com>
+# * Slackware has MPlayer now of course, but it does not hurt
+# to have a full-featured binary package available. The 1.0rc3
+# was released recently but I prefer to build a snapshot.
+# 20110624-1: 24/jun/2011 by Eric Hameleers <alien@slackware.com>
+# * Provide an up-to-date snapshot to be used in conjunction
+# with UMPlayer (a MPlayer GUI). New MPlayer source requires
+# a separate ffmpeg download.
+# 20120514-1: 14/may/2012 by volkerdi@slackware.com
+# * Update.
+# 1.1_20120701-1: 28/jun/2012 by alien@slackware.com
+# * Update to the 1.1 branch (essentially this is MPlayer-1.1 but
+# I like to check it out of SVN).
+# 1.1_20130819-1: 19/aug/2013 by volkerdi@slackware.com
+# * Update to the latest 1.1 branch, and the same ffmpeg that was
+# shipped with the 1.1.1 tarball. The official 1.1.1 release
+# did not start a new repo branch, so this is the latest.
+# 20150308-1: 09/mar/2015 by pprkut@slackware.com
+# * Update to latest version from trunk, together with ffmpeg 2.6,
+# which was released roughly around that date as well.
+# 20140403-1: 03/apr/2015 by volkerdi@slackware.com
+# * Update to latest version from trunk and ffmpeg-2.6.1.
+#
+# Run 'sh MPlayer.SlackBuild' to build a Slackware package.
+# The package (.txz) plus descriptive .txt file are created in /tmp .
+# Install using 'installpkg'.
+#
+# -----------------------------------------------------------------------------
+
+# Set initial variables:
+
+PRGNAM=MPlayer
+VERSION=${VERSION:-20160125}
+BRANCH=${BRANCH:-1.2} # leave empty if you want to build MPlayer trunk
+FFMPEG=${FFMPEG:-2.8.5}
+BUILD=${BUILD:-1_slack14.1}
+TAG=${TAG:-}
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Show the branch version in the package name if we build from a branch:
+[ -n "$BRANCH" ] && PKGVERSION=${BRANCH}_${VERSION} || PKGVERSION=${VERSION}
+
+DOCS="AUTHORS Changelog Copyright LICENSE README VERSION DOCS/HTML DOCS/tech"
+
+# MPlayer repository characteristics:
+MPURI="svn://svn.mplayerhq.hu/mplayer/"
+if [ -n "$BRANCH" ]; then
+ MPBRANCH="branches/$BRANCH"
+else
+ MPBRANCH="trunk"
+fi
+
+FFURI=git://git.videolan.org/ffmpeg.git
+
+DEFSKIN=${DEFSKIN:-"Blue"} # Download more skins at the following url:
+SKINVER=${SKINVER:-"1.11"} # http://www.mplayerhq.hu/design7/dload.html
+
+# Available languages: all cs de en es fr hu it pl ru zh_CN
+LANGUAGES="en,de,es,fr"
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+ # --enable-runtime-cpudetection is supported only for x86, x86_64, and PPC
+ EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection"
+elif [ "$ARCH" = "i486" -o \
+ "$ARCH" = "i586" -o \
+ "$ARCH" = "i686" ]; then
+ LIBDIRSUFFIX=""
+ EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection"
+else
+ LIBDIRSUFFIX=""
+ EXTRACONFIGUREOPTIONS=""
+fi
+
+# Where the WIN32 codecs are expectedfor instance
+CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs
+
+# ---------------------------------------------------------------------------
+# -- PATENT ALERT! --
+# MPLayer can be built with MP3 (lame) and AMR audio encoders
+# (needed for FLV and .3GP videos) but these libraries are 'contaminated'
+# with patents from Fraunhofer and GGP.
+# Also, the AAC encoder has patent issues.
+# You can build these patended algorithms into ffmpeg, and if you are an
+# ordinary end user, no one will bother you for using them.
+# For the binaries based on this SlackBuild that I distribute, it is a
+# different story. I am not allowed to distribute binary packages that
+# incorporate patented code. So here you go. My Slackware package was
+# built with "USE_PATENTS=NO" i.e. without using
+# the lame mp3, faac, AMR and dvdcss libraries.
+# ---------------------------------------------------------------------------
+USE_PATENTS=${USE_PATENTS:-"NO"}
+
+# MPlayer will try to use one of the TrueType fonts present on the target
+# system for it's On Screen Display (OSD) font.
+# Slackware 11.0 ships with the Vera and DejaVu fonts, you may want to add
+# more fonts to this list. The first font found will be used by creating a
+# symbolic link "/usr/share/mplayer/subfont.ttf" to it.
+# The use of bitmapped fonts is considered deprecated, but you can still use
+# those if you want. Read http://www.mplayerhq.hu/DOCS/HTML/en/fonts-osd.html
+# if you want to know more about OSD font configuration.
+OSDFONTS="LiberationSans-Regular.ttf \
+ Arialuni.ttf arial.ttf \
+ DejaVuSans.ttf Vera.ttf"
+
+# Where do we look for sources?
+SRCDIR=$(cd $(dirname $0); pwd)
+
+SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.xz"
+SRCURL[0]=""
+
+# The default skin to use (we need to add at least one)
+SOURCE[1]="$SRCDIR/${DEFSKIN}-${SKINVER}.tar.bz2"
+SRCURL[1]="http://www.mplayerhq.hu/MPlayer/skins/${DEFSKIN}-${SKINVER}.tar.bz2"
+
+# Ffmpeg needs to be checked out separately now:
+SOURCE[2]="$SRCDIR/ffmpeg-${FFMPEG}.tar.xz"
+SRCURL[2]=""
+
+# Use the src_checkout() function if no downloadable tarball exists.
+# This function checks out sources from SVN/CVS and creates a tarball of them.
+src_checkout() {
+ # Param #1 : index in the SOURCE[] array.
+ # Param #2 : full path to where SOURCE[$1] tarball should be created.
+ # Determine the tarball extension:
+ PEXT=$(echo "${2}" | sed -r -e 's/.*[^.].(tar.xz|tar.gz|tar.bz2|tgz).*/\1/')
+ case "$PEXT" in
+ "tar.xz") TARCOMP="J" ;;
+ "tar.gz") TARCOMP="z" ;;
+ "tgz") TARCOMP="z" ;;
+ "tar.bz2") TARCOMP="j" ;;
+ *) echo "Archive can only have extension 'tar.xz', '.tar.gz' '.tar.bz2' or '.tgz'" ; exit 1 ;;
+ esac
+ case ${1} in
+ 0) # mplayer
+ if [ "$(echo ${VERSION}|cut -c1)" == 'r' ]; then # revision instead of date
+ echo "Only supported VERSION is a date - yyyymmdd - or 'HEAD'"
+ else
+ REV="{${VERSION}}"
+ fi
+ mkdir MPlayer-${VERSION} \
+ && cd MPlayer-${VERSION} \
+ && svn checkout --revision $REV ${MPURI}/${MPBRANCH} . \
+ && svn propget svn:externals | sed -e 's/[[:space:]].*$//g' | xargs svn up --revision $REV \
+ && chown -R root:root . \
+ && cd .. \
+ && tar --exclude-vcs -${TARCOMP}cf ${2} MPlayer-${VERSION}
+ rm -rf MPlayer-${VERSION}
+ ;;
+ 2) # ffmpeg-${FFMPEG}
+ mkdir ffmpeg_temp_checkout_$$ \
+ && cd ffmpeg_temp_checkout_$$
+ echo "Checking out tag n$FFMPEG from '$FFURI':"
+ git clone ${FFURI} ffmpeg \
+ && cd ffmpeg \
+ && git checkout n$FFMPEG \
+ && cd ..
+ chown -R root:root . \
+ && tar --exclude-vcs -${TARCOMP}cf ${2} ffmpeg
+ cd ..
+ rm -rf ffmpeg_temp_checkout_$$
+ ;;
+ *) # Do nothing
+ ;;
+ esac
+}
+
+# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
+TMP=${TMP:-/tmp/build}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+##
+## --- with a little luck, you won't have to edit below this point --- ##
+##
+
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Create working directories:
+mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+mkdir -p $PKG # place for the package to be built
+rm -rf $PKG/* # erase old package's contents
+mkdir -p $OUTPUT # place for the package to be saved
+
+# Source file availability:
+for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
+ if ! [ -f ${SOURCE[$i]} ]; then
+ echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
+ # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
+ [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
+ if ! [ "x${SRCURL[$i]}" == "x" ]; then
+ echo "Will download file to $(dirname $SOURCE[$i])"
+ wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true
+ if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then
+ echo "Downloading '$(basename ${SOURCE[$i]})' failed.. aborting the build."
+ mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL
+ exit 1
+ fi
+ else
+ # Try if we have a SVN/CVS download routine for ${SOURCE[$i]}
+ echo "Will checkout sources to $(dirname $SOURCE[$i])"
+ src_checkout $i "${SOURCE[$i]}" 2>&1 > $OUTPUT/checkout-$(basename ${SOURCE[$i]}).log
+ fi
+ if [ ! -f "${SOURCE[$i]}" -o ! -s "${SOURCE[$i]}" ]; then
+ echo "File '$(basename ${SOURCE[$i]})' not available.. aborting the build."
+ exit 1
+ fi
+ fi
+done
+
+if [ "$P1" == "--download" ]; then
+ echo "Download complete."
+ exit 0
+fi
+
+# --- PACKAGE BUILDING ---
+
+echo "++"
+echo "|| $PRGNAM-$VERSION"
+echo "++"
+
+cd $TMP/tmp-$PRGNAM
+echo "Extracting the source archive(s) for $PRGNAM..."
+tar -xvf ${SOURCE[0]}
+
+cd ${PRGNAM}-${VERSION}
+ # remove MPlayer's copy of libswscale
+ rm -rf ffmpeg
+
+ # Extract the ffmpeg source inside the MPlayer directory:
+ tar -xvf ${SOURCE[2]}
+
+ # in case we build with an official tarball
+ if [ -e "ffmpeg-$FFMPEG" ]; then
+ mv "ffmpeg-$FFMPEG" ffmpeg
+ fi
+
+cd ..
+
+chown -R root:root *
+chmod -R u+w,go+r-w,a+X-s *
+cd ${PRGNAM}-${VERSION}
+
+# Determine what X we're running (the modular X returns the prefix
+# in the next command, while older versions stay silent):
+XPREF=$(pkg-config --variable=prefix x11) || true
+[ "$XPREF" == "" ] && XPREF='/usr/X11R6'
+
+# Remove support for patent encumbered and possibly illegal code:
+if [ "$USE_PATENTS" != "YES" ]; then
+ DO_PATENTED="--disable-mp3lame --disable-mp3lame-lavc \
+ --disable-libopencore_amrnb \
+ --disable-libopencore_amrwb"
+else
+ DO_PATENTED=""
+fi
+
+echo Building ...
+# MPlayer wants to automatically determine compiler flags,
+# so we don't provide CFLAGS.
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --confdir=/etc/mplayer \
+ --enable-gui \
+ --enable-menu \
+ --disable-arts \
+ --disable-bitmap-font \
+ --codecsdir=${CODECSDIR} \
+ --language="${LANGUAGES}" \
+ ${EXTRACONFIGUREOPTIONS} \
+ ${DO_PATENTED} \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+# So that MPlayer does not report "UNKNOWN" as it's version:
+if [ ! -f VERSION ]; then
+ echo $VERSION > VERSION
+fi
+make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
+make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
+
+# Build the html documentation (not all languages are available):
+if [ "$LANGUAGES" = "all" ]; then
+ # make html-chunked
+ make html-single
+else
+ for i in $(echo $LANGUAGES | tr , ' ') ; do
+ # make html-chunked-$i ;
+ make html-single-$i ;
+ done
+fi
+
+# Prepare the configfile:
+mkdir -p $PKG/etc/mplayer
+cp etc/example.conf $PKG/etc/mplayer/mplayer.conf.new
+
+# Install our default skin:
+cd $PKG/usr/share/mplayer/skins
+tar -xvf ${SOURCE[1]}
+chown -R root:root *
+chmod -R u+w,go+r-w,a+X-s *
+ln -s ${DEFSKIN} default
+cd -
+
+# Add this to the doinst.sh:
+mkdir -p $PKG/install
+cat <<EOINS >> $PKG/install/doinst.sh
+# Handle the incoming configuration files:
+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
+}
+
+# Installing a bitmap font is considered deprecated; use a TTF font instead.
+# We try to link to an installed TTF font at install time.
+# Configure a default TrueType font to use for the OSD :
+if [ ! -f usr/share/mplayer/subfont.ttf ]; then
+ for font in ${OSDFONTS}; do
+ if [ -f .${XPREF}/lib${LIBDIRSUFFIX}/X11/fonts/TTF/\${font} ]; then
+ ( cd usr/share/mplayer/
+ ln -sf ${XPREF}/lib${LIBDIRSUFFIX}/X11/fonts/TTF/\${font} subfont.ttf
+ )
+ break
+ fi
+ done
+fi
+
+# Prepare the new configuration file
+config etc/mplayer/mplayer.conf.new
+
+# Update the desktop database:
+if [ -x usr/bin/update-desktop-database ]; then
+ chroot . /usr/bin/update-desktop-database usr/share/applications 1> /dev/null 2> /dev/null
+fi
+
+# Update hicolor theme cache:
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x usr/bin/gtk-update-icon-cache ]; then
+ chroot . /usr/bin/gtk-update-icon-cache /usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
+# Update the mime database:
+if [ -x usr/bin/update-mime-database ]; then
+ chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
+EOINS
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$PKGVERSION || true
+cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$PKGVERSION/$PRGNAM.SlackBuild
+mv $PKG/usr/doc/$PRGNAM-$PKGVERSION/HTML $PKG/usr/doc/$PRGNAM-$PKGVERSION/html
+# Save a sample of all configuration files:
+for i in etc/*.conf ; do
+ cp $i $PKG/usr/doc/$PRGNAM-$PKGVERSION/$(basename $i)-sample
+done
+# Save a transcript of all configured options for this specific build:
+if [ -n $OUTPUT/configure-${PRGNAM}.log ]; then
+ cat $OUTPUT/configure-${PRGNAM}.log \
+ | sed -n "/^Config files successfully generated/,/^'config.h' and 'config.mak' contain your configuration options./p" \
+ > $PKG/usr/doc/$PRGNAM-$PKGVERSION/${PRGNAM}.configuration
+fi
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# 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 )
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $SRCDIR/slack-desc > $PKG/install/slack-desc
+if [ -f $SRCDIR/doinst.sh ]; then
+ cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh
+fi
+
+# Build the package:
+cd $PKG
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+cd $OUTPUT
+md5sum ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
+cd -
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txt
+
diff --git a/patches/source/MPlayer/slack-desc b/patches/source/MPlayer/slack-desc
new file mode 100644
index 00000000..033b4170
--- /dev/null
+++ b/patches/source/MPlayer/slack-desc
@@ -0,0 +1,20 @@
+# 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------------------------------------------------------|
+MPlayer: MPlayer (Linux movie player)
+MPlayer:
+MPlayer: MPlayer is a movie player for Linux. It plays most MPEG, VOB, AVI,
+MPlayer: Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo,
+MPlayer: YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim,
+MPlayer: and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx,
+MPlayer: DivX 3/4/5 and even WMV movies, too (without the avifile library).
+MPlayer: MPlayer supports 10 types of subtitles formats: VobSub,
+MPlayer: MicroDVD, SubRip, SubViewer, Sami, VPlayer, RT, SSA, AQTitle, MPsub.
+MPlayer:
+MPlayer: Homepage for MPLayer is http://www.mplayerhq.hu/
+
diff --git a/patches/source/apr-util/apr-util.SlackBuild b/patches/source/apr-util/apr-util.SlackBuild
new file mode 100755
index 00000000..c3c8c866
--- /dev/null
+++ b/patches/source/apr-util/apr-util.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013 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.
+
+
+VERSION=${VERSION:-$(echo apr-util-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -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
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-apr-util
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf apr-util-$VERSION
+tar xvf $CWD/apr-util-$VERSION.tar.bz2 || exit 1
+cd apr-util-$VERSION
+
+# For now, this isn't working with svn (here, anyway) and is probably
+# more trouble than it's worth. Could be a grey area in regards to
+# licensing, too -- the Apache people say it's fine for third parties
+# to link this and distribute the result, but there are usually some
+# differing opinions when it comes to this sort of thing...
+#( cd dbd ; lftpget http://apache.webthing.com/svn/apache/apr/apr_dbd_mysql.c )
+# --with-mysql=/usr \
+#
+
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-apr=/usr \
+ --with-dbm=db44 \
+ --with-berkeley-db \
+ --disable-util-dso \
+ --without-gdbm \
+ --with-ldap \
+ --disable-static \
+ --without-sqlite2 \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make dox || exit 1
+make install DESTDIR=$PKG
+
+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/doc/apr-util-$VERSION
+cp -a \
+ INSTALL.MySQL LICENSE NOTICE \
+ $PKG/usr/doc/apr-util-$VERSION
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# This just seems like way too much stuff...
+#mv docs/dox/html $PKG/usr/doc/apr-util-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/apr-util-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/apr-util/apr-util.url b/patches/source/apr-util/apr-util.url
new file mode 100644
index 00000000..7bdef9de
--- /dev/null
+++ b/patches/source/apr-util/apr-util.url
@@ -0,0 +1,2 @@
+http://www.apache.org/dist/apr/apr-util-1.5.3.tar.bz2
+http://www.apache.org/dist/apr/apr-util-1.5.3.tar.bz2.asc
diff --git a/patches/source/apr-util/slack-desc b/patches/source/apr-util/slack-desc
new file mode 100644
index 00000000..cec19063
--- /dev/null
+++ b/patches/source/apr-util/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------------------------------------------------------|
+apr-util: apr-util (Apache Portable Runtime utilities)
+apr-util:
+apr-util: The mission of the Apache Portable Runtime (APR) is to provide a
+apr-util: free library of C data structures and routines, forming a system
+apr-util: portability layer to as many operating systems as possible.
+apr-util:
+apr-util: This package contains additional utility interfaces for APR;
+apr-util: including support for XML, LDAP, database interfaces, URI parsing,
+apr-util: and more.
+apr-util:
+apr-util:
diff --git a/patches/source/apr/apr.SlackBuild b/patches/source/apr/apr.SlackBuild
new file mode 100755
index 00000000..34b7de76
--- /dev/null
+++ b/patches/source/apr/apr.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011 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.
+
+
+VERSION=${VERSION:-$(echo apr-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -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
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-apr
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf apr-$VERSION
+tar xvf $CWD/apr-$VERSION.tar.bz2 || exit 1
+cd apr-$VERSION
+
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-installbuilddir=/usr/lib${LIBDIRSUFFIX}/apr-${VERSION}/build-1 \
+ --disable-static \
+ --with-devrandom=/dev/urandom \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make dox || 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
+
+mkdir -p $PKG/usr/doc/apr-$VERSION
+cp -a \
+ LICENSE NOTICE README* \
+ $PKG/usr/doc/apr-$VERSION
+
+# If there's a CHANGES file, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r CHANGES ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# This just seems like way too much stuff...
+#mv docs/dox/html $PKG/usr/doc/apr-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/apr-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/apr/apr.url b/patches/source/apr/apr.url
new file mode 100644
index 00000000..7ef8d775
--- /dev/null
+++ b/patches/source/apr/apr.url
@@ -0,0 +1,2 @@
+http://www.apache.org/dist/apr/apr-1.5.0.tar.bz2
+http://www.apache.org/dist/apr/apr-1.5.0.tar.bz2.asc
diff --git a/patches/source/apr/slack-desc b/patches/source/apr/slack-desc
new file mode 100644
index 00000000..2e52660d
--- /dev/null
+++ b/patches/source/apr/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------------------------------------------------------|
+apr: apr (Apache Portable Runtime)
+apr:
+apr: The mission of the Apache Portable Runtime (APR) is to provide a
+apr: free library of C data structures and routines, forming a system
+apr: portability layer to as many operating systems as possible.
+apr:
+apr:
+apr:
+apr:
+apr:
+apr:
diff --git a/patches/source/bash/bash-4.2-patches/bash42-001 b/patches/source/bash/bash-4.2-patches/bash42-001
new file mode 100644
index 00000000..547aaa06
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-001
@@ -0,0 +1,78 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-001
+
+Bug-Reported-by: Juergen Daubert <jue@jue.li>
+Bug-Reference-ID: <20110214175132.GA19813@jue.netz>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00125.html
+
+Bug-Description:
+
+When running in Posix mode, bash does not correctly expand the right-hand
+side of a double-quoted word expansion containing single quotes.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500
+--- subst.c 2011-02-19 00:00:00.000000000 -0500
+***************
+*** 1380,1387 ****
+
+ /* The handling of dolbrace_state needs to agree with the code in parse.y:
+! parse_matched_pair() */
+! dolbrace_state = 0;
+! if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+! dolbrace_state = (flags & SX_POSIXEXP) ? DOLBRACE_QUOTE : DOLBRACE_PARAM;
+
+ i = *sindex;
+--- 1380,1389 ----
+
+ /* The handling of dolbrace_state needs to agree with the code in parse.y:
+! parse_matched_pair(). The different initial value is to handle the
+! case where this function is called to parse the word in
+! ${param op word} (SX_WORD). */
+! dolbrace_state = (flags & SX_WORD) ? DOLBRACE_WORD : DOLBRACE_PARAM;
+! if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && (flags & SX_POSIXEXP))
+! dolbrace_state = DOLBRACE_QUOTE;
+
+ i = *sindex;
+***************
+*** 7177,7181 ****
+ /* Extract the contents of the ${ ... } expansion
+ according to the Posix.2 rules. */
+! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#') ? SX_POSIXEXP : 0);
+ if (string[sindex] == RBRACE)
+ sindex++;
+--- 7181,7185 ----
+ /* Extract the contents of the ${ ... } expansion
+ according to the Posix.2 rules. */
+! value = extract_dollar_brace_string (string, &sindex, quoted, (c == '%' || c == '#' || c =='/' || c == '^' || c == ',' || c ==':') ? SX_POSIXEXP|SX_WORD : SX_WORD);
+ if (string[sindex] == RBRACE)
+ sindex++;
+*** ../bash-4.2-patched/subst.h 2010-12-02 20:21:29.000000000 -0500
+--- subst.h 2011-02-16 21:12:09.000000000 -0500
+***************
+*** 57,60 ****
+--- 57,61 ----
+ #define SX_ARITHSUB 0x0080 /* extracting $(( ... )) (currently unused) */
+ #define SX_POSIXEXP 0x0100 /* extracting new Posix pattern removal expansions in extract_dollar_brace_string */
++ #define SX_WORD 0x0200 /* extracting word in ${param op word} */
+
+ /* Remove backslashes which are quoting backquotes from STRING. Modifies
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-002 b/patches/source/bash/bash-4.2-patches/bash42-002
new file mode 100644
index 00000000..077c7e0f
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-002
@@ -0,0 +1,60 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-002
+
+Bug-Reported-by: Clark J. Wang <dearvoid@gmail.com>
+Bug-Reference-ID: <AANLkTimGbW7aC4E5infXP6ku5WPci4t=xVc+L1SyHqrD@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00157.html
+
+Bug-Description:
+
+The readline vi-mode `cc', `dd', and `yy' commands failed to modify the
+entire line.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/readline/vi_mode.c 2010-11-20 19:51:39.000000000 -0500
+--- lib/readline/vi_mode.c 2011-02-17 20:24:25.000000000 -0500
+***************
+*** 1115,1119 ****
+ _rl_vi_last_motion = c;
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+! return (0);
+ }
+ #if defined (READLINE_CALLBACKS)
+--- 1115,1119 ----
+ _rl_vi_last_motion = c;
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+! return (vidomove_dispatch (m));
+ }
+ #if defined (READLINE_CALLBACKS)
+*** ../bash-4.2-patched/lib/readline/callback.c 2010-06-06 12:18:58.000000000 -0400
+--- lib/readline/callback.c 2011-02-17 20:43:28.000000000 -0500
+***************
+*** 149,152 ****
+--- 149,155 ----
+ /* Should handle everything, including cleanup, numeric arguments,
+ and turning off RL_STATE_VIMOTION */
++ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
++ _rl_internal_char_cleanup ();
++
+ return;
+ }
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-003 b/patches/source/bash/bash-4.2-patches/bash42-003
new file mode 100644
index 00000000..c488e96b
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-003
@@ -0,0 +1,318 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-003
+
+Bug-Reported-by: Clark J. Wang <dearvoid@gmail.com>
+Bug-Reference-ID: <AANLkTikZ_rVV-frR8Fh0PzhXnMKnm5XsUR-F3qtPPs5G@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00136.html
+
+Bug-Description:
+
+When using the pattern replacement and pattern removal word expansions, bash
+miscalculates the possible match length in the presence of an unescaped left
+bracket without a closing right bracket, resulting in a failure to match
+the pattern.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/glob/gmisc.c 2011-02-05 16:11:17.000000000 -0500
+--- lib/glob/gmisc.c 2011-02-18 23:53:42.000000000 -0500
+***************
+*** 78,83 ****
+ size_t wmax;
+ {
+! wchar_t wc, *wbrack;
+! int matlen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*wpat == 0)
+--- 78,83 ----
+ size_t wmax;
+ {
+! wchar_t wc;
+! int matlen, bracklen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*wpat == 0)
+***************
+*** 119,123 ****
+ case L'[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! wbrack = wpat;
+ wc = *wpat++;
+ do
+--- 119,123 ----
+ case L'[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! bracklen = 1;
+ wc = *wpat++;
+ do
+***************
+*** 125,140 ****
+ if (wc == 0)
+ {
+! matlen += wpat - wbrack - 1; /* incremented below */
+! break;
+ }
+ else if (wc == L'\\')
+ {
+! wc = *wpat++;
+! if (*wpat == 0)
+! break;
+ }
+ else if (wc == L'[' && *wpat == L':') /* character class */
+ {
+ wpat++;
+ in_cclass = 1;
+ }
+--- 125,148 ----
+ if (wc == 0)
+ {
+! wpat--; /* back up to NUL */
+! matlen += bracklen;
+! goto bad_bracket;
+ }
+ else if (wc == L'\\')
+ {
+! /* *wpat == backslash-escaped character */
+! bracklen++;
+! /* If the backslash or backslash-escape ends the string,
+! bail. The ++wpat skips over the backslash escape */
+! if (*wpat == 0 || *++wpat == 0)
+! {
+! matlen += bracklen;
+! goto bad_bracket;
+! }
+ }
+ else if (wc == L'[' && *wpat == L':') /* character class */
+ {
+ wpat++;
++ bracklen++;
+ in_cclass = 1;
+ }
+***************
+*** 142,145 ****
+--- 150,154 ----
+ {
+ wpat++;
++ bracklen++;
+ in_cclass = 0;
+ }
+***************
+*** 147,152 ****
+ {
+ wpat++;
+ if (*wpat == L']') /* right bracket can appear as collating symbol */
+! wpat++;
+ in_collsym = 1;
+ }
+--- 156,165 ----
+ {
+ wpat++;
++ bracklen++;
+ if (*wpat == L']') /* right bracket can appear as collating symbol */
+! {
+! wpat++;
+! bracklen++;
+! }
+ in_collsym = 1;
+ }
+***************
+*** 154,157 ****
+--- 167,171 ----
+ {
+ wpat++;
++ bracklen++;
+ in_collsym = 0;
+ }
+***************
+*** 159,164 ****
+ {
+ wpat++;
+ if (*wpat == L']') /* right bracket can appear as equivalence class */
+! wpat++;
+ in_equiv = 1;
+ }
+--- 173,182 ----
+ {
+ wpat++;
++ bracklen++;
+ if (*wpat == L']') /* right bracket can appear as equivalence class */
+! {
+! wpat++;
+! bracklen++;
+! }
+ in_equiv = 1;
+ }
+***************
+*** 166,174 ****
+--- 184,196 ----
+ {
+ wpat++;
++ bracklen++;
+ in_equiv = 0;
+ }
++ else
++ bracklen++;
+ }
+ while ((wc = *wpat++) != L']');
+ matlen++; /* bracket expression can only match one char */
++ bad_bracket:
+ break;
+ }
+***************
+*** 214,219 ****
+ size_t max;
+ {
+! char c, *brack;
+! int matlen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*pat == 0)
+--- 236,241 ----
+ size_t max;
+ {
+! char c;
+! int matlen, bracklen, t, in_cclass, in_collsym, in_equiv;
+
+ if (*pat == 0)
+***************
+*** 255,259 ****
+ case '[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! brack = pat;
+ c = *pat++;
+ do
+--- 277,281 ----
+ case '[':
+ /* scan for ending `]', skipping over embedded [:...:] */
+! bracklen = 1;
+ c = *pat++;
+ do
+***************
+*** 261,276 ****
+ if (c == 0)
+ {
+! matlen += pat - brack - 1; /* incremented below */
+! break;
+ }
+ else if (c == '\\')
+ {
+! c = *pat++;
+! if (*pat == 0)
+! break;
+ }
+ else if (c == '[' && *pat == ':') /* character class */
+ {
+ pat++;
+ in_cclass = 1;
+ }
+--- 283,306 ----
+ if (c == 0)
+ {
+! pat--; /* back up to NUL */
+! matlen += bracklen;
+! goto bad_bracket;
+ }
+ else if (c == '\\')
+ {
+! /* *pat == backslash-escaped character */
+! bracklen++;
+! /* If the backslash or backslash-escape ends the string,
+! bail. The ++pat skips over the backslash escape */
+! if (*pat == 0 || *++pat == 0)
+! {
+! matlen += bracklen;
+! goto bad_bracket;
+! }
+ }
+ else if (c == '[' && *pat == ':') /* character class */
+ {
+ pat++;
++ bracklen++;
+ in_cclass = 1;
+ }
+***************
+*** 278,281 ****
+--- 308,312 ----
+ {
+ pat++;
++ bracklen++;
+ in_cclass = 0;
+ }
+***************
+*** 283,288 ****
+ {
+ pat++;
+ if (*pat == ']') /* right bracket can appear as collating symbol */
+! pat++;
+ in_collsym = 1;
+ }
+--- 314,323 ----
+ {
+ pat++;
++ bracklen++;
+ if (*pat == ']') /* right bracket can appear as collating symbol */
+! {
+! pat++;
+! bracklen++;
+! }
+ in_collsym = 1;
+ }
+***************
+*** 290,293 ****
+--- 325,329 ----
+ {
+ pat++;
++ bracklen++;
+ in_collsym = 0;
+ }
+***************
+*** 295,300 ****
+ {
+ pat++;
+ if (*pat == ']') /* right bracket can appear as equivalence class */
+! pat++;
+ in_equiv = 1;
+ }
+--- 331,340 ----
+ {
+ pat++;
++ bracklen++;
+ if (*pat == ']') /* right bracket can appear as equivalence class */
+! {
+! pat++;
+! bracklen++;
+! }
+ in_equiv = 1;
+ }
+***************
+*** 302,310 ****
+--- 342,354 ----
+ {
+ pat++;
++ bracklen++;
+ in_equiv = 0;
+ }
++ else
++ bracklen++;
+ }
+ while ((c = *pat++) != ']');
+ matlen++; /* bracket expression can only match one char */
++ bad_bracket:
+ break;
+ }
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-004 b/patches/source/bash/bash-4.2-patches/bash42-004
new file mode 100644
index 00000000..fe29f82c
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-004
@@ -0,0 +1,53 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-004
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <201102182106.17834.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00222.html
+
+Bug-Description:
+
+When used in contexts where word splitting and quote removal were not
+performed, such as pattern removal or pattern substitution, empty strings
+(either literal or resulting from quoted variables that were unset or
+null) were not matched correctly, resulting in failure.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-01-02 16:12:51.000000000 -0500
+--- subst.c 2011-02-18 22:30:13.000000000 -0500
+***************
+*** 3373,3379 ****
+ if (string == 0 || *string == '\0')
+ return (WORD_LIST *)NULL;
+
+! td.flags = 0;
+ td.word = string;
+ tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
+ return (tresult);
+--- 3373,3379 ----
+ if (string == 0 || *string == '\0')
+ return (WORD_LIST *)NULL;
+
+! td.flags = W_NOSPLIT2; /* no splitting, remove "" and '' */
+ td.word = string;
+ tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
+ return (tresult);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-005 b/patches/source/bash/bash-4.2-patches/bash42-005
new file mode 100644
index 00000000..3ca9fc1d
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-005
@@ -0,0 +1,131 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-005
+
+Bug-Reported-by: Dennis Williamson <dennistwilliamson@gmail.com>
+Bug-Reference-ID: <AANLkTikDbEV5rnbPc0zOfmZfBcg0xGetzLLzK+KjRiNa@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00147.html
+
+Bug-Description:
+
+Systems that use tzset() to set the local timezone require the TZ variable
+to be in the environment. Bash must make sure the environment has been
+modified with any updated value for TZ before calling tzset(). This
+affects prompt string expansions and the `%T' printf conversion specification
+on systems that do not allow bash to supply a replacement for getenv(3).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/variables.h 2010-12-02 20:22:01.000000000 -0500
+--- variables.h 2011-02-19 19:57:12.000000000 -0500
+***************
+*** 314,317 ****
+--- 314,318 ----
+ extern void sort_variables __P((SHELL_VAR **));
+
++ extern int chkexport __P((char *));
+ extern void maybe_make_export_env __P((void));
+ extern void update_export_env_inplace __P((char *, int, char *));
+*** ../bash-4.2-patched/variables.c 2011-01-24 20:07:48.000000000 -0500
+--- variables.c 2011-02-19 20:04:50.000000000 -0500
+***************
+*** 3654,3657 ****
+--- 3654,3673 ----
+ }
+
++ int
++ chkexport (name)
++ char *name;
++ {
++ SHELL_VAR *v;
++
++ v = find_variable (name);
++ if (exported_p (v))
++ {
++ array_needs_making = 1;
++ maybe_make_export_env ();
++ return 1;
++ }
++ return 0;
++ }
++
+ void
+ maybe_make_export_env ()
+***************
+*** 4215,4219 ****
+ { "TEXTDOMAINDIR", sv_locale },
+
+! #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+ { "TZ", sv_tz },
+ #endif
+--- 4231,4235 ----
+ { "TEXTDOMAINDIR", sv_locale },
+
+! #if defined (HAVE_TZSET)
+ { "TZ", sv_tz },
+ #endif
+***************
+*** 4559,4568 ****
+ #endif /* HISTORY */
+
+! #if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+ void
+ sv_tz (name)
+ char *name;
+ {
+! tzset ();
+ }
+ #endif
+--- 4575,4585 ----
+ #endif /* HISTORY */
+
+! #if defined (HAVE_TZSET)
+ void
+ sv_tz (name)
+ char *name;
+ {
+! if (chkexport (name))
+! tzset ();
+ }
+ #endif
+*** ../bash-4.2-patched/parse.y 2011-01-02 15:48:11.000000000 -0500
+--- parse.y 2011-02-19 20:05:00.000000000 -0500
+***************
+*** 5136,5139 ****
+--- 5136,5142 ----
+ /* Make the current time/date into a string. */
+ (void) time (&the_time);
++ #if defined (HAVE_TZSET)
++ sv_tz ("TZ"); /* XXX -- just make sure */
++ #endif
+ tm = localtime (&the_time);
+
+*** ../bash-4.2-patched/builtins/printf.def 2010-11-23 10:02:55.000000000 -0500
+--- builtins/printf.def 2011-02-19 20:05:04.000000000 -0500
+***************
+*** 466,469 ****
+--- 466,472 ----
+ else
+ secs = arg;
++ #if defined (HAVE_TZSET)
++ sv_tz ("TZ"); /* XXX -- just make sure */
++ #endif
+ tm = localtime (&secs);
+ n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-006 b/patches/source/bash/bash-4.2-patches/bash42-006
new file mode 100644
index 00000000..be6e49c7
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-006
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-006
+
+Bug-Reported-by: Allan McRae <allan@archlinux.org>
+Bug-Reference-ID: <4D6D0D0B.50908@archlinux.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00001.html
+
+Bug-Description:
+
+A problem with bash42-005 caused it to dump core if TZ was unset.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/variables.c 2011-02-25 12:07:41.000000000 -0500
+--- variables.c 2011-03-01 10:13:04.000000000 -0500
+***************
+*** 3661,3665 ****
+
+ v = find_variable (name);
+! if (exported_p (v))
+ {
+ array_needs_making = 1;
+--- 3661,3665 ----
+
+ v = find_variable (name);
+! if (v && exported_p (v))
+ {
+ array_needs_making = 1;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-007 b/patches/source/bash/bash-4.2-patches/bash42-007
new file mode 100644
index 00000000..d16156e2
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-007
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-007
+
+Bug-Reported-by: Matthias Klose <doko@debian.org>
+Bug-Reference-ID: <4D6FD2AC.1010500@debian.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00015.html
+
+Bug-Description:
+
+When used in contexts where word splitting and quote removal were not
+performed, such as case statement word expansion, empty strings
+(either literal or resulting from quoted variables that were unset or
+null) were not expanded correctly, resulting in failure.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-02-25 12:03:58.000000000 -0500
+--- subst.c 2011-03-03 14:08:23.000000000 -0500
+***************
+*** 4609,4614 ****
+--- 4611,4617 ----
+ if (ifs_firstc == 0)
+ #endif
+ word->flags |= W_NOSPLIT;
++ word->flags |= W_NOSPLIT2;
+ result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ expand_no_split_dollar_star = 0;
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-008 b/patches/source/bash/bash-4.2-patches/bash42-008
new file mode 100644
index 00000000..631abbdf
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-008
@@ -0,0 +1,74 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-008
+
+Bug-Reported-by: Doug McMahon <mc2man@optonline.net>
+Bug-Reference-ID: <1299441211.2535.11.camel@doug-XPS-M1330>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00050.html
+
+Bug-Description:
+
+Bash-4.2 does not attempt to save the shell history on receipt of a
+terminating signal that is handled synchronously. Unfortunately, the
+`close' button on most X11 terminal emulators sends SIGHUP, which
+kills the shell.
+
+This is a very small patch to save the history in the case that an
+interactive shell receives a SIGHUP or SIGTERM while in readline and
+reading a command.
+
+The next version of bash will do this differently.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/sig.c Tue Nov 23 08:21:22 2010
+--- sig.c Tue Mar 8 21:28:32 2011
+***************
+*** 47,50 ****
+--- 47,51 ----
+ #if defined (READLINE)
+ # include "bashline.h"
++ # include <readline/readline.h>
+ #endif
+
+***************
+*** 63,66 ****
+--- 64,68 ----
+ extern int history_lines_this_session;
+ #endif
++ extern int no_line_editing;
+
+ extern void initialize_siglist ();
+***************
+*** 506,510 ****
+ #if defined (HISTORY)
+ /* XXX - will inhibit history file being written */
+! history_lines_this_session = 0;
+ #endif
+ terminate_immediately = 0;
+--- 508,515 ----
+ #if defined (HISTORY)
+ /* XXX - will inhibit history file being written */
+! # if defined (READLINE)
+! if (interactive_shell == 0 || interactive == 0 || (sig != SIGHUP && sig != SIGTERM) || no_line_editing || (RL_ISSTATE (RL_STATE_READCMD) == 0))
+! # endif
+! history_lines_this_session = 0;
+ #endif
+ terminate_immediately = 0;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-009 b/patches/source/bash/bash-4.2-patches/bash42-009
new file mode 100644
index 00000000..83a7e2c7
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-009
@@ -0,0 +1,82 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-009
+
+Bug-Reported-by: <piuma@piumalab.org>
+Bug-Reference-ID: <4DAAC0DB.7060606@piumalab.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00075.html
+
+Bug-Description:
+
+Under certain circumstances, running `fc -l' two times in succession with a
+relative history offset at the end of the history will result in an incorrect
+calculation of the last history entry and a seg fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/fc.def 2010-05-30 18:25:38.000000000 -0400
+--- builtins/fc.def 2011-04-19 15:46:17.000000000 -0400
+***************
+*** 305,309 ****
+
+ /* XXX */
+! if (saved_command_line_count > 0 && i == last_hist && hlist[last_hist] == 0)
+ while (last_hist >= 0 && hlist[last_hist] == 0)
+ last_hist--;
+--- 305,309 ----
+
+ /* XXX */
+! if (i == last_hist && hlist[last_hist] == 0)
+ while (last_hist >= 0 && hlist[last_hist] == 0)
+ last_hist--;
+***************
+*** 476,480 ****
+ {
+ int sign, n, clen, rh;
+! register int i, j;
+ register char *s;
+
+--- 476,480 ----
+ {
+ int sign, n, clen, rh;
+! register int i, j, last_hist;
+ register char *s;
+
+***************
+*** 496,500 ****
+ calculation as if it were on. */
+ rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+! i -= rh + hist_last_line_added;
+
+ /* No specification defaults to most recent command. */
+--- 496,508 ----
+ calculation as if it were on. */
+ rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+! last_hist = i - rh - hist_last_line_added;
+!
+! if (i == last_hist && hlist[last_hist] == 0)
+! while (last_hist >= 0 && hlist[last_hist] == 0)
+! last_hist--;
+! if (last_hist < 0)
+! return (-1);
+!
+! i = last_hist;
+
+ /* No specification defaults to most recent command. */
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-010 b/patches/source/bash/bash-4.2-patches/bash42-010
new file mode 100644
index 00000000..e408abd6
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-010
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-010
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <201104122356.20160.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-04/msg00058.html
+
+Bug-Description:
+
+Bash did not correctly print/reproduce here documents attached to commands
+inside compound commands such as arithmetic for loops and user-specified
+subshells. This affected the execution of such commands inside a shell
+function when the function definition is saved and later restored using
+`.' or `eval'.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/print_cmd.c 2010-05-30 18:34:08.000000000 -0400
+--- print_cmd.c 2011-04-14 10:43:18.000000000 -0400
+***************
+*** 316,319 ****
+--- 317,321 ----
+ skip_this_indent++;
+ make_command_string_internal (command->value.Subshell->command);
++ PRINT_DEFERRED_HEREDOCS ("");
+ cprintf (" )");
+ break;
+***************
+*** 593,596 ****
+--- 606,610 ----
+ indentation += indentation_amount;
+ make_command_string_internal (arith_for_command->action);
++ PRINT_DEFERRED_HEREDOCS ("");
+ semicolon ();
+ indentation -= indentation_amount;
+***************
+*** 654,657 ****
+--- 668,672 ----
+
+ make_command_string_internal (group_command->command);
++ PRINT_DEFERRED_HEREDOCS ("");
+
+ if (inside_function_def)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-011 b/patches/source/bash/bash-4.2-patches/bash42-011
new file mode 100644
index 00000000..26fdf65f
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-011
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-011
+
+Bug-Reported-by: "David Parks" <davidparks21@yahoo.com>
+Bug-Reference-ID: <014101cc82c6$46ac1540$d4043fc0$@com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-10/msg00031.html
+
+Bug-Description:
+
+Overwriting a value in an associative array causes the memory allocated to
+store the key on the second and subsequent assignments to leak.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/assoc.c 2009-08-05 20:19:40.000000000 -0400
+--- assoc.c 2011-10-04 20:23:07.000000000 -0400
+***************
+*** 78,81 ****
+--- 78,86 ----
+ if (b == 0)
+ return -1;
++ /* If we are overwriting an existing element's value, we're not going to
++ use the key. Nothing in the array assignment code path frees the key
++ string, so we can free it here to avoid a memory leak. */
++ if (b->key != key)
++ free (key);
+ FREE (b->data);
+ b->data = value ? savestring (value) : (char *)0;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-012 b/patches/source/bash/bash-4.2-patches/bash42-012
new file mode 100644
index 00000000..70f0a56b
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-012
@@ -0,0 +1,151 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-012
+
+Bug-Reported-by: Rui Santos <rsantos@grupopie.com>
+Bug-Reference-ID: <4E04C6D0.2020507@grupopie.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00079.html
+
+Bug-Description:
+
+When calling the parser to recursively parse a command substitution within
+an arithmetic expansion, the shell overwrote the saved shell input line and
+associated state, resulting in a garbled command.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y 2011-02-26 19:19:05.000000000 -0500
+--- parse.y 2011-06-24 20:08:22.000000000 -0400
+***************
+*** 3843,3846 ****
+--- 3849,3853 ----
+ {
+ sh_parser_state_t ps;
++ sh_input_line_state_t ls;
+ int orig_ind, nc, sflags;
+ char *ret, *s, *ep, *ostring;
+***************
+*** 3850,3857 ****
+--- 3857,3866 ----
+ ostring = string;
+
++ /*itrace("xparse_dolparen: size = %d shell_input_line = `%s'", shell_input_line_size, shell_input_line);*/
+ sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE;
+ if (flags & SX_NOLONGJMP)
+ sflags |= SEVAL_NOLONGJMP;
+ save_parser_state (&ps);
++ save_input_line_state (&ls);
+
+ /*(*/
+***************
+*** 3862,3865 ****
+--- 3871,3876 ----
+ restore_parser_state (&ps);
+ reset_parser ();
++ /* reset_parser clears shell_input_line and associated variables */
++ restore_input_line_state (&ls);
+ if (interactive)
+ token_to_read = 0;
+***************
+*** 5909,5912 ****
+--- 5920,5929 ----
+ ps->echo_input_at_read = echo_input_at_read;
+
++ ps->token = token;
++ ps->token_buffer_size = token_buffer_size;
++ /* Force reallocation on next call to read_token_word */
++ token = 0;
++ token_buffer_size = 0;
++
+ return (ps);
+ }
+***************
+*** 5950,5953 ****
+--- 5967,6006 ----
+ expand_aliases = ps->expand_aliases;
+ echo_input_at_read = ps->echo_input_at_read;
++
++ FREE (token);
++ token = ps->token;
++ token_buffer_size = ps->token_buffer_size;
++ }
++
++ sh_input_line_state_t *
++ save_input_line_state (ls)
++ sh_input_line_state_t *ls;
++ {
++ if (ls == 0)
++ ls = (sh_input_line_state_t *)xmalloc (sizeof (sh_input_line_state_t));
++ if (ls == 0)
++ return ((sh_input_line_state_t *)NULL);
++
++ ls->input_line = shell_input_line;
++ ls->input_line_size = shell_input_line_size;
++ ls->input_line_len = shell_input_line_len;
++ ls->input_line_index = shell_input_line_index;
++
++ /* force reallocation */
++ shell_input_line = 0;
++ shell_input_line_size = shell_input_line_len = shell_input_line_index = 0;
++ }
++
++ void
++ restore_input_line_state (ls)
++ sh_input_line_state_t *ls;
++ {
++ FREE (shell_input_line);
++ shell_input_line = ls->input_line;
++ shell_input_line_size = ls->input_line_size;
++ shell_input_line_len = ls->input_line_len;
++ shell_input_line_index = ls->input_line_index;
++
++ set_line_mbstate ();
+ }
+
+*** ../bash-4.2-patched/shell.h 2011-01-06 22:16:55.000000000 -0500
+--- shell.h 2011-06-24 19:12:25.000000000 -0400
+***************
+*** 137,140 ****
+--- 139,145 ----
+ int *token_state;
+
++ char *token;
++ int token_buffer_size;
++
+ /* input line state -- line number saved elsewhere */
+ int input_line_terminator;
+***************
+*** 167,171 ****
+--- 172,186 ----
+ } sh_parser_state_t;
+
++ typedef struct _sh_input_line_state_t {
++ char *input_line;
++ int input_line_index;
++ int input_line_size;
++ int input_line_len;
++ } sh_input_line_state_t;
++
+ /* Let's try declaring these here. */
+ extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
+ extern void restore_parser_state __P((sh_parser_state_t *));
++
++ extern sh_input_line_state_t *save_input_line_state __P((sh_input_line_state_t *));
++ extern void restore_input_line_state __P((sh_input_line_state_t *));
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-013 b/patches/source/bash/bash-4.2-patches/bash42-013
new file mode 100644
index 00000000..5bb186b3
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-013
@@ -0,0 +1,52 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-013
+
+Bug-Reported-by: Marten Wikstrom <marten.wikstrom@keystream.se>
+Bug-Reference-ID: <BANLkTikKECAh94ZEX68iQvxYuPeEM_xoSQ@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00049.html
+
+Bug-Description:
+
+An off-by-one error caused the shell to skip over CTLNUL characters,
+which are used internally to mark quoted null strings. The effect
+was to have stray 0x7f characters left after expanding words like
+""""""""aa.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-03-06 14:11:11.000000000 -0500
+--- subst.c 2011-05-11 11:23:33.000000000 -0400
+***************
+*** 3707,3711 ****
+ }
+ else if (string[i] == CTLNUL)
+! i++;
+
+ prev_i = i;
+--- 3710,3717 ----
+ }
+ else if (string[i] == CTLNUL)
+! {
+! i++;
+! continue;
+! }
+
+ prev_i = i;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-014 b/patches/source/bash/bash-4.2-patches/bash42-014
new file mode 100644
index 00000000..a43271c3
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-014
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-014
+
+Bug-Reported-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
+Bug-Reference-ID: <20110504152320.6E8F28130527@dev1.rgmadvisors.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-05/msg00018.html
+
+Bug-Description:
+
+The regular expression matching operator did not correctly match
+expressions with an embedded ^A.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/pathexp.c 2010-08-13 23:21:57.000000000 -0400
+--- pathexp.c 2011-05-05 16:40:58.000000000 -0400
+***************
+*** 197,201 ****
+ if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/')
+ continue;
+! if ((qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0)
+ continue;
+ temp[j++] = '\\';
+--- 197,201 ----
+ if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/')
+ continue;
+! if (pathname[i+1] != CTLESC && (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0)
+ continue;
+ temp[j++] = '\\';
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-015 b/patches/source/bash/bash-4.2-patches/bash42-015
new file mode 100644
index 00000000..86558738
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-015
@@ -0,0 +1,81 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-015
+
+Bug-Reported-by: <dnade.ext@orange-ftgroup.com>
+Bug-Reference-ID: <728_1312188080_4E3666B0_728_118711_1_3B5D3E0F95CC5C478D6500CDCE8B691F7AAAA4AA3D@PUEXCB2B.nanterre.francetelecom.fr>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-08/msg00000.html
+
+Bug-Description:
+
+When in a context where arithmetic evaluation is not taking place, the
+evaluator should not check for division by 0.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/expr.c 2010-12-21 11:12:13.000000000 -0500
+--- expr.c 2011-08-02 20:58:28.000000000 -0400
+***************
+*** 477,480 ****
+--- 481,492 ----
+ if (special)
+ {
++ if ((op == DIV || op == MOD) && value == 0)
++ {
++ if (noeval == 0)
++ evalerror (_("division by 0"));
++ else
++ value = 1;
++ }
++
+ switch (op)
+ {
+***************
+*** 483,493 ****
+ break;
+ case DIV:
+- if (value == 0)
+- evalerror (_("division by 0"));
+ lvalue /= value;
+ break;
+ case MOD:
+- if (value == 0)
+- evalerror (_("division by 0"));
+ lvalue %= value;
+ break;
+--- 495,501 ----
+***************
+*** 805,809 ****
+
+ if (((op == DIV) || (op == MOD)) && (val2 == 0))
+! evalerror (_("division by 0"));
+
+ if (op == MUL)
+--- 813,822 ----
+
+ if (((op == DIV) || (op == MOD)) && (val2 == 0))
+! {
+! if (noeval == 0)
+! evalerror (_("division by 0"));
+! else
+! val2 = 1;
+! }
+
+ if (op == MUL)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-016 b/patches/source/bash/bash-4.2-patches/bash42-016
new file mode 100644
index 00000000..46025888
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-016
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-016
+
+Bug-Reported-by: Martin von Gagern <Martin.vGagern@gmx.net>
+Bug-Reference-ID: <4E43AD9E.8060501@gmx.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-08/msg00141.html
+
+Bug-Description:
+
+Bash should not check for mail while executing the `eval' builtin.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y Fri Feb 25 12:07:41 2011
+--- parse.y Thu Aug 11 19:02:26 2011
+***************
+*** 2500,2504 ****
+ is the mail alarm reset; nothing takes place in check_mail ()
+ except the checking of mail. Please don't change this. */
+! if (prompt_is_ps1 && time_to_check_mail ())
+ {
+ check_mail ();
+--- 2498,2502 ----
+ is the mail alarm reset; nothing takes place in check_mail ()
+ except the checking of mail. Please don't change this. */
+! if (prompt_is_ps1 && parse_and_execute_level == 0 && time_to_check_mail ())
+ {
+ check_mail ();
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-017 b/patches/source/bash/bash-4.2-patches/bash42-017
new file mode 100644
index 00000000..010ed1e5
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-017
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-017
+
+Bug-Reported-by: Curtis Doty <Curtis@GreenKey.net>
+Bug-Reference-ID: <20110621035324.A4F70849F59@mx1.iParadigms.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00053.html
+
+Bug-Description:
+
+Using `read -a foo' where foo was an already-declared associative array
+caused the shell to die with a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2011-01-04 11:43:36.000000000 -0500
+--- builtins/read.def 2011-06-21 10:31:02.000000000 -0400
+***************
+*** 643,646 ****
+--- 642,651 ----
+ return EXECUTION_FAILURE; /* readonly or noassign */
+ }
++ if (assoc_p (var))
++ {
++ builtin_error (_("%s: cannot convert associative to indexed array"), arrayname);
++ xfree (input_string);
++ return EXECUTION_FAILURE; /* existing associative array */
++ }
+ array_flush (array_cell (var));
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-018 b/patches/source/bash/bash-4.2-patches/bash42-018
new file mode 100644
index 00000000..5d11dce1
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-018
@@ -0,0 +1,74 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-018
+
+Bug-Reported-by: Thomas Cort <tcort@minix3.org>
+Bug-Reference-ID: <BANLkTik-ebGGw3k_1YtB=RyfV1bsqdxC_g@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00110.html
+
+Bug-Description:
+
+Bash fails to compile unless JOB_CONTROL is defined.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/execute_cmd.c 2011-02-09 17:32:25.000000000 -0500
+--- execute_cmd.c 2011-11-06 15:12:48.000000000 -0500
+***************
+*** 2197,2200 ****
+--- 2315,2319 ----
+ cmd->flags |= CMD_IGNORE_RETURN;
+
++ #if defined (JOB_CONTROL)
+ lastpipe_flag = 0;
+ begin_unwind_frame ("lastpipe-exec");
+***************
+*** 2216,2228 ****
+ add_unwind_protect (lastpipe_cleanup, lastpipe_jid);
+ }
+! cmd->flags |= CMD_LASTPIPE;
+ }
+ if (prev >= 0)
+ add_unwind_protect (close, prev);
+
+ exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close);
+
+ if (lstdin > 0)
+ restore_stdin (lstdin);
+
+ if (prev >= 0)
+--- 2335,2351 ----
+ add_unwind_protect (lastpipe_cleanup, lastpipe_jid);
+ }
+! if (cmd)
+! cmd->flags |= CMD_LASTPIPE;
+ }
+ if (prev >= 0)
+ add_unwind_protect (close, prev);
++ #endif
+
+ exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close);
+
++ #if defined (JOB_CONTROL)
+ if (lstdin > 0)
+ restore_stdin (lstdin);
++ #endif
+
+ if (prev >= 0)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-019 b/patches/source/bash/bash-4.2-patches/bash42-019
new file mode 100644
index 00000000..5fce40ae
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-019
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-019
+
+Bug-Reported-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
+Bug-Reference-ID: <CAGOxLdHcSQu3ck9Qy3pRjj_NBU5tAPSAvNm-95-nLQ9Szwb6aA@mail.gmail.com>
+Bug-Reference-URL: lists.gnu.org/archive/html/bug-bash/2011-09/msg00047.html
+
+Bug-Description:
+
+Using `declare' with attributes and an invalid array variable name or
+assignment reference resulted in a segmentation fault instead of a
+declaration error.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/declare.def 2010-05-30 18:25:21.000000000 -0400
+--- builtins/declare.def 2011-09-15 15:20:20.000000000 -0400
+***************
+*** 514,517 ****
+--- 514,522 ----
+ var = assign_array_element (name, value, 0); /* XXX - not aflags */
+ *subscript_start = '\0';
++ if (var == 0) /* some kind of assignment error */
++ {
++ assign_error++;
++ NEXT_VARIABLE ();
++ }
+ }
+ else if (simple_array_assign)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-020 b/patches/source/bash/bash-4.2-patches/bash42-020
new file mode 100644
index 00000000..a1dd0443
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-020
@@ -0,0 +1,60 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-020
+
+Bug-Reported-by: Vincent Sheffer <vince.sheffer@apisphere.com>
+Bug-Reference-ID: <F13C1C4F-C44C-4071-BFED-4BB6D13CF92F@apisphere.com>
+Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2011-08/msg00000.html
+
+Bug-Description:
+
+The shared object helper script needs to be updated for Mac OS X 10.7
+(Lion, darwin11).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/support/shobj-conf 2009-10-28 09:20:21.000000000 -0400
+--- support/shobj-conf 2011-08-27 13:25:23.000000000 -0400
+***************
+*** 158,162 ****
+
+ # Darwin/MacOS X
+! darwin[89]*|darwin10*)
+ SHOBJ_STATUS=supported
+ SHLIB_STATUS=supported
+--- 172,176 ----
+
+ # Darwin/MacOS X
+! darwin[89]*|darwin1[012]*)
+ SHOBJ_STATUS=supported
+ SHLIB_STATUS=supported
+***************
+*** 187,191 ****
+
+ case "${host_os}" in
+! darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+--- 201,205 ----
+
+ case "${host_os}" in
+! darwin[789]*|darwin1[012]*) SHOBJ_LDFLAGS=''
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-021 b/patches/source/bash/bash-4.2-patches/bash42-021
new file mode 100644
index 00000000..b6153c78
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-021
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-021
+
+Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
+Bug-Reference-ID: <4585554.nZWb4q7YoZ@smorgbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-12/msg00084.html
+
+Bug-Description:
+
+Using `read -N' to assign values to an array can result in NUL values being
+assigned to some array elements. These values cause seg faults when referenced
+later.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2011-11-21 18:03:38.000000000 -0500
+--- builtins/read.def 2011-12-19 19:52:12.000000000 -0500
+***************
+*** 738,742 ****
+ }
+ else
+! var = bind_read_variable (varname, t);
+ }
+ else
+--- 775,779 ----
+ }
+ else
+! var = bind_read_variable (varname, t ? t : "");
+ }
+ else
+***************
+*** 799,803 ****
+ }
+ else
+! var = bind_read_variable (list->word->word, input_string);
+
+ if (var)
+--- 836,840 ----
+ }
+ else
+! var = bind_read_variable (list->word->word, input_string ? input_string : "");
+
+ if (var)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-022 b/patches/source/bash/bash-4.2-patches/bash42-022
new file mode 100644
index 00000000..0067b133
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-022
@@ -0,0 +1,61 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-022
+
+Bug-Reported-by: Gregory Margo <gmargo@pacbell.net>
+Bug-Reference-ID: <20110727174529.GA3333@pacbell.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-07/msg00102.html
+
+Bug-Description:
+
+The return value from lseek is `off_t'. This can cause corrupted return
+values when the file offset is greater than 2**31 - 1.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/sh/zread.c Mon Mar 2 08:54:45 2009
+--- lib/sh/zread.c Thu Jul 28 18:16:53 2011
+***************
+*** 161,166 ****
+ int fd;
+ {
+! off_t off;
+! int r;
+
+ off = lused - lind;
+--- 161,165 ----
+ int fd;
+ {
+! off_t off, r;
+
+ off = lused - lind;
+***************
+*** 169,173 ****
+ r = lseek (fd, -off, SEEK_CUR);
+
+! if (r >= 0)
+ lused = lind = 0;
+ }
+--- 168,172 ----
+ r = lseek (fd, -off, SEEK_CUR);
+
+! if (r != -1)
+ lused = lind = 0;
+ }
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-023 b/patches/source/bash/bash-4.2-patches/bash42-023
new file mode 100644
index 00000000..4f204efb
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-023
@@ -0,0 +1,62 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-023
+
+Bug-Reported-by: Ewan Mellor <Ewan.Mellor@eu.citrix.com>
+Bug-Reference-ID: <6005BE083BF501439A84DC3523BAC82DC4B964FD12@LONPMAILBOX01.citrite.net>
+Bug-Reference-URL:
+
+Bug-Description:
+
+Under some circumstances, an exit trap triggered by a bad substitution
+error when errexit is enabled will cause the shell to exit with an
+incorrect exit status (0).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2011-11-21 12:04:38.000000000 -0500
+--- subst.c 2012-02-08 13:36:28.000000000 -0500
+***************
+*** 7275,7278 ****
+--- 7281,7285 ----
+ case '\0':
+ bad_substitution:
++ last_command_exit_value = EXECUTION_FAILURE;
+ report_error (_("%s: bad substitution"), string ? string : "??");
+ FREE (value);
+*** ../bash-4.2-patched/error.c 2009-08-21 22:31:31.000000000 -0400
+--- error.c 2012-02-25 15:54:40.000000000 -0500
+***************
+*** 201,205 ****
+ va_end (args);
+ if (exit_immediately_on_error)
+! exit_shell (1);
+ }
+
+--- 201,209 ----
+ va_end (args);
+ if (exit_immediately_on_error)
+! {
+! if (last_command_exit_value == 0)
+! last_command_exit_value = 1;
+! exit_shell (last_command_exit_value);
+! }
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-024 b/patches/source/bash/bash-4.2-patches/bash42-024
new file mode 100644
index 00000000..b7b1158b
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-024
@@ -0,0 +1,45 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-024
+
+Bug-Reported-by: Jim Avera <james_avera@yahoo.com>
+Bug-Reference-ID: <4F29E07A.80405@yahoo.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00001.html
+
+Bug-Description:
+
+When `printf -v' is used to set an array element, the format string contains
+`%b', and the corresponding argument is the empty string, the buffer used
+to store the value to be assigned can be NULL, which results in NUL being
+assigned to the array element. This causes a seg fault when it's used later.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/printf.def 2011-02-25 12:07:41.000000000 -0500
+--- builtins/printf.def 2012-02-02 08:37:12.000000000 -0500
+***************
+*** 256,259 ****
+--- 257,262 ----
+ {
+ vflag = 1;
++ if (vbsize == 0)
++ vbuf = xmalloc (vbsize = 16);
+ vblen = 0;
+ if (vbuf)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-025 b/patches/source/bash/bash-4.2-patches/bash42-025
new file mode 100644
index 00000000..34ac3430
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-025
@@ -0,0 +1,143 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-025
+
+Bug-Reported-by: Bill Gradwohl <bill@ycc.com>
+Bug-Reference-ID: <CAFyvKis-UfuOWr5THBRKh=vYHDoKEEgdW8hN1RviTuYQ00Lu5A@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/help-bash/2012-03/msg00078.html
+
+Bug-Description:
+
+When used in a shell function, `declare -g -a array=(compound assignment)'
+creates a local variable instead of a global one.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/command.h 2010-08-02 19:36:51.000000000 -0400
+--- command.h 2012-04-01 12:38:35.000000000 -0400
+***************
+*** 98,101 ****
+--- 98,102 ----
+ #define W_ASSIGNASSOC 0x400000 /* word looks like associative array assignment */
+ #define W_ARRAYIND 0x800000 /* word is an array index being expanded */
++ #define W_ASSNGLOBAL 0x1000000 /* word is a global assignment to declare (declare/typeset -g) */
+
+ /* Possible values for subshell_environment */
+*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 18:03:41.000000000 -0500
+--- execute_cmd.c 2012-04-01 12:42:03.000000000 -0400
+***************
+*** 3581,3585 ****
+ WORD_LIST *w;
+ struct builtin *b;
+! int assoc;
+
+ if (words == 0)
+--- 3581,3585 ----
+ WORD_LIST *w;
+ struct builtin *b;
+! int assoc, global;
+
+ if (words == 0)
+***************
+*** 3587,3591 ****
+
+ b = 0;
+! assoc = 0;
+
+ for (w = words; w; w = w->next)
+--- 3587,3591 ----
+
+ b = 0;
+! assoc = global = 0;
+
+ for (w = words; w; w = w->next)
+***************
+*** 3604,3607 ****
+--- 3604,3609 ----
+ if (assoc)
+ w->word->flags |= W_ASSIGNASSOC;
++ if (global)
++ w->word->flags |= W_ASSNGLOBAL;
+ #endif
+ }
+***************
+*** 3609,3613 ****
+ /* Note that we saw an associative array option to a builtin that takes
+ assignment statements. This is a bit of a kludge. */
+! else if (w->word->word[0] == '-' && strchr (w->word->word, 'A'))
+ {
+ if (b == 0)
+--- 3611,3618 ----
+ /* Note that we saw an associative array option to a builtin that takes
+ assignment statements. This is a bit of a kludge. */
+! else if (w->word->word[0] == '-' && (strchr (w->word->word+1, 'A') || strchr (w->word->word+1, 'g')))
+! #else
+! else if (w->word->word[0] == '-' && strchr (w->word->word+1, 'g'))
+! #endif
+ {
+ if (b == 0)
+***************
+*** 3619,3626 ****
+ words->word->flags |= W_ASSNBLTIN;
+ }
+! if (words->word->flags & W_ASSNBLTIN)
+ assoc = 1;
+ }
+- #endif
+ }
+
+--- 3624,3632 ----
+ words->word->flags |= W_ASSNBLTIN;
+ }
+! if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'A'))
+ assoc = 1;
++ if ((words->word->flags & W_ASSNBLTIN) && strchr (w->word->word+1, 'g'))
++ global = 1;
+ }
+ }
+
+*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400
+--- subst.c 2012-04-01 12:38:35.000000000 -0400
+***************
+*** 367,370 ****
+--- 367,375 ----
+ fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : "");
+ }
++ if (f & W_ASSNGLOBAL)
++ {
++ f &= ~W_ASSNGLOBAL;
++ fprintf (stderr, "W_ASSNGLOBAL%s", f ? "|" : "");
++ }
+ if (f & W_COMPASSIGN)
+ {
+***************
+*** 2804,2808 ****
+ else if (assign_list)
+ {
+! if (word->flags & W_ASSIGNARG)
+ aflags |= ASS_MKLOCAL;
+ if (word->flags & W_ASSIGNASSOC)
+--- 2809,2813 ----
+ else if (assign_list)
+ {
+! if ((word->flags & W_ASSIGNARG) && (word->flags & W_ASSNGLOBAL) == 0)
+ aflags |= ASS_MKLOCAL;
+ if (word->flags & W_ASSIGNASSOC)
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-026 b/patches/source/bash/bash-4.2-patches/bash42-026
new file mode 100644
index 00000000..e15d7480
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-026
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-026
+
+Bug-Reported-by: Greg Wooledge <wooledg@eeg.ccf.org>
+Bug-Reference-ID: <20120425180443.GO22241@eeg.ccf.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00172.html
+
+Bug-Description:
+
+The `lastpipe' option does not behave correctly on machines where the
+open file limit is less than 256.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/execute_cmd.c 2011-11-21 12:04:47.000000000 -0500
+--- execute_cmd.c 2012-04-26 11:09:30.000000000 -0400
+***************
+*** 2206,2210 ****
+ if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
+ {
+! lstdin = move_to_high_fd (0, 0, 255);
+ if (lstdin > 0)
+ {
+--- 2325,2329 ----
+ if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0)
+ {
+! lstdin = move_to_high_fd (0, 1, -1);
+ if (lstdin > 0)
+ {
+***************
+*** 2252,2256 ****
+--- 2371,2377 ----
+ }
+
++ #if defined (JOB_CONTROL)
+ discard_unwind_frame ("lastpipe-exec");
++ #endif
+
+ return (exec_result);
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 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/patches/source/bash/bash-4.2-patches/bash42-027 b/patches/source/bash/bash-4.2-patches/bash42-027
new file mode 100644
index 00000000..c0c5d3f8
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-027
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-027
+
+Bug-Reported-by: Mike Frysinger <vapier@gentoo.org>
+Bug-Reference-ID: <201204211243.30163.vapier@gentoo.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00134.html
+
+Bug-Description:
+
+When the `extglob' shell option is enabled, pattern substitution does not
+work correctly in the presence of multibyte characters.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-03-11 17:52:57.000000000 -0400
+--- subst.c 2012-04-22 16:19:10.000000000 -0400
+***************
+*** 4167,4171 ****
+ #if defined (EXTENDED_GLOB)
+ if (extended_glob)
+! simple |= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/
+ #endif
+
+--- 4167,4171 ----
+ #if defined (EXTENDED_GLOB)
+ if (extended_glob)
+! simple &= (wpat[1] != L'(' || (wpat[0] != L'*' && wpat[0] != L'?' && wpat[0] != L'+' && wpat[0] != L'!' && wpat[0] != L'@')); /*)*/
+ #endif
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 26
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 27
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-028 b/patches/source/bash/bash-4.2-patches/bash42-028
new file mode 100644
index 00000000..fa3be3b4
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-028
@@ -0,0 +1,52 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-028
+
+Bug-Reported-by: Mark Edgar <medgar123@gmail.com>
+Bug-Reference-ID: <CABHMh_3d+ZgO_zaEtYXPwK4P7tC0ghZ4g=Ue_TRpsEMf5YDsqw@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00109.html
+
+Bug-Description:
+
+When using a word expansion for which the right hand side is evaluated,
+certain expansions of quoted null strings include spurious ^? characters.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-03-11 17:35:13.000000000 -0400
+--- subst.c 2012-03-20 19:30:13.000000000 -0400
+***************
+*** 5810,5813 ****
+--- 5810,5823 ----
+ if (qdollaratp && ((hasdol && quoted) || l->next))
+ *qdollaratp = 1;
++ /* If we have a quoted null result (QUOTED_NULL(temp)) and the word is
++ a quoted null (l->next == 0 && QUOTED_NULL(l->word->word)), the
++ flags indicate it (l->word->flags & W_HASQUOTEDNULL), and the
++ expansion is quoted (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
++ (which is more paranoia than anything else), we need to return the
++ quoted null string and set the flags to indicate it. */
++ if (l->next == 0 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && QUOTED_NULL(temp) && QUOTED_NULL(l->word->word) && (l->word->flags & W_HASQUOTEDNULL))
++ {
++ w->flags |= W_HASQUOTEDNULL;
++ }
+ dispose_words (l);
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 27
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 28
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-029 b/patches/source/bash/bash-4.2-patches/bash42-029
new file mode 100644
index 00000000..c51704ca
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-029
@@ -0,0 +1,524 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-029
+
+Bug-Reported-by: "Michael Kalisz" <michael@kalisz.homelinux.net>
+Bug-Reference-ID: <50241.78.69.11.112.1298585641.squirrel@kalisz.homelinux.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00274.html
+
+Bug-Description:
+
+Bash-4.2 tries to leave completed directory names as the user typed them,
+without expanding them to a full pathname. One effect of this is that
+shell variables used in pathnames being completed (e.g., $HOME) are left
+unchanged, but the `$' is quoted by readline because it is a special
+character to the shell.
+
+This patch introduces two things:
+
+1. A new shell option, `direxpand', which, if set, attempts to emulate the
+ bash-4.1 behavior of expanding words to full pathnames during
+ completion;
+2. A set of heuristics that reduce the number of times special characters
+ such as `$' are quoted when the directory name is not expanded.
+
+Patch (apply with `patch -p0'):
+
+diff -NrC 2 ../bash-4.2-patched/bashline.c ./bashline.c
+*** ../bash-4.2-patched/bashline.c 2011-01-16 15:32:47.000000000 -0500
+--- ./bashline.c 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 122,125 ****
+--- 122,128 ----
+ static int bash_push_line __P((void));
+
++ static rl_icppfunc_t *save_directory_hook __P((void));
++ static void reset_directory_hook __P((rl_icppfunc_t *));
++
+ static void cleanup_expansion_error __P((void));
+ static void maybe_make_readline_line __P((char *));
+***************
+*** 244,251 ****
+--- 247,261 ----
+ int dircomplete_spelling = 0;
+
++ /* Expand directory names during word/filename completion. */
++ int dircomplete_expand = 0;
++ int dircomplete_expand_relpath = 0;
++
+ static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:";
+ static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:";
+ /* )) */
+
++ static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/
++ static char *custom_filename_quote_characters = 0;
++
+ static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL;
+
+***************
+*** 502,506 ****
+ /* Tell the completer that we might want to follow symbolic links or
+ do other expansion on directory names. */
+! rl_directory_rewrite_hook = bash_directory_completion_hook;
+
+ rl_filename_rewrite_hook = bash_filename_rewrite_hook;
+--- 512,516 ----
+ /* Tell the completer that we might want to follow symbolic links or
+ do other expansion on directory names. */
+! set_directory_hook ();
+
+ rl_filename_rewrite_hook = bash_filename_rewrite_hook;
+***************
+*** 530,534 ****
+
+ /* characters that need to be quoted when appearing in filenames. */
+! rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/
+
+ rl_filename_quoting_function = bash_quote_filename;
+--- 540,544 ----
+
+ /* characters that need to be quoted when appearing in filenames. */
+! rl_filename_quote_characters = default_filename_quote_characters;
+
+ rl_filename_quoting_function = bash_quote_filename;
+***************
+*** 565,570 ****
+ rl_attempted_completion_function = attempt_shell_completion;
+ rl_completion_entry_function = NULL;
+- rl_directory_rewrite_hook = bash_directory_completion_hook;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+ }
+
+--- 575,582 ----
+ rl_attempted_completion_function = attempt_shell_completion;
+ rl_completion_entry_function = NULL;
+ rl_ignore_some_completions_function = filename_completion_ignore;
++ rl_filename_quote_characters = default_filename_quote_characters;
++
++ set_directory_hook ();
+ }
+
+***************
+*** 1280,1283 ****
+--- 1292,1298 ----
+ rl_ignore_some_completions_function = filename_completion_ignore;
+
++ rl_filename_quote_characters = default_filename_quote_characters;
++ set_directory_hook ();
++
+ /* Determine if this could be a command word. It is if it appears at
+ the start of the line (ignoring preceding whitespace), or if it
+***************
+*** 1592,1595 ****
+--- 1607,1616 ----
+ else
+ {
++ if (dircomplete_expand && dot_or_dotdot (filename_hint))
++ {
++ dircomplete_expand = 0;
++ set_directory_hook ();
++ dircomplete_expand = 1;
++ }
+ mapping_over = 4;
+ goto inner;
+***************
+*** 1792,1795 ****
+--- 1813,1819 ----
+ inner:
+ val = rl_filename_completion_function (filename_hint, istate);
++ if (mapping_over == 4 && dircomplete_expand)
++ set_directory_hook ();
++
+ istate = 1;
+
+***************
+*** 2694,2697 ****
+--- 2718,2767 ----
+ }
+
++ /* Functions to save and restore the appropriate directory hook */
++ /* This is not static so the shopt code can call it */
++ void
++ set_directory_hook ()
++ {
++ if (dircomplete_expand)
++ {
++ rl_directory_completion_hook = bash_directory_completion_hook;
++ rl_directory_rewrite_hook = (rl_icppfunc_t *)0;
++ }
++ else
++ {
++ rl_directory_rewrite_hook = bash_directory_completion_hook;
++ rl_directory_completion_hook = (rl_icppfunc_t *)0;
++ }
++ }
++
++ static rl_icppfunc_t *
++ save_directory_hook ()
++ {
++ rl_icppfunc_t *ret;
++
++ if (dircomplete_expand)
++ {
++ ret = rl_directory_completion_hook;
++ rl_directory_completion_hook = (rl_icppfunc_t *)NULL;
++ }
++ else
++ {
++ ret = rl_directory_rewrite_hook;
++ rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL;
++ }
++
++ return ret;
++ }
++
++ static void
++ restore_directory_hook (hookf)
++ rl_icppfunc_t *hookf;
++ {
++ if (dircomplete_expand)
++ rl_directory_completion_hook = hookf;
++ else
++ rl_directory_rewrite_hook = hookf;
++ }
++
+ /* Handle symbolic link references and other directory name
+ expansions while hacking completion. This should return 1 if it modifies
+***************
+*** 2703,2720 ****
+ {
+ char *local_dirname, *new_dirname, *t;
+! int return_value, should_expand_dirname;
+ WORD_LIST *wl;
+ struct stat sb;
+
+! return_value = should_expand_dirname = 0;
+ local_dirname = *dirname;
+
+! if (mbschr (local_dirname, '$'))
+! should_expand_dirname = 1;
+ else
+ {
+ t = mbschr (local_dirname, '`');
+ if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0)
+! should_expand_dirname = 1;
+ }
+
+--- 2773,2801 ----
+ {
+ char *local_dirname, *new_dirname, *t;
+! int return_value, should_expand_dirname, nextch, closer;
+ WORD_LIST *wl;
+ struct stat sb;
+
+! return_value = should_expand_dirname = nextch = closer = 0;
+ local_dirname = *dirname;
+
+! if (t = mbschr (local_dirname, '$'))
+! {
+! should_expand_dirname = '$';
+! nextch = t[1];
+! /* Deliberately does not handle the deprecated $[...] arithmetic
+! expansion syntax */
+! if (nextch == '(')
+! closer = ')';
+! else if (nextch == '{')
+! closer = '}';
+! else
+! nextch = 0;
+! }
+ else
+ {
+ t = mbschr (local_dirname, '`');
+ if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0)
+! should_expand_dirname = '`';
+ }
+
+***************
+*** 2740,2743 ****
+--- 2821,2841 ----
+ dispose_words (wl);
+ local_dirname = *dirname;
++ /* XXX - change rl_filename_quote_characters here based on
++ should_expand_dirname/nextch/closer. This is the only place
++ custom_filename_quote_characters is modified. */
++ if (rl_filename_quote_characters && *rl_filename_quote_characters)
++ {
++ int i, j, c;
++ i = strlen (default_filename_quote_characters);
++ custom_filename_quote_characters = xrealloc (custom_filename_quote_characters, i+1);
++ for (i = j = 0; c = default_filename_quote_characters[i]; i++)
++ {
++ if (c == should_expand_dirname || c == nextch || c == closer)
++ continue;
++ custom_filename_quote_characters[j++] = c;
++ }
++ custom_filename_quote_characters[j] = '\0';
++ rl_filename_quote_characters = custom_filename_quote_characters;
++ }
+ }
+ else
+***************
+*** 2759,2762 ****
+--- 2857,2871 ----
+ }
+
++ /* no_symbolic_links == 0 -> use (default) logical view of the file system.
++ local_dirname[0] == '.' && local_dirname[1] == '/' means files in the
++ current directory (./).
++ local_dirname[0] == '.' && local_dirname[1] == 0 means relative pathnames
++ in the current directory (e.g., lib/sh).
++ XXX - should we do spelling correction on these? */
++
++ /* This is test as it was in bash-4.2: skip relative pathnames in current
++ directory. Change test to
++ (local_dirname[0] != '.' || (local_dirname[1] && local_dirname[1] != '/'))
++ if we want to skip paths beginning with ./ also. */
+ if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1]))
+ {
+***************
+*** 2764,2767 ****
+--- 2873,2885 ----
+ int len1, len2;
+
++ /* If we have a relative path
++ (local_dirname[0] != '/' && local_dirname[0] != '.')
++ that is canonical after appending it to the current directory, then
++ temp1 = temp2+'/'
++ That is,
++ strcmp (temp1, temp2) == 0
++ after adding a slash to temp2 below. It should be safe to not
++ change those.
++ */
+ t = get_working_directory ("symlink-hook");
+ temp1 = make_absolute (local_dirname, t);
+***************
+*** 2798,2802 ****
+ }
+ }
+! return_value |= STREQ (local_dirname, temp2) == 0;
+ free (local_dirname);
+ *dirname = temp2;
+--- 2916,2928 ----
+ }
+ }
+!
+! /* dircomplete_expand_relpath == 0 means we want to leave relative
+! pathnames that are unchanged by canonicalization alone.
+! *local_dirname != '/' && *local_dirname != '.' == relative pathname
+! (consistent with general.c:absolute_pathname())
+! temp1 == temp2 (after appending a slash to temp2) means the pathname
+! is not changed by canonicalization as described above. */
+! if (dircomplete_expand_relpath || ((local_dirname[0] != '/' && local_dirname[0] != '.') && STREQ (temp1, temp2) == 0))
+! return_value |= STREQ (local_dirname, temp2) == 0;
+ free (local_dirname);
+ *dirname = temp2;
+***************
+*** 3003,3012 ****
+ orig_func = rl_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+- orig_dir_func = rl_directory_rewrite_hook;
+ orig_ignore_func = rl_ignore_some_completions_function;
+ orig_rl_completer_word_break_characters = rl_completer_word_break_characters;
+ rl_completion_entry_function = rl_filename_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+- rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+ rl_completer_word_break_characters = " \t\n\"\'";
+--- 3129,3139 ----
+ orig_func = rl_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+ orig_ignore_func = rl_ignore_some_completions_function;
+ orig_rl_completer_word_break_characters = rl_completer_word_break_characters;
++
++ orig_dir_func = save_directory_hook ();
++
+ rl_completion_entry_function = rl_filename_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+ rl_completer_word_break_characters = " \t\n\"\'";
+***************
+*** 3016,3023 ****
+ rl_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+- rl_directory_rewrite_hook = orig_dir_func;
+ rl_ignore_some_completions_function = orig_ignore_func;
+ rl_completer_word_break_characters = orig_rl_completer_word_break_characters;
+
+ return r;
+ }
+--- 3143,3151 ----
+ rl_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+ rl_ignore_some_completions_function = orig_ignore_func;
+ rl_completer_word_break_characters = orig_rl_completer_word_break_characters;
+
++ restore_directory_hook (orig_dir_func);
++
+ return r;
+ }
+diff -NrC 2 ../bash-4.2-patched/bashline.h ./bashline.h
+*** ../bash-4.2-patched/bashline.h 2009-01-04 14:32:22.000000000 -0500
+--- ./bashline.h 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 34,41 ****
+--- 34,46 ----
+ extern int bash_re_edit __P((char *));
+
++ extern void bashline_set_event_hook __P((void));
++ extern void bashline_reset_event_hook __P((void));
++
+ extern int bind_keyseq_to_unix_command __P((char *));
+
+ extern char **bash_default_completion __P((const char *, int, int, int, int));
+
++ void set_directory_hook __P((void));
++
+ /* Used by programmable completion code. */
+ extern char *command_word_completion_function __P((const char *, int));
+diff -NrC 2 ../bash-4.2-patched/builtins/shopt.def ./builtins/shopt.def
+*** ../bash-4.2-patched/builtins/shopt.def 2010-07-02 22:42:44.000000000 -0400
+--- ./builtins/shopt.def 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 62,65 ****
+--- 62,69 ----
+ #include "bashgetopt.h"
+
++ #if defined (READLINE)
++ # include "../bashline.h"
++ #endif
++
+ #if defined (HISTORY)
+ # include "../bashhist.h"
+***************
+*** 95,99 ****
+ extern int no_empty_command_completion;
+ extern int force_fignore;
+! extern int dircomplete_spelling;
+
+ extern int enable_hostname_completion __P((int));
+--- 99,103 ----
+ extern int no_empty_command_completion;
+ extern int force_fignore;
+! extern int dircomplete_spelling, dircomplete_expand;
+
+ extern int enable_hostname_completion __P((int));
+***************
+*** 122,125 ****
+--- 126,133 ----
+ #endif
+
++ #if defined (READLINE)
++ static int shopt_set_complete_direxpand __P((char *, int));
++ #endif
++
+ static int shopt_login_shell;
+ static int shopt_compat31;
+***************
+*** 151,154 ****
+--- 159,163 ----
+ { "compat41", &shopt_compat41, set_compatibility_level },
+ #if defined (READLINE)
++ { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand },
+ { "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL },
+ #endif
+***************
+*** 536,539 ****
+--- 545,559 ----
+ }
+
++ #if defined (READLINE)
++ static int
++ shopt_set_complete_direxpand (option_name, mode)
++ char *option_name;
++ int mode;
++ {
++ set_directory_hook ();
++ return 0;
++ }
++ #endif
++
+ #if defined (RESTRICTED_SHELL)
+ /* Don't allow the value of restricted_shell to be modified. */
+Binary files ../bash-4.2-patched/doc/._bashref.pdf and ./doc/._bashref.pdf differ
+diff -NrC 2 ../bash-4.2-patched/doc/bash.1 ./doc/bash.1
+*** ../bash-4.2-patched/doc/bash.1 2011-01-16 15:31:39.000000000 -0500
+--- ./doc/bash.1 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 8949,8952 ****
+--- 8949,8962 ----
+ The default bash behavior remains as in previous versions.
+ .TP 8
++ .B direxpand
++ If set,
++ .B bash
++ replaces directory names with the results of word expansion when performing
++ filename completion. This changes the contents of the readline editing
++ buffer.
++ If not set,
++ .B bash
++ attempts to preserve what the user typed.
++ .TP 8
+ .B dirspell
+ If set,
+diff -NrC 2 ../bash-4.2-patched/doc/bashref.texi ./doc/bashref.texi
+*** ../bash-4.2-patched/doc/bashref.texi 2011-01-16 15:31:57.000000000 -0500
+--- ./doc/bashref.texi 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 4536,4539 ****
+--- 4536,4546 ----
+ The default Bash behavior remains as in previous versions.
+
++ @item direxpand
++ If set, Bash
++ replaces directory names with the results of word expansion when performing
++ filename completion. This changes the contents of the readline editing
++ buffer.
++ If not set, Bash attempts to preserve what the user typed.
++
+ @item dirspell
+ If set, Bash
+diff -NrC 2 ../bash-4.2-patched/tests/shopt.right ./tests/shopt.right
+*** ../bash-4.2-patched/tests/shopt.right 2010-07-02 23:36:30.000000000 -0400
+--- ./tests/shopt.right 2012-05-07 16:27:18.000000000 -0400
+***************
+*** 13,16 ****
+--- 13,17 ----
+ shopt -u compat40
+ shopt -u compat41
++ shopt -u direxpand
+ shopt -u dirspell
+ shopt -u dotglob
+***************
+*** 69,72 ****
+--- 70,74 ----
+ shopt -u compat40
+ shopt -u compat41
++ shopt -u direxpand
+ shopt -u dirspell
+ shopt -u dotglob
+***************
+*** 102,105 ****
+--- 104,108 ----
+ compat40 off
+ compat41 off
++ direxpand off
+ dirspell off
+ dotglob off
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 28
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 29
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-030 b/patches/source/bash/bash-4.2-patches/bash42-030
new file mode 100644
index 00000000..261a619b
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-030
@@ -0,0 +1,178 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-030
+
+Bug-Reported-by: Roman Rakus <rrakus@redhat.com>
+Bug-Reference-ID: <4D7DD91E.7040808@redhat.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2011-03/msg00126.html
+
+Bug-Description:
+
+When attempting to glob strings in a multibyte locale, and those strings
+contain invalid multibyte characters that cause mbsnrtowcs to return 0,
+the globbing code loops infinitely.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2010-05-30 18:36:27.000000000 -0400
+--- lib/glob/xmbsrtowcs.c 2011-03-22 16:06:47.000000000 -0400
+***************
+*** 36,39 ****
+--- 36,41 ----
+ #if HANDLE_MULTIBYTE
+
++ #define WSBUF_INC 32
++
+ #ifndef FREE
+ # define FREE(x) do { if (x) free (x); } while (0)
+***************
+*** 149,153 ****
+ size_t wcnum; /* Number of wide characters in WSBUF */
+ mbstate_t state; /* Conversion State */
+! size_t wcslength; /* Number of wide characters produced by the conversion. */
+ const char *end_or_backslash;
+ size_t nms; /* Number of multibyte characters to convert at one time. */
+--- 151,155 ----
+ size_t wcnum; /* Number of wide characters in WSBUF */
+ mbstate_t state; /* Conversion State */
+! size_t n, wcslength; /* Number of wide characters produced by the conversion. */
+ const char *end_or_backslash;
+ size_t nms; /* Number of multibyte characters to convert at one time. */
+***************
+*** 172,176 ****
+ tmp_p = p;
+ tmp_state = state;
+! wcslength = mbsnrtowcs(NULL, &tmp_p, nms, 0, &tmp_state);
+
+ /* Conversion failed. */
+--- 174,189 ----
+ tmp_p = p;
+ tmp_state = state;
+!
+! if (nms == 0 && *p == '\\') /* special initial case */
+! nms = wcslength = 1;
+! else
+! wcslength = mbsnrtowcs (NULL, &tmp_p, nms, 0, &tmp_state);
+!
+! if (wcslength == 0)
+! {
+! tmp_p = p; /* will need below */
+! tmp_state = state;
+! wcslength = 1; /* take a single byte */
+! }
+
+ /* Conversion failed. */
+***************
+*** 187,191 ****
+ wchar_t *wstmp;
+
+! wsbuf_size = wcnum+wcslength+1; /* 1 for the L'\0' or the potential L'\\' */
+
+ wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
+--- 200,205 ----
+ wchar_t *wstmp;
+
+! while (wsbuf_size < wcnum+wcslength+1) /* 1 for the L'\0' or the potential L'\\' */
+! wsbuf_size += WSBUF_INC;
+
+ wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
+***************
+*** 200,207 ****
+
+ /* Perform the conversion. This is assumed to return 'wcslength'.
+! * It may set 'p' to NULL. */
+! mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+
+! wcnum += wcslength;
+
+ if (mbsinit (&state) && (p != NULL) && (*p == '\\'))
+--- 214,229 ----
+
+ /* Perform the conversion. This is assumed to return 'wcslength'.
+! It may set 'p' to NULL. */
+! n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+
+! /* Compensate for taking single byte on wcs conversion failure above. */
+! if (wcslength == 1 && (n == 0 || n == (size_t)-1))
+! {
+! state = tmp_state;
+! p = tmp_p;
+! wsbuf[wcnum++] = *p++;
+! }
+! else
+! wcnum += wcslength;
+
+ if (mbsinit (&state) && (p != NULL) && (*p == '\\'))
+***************
+*** 231,236 ****
+ of DESTP and INDICESP are NULL. */
+
+- #define WSBUF_INC 32
+-
+ size_t
+ xdupmbstowcs (destp, indicesp, src)
+--- 253,256 ----
+*** ../bash-4.2-patched/lib/glob/glob.c 2009-11-14 18:39:30.000000000 -0500
+--- lib/glob/glob.c 2012-07-07 12:09:56.000000000 -0400
+***************
+*** 201,206 ****
+ size_t pat_n, dn_n;
+
+ pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+! dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+
+ ret = 0;
+--- 201,209 ----
+ size_t pat_n, dn_n;
+
++ pat_wc = dn_wc = (wchar_t *)NULL;
++
+ pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+! if (pat_n != (size_t)-1)
+! dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+
+ ret = 0;
+***************
+*** 222,225 ****
+--- 225,230 ----
+ ret = 1;
+ }
++ else
++ ret = skipname (pat, dname, flags);
+
+ FREE (pat_wc);
+***************
+*** 267,272 ****
+ n = xdupmbstowcs (&wpathname, NULL, pathname);
+ if (n == (size_t) -1)
+! /* Something wrong. */
+! return;
+ orig_wpathname = wpathname;
+
+--- 272,280 ----
+ n = xdupmbstowcs (&wpathname, NULL, pathname);
+ if (n == (size_t) -1)
+! {
+! /* Something wrong. Fall back to single-byte */
+! udequote_pathname (pathname);
+! return;
+! }
+ orig_wpathname = wpathname;
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 29
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 30
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-031 b/patches/source/bash/bash-4.2-patches/bash42-031
new file mode 100644
index 00000000..419d4478
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-031
@@ -0,0 +1,80 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-031
+
+Bug-Reported-by: Max Horn <max@quendi.de>
+Bug-Reference-ID: <20CC5C60-07C3-4E41-9817-741E48D407C5@quendi.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2012-06/msg00005.html
+
+Bug-Description:
+
+A change between bash-4.1 and bash-4.2 to prevent the readline input hook
+from being called too frequently had the side effect of causing delays
+when reading pasted input on systems such as Mac OS X. This patch fixes
+those delays while retaining the bash-4.2 behavior.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/readline/input.c 2010-05-30 18:33:01.000000000 -0400
+--- lib/readline/input.c 2012-06-25 21:08:42.000000000 -0400
+***************
+*** 410,414 ****
+ rl_read_key ()
+ {
+! int c;
+
+ rl_key_sequence_length++;
+--- 412,416 ----
+ rl_read_key ()
+ {
+! int c, r;
+
+ rl_key_sequence_length++;
+***************
+*** 430,441 ****
+ while (rl_event_hook)
+ {
+! if (rl_gather_tyi () < 0) /* XXX - EIO */
+ {
+ rl_done = 1;
+ return ('\n');
+ }
+ RL_CHECK_SIGNALS ();
+- if (rl_get_char (&c) != 0)
+- break;
+ if (rl_done) /* XXX - experimental */
+ return ('\n');
+--- 432,447 ----
+ while (rl_event_hook)
+ {
+! if (rl_get_char (&c) != 0)
+! break;
+!
+! if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */
+ {
+ rl_done = 1;
+ return ('\n');
+ }
++ else if (r == 1) /* read something */
++ continue;
++
+ RL_CHECK_SIGNALS ();
+ if (rl_done) /* XXX - experimental */
+ return ('\n');
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 30
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 31
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-032 b/patches/source/bash/bash-4.2-patches/bash42-032
new file mode 100644
index 00000000..d4f25ca0
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-032
@@ -0,0 +1,75 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-032
+
+Bug-Reported-by: Ruediger Kuhlmann <RKuhlmann@orga-systems.com>
+Bug-Reference-ID: <OFDE975207.0C3622E5-ONC12579F3.00361A06-C12579F3.00365E39@orga-systems.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00010.html
+
+Bug-Description:
+
+Bash-4.2 has problems with DEL characters in the expanded value of variables
+used in the same quoted string as variables that expand to nothing.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-20120427/subst.c 2012-04-22 16:19:10.000000000 -0400
+--- subst.c 2012-05-07 16:06:35.000000000 -0400
+***************
+*** 8152,8155 ****
+--- 8152,8163 ----
+ dispose_word_desc (tword);
+
++ /* Kill quoted nulls; we will add them back at the end of
++ expand_word_internal if nothing else in the string */
++ if (had_quoted_null && temp && QUOTED_NULL (temp))
++ {
++ FREE (temp);
++ temp = (char *)NULL;
++ }
++
+ goto add_string;
+ break;
+***************
+*** 8556,8560 ****
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+! if (had_quoted_null)
+ tword->flags |= W_HASQUOTEDNULL;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+--- 8564,8568 ----
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+! if (had_quoted_null && QUOTED_NULL (istring))
+ tword->flags |= W_HASQUOTEDNULL;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+***************
+*** 8587,8591 ****
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND;
+! if (had_quoted_null)
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+--- 8595,8599 ----
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND;
+! if (had_quoted_null && QUOTED_NULL (istring))
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 31
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 32
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-033 b/patches/source/bash/bash-4.2-patches/bash42-033
new file mode 100644
index 00000000..e58d7286
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-033
@@ -0,0 +1,57 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-033
+
+Bug-Reported-by: David Leverton <levertond@googlemail.com>
+Bug-Reference-ID: <4FCCE737.1060603@googlemail.com>
+Bug-Reference-URL:
+
+Bug-Description:
+
+Bash uses a static buffer when expanding the /dev/fd prefix for the test
+and conditional commands, among other uses, when it should use a dynamic
+buffer to avoid buffer overflow.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/sh/eaccess.c 2011-01-08 20:50:10.000000000 -0500
+--- lib/sh/eaccess.c 2012-06-04 21:06:43.000000000 -0400
+***************
+*** 83,86 ****
+--- 83,88 ----
+ struct stat *finfo;
+ {
++ static char *pbuf = 0;
++
+ if (*path == '\0')
+ {
+***************
+*** 107,111 ****
+ On most systems, with the notable exception of linux, this is
+ effectively a no-op. */
+! char pbuf[32];
+ strcpy (pbuf, DEV_FD_PREFIX);
+ strcat (pbuf, path + 8);
+--- 109,113 ----
+ On most systems, with the notable exception of linux, this is
+ effectively a no-op. */
+! pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8));
+ strcpy (pbuf, DEV_FD_PREFIX);
+ strcat (pbuf, path + 8);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 32
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 33
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-034 b/patches/source/bash/bash-4.2-patches/bash42-034
new file mode 100644
index 00000000..e4f05e10
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-034
@@ -0,0 +1,46 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-034
+
+Bug-Reported-by: "Davide Brini" <dave_br@gmx.com>
+Bug-Reference-ID: <20120604164154.69781EC04B@imaps.oficinas.atrapalo.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00030.html
+
+Bug-Description:
+
+In bash-4.2, the history code would inappropriately add a semicolon to
+multi-line compound array assignments when adding them to the history.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y 2011-11-21 18:03:36.000000000 -0500
+--- parse.y 2012-06-07 12:48:47.000000000 -0400
+***************
+*** 4900,4905 ****
+--- 4916,4924 ----
+ return (current_command_line_count == 2 ? "\n" : "");
+ }
+
++ if (parser_state & PST_COMPASSIGN)
++ return (" ");
++
+ /* First, handle some special cases. */
+ /*(*/
+ /* If we just read `()', assume it's a function definition, and don't
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 33
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 34
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-035 b/patches/source/bash/bash-4.2-patches/bash42-035
new file mode 100644
index 00000000..6f0be6f9
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-035
@@ -0,0 +1,66 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-035
+
+Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
+Bug-Reference-ID: <2766482.Ksm3GrSoYi@smorgbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-06/msg00071.html
+
+Bug-Description:
+
+When given a number of lines to read, `mapfile -n lines' reads one too many.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/mapfile.def 2010-05-29 22:09:47.000000000 -0400
+--- builtins/mapfile.def 2012-06-20 09:48:33.000000000 -0400
+***************
+*** 196,206 ****
+ interrupt_immediately++;
+ for (array_index = origin, line_count = 1;
+! zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+! array_index++, line_count++)
+ {
+- /* Have we exceeded # of lines to store? */
+- if (line_count_goal != 0 && line_count > line_count_goal)
+- break;
+-
+ /* Remove trailing newlines? */
+ if (flags & MAPF_CHOP)
+--- 196,202 ----
+ interrupt_immediately++;
+ for (array_index = origin, line_count = 1;
+! zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+! array_index++)
+ {
+ /* Remove trailing newlines? */
+ if (flags & MAPF_CHOP)
+***************
+*** 218,221 ****
+--- 214,222 ----
+
+ bind_array_element (entry, array_index, line, 0);
++
++ /* Have we exceeded # of lines to store? */
++ line_count++;
++ if (line_count_goal != 0 && line_count > line_count_goal)
++ break;
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 34
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 35
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-036 b/patches/source/bash/bash-4.2-patches/bash42-036
new file mode 100644
index 00000000..73fac408
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-036
@@ -0,0 +1,92 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-036
+
+Bug-Reported-by: gregrwm <backuppc-users@whitleymott.net>
+Bug-Reference-ID: <CAD+dB9B4JG+qUwZBQUwiQmVt0j6NDn=DDTxr9R+nkA8DL4KLJA@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-05/msg00108.html
+
+Bug-Description:
+
+Bash-4.2 produces incorrect word splitting results when expanding
+double-quoted $@ in the same string as and adjacent to other variable
+expansions. The $@ should be split, the other expansions should not.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-05-02 12:02:33.000000000 -0400
+--- subst.c 2012-07-08 21:19:32.000000000 -0400
+***************
+*** 7923,7927 ****
+ /* State flags */
+ int had_quoted_null;
+! int has_dollar_at;
+ int tflag;
+ int pflags; /* flags passed to param_expand */
+--- 7923,7927 ----
+ /* State flags */
+ int had_quoted_null;
+! int has_dollar_at, temp_has_dollar_at;
+ int tflag;
+ int pflags; /* flags passed to param_expand */
+***************
+*** 8128,8138 ****
+ *expanded_something = 1;
+
+! has_dollar_at = 0;
+ pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+ if (word->flags & W_NOSPLIT2)
+ pflags |= PF_NOSPLIT2;
+ tword = param_expand (string, &sindex, quoted, expanded_something,
+! &has_dollar_at, &quoted_dollar_at,
+ &had_quoted_null, pflags);
+
+ if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+--- 8128,8139 ----
+ *expanded_something = 1;
+
+! temp_has_dollar_at = 0;
+ pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+ if (word->flags & W_NOSPLIT2)
+ pflags |= PF_NOSPLIT2;
+ tword = param_expand (string, &sindex, quoted, expanded_something,
+! &temp_has_dollar_at, &quoted_dollar_at,
+ &had_quoted_null, pflags);
++ has_dollar_at += temp_has_dollar_at;
+
+ if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+***************
+*** 8275,8281 ****
+ temp = (char *)NULL;
+
+! has_dollar_at = 0;
+ /* Need to get W_HASQUOTEDNULL flag through this function. */
+! list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL);
+
+ if (list == &expand_word_error || list == &expand_word_fatal)
+--- 8276,8283 ----
+ temp = (char *)NULL;
+
+! temp_has_dollar_at = 0; /* XXX */
+ /* Need to get W_HASQUOTEDNULL flag through this function. */
+! list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &temp_has_dollar_at, (int *)NULL);
+! has_dollar_at += temp_has_dollar_at;
+
+ if (list == &expand_word_error || list == &expand_word_fatal)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 35
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 36
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-037 b/patches/source/bash/bash-4.2-patches/bash42-037
new file mode 100644
index 00000000..a12b8a7e
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-037
@@ -0,0 +1,112 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-037
+
+Bug-Reported-by: Jakub Filak
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugzilla.redhat.com/show_bug.cgi?id=813289
+
+Bug-Description:
+
+Attempting to redo (using `.') the vi editing mode `cc', `dd', or `yy'
+commands leads to an infinite loop.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/readline/vi_mode.c 2011-02-25 11:17:02.000000000 -0500
+--- lib/readline/vi_mode.c 2012-06-02 12:24:47.000000000 -0400
+***************
+*** 1235,1243 ****
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing)
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+--- 1297,1313 ----
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing) /* handle redoing `dd' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+***************
+*** 1317,1325 ****
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing)
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+--- 1387,1403 ----
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+! else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing) /* handle redoing `cc' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+***************
+*** 1378,1381 ****
+--- 1456,1472 ----
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ r = rl_domove_motion_callback (_rl_vimvcxt);
++ }
++ else if (vi_redoing) /* handle redoing `yy' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 36
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 37
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-038 b/patches/source/bash/bash-4.2-patches/bash42-038
new file mode 100644
index 00000000..411e4dd5
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-038
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-038
+
+Bug-Reported-by: armandsl@gmail.com
+Bug-Reference-ID: <20120822112810.8D14920040@windmill.latviatours.lv>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-08/msg00049.html
+
+Bug-Description:
+
+If a backslash-newline (which is removed) with no other input is given as
+input to `read', the shell tries to dereference a null pointer and seg faults.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2012-03-11 17:52:44.000000000 -0400
+--- builtins/read.def 2012-08-22 11:53:09.000000000 -0400
+***************
+*** 792,796 ****
+ #endif
+
+! if (saw_escape)
+ {
+ t = dequote_string (input_string);
+--- 847,851 ----
+ #endif
+
+! if (saw_escape && input_string && *input_string)
+ {
+ t = dequote_string (input_string);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 37
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 38
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-039 b/patches/source/bash/bash-4.2-patches/bash42-039
new file mode 100644
index 00000000..21457af1
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-039
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-039
+
+Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
+Bug-Reference-ID: <1498458.MpVlmOXDB7@smorgbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-09/msg00008.html
+
+Bug-Description:
+
+Under certain circumstances, bash attempts to expand variables in arithmetic
+expressions even when evaluation is being suppressed.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/expr.c 2011-11-21 18:03:35.000000000 -0500
+--- expr.c 2012-09-09 16:31:18.000000000 -0400
+***************
+*** 1010,1013 ****
+--- 1073,1082 ----
+ #endif
+
++ /*itrace("expr_streval: %s: noeval = %d", tok, noeval);*/
++ /* If we are suppressing evaluation, just short-circuit here instead of
++ going through the rest of the evaluator. */
++ if (noeval)
++ return (0);
++
+ /* [[[[[ */
+ #if defined (ARRAY_VARS)
+***************
+*** 1183,1186 ****
+--- 1256,1263 ----
+
+ *cp = '\0';
++ /* XXX - watch out for pointer aliasing issues here */
++ if (curlval.tokstr && curlval.tokstr == tokstr)
++ init_lvalue (&curlval);
++
+ FREE (tokstr);
+ tokstr = savestring (tp);
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 38
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 39
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-040 b/patches/source/bash/bash-4.2-patches/bash42-040
new file mode 100644
index 00000000..1de0fe37
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-040
@@ -0,0 +1,56 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-040
+
+Bug-Reported-by: Andrey Zaitsev <jstcdr@gmail.com>
+Bug-Reference-ID: <CAEZVQT5PJ1Mb_Zh8LT5qz8sv+-9Q6hGfQ5DU9ZxdJ+gV7xBUaQ@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-04/msg00144.html
+
+Bug-Description:
+
+Output redirection applied to builtin commands missed I/O errors if
+they happened when the file descriptor was closed, rather than on write
+(e.g., like with an out-of-space error on a remote NFS file system).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/redir.c 2011-01-02 16:00:31.000000000 -0500
+--- redir.c 2012-04-24 20:42:12.000000000 -0400
+***************
+*** 1092,1099 ****
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+! close_buffered_fd (redirector);
+ #else /* !BUFFERED_INPUT */
+! close (redirector);
+ #endif /* !BUFFERED_INPUT */
+ }
+ break;
+--- 1092,1101 ----
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+! r = close_buffered_fd (redirector);
+ #else /* !BUFFERED_INPUT */
+! r = close (redirector);
+ #endif /* !BUFFERED_INPUT */
++ if (r < 0 && (flags & RX_INTERNAL) && (errno == EIO || errno == ENOSPC))
++ REDIRECTION_ERROR (r, errno, -1);
+ }
+ break;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 39
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 40
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-041 b/patches/source/bash/bash-4.2-patches/bash42-041
new file mode 100644
index 00000000..37d4ac70
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-041
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-041
+
+Bug-Reported-by: Andrey Borzenkov <arvidjaar@gmail.com>
+Bug-Reference-ID: <20121202205200.2134478e@opensuse.site>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-12/msg00008.html
+
+Bug-Description:
+
+Process substitution incorrectly inherited a flag that inhibited using the
+(local) temporary environment for variable lookups if it was providing
+the filename to a redirection. The intent the flag is to enforce the
+Posix command expansion ordering rules.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-07-14 15:53:20.000000000 -0400
+--- subst.c 2012-12-02 22:26:54.000000000 -0500
+***************
+*** 5125,5128 ****
+--- 5129,5136 ----
+ #endif /* HAVE_DEV_FD */
+
++ /* subshells shouldn't have this flag, which controls using the temporary
++ environment for variable lookups. */
++ expanding_redir = 0;
++
+ result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST));
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 40
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 41
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-042 b/patches/source/bash/bash-4.2-patches/bash42-042
new file mode 100644
index 00000000..1ce0cae3
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-042
@@ -0,0 +1,57 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-042
+
+Bug-Reported-by: Adam Pippin <adam@gp-inc.ca>
+Bug-Reference-ID: <CAPYbNHr6ucZFOoWsRdUJj6KP3Ju0j1bkESa_cmb7iU+kZwdVpg@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2012-11/msg00087.html
+
+Bug-Description:
+
+Compilation failed after specifying the `--enable-minimal-config' option to
+configure (more specifically, specifying `--disable-alias').
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/parse.y 2012-07-08 21:53:33.000000000 -0400
+--- parse.y 2012-10-14 20:20:34.000000000 -0400
+***************
+*** 2394,2397 ****
+--- 2392,2396 ----
+ to consume the quoted newline and move to the next character in
+ the expansion. */
++ #if defined (ALIAS)
+ if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0')
+ {
+***************
+*** 2404,2408 ****
+ goto next_alias_char; /* and get next character */
+ }
+! else
+ goto restart_read;
+ }
+--- 2403,2408 ----
+ goto next_alias_char; /* and get next character */
+ }
+! else
+! #endif
+ goto restart_read;
+ }
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 41
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 42
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-043 b/patches/source/bash/bash-4.2-patches/bash42-043
new file mode 100644
index 00000000..b25a5ee3
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-043
@@ -0,0 +1,65 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-043
+
+Bug-Reported-by: konsolebox <konsolebox@gmail.com>
+Bug-Reference-ID: <CAJnmqwZuGKLgMsMwxRK4LL+2NN+HgvmKzrnode99QBGrcgX1Lw@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-01/msg00138.html
+
+Bug-Description:
+
+When SIGCHLD is trapped, and a SIGCHLD trap handler runs when a pending
+`read -t' invocation times out and generates SIGALRM, bash can crash with
+a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/builtins/read.def 2012-10-31 21:22:51.000517000 -0400
+--- builtins/read.def 2013-01-25 10:28:16.000038000 -0500
+***************
+*** 386,393 ****
+ /* Tricky. The top of the unwind-protect stack is the free of
+ input_string. We want to run all the rest and use input_string,
+! so we have to remove it from the stack. */
+! remove_unwind_protect ();
+! run_unwind_frame ("read_builtin");
+ input_string[i] = '\0'; /* make sure it's terminated */
+ retval = 128+SIGALRM;
+ goto assign_vars;
+--- 386,403 ----
+ /* Tricky. The top of the unwind-protect stack is the free of
+ input_string. We want to run all the rest and use input_string,
+! so we have to save input_string temporarily, run the unwind-
+! protects, then restore input_string so we can use it later. */
+!
+ input_string[i] = '\0'; /* make sure it's terminated */
++ if (i == 0)
++ {
++ t = (char *)xmalloc (1);
++ t[0] = 0;
++ }
++ else
++ t = savestring (input_string);
++
++ run_unwind_frame ("read_builtin");
++ input_string = t;
+ retval = 128+SIGALRM;
+ goto assign_vars;
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 42
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 43
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-044 b/patches/source/bash/bash-4.2-patches/bash42-044
new file mode 100644
index 00000000..e5bf2832
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-044
@@ -0,0 +1,70 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-044
+
+Bug-Reported-by: "Dashing" <dashing@hushmail.com>
+Bug-Reference-ID: <20130211175049.D90786F446@smtp.hushmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-02/msg00030.html
+
+Bug-Description:
+
+When converting a multibyte string to a wide character string as part of
+pattern matching, bash does not handle the end of the string correctly,
+causing the search for the NUL to go beyond the end of the string and
+reference random memory. Depending on the contents of that memory, bash
+can produce errors or crash.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/lib/glob/xmbsrtowcs.c 2012-07-08 21:53:19.000000000 -0400
+--- lib/glob/xmbsrtowcs.c 2013-02-12 12:00:39.000000000 -0500
+***************
+*** 217,220 ****
+--- 217,226 ----
+ n = mbsnrtowcs(wsbuf+wcnum, &p, nms, wsbuf_size-wcnum, &state);
+
++ if (n == 0 && p == 0)
++ {
++ wsbuf[wcnum] = L'\0';
++ break;
++ }
++
+ /* Compensate for taking single byte on wcs conversion failure above. */
+ if (wcslength == 1 && (n == 0 || n == (size_t)-1))
+***************
+*** 222,226 ****
+ state = tmp_state;
+ p = tmp_p;
+! wsbuf[wcnum++] = *p++;
+ }
+ else
+--- 228,238 ----
+ state = tmp_state;
+ p = tmp_p;
+! wsbuf[wcnum] = *p;
+! if (*p == 0)
+! break;
+! else
+! {
+! wcnum++; p++;
+! }
+ }
+ else
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 43
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 44
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-045 b/patches/source/bash/bash-4.2-patches/bash42-045
new file mode 100644
index 00000000..e0f8559e
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-045
@@ -0,0 +1,53 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-045
+
+Bug-Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
+Bug-Reference-ID: <20130218195539.GA9620@chaz.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-02/msg00080.html
+
+Bug-Description:
+
+The <&n- and >&n- redirections, which move one file descriptor to another,
+leave the file descriptor closed when applied to builtins or compound
+commands.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/redir.c 2013-01-30 11:56:09.000000000 -0500
+--- redir.c 2013-02-19 09:38:36.000000000 -0500
+***************
+*** 1008,1011 ****
+--- 1008,1021 ----
+ REDIRECTION_ERROR (r, errno, -1);
+ }
++ if ((flags & RX_UNDOABLE) && (ri == r_move_input || ri == r_move_output))
++ {
++ /* r_move_input and r_move_output add an additional close()
++ that needs to be undone */
++ if (fcntl (redirector, F_GETFD, 0) != -1)
++ {
++ r = add_undo_redirect (redir_fd, r_close_this, -1);
++ REDIRECTION_ERROR (r, errno, -1);
++ }
++ }
+ #if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 44
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 45
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-046 b/patches/source/bash/bash-4.2-patches/bash42-046
new file mode 100644
index 00000000..03a489e9
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-046
@@ -0,0 +1,55 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-046
+
+Bug-Reported-by: "Theodoros V. Kalamatianos" <thkala@gmail.com>
+Bug-Reference-ID: <20140112011131.GE17667@infinity.metashade.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-01/msg00044.html
+
+Bug-Description:
+
+Bash-4.2 patch 32 introduced a problem with "$@" and arrays expanding empty
+positional parameters or array elements when using substring expansion,
+pattern substitution, or case modfication. The empty parameters or array
+elements are removed instead of expanding to empty strings ("").
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/subst.c 2012-12-31 11:52:56.000000000 -0500
+--- subst.c 2014-03-31 14:19:56.000000000 -0400
+***************
+*** 7243,7247 ****
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+! if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+--- 7243,7253 ----
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+! /* We test quoted_dollar_atp because we want variants with double-quoted
+! "$@" to take a different code path. In fact, we make sure at the end
+! of expand_word_internal that we're only looking at these flags if
+! quoted_dollar_at == 0. */
+! if (temp1 &&
+! (quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) &&
+! QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 45
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 46
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-047 b/patches/source/bash/bash-4.2-patches/bash42-047
new file mode 100644
index 00000000..65aff1c1
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-047
@@ -0,0 +1,49 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-047
+
+Bug-Reported-by: Matthew Riley <mattdr@google.com>
+Bug-Reference-ID: <CA+NEdkwP3gw+gbcF5+xnR1pvcuzb1mDVzvmuJOpHRGHA9T7VFg@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-03/msg00047.html
+
+Bug-Description:
+
+The function that shortens pathnames for $PS1 according to the value of
+$PROMPT_DIRTRIM uses memcpy on potentially-overlapping regions of memory,
+when it should use memmove. The result is garbled pathnames in prompt
+strings.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/general.c 2010-12-12 15:06:27.000000000 -0500
+--- general.c 2014-01-30 16:46:15.000000000 -0500
+***************
+*** 767,771 ****
+
+ nlen = nend - ntail;
+! memcpy (nbeg, ntail, nlen);
+ nbeg[nlen] = '\0';
+
+--- 767,771 ----
+
+ nlen = nend - ntail;
+! memmove (nbeg, ntail, nlen);
+ nbeg[nlen] = '\0';
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 46
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-048 b/patches/source/bash/bash-4.2-patches/bash42-048
new file mode 100644
index 00000000..d6097fbb
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-048
@@ -0,0 +1,104 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-048
+
+Bug-Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+Under certain circumstances, bash will execute user code while processing the
+environment for exported function definitions.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.47/builtins/common.h 2010-05-30 18:31:51.000000000 -0400
+--- builtins/common.h 2014-09-16 19:35:45.000000000 -0400
+***************
+*** 36,39 ****
+--- 36,41 ----
+
+ /* Flags for describe_command, shared between type.def and command.def */
++ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
++ #define SEVAL_ONECMD 0x100 /* only allow a single command */
+ #define CDESC_ALL 0x001 /* type -a */
+ #define CDESC_SHORTDESC 0x002 /* command -V */
+*** ../bash-4.2.47/builtins/evalstring.c 2010-11-23 08:22:15.000000000 -0500
+--- builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
+***************
+*** 262,265 ****
+--- 262,273 ----
+ struct fd_bitmap *bitmap;
+
++ if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
++ {
++ internal_warning ("%s: ignoring function definition attempt", from_file);
++ should_jump_to_top_level = 0;
++ last_result = last_command_exit_value = EX_BADUSAGE;
++ break;
++ }
++
+ bitmap = new_fd_bitmap (FD_BITMAP_SIZE);
+ begin_unwind_frame ("pe_dispose");
+***************
+*** 322,325 ****
+--- 330,336 ----
+ dispose_fd_bitmap (bitmap);
+ discard_unwind_frame ("pe_dispose");
++
++ if (flags & SEVAL_ONECMD)
++ break;
+ }
+ }
+*** ../bash-4.2.47/variables.c 2011-03-01 16:15:20.000000000 -0500
+--- variables.c 2014-09-16 19:35:45.000000000 -0400
+***************
+*** 348,357 ****
+ strcpy (temp_string + char_index + 1, string);
+
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
+!
+! /* Ancient backwards compatibility. Old versions of bash exported
+! functions like name()=() {...} */
+! if (name[char_index - 1] == ')' && name[char_index - 2] == '(')
+! name[char_index - 2] = '\0';
+
+ if (temp_var = find_function (name))
+--- 348,355 ----
+ strcpy (temp_string + char_index + 1, string);
+
+! /* Don't import function names that are invalid identifiers from the
+! environment. */
+! if (legal_identifier (name))
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+ if (temp_var = find_function (name))
+***************
+*** 362,369 ****
+ else
+ report_error (_("error importing function definition for `%s'"), name);
+-
+- /* ( */
+- if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
+- name[char_index - 2] = '('; /* ) */
+ }
+ #if defined (ARRAY_VARS)
+--- 360,363 ----
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 48
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-049 b/patches/source/bash/bash-4.2-patches/bash42-049
new file mode 100644
index 00000000..bf3abcef
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-049
@@ -0,0 +1,43 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-049
+
+Bug-Reported-by: Tavis Ormandy <taviso@cmpxchg8b.com>
+Bug-Reference-ID:
+Bug-Reference-URL: http://twitter.com/taviso/statuses/514887394294652929
+
+Bug-Description:
+
+Under certain circumstances, bash can incorrectly save a lookahead character and
+return it on a subsequent call, even when reading a new line.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.48/parse.y 2012-12-31 11:52:57.000000000 -0500
+--- parse.y 2014-09-25 16:12:19.000000000 -0400
+***************
+*** 2851,2854 ****
+--- 2851,2856 ----
+ word_desc_to_read = (WORD_DESC *)NULL;
+
++ eol_ungetc_lookahead = 0;
++
+ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 48
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 49
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-050 b/patches/source/bash/bash-4.2-patches/bash42-050
new file mode 100644
index 00000000..76b37e52
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-050
@@ -0,0 +1,217 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-050
+
+Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+This patch changes the encoding bash uses for exported functions to avoid
+clashes with shell variables and to avoid depending only on an environment
+variable's contents to determine whether or not to interpret it as a shell
+function.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.49/variables.c 2014-09-16 19:35:45.000000000 -0400
+--- variables.c 2014-09-27 20:54:00.000000000 -0400
+***************
+*** 80,83 ****
+--- 80,88 ----
+ #define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
+
++ #define BASHFUNC_PREFIX "BASH_FUNC_"
++ #define BASHFUNC_PREFLEN 10 /* == strlen(BASHFUNC_PREFIX */
++ #define BASHFUNC_SUFFIX "%%"
++ #define BASHFUNC_SUFFLEN 2 /* == strlen(BASHFUNC_SUFFIX) */
++
+ extern char **environ;
+
+***************
+*** 269,273 ****
+ static void dispose_temporary_env __P((sh_free_func_t *));
+
+! static inline char *mk_env_string __P((const char *, const char *));
+ static char **make_env_array_from_var_list __P((SHELL_VAR **));
+ static char **make_var_export_array __P((VAR_CONTEXT *));
+--- 274,278 ----
+ static void dispose_temporary_env __P((sh_free_func_t *));
+
+! static inline char *mk_env_string __P((const char *, const char *, int));
+ static char **make_env_array_from_var_list __P((SHELL_VAR **));
+ static char **make_var_export_array __P((VAR_CONTEXT *));
+***************
+*** 339,357 ****
+ /* If exported function, define it now. Don't import functions from
+ the environment in privileged mode. */
+! if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
+ {
+ string_length = strlen (string);
+! temp_string = (char *)xmalloc (3 + string_length + char_index);
+
+! strcpy (temp_string, name);
+! temp_string[char_index] = ' ';
+! strcpy (temp_string + char_index + 1, string);
+
+ /* Don't import function names that are invalid identifiers from the
+ environment. */
+! if (legal_identifier (name))
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+! if (temp_var = find_function (name))
+ {
+ VSETATTR (temp_var, (att_exported|att_imported));
+--- 344,373 ----
+ /* If exported function, define it now. Don't import functions from
+ the environment in privileged mode. */
+! if (privmode == 0 && read_but_dont_execute == 0 &&
+! STREQN (BASHFUNC_PREFIX, name, BASHFUNC_PREFLEN) &&
+! STREQ (BASHFUNC_SUFFIX, name + char_index - BASHFUNC_SUFFLEN) &&
+! STREQN ("() {", string, 4))
+ {
++ size_t namelen;
++ char *tname; /* desired imported function name */
++
++ namelen = char_index - BASHFUNC_PREFLEN - BASHFUNC_SUFFLEN;
++
++ tname = name + BASHFUNC_PREFLEN; /* start of func name */
++ tname[namelen] = '\0'; /* now tname == func name */
++
+ string_length = strlen (string);
+! temp_string = (char *)xmalloc (namelen + string_length + 2);
+
+! memcpy (temp_string, tname, namelen);
+! temp_string[namelen] = ' ';
+! memcpy (temp_string + namelen + 1, string, string_length + 1);
+
+ /* Don't import function names that are invalid identifiers from the
+ environment. */
+! if (absolute_program (tname) == 0 && (posixly_correct == 0 || legal_identifier (tname)))
+! parse_and_execute (temp_string, tname, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+! if (temp_var = find_function (tname))
+ {
+ VSETATTR (temp_var, (att_exported|att_imported));
+***************
+*** 359,363 ****
+ }
+ else
+! report_error (_("error importing function definition for `%s'"), name);
+ }
+ #if defined (ARRAY_VARS)
+--- 375,382 ----
+ }
+ else
+! report_error (_("error importing function definition for `%s'"), tname);
+!
+! /* Restore original suffix */
+! tname[namelen] = BASHFUNC_SUFFIX[0];
+ }
+ #if defined (ARRAY_VARS)
+***************
+*** 2538,2542 ****
+
+ INVALIDATE_EXPORTSTR (var);
+! var->exportstr = mk_env_string (name, value);
+
+ array_needs_making = 1;
+--- 2557,2561 ----
+
+ INVALIDATE_EXPORTSTR (var);
+! var->exportstr = mk_env_string (name, value, 0);
+
+ array_needs_making = 1;
+***************
+*** 3390,3408 ****
+
+ static inline char *
+! mk_env_string (name, value)
+ const char *name, *value;
+ {
+! int name_len, value_len;
+! char *p;
+
+ name_len = strlen (name);
+ value_len = STRLEN (value);
+! p = (char *)xmalloc (2 + name_len + value_len);
+! strcpy (p, name);
+! p[name_len] = '=';
+ if (value && *value)
+! strcpy (p + name_len + 1, value);
+ else
+! p[name_len + 1] = '\0';
+ return (p);
+ }
+--- 3409,3448 ----
+
+ static inline char *
+! mk_env_string (name, value, isfunc)
+ const char *name, *value;
++ int isfunc;
+ {
+! size_t name_len, value_len;
+! char *p, *q;
+
+ name_len = strlen (name);
+ value_len = STRLEN (value);
+!
+! /* If we are exporting a shell function, construct the encoded function
+! name. */
+! if (isfunc && value)
+! {
+! p = (char *)xmalloc (BASHFUNC_PREFLEN + name_len + BASHFUNC_SUFFLEN + value_len + 2);
+! q = p;
+! memcpy (q, BASHFUNC_PREFIX, BASHFUNC_PREFLEN);
+! q += BASHFUNC_PREFLEN;
+! memcpy (q, name, name_len);
+! q += name_len;
+! memcpy (q, BASHFUNC_SUFFIX, BASHFUNC_SUFFLEN);
+! q += BASHFUNC_SUFFLEN;
+! }
+! else
+! {
+! p = (char *)xmalloc (2 + name_len + value_len);
+! memcpy (p, name, name_len);
+! q = p + name_len;
+! }
+!
+! q[0] = '=';
+ if (value && *value)
+! memcpy (q + 1, value, value_len + 1);
+ else
+! q[1] = '\0';
+!
+ return (p);
+ }
+***************
+*** 3490,3494 ****
+ using the cached exportstr... */
+ list[list_index] = USE_EXPORTSTR ? savestring (value)
+! : mk_env_string (var->name, value);
+
+ if (USE_EXPORTSTR == 0)
+--- 3530,3534 ----
+ using the cached exportstr... */
+ list[list_index] = USE_EXPORTSTR ? savestring (value)
+! : mk_env_string (var->name, value, function_p (var));
+
+ if (USE_EXPORTSTR == 0)
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 49
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 50
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-051 b/patches/source/bash/bash-4.2-patches/bash42-051
new file mode 100644
index 00000000..4d5040aa
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-051
@@ -0,0 +1,173 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-051
+
+Bug-Reported-by: Florian Weimer <fweimer@redhat.com>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+There are two local buffer overflows in parse.y that can cause the shell
+to dump core when given many here-documents attached to a single command
+or many nested loops.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.50/parse.y 2014-09-27 12:18:53.000000000 -0400
+--- parse.y 2014-09-30 19:24:19.000000000 -0400
+***************
+*** 168,171 ****
+--- 168,174 ----
+ static int reserved_word_acceptable __P((int));
+ static int yylex __P((void));
++
++ static void push_heredoc __P((REDIRECT *));
++ static char *mk_alexpansion __P((char *));
+ static int alias_expand_token __P((char *));
+ static int time_command_acceptable __P((void));
+***************
+*** 265,269 ****
+ /* Variables to manage the task of reading here documents, because we need to
+ defer the reading until after a complete command has been collected. */
+! static REDIRECT *redir_stack[10];
+ int need_here_doc;
+
+--- 268,274 ----
+ /* Variables to manage the task of reading here documents, because we need to
+ defer the reading until after a complete command has been collected. */
+! #define HEREDOC_MAX 16
+!
+! static REDIRECT *redir_stack[HEREDOC_MAX];
+ int need_here_doc;
+
+***************
+*** 307,311 ****
+ index is decremented after a case, select, or for command is parsed. */
+ #define MAX_CASE_NEST 128
+! static int word_lineno[MAX_CASE_NEST];
+ static int word_top = -1;
+
+--- 312,316 ----
+ index is decremented after a case, select, or for command is parsed. */
+ #define MAX_CASE_NEST 128
+! static int word_lineno[MAX_CASE_NEST+1];
+ static int word_top = -1;
+
+***************
+*** 520,524 ****
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS WORD
+--- 525,529 ----
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | NUMBER LESS_LESS WORD
+***************
+*** 527,531 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS WORD
+--- 532,536 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | REDIR_WORD LESS_LESS WORD
+***************
+*** 534,538 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_MINUS WORD
+--- 539,543 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ($$);
+ }
+ | LESS_LESS_MINUS WORD
+***************
+*** 541,545 ****
+ redir.filename = $2;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS_MINUS WORD
+--- 546,550 ----
+ redir.filename = $2;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | NUMBER LESS_LESS_MINUS WORD
+***************
+*** 548,552 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS_MINUS WORD
+--- 553,557 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | REDIR_WORD LESS_LESS_MINUS WORD
+***************
+*** 555,559 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_LESS WORD
+--- 560,564 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ($$);
+ }
+ | LESS_LESS_LESS WORD
+***************
+*** 2534,2537 ****
+--- 2539,2557 ----
+ static int esacs_needed_count;
+
++ static void
++ push_heredoc (r)
++ REDIRECT *r;
++ {
++ if (need_here_doc >= HEREDOC_MAX)
++ {
++ last_command_exit_value = EX_BADUSAGE;
++ need_here_doc = 0;
++ report_syntax_error (_("maximum here-document count exceeded"));
++ reset_parser ();
++ exit_shell (last_command_exit_value);
++ }
++ redir_stack[need_here_doc++] = r;
++ }
++
+ void
+ gather_here_documents ()
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 50
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 51
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-052 b/patches/source/bash/bash-4.2-patches/bash42-052
new file mode 100644
index 00000000..186af0ae
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-052
@@ -0,0 +1,59 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-052
+
+Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+When bash is parsing a function definition that contains a here-document
+delimited by end-of-file (or end-of-string), it leaves the closing delimiter
+uninitialized. This can result in an invalid memory access when the parsed
+function is later copied.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.51/make_cmd.c 2009-09-11 17:26:12.000000000 -0400
+--- make_cmd.c 2014-10-02 11:26:58.000000000 -0400
+***************
+*** 690,693 ****
+--- 690,694 ----
+ temp->redirector = source;
+ temp->redirectee = dest_and_filename;
++ temp->here_doc_eof = 0;
+ temp->instruction = instruction;
+ temp->flags = 0;
+*** ../bash-4.2.51/copy_cmd.c 2009-09-11 16:28:02.000000000 -0400
+--- copy_cmd.c 2014-10-02 11:26:58.000000000 -0400
+***************
+*** 127,131 ****
+ case r_reading_until:
+ case r_deblank_reading_until:
+! new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
+ /*FALLTHROUGH*/
+ case r_reading_string:
+--- 127,131 ----
+ case r_reading_until:
+ case r_deblank_reading_until:
+! new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
+ /*FALLTHROUGH*/
+ case r_reading_string:
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 51
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 52
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash-4.2-patches/bash42-053 b/patches/source/bash/bash-4.2-patches/bash42-053
new file mode 100644
index 00000000..cffd622f
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-053
@@ -0,0 +1,132 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-053
+
+Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
+Bug-Reference-ID:
+Bug-Reference-URL:
+
+Bug-Description:
+
+A combination of nested command substitutions and function importing from
+the environment can cause bash to execute code appearing in the environment
+variable value following the function definition.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2.52/builtins/evalstring.c 2014-09-16 19:35:45.000000000 -0400
+--- builtins/evalstring.c 2014-10-04 15:00:26.000000000 -0400
+***************
+*** 262,271 ****
+ struct fd_bitmap *bitmap;
+
+! if ((flags & SEVAL_FUNCDEF) && command->type != cm_function_def)
+ {
+! internal_warning ("%s: ignoring function definition attempt", from_file);
+! should_jump_to_top_level = 0;
+! last_result = last_command_exit_value = EX_BADUSAGE;
+! break;
+ }
+
+--- 262,284 ----
+ struct fd_bitmap *bitmap;
+
+! if (flags & SEVAL_FUNCDEF)
+ {
+! char *x;
+!
+! /* If the command parses to something other than a straight
+! function definition, or if we have not consumed the entire
+! string, or if the parser has transformed the function
+! name (as parsing will if it begins or ends with shell
+! whitespace, for example), reject the attempt */
+! if (command->type != cm_function_def ||
+! ((x = parser_remaining_input ()) && *x) ||
+! (STREQ (from_file, command->value.Function_def->name->word) == 0))
+! {
+! internal_warning (_("%s: ignoring function definition attempt"), from_file);
+! should_jump_to_top_level = 0;
+! last_result = last_command_exit_value = EX_BADUSAGE;
+! reset_parser ();
+! break;
+! }
+ }
+
+***************
+*** 332,336 ****
+
+ if (flags & SEVAL_ONECMD)
+! break;
+ }
+ }
+--- 345,352 ----
+
+ if (flags & SEVAL_ONECMD)
+! {
+! reset_parser ();
+! break;
+! }
+ }
+ }
+*** ../bash-4.2.52/parse.y 2014-09-30 19:24:19.000000000 -0400
+--- parse.y 2014-10-04 15:00:26.000000000 -0400
+***************
+*** 2436,2439 ****
+--- 2436,2449 ----
+ }
+
++ char *
++ parser_remaining_input ()
++ {
++ if (shell_input_line == 0)
++ return 0;
++ if (shell_input_line_index < 0 || shell_input_line_index >= shell_input_line_len)
++ return '\0'; /* XXX */
++ return (shell_input_line + shell_input_line_index);
++ }
++
+ #ifdef INCLUDE_UNUSED
+ /* Back the input pointer up by one, effectively `ungetting' a character. */
+***************
+*** 3891,3896 ****
+ /* reset_parser clears shell_input_line and associated variables */
+ restore_input_line_state (&ls);
+! if (interactive)
+! token_to_read = 0;
+
+ /* Need to find how many characters parse_and_execute consumed, update
+--- 3901,3906 ----
+ /* reset_parser clears shell_input_line and associated variables */
+ restore_input_line_state (&ls);
+!
+! token_to_read = 0;
+
+ /* Need to find how many characters parse_and_execute consumed, update
+*** ../bash-4.2.52/shell.h 2011-11-21 18:03:32.000000000 -0500
+--- shell.h 2014-10-04 15:00:26.000000000 -0400
+***************
+*** 178,181 ****
+--- 178,183 ----
+
+ /* Let's try declaring these here. */
++ extern char *parser_remaining_input __P((void));
++
+ extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
+ extern void restore_parser_state __P((sh_parser_state_t *));
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 52
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 53
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash.CVE-2016-0634.bash43-047 b/patches/source/bash/bash.CVE-2016-0634.bash43-047
new file mode 100644
index 00000000..316e3afc
--- /dev/null
+++ b/patches/source/bash/bash.CVE-2016-0634.bash43-047
@@ -0,0 +1,150 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-047
+
+Bug-Reported-by: Bernd Dietzel
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1507025
+
+Bug-Description:
+
+Bash performs word expansions on the prompt strings after the special
+escape sequences are expanded. If a malicious user can modify the system
+hostname or change the name of the bash executable and coerce a user into
+executing it, and the new name contains word expansions (including
+command substitution), bash will expand them in prompt strings containing
+the \h or \H and \s escape sequences, respectively.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/parse.y 2015-08-13 15:11:54.000000000 -0400
+--- parse.y 2016-03-07 15:44:14.000000000 -0500
+***************
+*** 5259,5263 ****
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+--- 5259,5263 ----
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, *t_host, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+***************
+*** 5407,5411 ****
+ case 's':
+ temp = base_pathname (shell_name);
+! temp = savestring (temp);
+ goto add_string;
+
+--- 5407,5415 ----
+ case 's':
+ temp = base_pathname (shell_name);
+! /* Try to quote anything the user can set in the file system */
+! if (promptvars || posixly_correct)
+! temp = sh_backslash_quote_for_double_quotes (temp);
+! else
+! temp = savestring (temp);
+ goto add_string;
+
+***************
+*** 5497,5503 ****
+ case 'h':
+ case 'H':
+! temp = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (temp, '.')))
+ *t = '\0';
+ goto add_string;
+
+--- 5501,5515 ----
+ case 'h':
+ case 'H':
+! t_host = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (t_host, '.')))
+ *t = '\0';
++ if (promptvars || posixly_correct)
++ /* Make sure that expand_prompt_string is called with a
++ second argument of Q_DOUBLE_QUOTES if we use this
++ function here. */
++ temp = sh_backslash_quote_for_double_quotes (t_host);
++ else
++ temp = savestring (t_host);
++ free (t_host);
+ goto add_string;
+
+*** ../bash-4.3-patched/y.tab.c 2015-08-13 15:11:54.000000000 -0400
+--- y.tab.c 2016-03-07 15:44:14.000000000 -0500
+***************
+*** 7571,7575 ****
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+--- 7571,7575 ----
+ int result_size, result_index;
+ int c, n, i;
+! char *temp, *t_host, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+***************
+*** 7719,7723 ****
+ case 's':
+ temp = base_pathname (shell_name);
+! temp = savestring (temp);
+ goto add_string;
+
+--- 7719,7727 ----
+ case 's':
+ temp = base_pathname (shell_name);
+! /* Try to quote anything the user can set in the file system */
+! if (promptvars || posixly_correct)
+! temp = sh_backslash_quote_for_double_quotes (temp);
+! else
+! temp = savestring (temp);
+ goto add_string;
+
+***************
+*** 7809,7815 ****
+ case 'h':
+ case 'H':
+! temp = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (temp, '.')))
+ *t = '\0';
+ goto add_string;
+
+--- 7813,7827 ----
+ case 'h':
+ case 'H':
+! t_host = savestring (current_host_name);
+! if (c == 'h' && (t = (char *)strchr (t_host, '.')))
+ *t = '\0';
++ if (promptvars || posixly_correct)
++ /* Make sure that expand_prompt_string is called with a
++ second argument of Q_DOUBLE_QUOTES if we use this
++ function here. */
++ temp = sh_backslash_quote_for_double_quotes (t_host);
++ else
++ temp = savestring (t_host);
++ free (t_host);
+ goto add_string;
+
+*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
+--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 46
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash.CVE-2016-7543.bash43-048 b/patches/source/bash/bash.CVE-2016-7543.bash43-048
new file mode 100644
index 00000000..6a8588ec
--- /dev/null
+++ b/patches/source/bash/bash.CVE-2016-7543.bash43-048
@@ -0,0 +1,54 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-048
+
+Bug-Reported-by: up201407890@alunos.dcc.fc.up.pt
+Bug-Reference-ID: <20151210201649.126444eionzfsam8@webmail.alunos.dcc.fc.up.pt>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-12/msg00054.html
+
+Bug-Description:
+
+If a malicious user can inject a value of $SHELLOPTS containing `xtrace'
+and a value for $PS4 that includes a command substitution into a shell
+running as root, bash will expand the command substitution as part of
+expanding $PS4 when it executes a traced command.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/variables.c 2015-11-26 12:31:21.000000000 -0500
+--- variables.c 2015-12-23 10:19:01.000000000 -0500
+***************
+*** 496,500 ****
+ set_if_not ("PS2", secondary_prompt);
+ }
+! set_if_not ("PS4", "+ ");
+
+ /* Don't allow IFS to be imported from the environment. */
+--- 496,504 ----
+ set_if_not ("PS2", secondary_prompt);
+ }
+!
+! if (current_user.euid == 0)
+! bind_variable ("PS4", "+ ", 0);
+! else
+! set_if_not ("PS4", "+ ");
+
+ /* Don't allow IFS to be imported from the environment. */
+
+*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
+--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 48
+
+ #endif /* _PATCHLEVEL_H_ */
diff --git a/patches/source/bash/bash.SlackBuild b/patches/source/bash/bash.SlackBuild
new file mode 100755
index 00000000..6494545c
--- /dev/null
+++ b/patches/source/bash/bash.SlackBuild
@@ -0,0 +1,173 @@
+#!/bin/sh
+
+# Copyright 2005-2017 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.
+
+# Modified 2011, 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+
+# Set initial variables:
+CWD=`pwd`
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-bash
+
+VERSION=${VERSION:-$(echo bash-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.1}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+if [ ! -d $TMP ]; then
+ mkdir -p $TMP # location to build the source
+fi
+rm -rf $PKG
+mkdir -p $PKG
+
+# Determine bash patchlevel:
+PATCHLEVEL="$( cd $CWD/bash-${VERSION}-patches ; /bin/ls bash4?-??? | tail -1 | cut -f 2 -d - 2> /dev/null )"
+if [ "$PATCHLEVEL" = "" ]; then
+ PATCHLEVEL=0
+fi
+
+cd $TMP
+rm -rf bash-$VERSION
+tar xvf $CWD/bash-$VERSION.tar.?z* || exit 1
+cd bash-$VERSION || exit 1
+chown -R root:root .
+find . -perm 664 | xargs chmod 644
+find . -perm 775 | xargs chmod 755
+
+if [ -d $CWD/bash-${VERSION}-patches ]; then
+ ( cd $CWD/bash-${VERSION}-patches ; cat bash4?-??? ) | patch -p0 --verbose || exit 1
+fi
+
+# Patch security issues with upstream patches for bash-4.3.
+# Don't worry about the patch rejections in patchlevel.h here.
+zcat $CWD/bash.CVE-2016-0634.bash43-047.gz | patch -p0 --verbose
+zcat $CWD/bash.CVE-2016-7543.bash43-048.gz | patch -p0 --verbose
+
+# End of preparations
+if echo "$*" | grep -qw -- --prep ; then
+ exit 0
+fi
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --build=$TARGET
+
+make -j4 || make || exit 1
+make install DESTDIR=$PKG
+mv $PKG/usr/share/doc $PKG/usr
+mkdir -p $PKG/bin
+mv $PKG/usr/bin/bash $PKG/bin/bash4.new
+# We don't include the "bashbug" script.
+rm -rf $PKG/usr/bin $PKG/usr/man/man1/bashbug.1
+
+# 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) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# bash.1 is already installed by "make install"
+( cd doc
+ for page in builtins.1 rbash.1 ; do
+ cat $page | gzip -9c > $PKG/usr/man/man1/$page.gz
+ done
+)
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+mkdir -p $PKG/usr/doc/bash-$VERSION
+cp -a AUTHORS CHANGES COMPAT COPYING INSTALL MANIFEST NEWS NOTES \
+ README Y2K doc/FAQ doc/INTRO \
+ $PKG/usr/doc/bash-$VERSION
+( cd doc ; groff -ms -Tascii article.ms > $PKG/usr/doc/bash-$VERSION/article.txt )
+
+# 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
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/bash-$VERSION.$PATCHLEVEL-$ARCH-$BUILD.txz
+
diff --git a/patches/source/bash/doinst.sh b/patches/source/bash/doinst.sh
new file mode 100644
index 00000000..867958fb
--- /dev/null
+++ b/patches/source/bash/doinst.sh
@@ -0,0 +1,18 @@
+if [ -r bin/bash ]; then
+ mv bin/bash bin/bash.old
+fi
+mv bin/bash4.new bin/bash
+if [ -f bin/bash.old ]; then
+ rm -f bin/bash.old
+fi
+if [ ! -r etc/shells ]; then
+ touch etc/shells
+ chmod 644 etc/shells
+fi
+if grep -wq /bin/bash etc/shells ; then
+ true
+else
+ echo /bin/bash >> etc/shells
+fi
+( cd usr/bin ; rm -rf bash )
+( cd usr/bin ; ln -sf /bin/bash bash )
diff --git a/patches/source/bash/slack-desc b/patches/source/bash/slack-desc
new file mode 100644
index 00000000..f2fdb929
--- /dev/null
+++ b/patches/source/bash/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------------------------------------------------------|
+bash: bash (sh-compatible shell)
+bash:
+bash: The GNU Bourne-Again SHell. Bash is a sh-compatible command
+bash: interpreter that executes commands read from the standard input or
+bash: from a file. Bash also incorporates useful features from the Korn
+bash: and C shells (ksh and csh). Bash is ultimately intended to be a
+bash: conformant implementation of the IEEE Posix Shell and Tools
+bash: specification (IEEE Working Group 1003.2).
+bash:
+bash: Bash must be present for the system to boot properly.
+bash:
diff --git a/patches/source/bind/3link.sh b/patches/source/bind/3link.sh
new file mode 100644
index 00000000..ec8ba4d1
--- /dev/null
+++ b/patches/source/bind/3link.sh
@@ -0,0 +1,136 @@
+rm -f lwres_addr_parse.3
+ln -sf lwres_resutil.3 lwres_addr_parse.3
+rm -f lwres_buffer_add.3
+ln -sf lwres_buffer.3 lwres_buffer_add.3
+rm -f lwres_buffer_back.3
+ln -sf lwres_buffer.3 lwres_buffer_back.3
+rm -f lwres_buffer_clear.3
+ln -sf lwres_buffer.3 lwres_buffer_clear.3
+rm -f lwres_buffer_first.3
+ln -sf lwres_buffer.3 lwres_buffer_first.3
+rm -f lwres_buffer_forward.3
+ln -sf lwres_buffer.3 lwres_buffer_forward.3
+rm -f lwres_buffer_getmem.3
+ln -sf lwres_buffer.3 lwres_buffer_getmem.3
+rm -f lwres_buffer_getuint16.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint16.3
+rm -f lwres_buffer_getuint32.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint32.3
+rm -f lwres_buffer_getuint8.3
+ln -sf lwres_buffer.3 lwres_buffer_getuint8.3
+rm -f lwres_buffer_init.3
+ln -sf lwres_buffer.3 lwres_buffer_init.3
+rm -f lwres_buffer_invalidate.3
+ln -sf lwres_buffer.3 lwres_buffer_invalidate.3
+rm -f lwres_buffer_putmem.3
+ln -sf lwres_buffer.3 lwres_buffer_putmem.3
+rm -f lwres_buffer_putuint16.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint16.3
+rm -f lwres_buffer_putuint32.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint32.3
+rm -f lwres_buffer_putuint8.3
+ln -sf lwres_buffer.3 lwres_buffer_putuint8.3
+rm -f lwres_buffer_subtract.3
+ln -sf lwres_buffer.3 lwres_buffer_subtract.3
+rm -f lwres_conf_clear.3
+ln -sf lwres_config.3 lwres_conf_clear.3
+rm -f lwres_conf_get.3
+ln -sf lwres_config.3 lwres_conf_get.3
+rm -f lwres_conf_init.3
+ln -sf lwres_config.3 lwres_conf_init.3
+rm -f lwres_conf_parse.3
+ln -sf lwres_config.3 lwres_conf_parse.3
+rm -f lwres_conf_print.3
+ln -sf lwres_config.3 lwres_conf_print.3
+rm -f lwres_context_allocmem.3
+ln -sf lwres_context.3 lwres_context_allocmem.3
+rm -f lwres_context_create.3
+ln -sf lwres_context.3 lwres_context_create.3
+rm -f lwres_context_destroy.3
+ln -sf lwres_context.3 lwres_context_destroy.3
+rm -f lwres_context_freemem.3
+ln -sf lwres_context.3 lwres_context_freemem.3
+rm -f lwres_context_initserial.3
+ln -sf lwres_context.3 lwres_context_initserial.3
+rm -f lwres_context_nextserial.3
+ln -sf lwres_context.3 lwres_context_nextserial.3
+rm -f lwres_context_sendrecv.3
+ln -sf lwres_context.3 lwres_context_sendrecv.3
+rm -f lwres_endhostent.3
+ln -sf lwres_gethostent.3 lwres_endhostent.3
+rm -f lwres_endhostent_r.3
+ln -sf lwres_gethostent.3 lwres_endhostent_r.3
+rm -f lwres_freeaddrinfo.3
+ln -sf lwres_getaddrinfo.3 lwres_freeaddrinfo.3
+rm -f lwres_freehostent.3
+ln -sf lwres_getipnode.3 lwres_freehostent.3
+rm -f lwres_gabnrequest_free.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_free.3
+rm -f lwres_gabnrequest_parse.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_parse.3
+rm -f lwres_gabnrequest_render.3
+ln -sf lwres_gabn.3 lwres_gabnrequest_render.3
+rm -f lwres_gabnresponse_free.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_free.3
+rm -f lwres_gabnresponse_parse.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_parse.3
+rm -f lwres_gabnresponse_render.3
+ln -sf lwres_gabn.3 lwres_gabnresponse_render.3
+rm -f lwres_getaddrsbyname.3
+ln -sf lwres_resutil.3 lwres_getaddrsbyname.3
+rm -f lwres_gethostbyaddr.3
+ln -sf lwres_gethostent.3 lwres_gethostbyaddr.3
+rm -f lwres_gethostbyaddr_r.3
+ln -sf lwres_gethostent.3 lwres_gethostbyaddr_r.3
+rm -f lwres_gethostbyname.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname.3
+rm -f lwres_gethostbyname2.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname2.3
+rm -f lwres_gethostbyname_r.3
+ln -sf lwres_gethostent.3 lwres_gethostbyname_r.3
+rm -f lwres_gethostent_r.3
+ln -sf lwres_gethostent.3 lwres_gethostent_r.3
+rm -f lwres_getipnodebyaddr.3
+ln -sf lwres_getipnode.3 lwres_getipnodebyaddr.3
+rm -f lwres_getipnodebyname.3
+ln -sf lwres_getipnode.3 lwres_getipnodebyname.3
+rm -f lwres_getnamebyaddr.3
+ln -sf lwres_resutil.3 lwres_getnamebyaddr.3
+rm -f lwres_gnbarequest_free.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_free.3
+rm -f lwres_gnbarequest_parse.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_parse.3
+rm -f lwres_gnbarequest_render.3
+ln -sf lwres_gnba.3 lwres_gnbarequest_render.3
+rm -f lwres_gnbaresponse_free.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_free.3
+rm -f lwres_gnbaresponse_parse.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_parse.3
+rm -f lwres_gnbaresponse_render.3
+ln -sf lwres_gnba.3 lwres_gnbaresponse_render.3
+rm -f lwres_herror.3
+ln -sf lwres_hstrerror.3 lwres_herror.3
+rm -f lwres_lwpacket_parseheader.3
+ln -sf lwres_packet.3 lwres_lwpacket_parseheader.3
+rm -f lwres_lwpacket_renderheader.3
+ln -sf lwres_packet.3 lwres_lwpacket_renderheader.3
+rm -f lwres_net_ntop.3
+ln -sf lwres_inetntop.3 lwres_net_ntop.3
+rm -f lwres_nooprequest_free.3
+ln -sf lwres_noop.3 lwres_nooprequest_free.3
+rm -f lwres_nooprequest_parse.3
+ln -sf lwres_noop.3 lwres_nooprequest_parse.3
+rm -f lwres_nooprequest_render.3
+ln -sf lwres_noop.3 lwres_nooprequest_render.3
+rm -f lwres_noopresponse_free.3
+ln -sf lwres_noop.3 lwres_noopresponse_free.3
+rm -f lwres_noopresponse_parse.3
+ln -sf lwres_noop.3 lwres_noopresponse_parse.3
+rm -f lwres_noopresponse_render.3
+ln -sf lwres_noop.3 lwres_noopresponse_render.3
+rm -f lwres_sethostent.3
+ln -sf lwres_gethostent.3 lwres_sethostent.3
+rm -f lwres_sethostent_r.3
+ln -sf lwres_gethostent.3 lwres_sethostent_r.3
+rm -f lwres_string_parse.3
+ln -sf lwres_resutil.3 lwres_string_parse.3
diff --git a/patches/source/bind/bind.SlackBuild b/patches/source/bind/bind.SlackBuild
new file mode 100755
index 00000000..fc14c99c
--- /dev/null
+++ b/patches/source/bind/bind.SlackBuild
@@ -0,0 +1,166 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=bind
+VERSION=${VERSION:-9.9.11-P1}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=/bind-$(mcookie)
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG/etc/default
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Remove use of SO_BSDCOMPAT which has been obsolete since the 2.2.x kernel
+# series, and generates warnings under 2.6.x kernels. This _might_ be fixed
+# upstream already, but an explicit #undef SO_BSDCOMPAT does not hurt:
+zcat $CWD/bind.so_bsdcompat.diff.gz | patch -p1 --verbose || exit
+
+# Make sure ownerships and permissions are sane:
+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:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-libtool \
+ --with-idn=/usr \
+ --mandir=/usr/man \
+ --enable-shared \
+ --disable-static \
+ --enable-threads \
+ --with-openssl=/usr \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# We like symlinks.
+( cd $PKG/usr/sbin
+ ln -sf named lwresd
+)
+
+# We like a lot of symlinks.
+( cd $PKG/usr/man/man3
+ sh $CWD/3link.sh
+)
+
+# Install init script:
+mkdir -p $PKG/etc/rc.d
+cp -a $CWD/rc.bind $PKG/etc/rc.d/rc.bind.new
+chmod 644 $PKG/etc/rc.d/rc.bind.new
+
+# Add /var/run/named directory:
+mkdir -p $PKG/var/run/named
+
+# Fix library perms:
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/*
+
+# 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
+ ( 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 *.* 2> /dev/null
+ )
+ done
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ CHANGES COPYRIGHT FAQ* README* \
+ doc/arm doc/misc \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# This one should have the correct perms of the config file:
+chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/misc/rndc.conf-sample
+
+# One format of this is plenty. Especially get rid of the bloated PDF.
+( cd $PKG/usr/doc/bind-$VERSION/arm
+ rm -f Makefile* *.pdf *.xml README.SGML latex-fixup.pl
+)
+
+# Add sample config files for a simple caching nameserver:
+mkdir -p $PKG/var/named/caching-example
+cat $CWD/caching-example/named.conf > $PKG/etc/named.conf.new
+cat $CWD/caching-example/localhost.zone > $PKG/var/named/caching-example/localhost.zone
+cat $CWD/caching-example/named.local > $PKG/var/named/caching-example/named.local
+cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.root
+# This name is deprecated, but having it here doesn't hurt in case
+# an old configuration file wants it:
+cat $CWD/caching-example/named.root > $PKG/var/named/caching-example/named.ca
+
+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}-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+
diff --git a/patches/source/bind/bind.so_bsdcompat.diff b/patches/source/bind/bind.so_bsdcompat.diff
new file mode 100644
index 00000000..5d78031b
--- /dev/null
+++ b/patches/source/bind/bind.so_bsdcompat.diff
@@ -0,0 +1,11 @@
+--- ./lib/isc/unix/socket.c.orig 2005-11-03 17:08:42.000000000 -0600
++++ ./lib/isc/unix/socket.c 2006-02-18 13:09:15.000000000 -0600
+@@ -245,6 +245,8 @@
+
+ #define SOCK_DEAD(s) ((s)->references == 0)
+
++#undef SO_BSDCOMPAT
++
+ static void
+ manager_log(isc_socketmgr_t *sockmgr,
+ isc_logcategory_t *category, isc_logmodule_t *module, int level,
diff --git a/patches/source/bind/caching-example/localhost.zone b/patches/source/bind/caching-example/localhost.zone
new file mode 100644
index 00000000..c47baf5f
--- /dev/null
+++ b/patches/source/bind/caching-example/localhost.zone
@@ -0,0 +1,11 @@
+$TTL 86400
+$ORIGIN localhost.
+@ 1D IN SOA @ root (
+ 42 ; serial (d. adams)
+ 3H ; refresh
+ 15M ; retry
+ 1W ; expiry
+ 1D ) ; minimum
+
+ 1D IN NS @
+ 1D IN A 127.0.0.1
diff --git a/patches/source/bind/caching-example/named.conf b/patches/source/bind/caching-example/named.conf
new file mode 100644
index 00000000..a8ee2795
--- /dev/null
+++ b/patches/source/bind/caching-example/named.conf
@@ -0,0 +1,31 @@
+options {
+ directory "/var/named";
+ /*
+ * If there is a firewall between you and nameservers you want
+ * to talk to, you might need to uncomment the query-source
+ * directive below. Previous versions of BIND always asked
+ * questions using port 53, but BIND 8.1 uses an unprivileged
+ * port by default.
+ */
+ // query-source address * port 53;
+};
+
+//
+// a caching only nameserver config
+//
+zone "." IN {
+ type hint;
+ file "caching-example/named.root";
+};
+
+zone "localhost" IN {
+ type master;
+ file "caching-example/localhost.zone";
+ allow-update { none; };
+};
+
+zone "0.0.127.in-addr.arpa" IN {
+ type master;
+ file "caching-example/named.local";
+ allow-update { none; };
+};
diff --git a/patches/source/bind/caching-example/named.local b/patches/source/bind/caching-example/named.local
new file mode 100644
index 00000000..8f40bcf3
--- /dev/null
+++ b/patches/source/bind/caching-example/named.local
@@ -0,0 +1,10 @@
+$TTL 86400
+@ IN SOA localhost. root.localhost. (
+ 2011032500 ; Serial
+ 28800 ; Refresh
+ 14400 ; Retry
+ 3600000 ; Expire
+ 86400 ) ; Minimum
+ IN NS localhost.
+
+1 IN PTR localhost.
diff --git a/patches/source/bind/caching-example/named.root b/patches/source/bind/caching-example/named.root
new file mode 100644
index 00000000..9cc20228
--- /dev/null
+++ b/patches/source/bind/caching-example/named.root
@@ -0,0 +1,90 @@
+; This file holds the information on root name servers needed to
+; initialize cache of Internet domain name servers
+; (e.g. reference this file in the "cache . <file>"
+; configuration file of BIND domain name servers).
+;
+; This file is made available by InterNIC
+; under anonymous FTP as
+; file /domain/named.cache
+; on server FTP.INTERNIC.NET
+; -OR- RS.INTERNIC.NET
+;
+; last update: November 05, 2014
+; related version of root zone: 2014110501
+;
+; formerly NS.INTERNIC.NET
+;
+. 3600000 NS A.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
+A.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:ba3e::2:30
+;
+; FORMERLY NS1.ISI.EDU
+;
+. 3600000 NS B.ROOT-SERVERS.NET.
+B.ROOT-SERVERS.NET. 3600000 A 192.228.79.201
+B.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:84::b
+;
+; FORMERLY C.PSI.NET
+;
+. 3600000 NS C.ROOT-SERVERS.NET.
+C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
+C.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2::c
+;
+; FORMERLY TERP.UMD.EDU
+;
+. 3600000 NS D.ROOT-SERVERS.NET.
+D.ROOT-SERVERS.NET. 3600000 A 199.7.91.13
+D.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2d::d
+;
+; FORMERLY NS.NASA.GOV
+;
+. 3600000 NS E.ROOT-SERVERS.NET.
+E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
+;
+; FORMERLY NS.ISC.ORG
+;
+. 3600000 NS F.ROOT-SERVERS.NET.
+F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
+F.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:2f::f
+;
+; FORMERLY NS.NIC.DDN.MIL
+;
+. 3600000 NS G.ROOT-SERVERS.NET.
+G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
+;
+; FORMERLY AOS.ARL.ARMY.MIL
+;
+. 3600000 NS H.ROOT-SERVERS.NET.
+H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
+H.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:1::803f:235
+;
+; FORMERLY NIC.NORDU.NET
+;
+. 3600000 NS I.ROOT-SERVERS.NET.
+I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
+I.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fe::53
+;
+; OPERATED BY VERISIGN, INC.
+;
+. 3600000 NS J.ROOT-SERVERS.NET.
+J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
+J.ROOT-SERVERS.NET. 3600000 AAAA 2001:503:c27::2:30
+;
+; OPERATED BY RIPE NCC
+;
+. 3600000 NS K.ROOT-SERVERS.NET.
+K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
+K.ROOT-SERVERS.NET. 3600000 AAAA 2001:7fd::1
+;
+; OPERATED BY ICANN
+;
+. 3600000 NS L.ROOT-SERVERS.NET.
+L.ROOT-SERVERS.NET. 3600000 A 199.7.83.42
+L.ROOT-SERVERS.NET. 3600000 AAAA 2001:500:3::42
+;
+; OPERATED BY WIDE
+;
+. 3600000 NS M.ROOT-SERVERS.NET.
+M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
+M.ROOT-SERVERS.NET. 3600000 AAAA 2001:dc3::35
+; End of file
diff --git a/patches/source/bind/doinst.sh b/patches/source/bind/doinst.sh
new file mode 100644
index 00000000..afeff946
--- /dev/null
+++ b/patches/source/bind/doinst.sh
@@ -0,0 +1,36 @@
+#!/bin/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...
+}
+
+# Keep same perms on rc.bind.new:
+if [ -e etc/rc.d/rc.bind ]; then
+ cp -a etc/rc.d/rc.bind etc/rc.d/rc.bind.new.incoming
+ cat etc/rc.d/rc.bind.new > etc/rc.d/rc.bind.new.incoming
+ mv etc/rc.d/rc.bind.new.incoming etc/rc.d/rc.bind.new
+fi
+
+config etc/named.conf.new
+config etc/rc.d/rc.bind.new
+
+# Add a /var/named if it doesn't exist:
+if [ ! -d var/named ]; then
+ mkdir -p var/named
+ chmod 755 var/named
+fi
+
+# Generate /etc/rndc.key if there's none there,
+# and there also no /etc/rndc.conf (the other
+# way to set this up).
+if [ ! -r etc/rndc.key -a ! -r /etc/rndc.conf ]; then
+ chroot . /sbin/ldconfig
+ chroot . /usr/sbin/rndc-confgen -r /dev/urandom -a 2> /dev/null
+fi
diff --git a/patches/source/bind/rc.bind b/patches/source/bind/rc.bind
new file mode 100644
index 00000000..6d77d73d
--- /dev/null
+++ b/patches/source/bind/rc.bind
@@ -0,0 +1,112 @@
+#!/bin/sh
+# Start/stop/restart the BIND name server daemon (named).
+
+
+# Start bind. In the past it was more secure to run BIND as a non-root
+# user (for example, with '-u daemon'), but the modern version of BIND
+# knows how to use the kernel's capability mechanism to drop all root
+# privileges except the ability to bind() to a privileged port and set
+# process resource limits, so -u should not be needed. If you wish to
+# use it anyway, chown the /var/run/named and /var/named directories to
+# the non-root user. The command options can be set like this in
+# /etc/default/named :
+# NAMED_OPTIONS="-u daemon"
+# So you will not have to edit this script.
+
+# You might also consider running BIND in a "chroot jail",
+# a discussion of which may be found in
+# /usr/doc/Linux-HOWTOs/Chroot-BIND-HOWTO.
+
+# One last note: rndc has a lot of other nice features that it is not
+# within the scope of this start/stop/restart script to support.
+# For more details, see "man rndc" or just type "rndc" to see the options.
+
+# Load command defaults:
+if [ -f /etc/default/named ] ; then . /etc/default/named ; fi
+if [ -f /etc/default/rndc ] ; then . /etc/default/rndc ; fi
+
+# Sanity check. If /usr/sbin/named is missing then it
+# doesn't make much sense to try to run this script:
+if [ ! -x /usr/sbin/named ]; then
+ echo "/etc/rc.d/rc.bind: no /usr/sbin/named found (or not executable); cannot start."
+ exit 1
+fi
+
+# Start BIND. As many times as you like. ;-)
+# Seriously, don't run "rc.bind start" if BIND is already
+# running or you'll get more than one copy running.
+bind_start() {
+ if [ -x /usr/sbin/named ]; then
+ echo "Starting BIND: /usr/sbin/named $NAMED_OPTIONS"
+ /usr/sbin/named $NAMED_OPTIONS
+ sleep 1
+ fi
+ if ! ps axc | grep -q named ; then
+ echo "WARNING: named did not start."
+ echo "Attempting to start named again: /usr/sbin/named $NAMED_OPTIONS"
+ /usr/sbin/named $NAMED_OPTIONS
+ sleep 1
+ if ps axc | grep -q named ; then
+ echo "SUCCESS: named started."
+ else
+ echo "FAILED: Sorry, a second attempt to start named has also failed."
+ echo "There may be a configuration error that needs fixing. Good luck!"
+ fi
+ fi
+}
+
+# Stop all running copies of BIND (/usr/sbin/named):
+bind_stop() {
+ echo "Stopping BIND: /usr/sbin/rndc $RDNC_OPTIONS stop"
+ /usr/sbin/rndc $RDNC_OPTIONS stop
+ # A problem with using "/usr/sbin/rndc stop" is that if you
+ # managed to get multiple copies of named running it will
+ # only stop one of them and then can't stop the others even
+ # if you run it again. So, after doing things the nice way
+ # we'll do them the old-fashioned way. If you don't like
+ # it you can comment it out, but unless you have a lot of
+ # other programs you run called "named" this is unlikely
+ # to have any ill effects:
+ sleep 1
+ if ps axc | grep -q named ; then
+ echo "Using "killall named" on additional BIND processes..."
+ /bin/killall named 2> /dev/null
+ fi
+}
+
+# Reload BIND:
+bind_reload() {
+ /usr/sbin/rndc $RDNC_OPTIONS reload
+}
+
+# Restart BIND:
+bind_restart() {
+ bind_stop
+ bind_start
+}
+
+# Get BIND status:
+bind_status() {
+ /usr/sbin/rndc $RDNC_OPTIONS status
+}
+
+case "$1" in
+'start')
+ bind_start
+ ;;
+'stop')
+ bind_stop
+ ;;
+'reload')
+ bind_reload
+ ;;
+'restart')
+ bind_restart
+ ;;
+'status')
+ bind_status
+ ;;
+*)
+ echo "usage $0 start|stop|reload|restart|status"
+esac
+
diff --git a/patches/source/bind/slack-desc b/patches/source/bind/slack-desc
new file mode 100644
index 00000000..9e9b15d1
--- /dev/null
+++ b/patches/source/bind/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------------------------------------------------------|
+bind: bind (DNS server and utilities)
+bind:
+bind: The named daemon and support utilities such as dig, host, and
+bind: nslookup. Sample configuration files for running a simple caching
+bind: nameserver are included. Documentation for advanced name server
+bind: setup can be found in /usr/doc/bind-9.x.x/.
+bind:
+bind:
+bind:
+bind:
+bind:
diff --git a/patches/source/blueman/blueman-open b/patches/source/blueman/blueman-open
new file mode 100644
index 00000000..0cfa688f
--- /dev/null
+++ b/patches/source/blueman/blueman-open
@@ -0,0 +1,114 @@
+#!/bin/sh
+# Blueman Mount Script for Slackware
+# by Zarren Spry & Robby Workman
+# Based on http://kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869
+
+# Set to 0 if you want more debugging messages
+DEBUG=1
+
+device_addr="$1"
+device_name="$(hcitool name $device_addr)"
+own_name="$(basename $0)"
+basedir="${basedir:-$HOME/obexfs}"
+mountpoint="${basedir}/${device_addr}"
+browser=${browser:-"xdg-open"}
+
+# If we're running in kde, use kdialog
+if [ "$KDE_FULL_SESSION" = "true" ]; then
+ if which kdialog 1>/dev/null 2>/dev/null; then
+ messagetype="kdialog"
+ fi
+# If not, then see if libnotify is available
+# Even if it is, there may not be a notification daemon running, but there's
+# no good way to check for this, so oh well...
+elif which notify-send 1>/dev/null 2>/dev/null; then
+ messagetype="libnotify"
+# If no libnotify, then use kdialog if it's installed
+elif which kdialog 1>/dev/null 2>/dev/null; then
+ messagetype="kdialog"
+# If all else fails, just don't do notifications
+else
+ messagetype=""
+fi
+
+# Mount function
+mount_device ()
+{
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Attempting to mount device $device_name to $mountpoint..."
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Execute: obexfs -b $device_addr $mountpoint"
+
+ mkdir -p $mountpoint
+ obexfs -b $device_addr $mountpoint 2>&1
+
+ if [ $? != 0 ]; then
+ MSG_TXT="Failed to mount $device_name to $mountpoint. $dbg_msg"
+ FAILZOR=definitely
+ if [ ! -z $DEBUG ]; then
+ logger -i -t $own_name "Failed to mount $device_name to $mountpoint."
+ fi
+ else
+ MSG_TXT="Successfully mounted $device_name to $mountpoint"
+ if [ ! -z $DEBUG ]; then
+ logger -i -t $own_name "Successfully mounted $device_name to $mountpoint."
+ fi
+ fi
+
+ if [ $messagetype == "kdialog" ]; then
+ kdialog --passivepopup "$MSG_TXT" 2
+ elif [ $messagetype == "libnotify" ]; then
+ notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
+ fi
+
+ [ "$FAILZOR" = "definitely" ] && exit 1
+
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Opening $mountpoint with $browser..."
+ $browser $mountpoint 2>&1
+
+}
+
+# Unmount function
+umount_device ()
+{
+ if grep -qw $mountpoint /proc/mounts 2>/dev/null ; then
+ [ ! -z $DEBUG ] && logger -i -t $own_name \
+ "$mountpoint has something mounted on it already - unmounting it..."
+
+ fusermount -u $mountpoint 1>/dev/null 2>/dev/null
+
+ if [ $? != 0 ]; then
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Failed to unmount $mountpoint with fusermount..."
+ umount -f $mountpoint 1>/dev/null 2>/dev/null
+ if [ $? != 0 ]; then
+ [ ! -z $DEBUG ] && \
+ logger -i -t $own_name \
+ "Failed to unmount $mountpoint with umount - try it manually as root and then start over."
+ FAILZOR=definitely
+ MSG_TXT="Failed to unmount $mountpoint with fusermount and umount - try it as root first."
+ else
+ break
+ fi
+ else
+ [ ! -z $DEBUG ] && logger -i -t $own_name "Successfully unmounted $device_name."
+ fi
+ else
+ [ ! -z $DEBUG ] && logger -i -t $own_name "$mountpoint has nothing mounted on it - continuing..."
+ fi
+
+ if [ $messagetype == "kdialog" ]; then
+ kdialog --passivepopup "$MSG_TXT" 3
+ elif [ $messagetype == "libnotify" ]; then
+ notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
+ fi
+ [ "$FAILZOR" = "definitely" ] && exit 1
+}
+
+MSG_TXT="Attempting to mount $device_name - please wait..."
+if [ $messagetype == "kdialog" ]; then
+ kdialog --passivepopup "$MSG_TXT" 4
+elif [ $messagetype == "libnotify" ]; then
+ notify-send --expire-time=20000 --icon=blueman "$MSG_TXT"
+fi
+
+umount_device
+mount_device
+
diff --git a/patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff b/patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff
new file mode 100644
index 00000000..542ee6e5
--- /dev/null
+++ b/patches/source/blueman/blueman-use_blueman-open_for_obexfs.diff
@@ -0,0 +1,12 @@
+diff -Nur blueman-1.21.orig/blueman/Constants.py.in blueman-1.21/blueman/Constants.py.in
+--- blueman-1.21.orig/blueman/Constants.py.in 2009-09-20 05:01:26.000000000 -0500
++++ blueman-1.21/blueman/Constants.py.in 2009-12-13 16:26:29.643850538 -0600
+@@ -10,7 +10,7 @@
+ POLKIT = "@polkit_val@" == "yes"
+ HAL_ENABLED = "@hal_en@" == "yes"
+
+-DEF_BROWSE_COMMAND = "nautilus --browser obex://[%d]"
++DEF_BROWSE_COMMAND = "/usr/libexec/blueman-open %d"
+
+ import os
+ import gettext
diff --git a/patches/source/blueman/blueman.CVE-2015-8612.diff b/patches/source/blueman/blueman.CVE-2015-8612.diff
new file mode 100644
index 00000000..163d6608
--- /dev/null
+++ b/patches/source/blueman/blueman.CVE-2015-8612.diff
@@ -0,0 +1,21 @@
+--- ./blueman/plugins/mechanism/Network.py.orig 2010-02-05 13:16:27.000000000 -0600
++++ ./blueman/plugins/mechanism/Network.py 2015-12-19 16:07:25.509562573 -0600
+@@ -22,6 +22,9 @@
+ import gobject
+ from blueman.main.NetConf import NetConf, DnsMasqHandler, DhcpdHandler
+
++DHCPDHANDLERS = {"DnsMasqHandler": DnsMasqHandler,
++ "DhcpdHandler": DhcpdHandler},
++
+ class Network(MechanismPlugin):
+ def on_load(self):
+ self.add_dbus_method(self.SetGN, in_signature="b", out_signature="", sender_keyword="caller")
+@@ -67,7 +70,7 @@
+ def EnableNetwork(self, ip_address, netmask, dhcp_handler, caller):
+ nc = NetConf.get_default()
+ nc.set_ipv4(ip_address, netmask)
+- eval("nc.set_dhcp_handler(%s)" % dhcp_handler)
++ nc.set_dhcp_handler(DHCPDHANDLERS[dhcp_handler])
+ nc.apply_settings()
+
+ def ReloadNetwork(self, caller):
diff --git a/patches/source/blueman/blueman.SlackBuild b/patches/source/blueman/blueman.SlackBuild
new file mode 100755
index 00000000..6757da5d
--- /dev/null
+++ b/patches/source/blueman/blueman.SlackBuild
@@ -0,0 +1,134 @@
+#!/bin/sh
+
+# Slackware build script for blueman
+
+# Copyright 2009 Robby Workman, Northport, Alabama, USA
+# Copyright 2010 Patrick Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=blueman
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-4_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ 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
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION
+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 {} \;
+
+# Use blueman-open, a modified version of this, to browse obexfs shares:
+# http://www.kde-apps.org/content/show.php/kde4+bluetooth+files+open?content=108869
+zcat $CWD/blueman-use_blueman-open_for_obexfs.diff.gz | patch -p1 --verbose || exit 1
+
+zcat $CWD/blueman.CVE-2015-8612.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./autogen.sh \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --with-dhcp-config=/etc/dhcpd.conf \
+ --disable-hal \
+ --enable-polkit \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Add the blueman-open script to /usr/libexec for browsing obexfs shares
+# I don't want to put this in PATH and have someone accidentally run it
+mkdir -p $PKG/usr/libexec
+cat $CWD/blueman-open > $PKG/usr/libexec/blueman-open
+chmod 0755 $PKG/usr/libexec/blueman-open
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+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 -p -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/blueman/doinst.sh b/patches/source/blueman/doinst.sh
new file mode 100644
index 00000000..17b18ef3
--- /dev/null
+++ b/patches/source/blueman/doinst.sh
@@ -0,0 +1,23 @@
+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...
+}
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
+
diff --git a/patches/source/blueman/slack-desc b/patches/source/blueman/slack-desc
new file mode 100644
index 00000000..d9b80088
--- /dev/null
+++ b/patches/source/blueman/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------------------------------------------------------|
+blueman: Blueman (Graphical Bluetooth Manager)
+blueman:
+blueman: Blueman is a GTK+ Bluetooth Manager for tasks such as:
+blueman:
+blueman: - Connecting to 3G/EDGE/GPRS via DUN profile.
+blueman: - Connecting to/Creating bluetooth networks
+blueman: - Connecting to input and audio devices
+blueman: - Sending/Receiving/Browsing files via OBEX
+blueman: - Pairing
+blueman:
+blueman: Homepage: http://blueman-project.org
diff --git a/patches/source/bluez/bluez-4.99.tar.sign b/patches/source/bluez/bluez-4.99.tar.sign
new file mode 100644
index 00000000..a9a039be
--- /dev/null
+++ b/patches/source/bluez/bluez-4.99.tar.sign
@@ -0,0 +1,17 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+iQIcBAABAgAGBQJPVkejAAoJEAbKn10dzyZZ0rEP/1BvYxUAoYf0cP2pQIqDwzkV
+l9PSVsxKq/n3rNwKEWBufo3heHYxVAG5prlPiY8yHj4Q0tFNiCSPL+zLObG++iDy
+3x+wxmaNaqbYurXQolHOqmH1L4OeMqT3mdzlb7xN48RLHLiS0XwTUMu2VBcM00me
+nd03q+7gV6c1v3bXrDalUJuQQYHeubSLT6YMDKmMj/7PiLfA8hEoOE1uWefcBcas
+B9xi5IBY208Cdq5odL6ae8ybvvG/PTDSFAOZNCzqIjJMYEwBosh1TbPN1AvUu1z2
+bzbgAa3oaRXnGZNDJ07pwa+2A+jAAtDRNO2R6z5lovpT568nwY6bmDIvbcIHuMHj
+xhrhbUvPnhIcn+no+WkAtYjNe8ydcdH8BkeA7o1oauRAYJlGoTIVugobu2a608NN
+7bGChWnhTPaKty8p0NGuE5gFvMwwLeE3W3d50+JH6icNBZbZOYK+88q1OI9hTHSW
+fUm/tydzqRwPDuqgt6CiYxT49AuwQ+MjfED0fwvlfta8A+tYUDkgaOkpUcJvq8v/
+Bnd0mUkT7l2fiymw7hfzJEh9EXBWmXJBs77zkYPBmzv/YDSCpMWZuEHI7gvcBu4j
+BN/+pJfYwo/kPRS0nXc/Xt438H806SUdvD926MmRwmg5jYmBRVJSemYtPHfkC03L
+MO/geWyy5aH5w/+THCgN
+=BIdO
+-----END PGP SIGNATURE-----
diff --git a/patches/source/bluez/bluez-run_udev_helper.patch b/patches/source/bluez/bluez-run_udev_helper.patch
new file mode 100644
index 00000000..a3a71e6d
--- /dev/null
+++ b/patches/source/bluez/bluez-run_udev_helper.patch
@@ -0,0 +1,14 @@
+Instead of automatically starting the bluetooth subsystem when devices
+are added, let's invoke a wrapper script in /lib/udev and have that
+wrapper check whether /etc/rc.d/rc.bluetooth is executable first.
+
+diff -Nur bluez-4.99/scripts/bluetooth.rules.in bluez-4.99.orig/scripts/bluetooth.rules.in
+--- bluez-4.99.orig/scripts/bluetooth.rules.in 2010-10-02 18:25:27.000000000 -0500
++++ bluez-4.99/scripts/bluetooth.rules.in 2013-06-27 22:05:55.572332197 -0500
+@@ -1,4 +1,4 @@
+ # Run helper every time a Bluetooth device appears
+ # On remove actions, bluetoothd should go away by itself
+-ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
+-ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="@prefix@/sbin/bluetoothd --udev"
++ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
++ACTION=="change", SUBSYSTEM=="bluetooth", RUN+="/lib/udev/bluetooth.sh"
diff --git a/patches/source/bluez/bluez.CVE-2017-1000251.diff b/patches/source/bluez/bluez.CVE-2017-1000251.diff
new file mode 100644
index 00000000..8f820363
--- /dev/null
+++ b/patches/source/bluez/bluez.CVE-2017-1000251.diff
@@ -0,0 +1,27 @@
+From 9e009647b14e810e06626dde7f1bb9ea3c375d09 Mon Sep 17 00:00:00 2001
+From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+Date: Wed, 13 Sep 2017 10:01:40 +0300
+Subject: sdp: Fix Out-of-bounds heap read in service_search_attr_req function
+
+Check if there is enough data to continue otherwise return an error.
+---
+ src/sdpd-request.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sdpd-request.c b/src/sdpd-request.c
+index 1eefdce..318d044 100644
+--- a/src/sdpd-request.c
++++ b/src/sdpd-request.c
+@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
+ } else {
+ /* continuation State exists -> get from cache */
+ sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
+- if (pCache) {
++ if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) {
+ uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent);
+ pResponse = pCache->data;
+ memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent);
+--
+cgit v1.1
+
+
diff --git a/patches/source/bluez/bluez.SlackBuild b/patches/source/bluez/bluez.SlackBuild
new file mode 100755
index 00000000..4b46c586
--- /dev/null
+++ b/patches/source/bluez/bluez.SlackBuild
@@ -0,0 +1,196 @@
+#!/bin/sh
+
+# Slackware build script for bluez - http://www.bluez.org
+
+# Copyright 2009, 2010, 2011, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=bluez
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-4_slack14.1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+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 || exit 1
+cd $PKGNAM-$VERSION
+
+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 {} \;
+
+# Start bluetoothd via a wrapper script to check rc.bluetooth's +/-x first
+zcat $CWD/bluez-run_udev_helper.patch.gz | patch -p1 --verbose || exit 1
+
+# Enable the audio socket in audio.conf:
+zcat $CWD/bluez.enable.audio.socket.diff.gz | patch -p1 --verbose || exit 1
+
+# Patch CVE-2017-1000251:
+zcat $CWD/bluez.CVE-2017-1000251.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --localstatedir=/var \
+ --enable-datafiles \
+ --enable-audio \
+ --enable-gstreamer \
+ --enable-alsa \
+ --enable-usb \
+ --enable-tools\
+ --enable-input \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-dfutool \
+ --enable-hidd \
+ --enable-pand \
+ --enable-dund \
+ --enable-cups \
+ --enable-service \
+ --enable-network \
+ --enable-serial \
+ --enable-health \
+ --enable-pnat \
+ --enable-maemo6 \
+ --enable-wiimote \
+ --enable-test \
+ --enable-dbusoob \
+ --with-ouifile=/usr/share/hwdata/oui.txt \
+ --disable-silent-rules \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+cp scripts/bluetooth-serial.rules $PKG/lib/udev/rules.d/97-bluetooth-serial.rules || exit 1
+cp -a scripts/bluetooth_serial $PKG/lib/udev/bluetooth_serial || exit 1
+chmod 0755 $PKG/lib/udev/bluetooth_serial
+
+mkdir -p $PKG/etc/bluetooth
+cp -a audio/audio.conf $PKG/etc/bluetooth
+cp -a input/input.conf $PKG/etc/bluetooth
+cp -a network/network.conf $PKG/etc/bluetooth
+cp -a serial/serial.conf $PKG/etc/bluetooth
+chmod 644 $PKG/etc/bluetooth/*.conf
+
+mkdir -p $PKG/etc/alsa
+mv $PKG/usr/share/alsa/bluetooth.conf $PKG/etc/alsa
+( cd $PKG/usr/share/alsa ; ln -s ../../../etc/alsa/bluetooth.conf . )
+
+# Do not overwrite configuration
+# Well, let the dbus file be overwritten, as it is not usually user-edited.
+( cd $PKG
+ for file in \
+ etc/alsa/bluetooth.conf \
+ etc/bluetooth/audio.conf \
+ etc/bluetooth/input.conf \
+ etc/bluetooth/network.conf \
+ etc/bluetooth/serial.conf \
+ etc/bluetooth/rfcomm.conf \
+ etc/bluetooth/main.conf \
+ etc/modprobe.d/bluetooth.conf ; do
+ mv ${file} ${file}.new
+ done
+)
+
+# Add the wrapper script
+cat $CWD/config/bluetooth.sh > $PKG/lib/udev/bluetooth.sh
+chmod 0755 $PKG/lib/udev/bluetooth.sh
+
+# Add an init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+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/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+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/patches/source/bluez/bluez.enable.audio.socket.diff b/patches/source/bluez/bluez.enable.audio.socket.diff
new file mode 100644
index 00000000..52b9d0c6
--- /dev/null
+++ b/patches/source/bluez/bluez.enable.audio.socket.diff
@@ -0,0 +1,12 @@
+--- ./audio/audio.conf.orig 2010-08-25 00:10:02.000000000 -0500
++++ ./audio/audio.conf 2012-09-09 12:36:31.766492102 -0500
+@@ -4,6 +4,9 @@
+ # particular interface
+ [General]
+
++# Enable the audio socket
++Enable=Socket
++
+ # Switch to master role for incoming connections (defaults to true)
+ #Master=true
+
diff --git a/patches/source/bluez/config/bluetooth.modprobe b/patches/source/bluez/config/bluetooth.modprobe
new file mode 100644
index 00000000..3072d788
--- /dev/null
+++ b/patches/source/bluez/config/bluetooth.modprobe
@@ -0,0 +1,3 @@
+# use "reset=1" as default, since it should be safe for recent devices and
+# solves all kind of problems.
+options btusb reset=1
diff --git a/patches/source/bluez/config/bluetooth.sh b/patches/source/bluez/config/bluetooth.sh
new file mode 100644
index 00000000..22034551
--- /dev/null
+++ b/patches/source/bluez/config/bluetooth.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Check whether /etc/rc.d/rc.bluetooth is executable before starting
+# the bluetooth subsystem for hotplugged bluetooth devices
+[ -x /etc/rc.d/rc.bluetooth ] && exec /usr/sbin/bluetoothd --udev
+exit 0
+
diff --git a/patches/source/bluez/config/rc.bluetooth b/patches/source/bluez/config/rc.bluetooth
new file mode 100644
index 00000000..296c4542
--- /dev/null
+++ b/patches/source/bluez/config/rc.bluetooth
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+bluez_start() {
+ /usr/sbin/bluetoothd
+}
+
+bluez_stop() {
+ udevadm trigger --subsystem-match=bluetooth --action=remove
+ pkill -TERM bluetoothd 1>/dev/null 2>/dev/null
+}
+
+case "$1" in
+ start)
+ bluez_start
+ ;;
+ stop)
+ bluez_stop
+ ;;
+ restart)
+ bluez_stop
+ sleep 1
+ bluez_start
+ ;;
+ *)
+ printf "Usage: $N {start|stop|restart}\n"
+ exit 1
+ ;;
+esac
+
diff --git a/patches/source/bluez/doinst.sh b/patches/source/bluez/doinst.sh
new file mode 100644
index 00000000..fe68ad7f
--- /dev/null
+++ b/patches/source/bluez/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...
+}
+
+# Keep same perms on rc.bluetooth.new:
+if [ -e etc/rc.d/rc.bluetooth ]; then
+ cp -a etc/rc.d/rc.bluetooth etc/rc.d/rc.bluetooth.new.incoming
+ cat etc/rc.d/rc.bluetooth.new > etc/rc.d/rc.bluetooth.new.incoming
+ mv etc/rc.d/rc.bluetooth.new.incoming etc/rc.d/rc.bluetooth.new
+fi
+
+config etc/rc.d/rc.bluetooth.new
+config etc/alsa/bluetooth.conf.new
+config etc/bluetooth/audio.conf.new
+config etc/bluetooth/input.conf.new
+config etc/bluetooth/main.conf.new
+config etc/bluetooth/network.conf.new
+config etc/bluetooth/serial.conf.new
+config etc/bluetooth/rfcomm.conf.new
+
diff --git a/patches/source/bluez/slack-desc b/patches/source/bluez/slack-desc
new file mode 100644
index 00000000..607fa4d9
--- /dev/null
+++ b/patches/source/bluez/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------------------------------------------------------|
+bluez: bluez (Bluetooth libraries and utilities)
+bluez:
+bluez: Bluez is the Bluetooth stack for Linux, allowing Bluetooth adaptors
+bluez: and devices to be used with Linux. This package contains the Bluez
+bluez: libraries, utilities, and other support files.
+bluez:
+bluez: For more info, visit: http://www.bluez.org
+bluez:
+bluez:
+bluez:
+bluez:
diff --git a/patches/source/btrfs-progs/btrfs-progs.SlackBuild b/patches/source/btrfs-progs/btrfs-progs.SlackBuild
new file mode 100755
index 00000000..f02b75a0
--- /dev/null
+++ b/patches/source/btrfs-progs/btrfs-progs.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+# Copyright 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+CWD=$(pwd)
+
+PKGNAM=btrfs-progs
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Download the btrfs-progs Git head if there's no tarball:
+if ! /bin/ls $CWD/btrfs-progs*tar* 1> /dev/null 2> /dev/null ; then
+ git clone git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git
+ rm -r btrfs-progs/.git
+ tar cf btrfs-progs-$(date +%Y%m%d).tar btrfs-progs
+ xz -9 btrfs-progs-$(date +%Y%m%d).tar
+ rm -r $CWD/btrfs-progs
+fi
+
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | cut -f 3 -d - | cut -f 1 -d .)}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$TMP" = "" ]; then
+ TMP=/tmp
+fi
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $PKG
+
+cd $TMP
+rm -rf btrfs-progs
+tar xf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd btrfs-progs
+
+# 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 {} \;
+
+# Build:
+make prefix=/usr bindir=/sbin $NUMJOBS || make prefix=/usr bindir=/sbin || exit 1
+
+# Install:
+make install prefix=/usr bindir=/sbin DESTDIR=$PKG || exit 1
+
+# 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
+)
+
+# Move manpages:
+mv $PKG/usr/share/man $PKG/usr/man
+rmdir $PKG/share
+
+# Do not ship libraries.
+# If there becomes a use for these outside of btrfs-progs, let me know.
+rm -rf $PKG/usr/lib
+
+# According to https://btrfs.wiki.kernel.org/index.php/FAQ#When_will_Btrfs_have_a_fsck_like_tool.3F
+# it is not recommended to make fsck.btrfs a no-op by linking it to /bin/true:
+ln -sf /bin/true $PKG/sbin/fsck.btrfs
+
+# 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
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ COPYING* INSTALL README* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $TMP/package-${PKGNAM}
+makepkg -l y -c n ../${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/btrfs-progs/slack-desc b/patches/source/btrfs-progs/slack-desc
new file mode 100644
index 00000000..d53953c8
--- /dev/null
+++ b/patches/source/btrfs-progs/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-------------------------------------------------------|
+btrfs-progs: btrfs-progs (Btrfs filesystem utilities)
+btrfs-progs:
+btrfs-progs: Btrfs is a new copy on write filesystem for Linux aimed at implementing
+btrfs-progs: advanced features while focusing on fault tolerance, repair and easy
+btrfs-progs: administration. Initially developed by Oracle, Btrfs is licensed under
+btrfs-progs: the GPL and open for contribution from anyone.
+btrfs-progs:
+btrfs-progs:
+btrfs-progs:
+btrfs-progs: Btrfs homepage: http://btrfs.wiki.kernel.org
+btrfs-progs:
diff --git a/patches/source/ca-certificates/ca-certificates.SlackBuild b/patches/source/ca-certificates/ca-certificates.SlackBuild
new file mode 100755
index 00000000..ba1be3e7
--- /dev/null
+++ b/patches/source/ca-certificates/ca-certificates.SlackBuild
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+# Slackware build script for ca-certificates
+
+# Copyright 2009,2011 Robby Workman Northport, AL, USA
+# Copyright 2012, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=ca-certificates
+VERSION=${VERSION:-20161130}
+ARCH=noarch
+BUILD=${BUILD:-1_slack14.1}
+
+TARVERSION=${VERSION}+nmu1
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/share/ca-certificates $PKG/usr/sbin
+cd $TMP
+
+# Need both $PKGNAM and $PKGNAM-$VERSION since upstream can't decide how
+# to package their tarball:
+rm -rf $PKGNAM $PKGNAM-$VERSION
+
+# Extract the tarball:
+tar xvf $CWD/${PKGNAM}_$TARVERSION.tar.?z || exit 1
+
+# Again, both $PKGNAM and $PKGNAM-$VERSION are needed here:
+cd $PKGNAM-$VERSION || cd $PKGNAM || 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 {} \;
+
+# Obsolete?
+#zcat $CWD/patches/fixup_DESTDIR.diff.gz | patch -p1 || exit 1
+
+# Remove incompatible command operators used to call 'run-parts':
+zcat $CWD/patches/fixup_update-ca-certificates.diff.gz | patch -p1 || exit 1
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/etc/ca-certificates/update.d
+printf "# Automatically generated by $PKGNAM-$VERSION \n#\n" \
+ > $PKG/etc/ca-certificates.conf.new
+( cd $PKG/usr/share/ca-certificates
+ find . -name '*.crt' | sort | cut -b3-
+) >> $PKG/etc/ca-certificates.conf.new
+
+mkdir -p $PKG/usr/man/man8
+gzip -9c sbin/update-ca-certificates.8 > \
+ $PKG/usr/man/man8/update-ca-certificates.8.gz
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mv debian/NEWS debian/NEWS.Debian
+cp -a debian/NEWS.Debian debian/README.Debian $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/var/log/setup
+cat $CWD/setup.11.cacerts > $PKG/var/log/setup/setup.11.cacerts
+chmod 755 $PKG/var/log/setup/setup.11.cacerts
+
+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/patches/source/ca-certificates/doinst.sh b/patches/source/ca-certificates/doinst.sh
new file mode 100644
index 00000000..cfd7d795
--- /dev/null
+++ b/patches/source/ca-certificates/doinst.sh
@@ -0,0 +1,19 @@
+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/ca-certificates.conf.new
+
+if [ -x /usr/sbin/update-ca-certificates ]; then
+ /usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
+fi
+
diff --git a/patches/source/ca-certificates/patches/fixup_DESTDIR.diff b/patches/source/ca-certificates/patches/fixup_DESTDIR.diff
new file mode 100644
index 00000000..96406418
--- /dev/null
+++ b/patches/source/ca-certificates/patches/fixup_DESTDIR.diff
@@ -0,0 +1,49 @@
+--- ./cacert.org/Makefile.orig
++++ ./cacert.org/Makefile
+@@ -7,6 +7,7 @@
+ clean:
+
+ install:
++ mkdir -p $(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/cacert.org_$$p ; \
+ done
+--- ./mozilla/Makefile.orig
++++ ./mozilla/Makefile
+@@ -9,6 +9,7 @@
+ -rm -f *.crt
+
+ install:
++ mkdir -p $(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/$$p ; \
+ done
+--- ./sbin/Makefile.orig
++++ ./sbin/Makefile
+@@ -8,4 +8,5 @@
+ clean:
+
+ install:
++ mkdir -p $(DESTDIR)/usr/sbin
+ install -m755 update-ca-certificates $(DESTDIR)/usr/sbin/
+--- ./Makefile.orig
++++ ./Makefile
+@@ -17,7 +17,7 @@
+
+ install:
+ for dir in $(SUBDIRS); do \
+- mkdir $(DESTDIR)/$(CERTSDIR)/$$dir; \
++ mkdir -p $(DESTDIR)/$(CERTSDIR)/$$dir; \
+ $(MAKE) -C $$dir install CERTSDIR=$(DESTDIR)/$(CERTSDIR)/$$dir; \
+ done
+ for dir in sbin; do \
+--- ./spi-inc.org/Makefile.orig
++++ ./spi-inc.org/Makefile
+@@ -7,6 +7,7 @@
+ clean:
+
+ install:
++ mkdir -p $PKG/$(CERTSDIR)
+ for p in *.crt; do \
+ install -m 644 $$p $(CERTSDIR)/$$p ; \
+ done
diff --git a/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff b/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff
new file mode 100644
index 00000000..1c394058
--- /dev/null
+++ b/patches/source/ca-certificates/patches/fixup_update-ca-certificates.diff
@@ -0,0 +1,12 @@
+diff -urN ca-certificates-20150426.orig/sbin/update-ca-certificates ca-certificates-20150426/sbin/update-ca-certificates
+--- ca-certificates-20150426.orig/sbin/update-ca-certificates 2015-04-01 13:47:25.000000000 +0100
++++ ca-certificates-20150426/sbin/update-ca-certificates 2015-09-14 22:51:39.856021883 +0100
+@@ -193,7 +193,7 @@
+ echo "Running hooks in $HOOKSDIR..."
+ VERBOSE_ARG=
+ [ "$verbose" = 0 ] || VERBOSE_ARG="--verbose"
+- eval run-parts "$VERBOSE_ARG" --test -- "$HOOKSDIR" | while read hook
++ eval run-parts "$HOOKSDIR" | while read hook
+ do
+ ( cat "$ADDED"
+ cat "$REMOVED" ) | "$hook" || echo "E: $hook exited with code $?."
diff --git a/patches/source/ca-certificates/setup.11.cacerts b/patches/source/ca-certificates/setup.11.cacerts
new file mode 100644
index 00000000..328b61c0
--- /dev/null
+++ b/patches/source/ca-certificates/setup.11.cacerts
@@ -0,0 +1,3 @@
+#!/bin/sh
+#BLURB="Rebuild SSL certificate database."
+chroot . usr/sbin/update-ca-certificates --fresh 1> /dev/null 2> /dev/null
diff --git a/patches/source/ca-certificates/slack-desc b/patches/source/ca-certificates/slack-desc
new file mode 100644
index 00000000..c302e828
--- /dev/null
+++ b/patches/source/ca-certificates/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-----------------------------------------------------|
+ca-certificates: ca-certificates (PEM Files of CA Certificates)
+ca-certificates:
+ca-certificates: This package includes PEM files of CA certificates to allow SSL-based
+ca-certificates: applications to check for the authenticity of SSL connections.
+ca-certificates:
+ca-certificates: Homepage: http://packages.qa.debian.org/c/ca-certificates.html
+ca-certificates:
+ca-certificates:
+ca-certificates:
+ca-certificates:
+ca-certificates:
diff --git a/patches/source/cairo/cairo.SlackBuild b/patches/source/cairo/cairo.SlackBuild
new file mode 100755
index 00000000..53aa3465
--- /dev/null
+++ b/patches/source/cairo/cairo.SlackBuild
@@ -0,0 +1,132 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2014 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=cairo
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -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
+
+CWD=$(pwd)
+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
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --disable-gtk-doc \
+ --disable-quartz \
+ --disable-static \
+ --disable-win32 \
+ --disable-trace \
+ --enable-xlib \
+ --enable-xcb \
+ --enable-ps \
+ --enable-pdf \
+ --enable-svg \
+ --enable-tee \
+ --enable-ft \
+ --enable-gl \
+ --enable-gobject \
+ --enable-xml \
+ --build=$ARCH-slackware-linux
+
+# None of these are 'stable' yet...
+# --enable-qt \
+# --enable-drm \
+
+# Not sure if these two are needed / useful yet; --enable-xcb is now default
+# --enable-xcb-shm \
+# ^^ may cause GTK+3 instability
+# --enable-xlib-xcb \
+# ^^ this one caused a GIMP slowdown
+
+# Skipping this, because it causes a dependency on the specific
+# version of binutils installed at compile time:
+# --enable-trace
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+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/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS BIBLIOGRAPHY BUGS CODING_STYLE COPYING* HACKING NEWS PORTING_GUIDE README RELEASING \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+( cd $PKG/usr/doc/$PKGNAM-$VERSION ; ln -sf /usr/share/gtk-doc/html/cairo html )
+
+# We do not need the entire NEWS file.
+if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat NEWS | head -n 1000 > $DOCSDIR/NEWS
+ touch -r NEWS $DOCSDIR/NEWS
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/cairo/paredown.sh b/patches/source/cairo/paredown.sh
new file mode 100755
index 00000000..a2436974
--- /dev/null
+++ b/patches/source/cairo/paredown.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Copyright 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Remove the reference PNG files from the cairo source tarball.
+# These are used only for build time testing, and cairo always fails
+# a large number of tests, making these files more or less useless to
+# the average end user. If you really need them for some reason, you
+# can fetch the original tarball from cairographics.org.
+#
+# Removing these files reduces the size of the source tarball by 93%.
+
+PKGNAM=cairo
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+
+if [ ! -r $PKGNAM-$VERSION.tar.xz ]; then
+ echo "$PKGNAM-$VERSION.tar.xz is not a cairo tarball. Exiting."
+ exit 1
+fi
+
+touch -r $PKGNAM-$VERSION.tar.xz tmp-timestamp || exit 1
+
+rm -rf $PKGNAM-$VERSION
+tar xvf $PKGNAM-$VERSION.tar.xz || exit 1
+rm -f $PKGNAM-$VERSION/test/reference/*
+rm -f $PKGNAM-$VERSION.tar.xz
+tar cvf $PKGNAM-$VERSION.tar $PKGNAM-$VERSION
+touch -r tmp-timestamp $PKGNAM-$VERSION.tar
+xz -9 -v $PKGNAM-$VERSION.tar
+rm -rf $PKGNAM-$VERSION tmp-timestamp
+
+echo "Repacking of $PKGNAM-$VERSION.tar.xz complete."
+
diff --git a/patches/source/cairo/slack-desc b/patches/source/cairo/slack-desc
new file mode 100644
index 00000000..b70ae035
--- /dev/null
+++ b/patches/source/cairo/slack-desc
@@ -0,0 +1,20 @@
+# 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------------------------------------------------------|
+cairo: cairo (graphics library used by GTK+)
+cairo:
+cairo: Cairo is a vector graphics library designed to provide high-quality
+cairo: display and print output. Cairo is designed to produce
+cairo: identical output on all output media while taking advantage of display
+cairo: hardware acceleration when available (eg. through the X Render
+cairo: Extension or OpenGL).
+cairo:
+cairo:
+cairo:
+cairo:
+
diff --git a/patches/source/cups/cups-1.5.4-usb-quirks.diff b/patches/source/cups/cups-1.5.4-usb-quirks.diff
new file mode 100644
index 00000000..dfe1dab8
--- /dev/null
+++ b/patches/source/cups/cups-1.5.4-usb-quirks.diff
@@ -0,0 +1,319 @@
+From efe932a075744c1cfdf755ce8fea0870fc38a1c8 Mon Sep 17 00:00:00 2001
+From: mancha <mancha1@hush.com>
+Date: Wed, 9 Oct 2013
+Subject: Backport usb fixes to CUPS 1.5.4
+
+ usb-libusb.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++++----------
+ 1 file changed, 127 insertions(+), 25 deletions(-)
+
+--- a/backend/usb-libusb.c 2012-07-16
++++ b/backend/usb-libusb.c 2013-10-09
+@@ -13,7 +13,7 @@
+ *
+ * Contents:
+ *
+- * list_devices() - List the available printers.
++ * list_devices() - List the available printers.
+ * print_device() - Print a file to a USB device.
+ * close_device() - Close the connection to the USB printer.
+ * find_device() - Find or enumerate USB printers.
+@@ -70,7 +70,7 @@ typedef struct usb_printer_s /**** USB
+ read_endp, /* Read endpoint */
+ protocol, /* Protocol: 1 = Uni-di, 2 = Bi-di. */
+ usblp_attached, /* "usblp" kernel module attached? */
+- opened_for_job; /* Set to 1 by print_device() */
++ reset_after_job; /* Set to 1 by print_device() */
+ unsigned int quirks; /* Quirks flags */
+ struct libusb_device_handle *handle; /* Open handle to device */
+ } usb_printer_t;
+@@ -122,6 +122,9 @@ struct quirk_printer_struct {
+ #define USBLP_QUIRK_USB_INIT 0x2 /* needs vendor USB init string */
+ #define USBLP_QUIRK_BAD_CLASS 0x4 /* descriptor uses vendor-specific
+ Class or SubClass */
++#define USBLP_QUIRK_BLACKLIST 0x8 /* these printers do not conform to the USB print spec */
++#define USBLP_QUIRK_RESET 0x4000 /* After printing do a reset
++ for clean-up */
+ #define USBLP_QUIRK_NO_REATTACH 0x8000 /* After printing we cannot re-attach
+ the usblp kernel module */
+
+@@ -139,17 +142,97 @@ static const struct quirk_printer_struct
+ { 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
+ { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
+ { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
++ { 0x043d, 0x00f3, USBLP_QUIRK_NO_REATTACH }, /* Lexmark International,
++ Inc. (e250d), https://bugs.launchpad.net/bugs/1084164 */
++ { 0x043d, 0x00d7, USBLP_QUIRK_NO_REATTACH }, /* Lexmark E328 */
+ { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820,
+ by zut <kernel@zut.de> */
++ { 0x04a9, 0x1095, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP6000D
++ Printer, https://bugs.launchpad.net/bugs/1160638 */
++ { 0x04a9, 0x10a2, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4200
++ Printer, http://www.cups.org/str.php?L4155 */
++ { 0x04a9, 0x10b6, USBLP_QUIRK_BIDIR }, /* Canon, Inc. PIXMA iP4300
++ Printer, https://bugs.launchpad.net/bugs/1032385 */
++ { 0x04a9, 0x1721, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP210
++ https://bugzilla.redhat.com/show_bug.cgi?id=847923#c53 */
++ { 0x04a9, 0x170c, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP500
++ Printer, https://bugs.launchpad.net/bugs/1032456 */
++ { 0x04a9, 0x1717, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP510
++ Printer, https://bugs.launchpad.net/bugs/1050009 */
++ { 0x04a9, 0x173d, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP550
++ Printer, http://www.cups.org/str.php?L4155 */
++ { 0x04a9, 0x173e, USBLP_QUIRK_BIDIR }, /* Canon, Inc. MP560
++ Printer, http://www.cups.org/str.php?L4155 */
++ { 0x04a9, 0x26a3, USBLP_QUIRK_NO_REATTACH }, /* Canon, Inc. MF4150
++ Printer, https://bugs.launchpad.net/bugs/1160638 */
++ { 0x04f9, 0x001a, USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
++ HL-1430 Laser Printer,
++ https://bugs.launchpad.net/bugs/1038695 */
+ { 0x04f9, 0x000d, USBLP_QUIRK_BIDIR |
+ USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
+- HL-1440 Laser Printer */
++ HL-1440 Laser Printer,
++ https://bugs.launchpad.net/bugs/1000253 */
++ { 0x04f9, 0x000e, USBLP_QUIRK_BIDIR |
++ USBLP_QUIRK_NO_REATTACH }, /* Brother Industries, Ltd
++ HL-1450 Laser Printer,
++ https://bugs.launchpad.net/bugs/1000253 */
++ { 0x06bc, 0x000b, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp.
++ Okipage 14ex Printer,
++ https://bugs.launchpad.net/bugs/872483 */
++ { 0x06bc, 0x01c7, USBLP_QUIRK_NO_REATTACH }, /* Oki Data Corp. B410d,
++ https://bugs.launchpad.net/bugs/872483 */
++ { 0x04b8, 0x0001, USBLP_QUIRK_BIDIR |
++ USBLP_QUIRK_NO_REATTACH }, /* Seiko Epson Corp. Stylus Color 740 / Photo 750,
++ http://bugs.debian.org/697970 */
++ { 0x04b8, 0x0005, USBLP_QUIRK_NO_REATTACH }, /* Seiko Epson Corp. Stylus Color 670,
++ https://bugs.launchpad.net/bugs/872483 */
+ { 0x04b8, 0x0202, USBLP_QUIRK_BAD_CLASS }, /* Seiko Epson Receipt
+ Printer M129C */
+ { 0x067b, 0x2305, USBLP_QUIRK_BIDIR |
+- USBLP_QUIRK_NO_REATTACH },
++ USBLP_QUIRK_NO_REATTACH |
++ USBLP_QUIRK_RESET },
+ /* Prolific Technology, Inc. PL2305 Parallel Port
+- (USB -> Parallel adapter) */
++ (USB -> Parallel adapter), https://bugs.launchpad.net/bugs/987485 */
++ { 0x0924, 0x3ce9, USBLP_QUIRK_NO_REATTACH }, /* Xerox Phaser 3124
++ https://bugzilla.redhat.com/show_bug.cgi?id=867392 */
++ { 0x0924, 0x4293, USBLP_QUIRK_NO_REATTACH }, /* Xerox WorkCentre 3210
++ https://bugs.launchpad.net/bugs/1102470 */
++ { 0x1a86, 0x7584, USBLP_QUIRK_NO_REATTACH }, /* QinHeng Electronics
++ CH340S (USB -> Parallel adapter), https://bugs.launchpad.net/bugs/1000253 */
++ { 0x04e8, 0x0000, USBLP_QUIRK_RESET }, /* All Samsung devices,
++ https://bugs.launchpad.net/bugs/1032456 */
++ { 0x0a5f, 0x0000, USBLP_QUIRK_BIDIR }, /* All Zebra devices,
++ https://bugs.launchpad.net/bugs/1001028 */
++ /* Canon */
++ { 0x04a9, 0x304a, USBLP_QUIRK_BLACKLIST }, /* Canon CP-10 */
++ { 0x04a9, 0x3063, USBLP_QUIRK_BLACKLIST }, /* Canon CP-100 */
++ { 0x04a9, 0x307c, USBLP_QUIRK_BLACKLIST }, /* Canon CP-200 */
++ { 0x04a9, 0x307d, USBLP_QUIRK_BLACKLIST }, /* Canon CP-300 */
++ { 0x04a9, 0x30bd, USBLP_QUIRK_BLACKLIST }, /* Canon CP-220 */
++ { 0x04a9, 0x30be, USBLP_QUIRK_BLACKLIST }, /* Canon CP-330 */
++ { 0x04a9, 0x30f6, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP400 */
++ { 0x04a9, 0x310b, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP600 */
++ { 0x04a9, 0x3127, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP710 */
++ { 0x04a9, 0x3128, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP510 */
++ { 0x04a9, 0x3141, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES1 */
++ { 0x04a9, 0x3142, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP730 */
++ { 0x04a9, 0x3143, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP720 */
++ { 0x04a9, 0x3170, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP750 */
++ { 0x04a9, 0x3171, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP740 */
++ { 0x04a9, 0x3185, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES2 */
++ { 0x04a9, 0x3186, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES20 */
++ { 0x04a9, 0x31aa, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP770 */
++ { 0x04a9, 0x31ab, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP760 */
++ { 0x04a9, 0x31b0, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES30 */
++ { 0x04a9, 0x31dd, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
++ { 0x04a9, 0x31ee, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES40 */
++ { 0x04a9, 0x3214, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP800 */
++ { 0x04a9, 0x3255, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP900 */
++ { 0x04a9, 0x3256, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP810 */
++ { 0x04a9, 0x30F5, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP500 */
++ { 0x04a9, 0x31AF, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY ES3 */
++ { 0x04a9, 0x31DD, USBLP_QUIRK_BLACKLIST }, /* Canon SELPHY CP780 */
++ /* MISSING PIDs: CP520, CP530, CP790 */
+ { 0, 0 }
+ };
+
+@@ -256,7 +339,12 @@ print_device(const char *uri, /* I - De
+ }
+
+ g.print_fd = print_fd;
+- g.printer->opened_for_job = 1;
++
++ /*
++ * Some devices need a reset after finishing a job, these devices are
++ * marked with the USBLP_QUIRK_RESET quirk.
++ */
++ g.printer->reset_after_job = (g.printer->quirks & USBLP_QUIRK_RESET ? 1 : 0);
+
+ /*
+ * If we are printing data from a print driver on stdin, ignore SIGTERM
+@@ -639,10 +727,10 @@ print_device(const char *uri, /* I - De
+ * If it didn't exit abort the pending read and wait an additional
+ * second...
+ */
+-
++
+ if (!g.read_thread_done)
+ {
+- fputs("DEBUG: Read thread still active, aborting the pending read...\n",
++ fputs("DEBUG: Read thread still active, aborting the pending read...\n",
+ stderr);
+
+ g.wait_eof = 0;
+@@ -650,7 +738,7 @@ print_device(const char *uri, /* I - De
+ gettimeofday(&tv, NULL);
+ cond_timeout.tv_sec = tv.tv_sec + 1;
+ cond_timeout.tv_nsec = tv.tv_usec * 1000;
+-
++
+ while (!g.read_thread_done)
+ {
+ if (pthread_cond_timedwait(&g.read_thread_cond, &g.read_thread_mutex,
+@@ -663,9 +751,6 @@ print_device(const char *uri, /* I - De
+ pthread_mutex_unlock(&g.read_thread_mutex);
+ }
+
+- if (print_fd)
+- close(print_fd);
+-
+ /*
+ * Close the connection and input file and general clean up...
+ */
+@@ -725,7 +810,7 @@ close_device(usb_printer_t *printer) /*
+ */
+ if (printer->origconf > 0 && printer->origconf != number2)
+ {
+- fprintf(stderr, "DEBUG: Restoring USB device configuration: %d -> %d\n",
++ fprintf(stderr, "DEBUG: Restoring USB device configuration: %d -> %d\n",
+ number2, printer->origconf);
+ if ((errcode = libusb_set_configuration(printer->handle,
+ printer->origconf)) < 0)
+@@ -772,7 +857,7 @@ close_device(usb_printer_t *printer) /*
+ * Reset the device to clean up after the job
+ */
+
+- if (printer->opened_for_job == 1)
++ if (printer->reset_after_job == 1)
+ {
+ if ((errcode = libusb_reset_device(printer->handle)) < 0)
+ fprintf(stderr,
+@@ -815,7 +900,8 @@ find_device(usb_cb_t cb, /* I - Callb
+ /* Pointer to current alternate setting */
+ const struct libusb_endpoint_descriptor *endpptr = NULL;
+ /* Pointer to current endpoint */
+- ssize_t numdevs, /* number of connected devices */
++ ssize_t err = 0, /* Error code */
++ numdevs, /* number of connected devices */
+ i = 0;
+ uint8_t conf, /* Current configuration */
+ iface, /* Current interface */
+@@ -834,7 +920,14 @@ find_device(usb_cb_t cb, /* I - Callb
+ * Initialize libusb...
+ */
+
+- libusb_init(NULL);
++ err = libusb_init(NULL);
++ if (err)
++ {
++ fprintf(stderr, "DEBUG: Unable to initialize USB access via libusb, "
++ "libusb error %i\n", err);
++ return (NULL);
++ }
++
+ numdevs = libusb_get_device_list(NULL, &list);
+ fprintf(stderr, "DEBUG: libusb_get_device_list=%d\n", (int)numdevs);
+
+@@ -859,7 +952,14 @@ find_device(usb_cb_t cb, /* I - Callb
+ !devdesc.idProduct)
+ continue;
+
+- printer.quirks = quirks(devdesc.idVendor, devdesc.idProduct);
++ printer.quirks = quirks(devdesc.idVendor, devdesc.idProduct);
++
++ /*
++ * Ignore blacklisted printers...
++ */
++
++ if (printer.quirks & USBLP_QUIRK_BLACKLIST)
++ continue;
+
+ for (conf = 0; conf < devdesc.bNumConfigurations; conf ++)
+ {
+@@ -886,7 +986,7 @@ find_device(usb_cb_t cb, /* I - Callb
+ */
+
+ if (((altptr->bInterfaceClass != LIBUSB_CLASS_PRINTER ||
+- altptr->bInterfaceSubClass != 1) &&
++ altptr->bInterfaceSubClass != 1) &&
+ ((printer.quirks & USBLP_QUIRK_BAD_CLASS) == 0)) ||
+ (altptr->bInterfaceProtocol != 1 && /* Unidirectional */
+ altptr->bInterfaceProtocol != 2) || /* Bidirectional */
+@@ -964,7 +1064,7 @@ find_device(usb_cb_t cb, /* I - Callb
+ bEndpointAddress;
+ }
+ else
+- fprintf(stderr, "DEBUG: Uni-directional USB communication "
++ fprintf(stderr, "DEBUG: Uni-directional USB communication "
+ "only!\n");
+ printer.write_endp = confptr->interface[printer.iface].
+ altsetting[printer.altset].
+@@ -997,7 +1097,8 @@ find_device(usb_cb_t cb, /* I - Callb
+ * Clean up ....
+ */
+
+- libusb_free_device_list(list, 1);
++ if (numdevs >= 0)
++ libusb_free_device_list(list, 1);
+ libusb_exit(NULL);
+
+ return (NULL);
+@@ -1144,7 +1245,7 @@ make_device_uri(
+ if ((sern = cupsGetOption("SERIALNUMBER", num_values, values)) == NULL)
+ if ((sern = cupsGetOption("SERN", num_values, values)) == NULL)
+ if ((sern = cupsGetOption("SN", num_values, values)) == NULL &&
+- ((libusb_get_device_descriptor (printer->device, &devdesc) >= 0) &&
++ ((libusb_get_device_descriptor(printer->device, &devdesc) >= 0) &&
+ devdesc.iSerialNumber))
+ {
+ /*
+@@ -1288,7 +1389,7 @@ open_device(usb_printer_t *printer, /* I
+ }
+
+ printer->usblp_attached = 0;
+- printer->opened_for_job = 0;
++ printer->reset_after_job = 0;
+
+ if (verbose)
+ fputs("STATE: +connecting-to-device\n", stderr);
+@@ -1343,7 +1444,7 @@ open_device(usb_printer_t *printer, /* I
+
+ printer->origconf = current;
+
+- if ((errcode =
++ if ((errcode =
+ libusb_get_config_descriptor (printer->device, printer->conf, &confptr))
+ < 0)
+ {
+@@ -1355,7 +1456,7 @@ open_device(usb_printer_t *printer, /* I
+
+ if (number1 != current)
+ {
+- fprintf(stderr, "DEBUG: Switching USB device configuration: %d -> %d\n",
++ fprintf(stderr, "DEBUG: Switching USB device configuration: %d -> %d\n",
+ current, number1);
+ if ((errcode = libusb_set_configuration(printer->handle, number1)) < 0)
+ {
+@@ -1586,7 +1687,8 @@ static unsigned int quirks(int vendor, i
+ for (i = 0; quirk_printers[i].vendorId; i++)
+ {
+ if (vendor == quirk_printers[i].vendorId &&
+- product == quirk_printers[i].productId)
++ (quirk_printers[i].productId == 0x0000 ||
++ product == quirk_printers[i].productId))
+ return quirk_printers[i].quirks;
+ }
+ return 0;
diff --git a/patches/source/cups/cups-blacklist-usblp.conf b/patches/source/cups/cups-blacklist-usblp.conf
new file mode 100644
index 00000000..0ebaa9a6
--- /dev/null
+++ b/patches/source/cups/cups-blacklist-usblp.conf
@@ -0,0 +1,10 @@
+##############################################################################
+# Do not edit this file; instead, copy it to /etc/modprobe.d/ and edit that
+##############################################################################
+
+# Blacklist the (obsolete) usblp module. While the CUPS package has been
+# patched to handle if this module is loaded, there are some reports that
+# it doesn't always work. Anyway, there should be no need to have this
+# module loaded, so we'll blacklist it just in case.
+
+blacklist usblp
diff --git a/patches/source/cups/cups.SlackBuild b/patches/source/cups/cups.SlackBuild
new file mode 100755
index 00000000..71caa108
--- /dev/null
+++ b/patches/source/cups/cups.SlackBuild
@@ -0,0 +1,203 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012 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.
+
+# CUPS build script by volkerdi@slackware.com.
+
+VERSION=1.5.4
+BUILD=${BUILD:-4_slack14.1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-cups
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf cups-$VERSION
+tar xvf $CWD/cups-$VERSION-source.tar.?z* || exit 1
+cd cups-$VERSION || exit 1
+
+# Fix for CUPS 1.5.4. Don't reload the obsolete usblp module, as this
+# can cause partial printing with certain printers.
+zcat $CWD/cups-1.5.4-usb-quirks.diff.gz | patch -p1 --verbose || exit 1
+
+zcat $CWD/str4609-1.5.patch.gz | patch -p0 --verbose || exit 1
+
+sed -i.orig -e 's#$exec_prefix/lib/cups#$libdir/cups#g' configure
+./configure \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-ssl \
+ --enable-openssl=yes \
+ --enable-gnutls=no \
+ --enable-cdsassl=no \
+ --docdir=/usr/doc \
+ --without-php \
+ --disable-pam \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || exit 1
+mkdir -p $PKG/etc/cups
+mkdir -p $PKG/var/spool
+make BUILDROOT=$PKG install || exit 1
+
+# Blacklist the usblp module just to make sure that it doesn't cause
+# any problems:
+mkdir -p $PKG/lib/modprobe.d
+cp -a $CWD/cups-blacklist-usblp.conf $PKG/lib/modprobe.d
+chown root:root $PKG/lib/modprobe.d/cups-blacklist-usblp.conf
+chmod 644 $PKG/lib/modprobe.d/cups-blacklist-usblp.conf
+
+# Hey, what's with the gigantic test files? Bloat is bad.
+rm -f $PKG/usr/share/cups/ipptool/*.{pdf,ps,jpg}
+
+# I've added so many things like /etc/init.d/ to Slackware that CUPS
+# is now installing init scripts to the Red Hat locations. We'll move
+# them to the usual locations:
+mkdir -p $PKG/etc/rc.d
+# Handle this as a config file, and non-executable in a default install:
+mv $PKG/etc/init.d/cups $PKG/etc/rc.d/rc.cups.new
+chmod 644 $PKG/etc/rc.d/rc.cups.new
+# Clear out the additions:
+rm -rf $PKG/etc/init.d $PKG/etc/rc{0,2,3,5}.d
+
+# I'm not sure if overwriting this blindly could have ill effects,
+# but it never hurts to play it safe. According to the dbus-daemon
+# manpage, only files ending in .conf will be used, so there won't
+# be any unintended doubling up.
+mv $PKG/etc/dbus-1/system.d/cups.conf $PKG/etc/dbus-1/system.d/cups.conf.new
+
+# For full CUPS SMB support, you'll need to install the cups-samba
+# package from the source in this directory. There's no easy way
+# to add that to a package build, and the requests aren't pouring in,
+# so you'll have to install it yourself. It's easy to do.
+
+# However, this will get you the most useful SMB support for free.
+# Thanks to Boris Kurktchiev for the tip. :-)
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/cups/backend
+ if [ ! -e smb ]; then
+ ln -sf /usr/bin/smbspool smb
+ fi
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Remove preformatted manpages and move the manpages to /usr/man:
+( cd $PKG/usr/share/man
+ find . -type d -name "cat*" | xargs rm -rf
+ cd ..
+ mv man ..
+)
+
+# Adjust/expand docs:
+( mkdir -p $PKG/usr/doc
+ mv $PKG/usr/share/doc/cups $PKG/usr/doc/cups-$VERSION
+ rmdir $PKG/usr/share/doc
+ cd $PKG/usr/doc
+ ln -sf cups-$VERSION cups )
+
+# 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 CHANGES.txt ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES.txt | head -n 1000 > $DOCSDIR/CHANGES.txt
+ touch -r CHANGES.txt $DOCSDIR/CHANGES.txt
+fi
+
+# I'm sorry, but PDF files are almost as bloated and annoying as
+# MS Word documents. We'll retain the HTML files in /usr/doc.
+( cd $PKG/usr/doc
+ find . -name "*.pdf" -exec rm -f {} \; )
+
+# Apply no-clobber fix to conffiles:
+( cd $PKG/etc/cups
+ for file in * ; do
+ if [ -f $file ]; then
+ mv $file $file.new
+ fi
+ done )
+
+# Strip stuff:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Use symlinks to certain binaries so that CUPS and LPRng can coexist:
+SUFFIX=cups
+for file in \
+usr/bin/cancel \
+usr/bin/lp \
+usr/bin/lpq \
+usr/bin/lpr \
+usr/bin/lprm \
+usr/bin/lpstat \
+usr/sbin/lpc ; do
+ ( cd $PKG
+ mv ${file} ${file}-${SUFFIX}
+ ( cd `dirname ${file}` ; ln -sf `basename ${file}`-${SUFFIX} `basename ${file}` )
+ )
+done
+# Now fix the associated man pages:
+mv $PKG/usr/man/man1/cancel.1.gz $PKG/usr/man/man1/cancel-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lp.1.gz $PKG/usr/man/man1/lp-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lpq.1.gz $PKG/usr/man/man1/lpq-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lpr.1.gz $PKG/usr/man/man1/lpr-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lprm.1.gz $PKG/usr/man/man1/lprm-${SUFFIX}.1.gz
+mv $PKG/usr/man/man1/lpstat.1.gz $PKG/usr/man/man1/lpstat-${SUFFIX}.1.gz
+mv $PKG/usr/man/man8/lpc.8.gz $PKG/usr/man/man8/lpc-${SUFFIX}.8.gz
+( cd $PKG/usr/man/man1
+ ln -sf cancel-${SUFFIX}.1.gz cancel.1.gz
+ ln -sf lp-${SUFFIX}.1.gz lp.1.gz
+ ln -sf lpq-${SUFFIX}.1.gz lpq.1.gz
+ ln -sf lpr-${SUFFIX}.1.gz lpr.1.gz
+ ln -sf lprm-${SUFFIX}.1.gz lprm.1.gz
+ ln -sf lpstat-${SUFFIX}.1.gz lpstat.1.gz
+)
+( cd $PKG/usr/man/man8
+ ln -sf lpc-${SUFFIX}.8.gz lpc.8.gz
+)
+
+# Add the doinst.sh that installs the .new conffiles:
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/cups-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/cups/cups.url b/patches/source/cups/cups.url
new file mode 100644
index 00000000..fc83aeb6
--- /dev/null
+++ b/patches/source/cups/cups.url
@@ -0,0 +1 @@
+http://ftp.easysw.com/pub/cups/1.5.4/cups-1.5.4-source.tar.bz2
diff --git a/patches/source/cups/doinst.sh b/patches/source/cups/doinst.sh
new file mode 100644
index 00000000..6807cc3a
--- /dev/null
+++ b/patches/source/cups/doinst.sh
@@ -0,0 +1,34 @@
+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...
+}
+for file in etc/cups/*.new ; do
+ config $file
+done
+config etc/dbus-1/system.d/cups.conf.new
+
+# This file will just have to go. It appeared for a while during a -current
+# devel period and has never been part of a stable release.
+#config etc/modprobe.d/cups.blacklist.usblp.conf.new
+rm -f etc/modprobe.d/cups.blacklist.usblp.conf.new
+rm -f etc/modprobe.d/cups.blacklist.usblp.conf
+
+# Leave any new rc.cups 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.cups ]; then
+ if [ -x etc/rc.d/rc.cups ]; then
+ chmod 755 etc/rc.d/rc.cups.new
+ else
+ chmod 644 etc/rc.d/rc.cups.new
+ fi
+fi
+# Then config() it:
+config etc/rc.d/rc.cups.new
diff --git a/patches/source/cups/slack-desc b/patches/source/cups/slack-desc
new file mode 100644
index 00000000..c2e1643c
--- /dev/null
+++ b/patches/source/cups/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------------------------------------------------------|
+cups: CUPS (Common UNIX Printing System)
+cups:
+cups: The Common UNIX Printing System provides a portable printing layer for
+cups: UNIX(R)-like operating systems. It has been developed by Easy Software
+cups: Products to promote a standard printing solution for all UNIX vendors
+cups: and users. CUPS uses the Internet Printing Protocol ("IPP") as the
+cups: basis for managing print jobs and queues. The CUPS package includes
+cups: System V and Berkeley command-line interfaces, a PostScript RIP
+cups: package for supporting non-PostScript printer drivers, and tools for
+cups: creating additional printer drivers and other CUPS services.
+cups:
diff --git a/patches/source/cups/str4609-1.5.patch b/patches/source/cups/str4609-1.5.patch
new file mode 100644
index 00000000..f0d940ea
--- /dev/null
+++ b/patches/source/cups/str4609-1.5.patch
@@ -0,0 +1,341 @@
+Index: cgi-bin/ipp-var.c
+===================================================================
+--- cgi-bin/ipp-var.c (revision 12588)
++++ cgi-bin/ipp-var.c (working copy)
+@@ -1230,21 +1230,7 @@
+ * Rewrite URIs...
+ */
+
+- if (!strcmp(name, "member_uris"))
+- {
+- char url[1024]; /* URL for class member... */
+-
+-
+- cgiRewriteURL(attr->values[i].string.text, url,
+- sizeof(url), NULL);
+-
+- snprintf(valptr, sizeof(value) - (valptr - value),
+- "<A HREF=\"%s\">%s</A>", url,
+- strrchr(attr->values[i].string.text, '/') + 1);
+- }
+- else
+- cgiRewriteURL(attr->values[i].string.text, valptr,
+- sizeof(value) - (valptr - value), NULL);
++ cgiRewriteURL(attr->values[i].string.text, valptr, sizeof(value) - (valptr - value), NULL);
+ break;
+ }
+
+Index: cgi-bin/template.c
+===================================================================
+--- cgi-bin/template.c (revision 12588)
++++ cgi-bin/template.c (working copy)
+@@ -659,39 +659,7 @@
+ while (*s)
+ {
+ if (*s == '<')
+- {
+- /*
+- * Pass <A HREF="url"> and </A>, otherwise quote it...
+- */
+-
+- if (!_cups_strncasecmp(s, "<A HREF=\"", 9))
+- {
+- fputs("<A HREF=\"", out);
+- s += 9;
+-
+- while (*s && *s != '\"')
+- {
+- if (*s == '&')
+- fputs("&amp;", out);
+- else
+- putc(*s, out);
+-
+- s ++;
+- }
+-
+- if (*s)
+- s ++;
+-
+- fputs("\">", out);
+- }
+- else if (!_cups_strncasecmp(s, "</A>", 4))
+- {
+- fputs("</A>", out);
+- s += 3;
+- }
+- else
+- fputs("&lt;", out);
+- }
++ fputs("&lt;", out);
+ else if (*s == '>')
+ fputs("&gt;", out);
+ else if (*s == '\"')
+Index: scheduler/ipp.c
+===================================================================
+--- scheduler/ipp.c (revision 12588)
++++ scheduler/ipp.c (working copy)
+@@ -509,8 +509,8 @@
+ * Remote unauthenticated user masquerading as local root...
+ */
+
+- _cupsStrFree(username->values[0].string.text);
+- username->values[0].string.text = _cupsStrAlloc(RemoteRoot);
++ _cupsStrFree(username->values[0].string.text);
++ username->values[0].string.text = _cupsStrAlloc(RemoteRoot);
+ }
+ }
+
+@@ -1648,7 +1648,10 @@
+ cupsdSetString(&job->username, con->username);
+
+ if (attr)
+- cupsdSetString(&attr->values[0].string.text, con->username);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(con->username);
++ }
+ }
+ else if (attr)
+ {
+@@ -1699,48 +1702,11 @@
+ * Also, we can only have 1 value and it must be a name value.
+ */
+
+- switch (attr->value_tag)
+- {
+- case IPP_TAG_STRING :
+- case IPP_TAG_TEXTLANG :
+- case IPP_TAG_NAMELANG :
+- case IPP_TAG_TEXT :
+- case IPP_TAG_NAME :
+- case IPP_TAG_KEYWORD :
+- case IPP_TAG_URI :
+- case IPP_TAG_URISCHEME :
+- case IPP_TAG_CHARSET :
+- case IPP_TAG_LANGUAGE :
+- case IPP_TAG_MIMETYPE :
+- /*
+- * Free old strings...
+- */
+-
+- for (i = 0; i < attr->num_values; i ++)
+- {
+- _cupsStrFree(attr->values[i].string.text);
+- attr->values[i].string.text = NULL;
+- if (attr->values[i].string.charset)
+- {
+- _cupsStrFree(attr->values[i].string.charset);
+- attr->values[i].string.charset = NULL;
+- }
+- }
+-
+- default :
+- break;
+- }
+-
+- /*
+- * Use the default connection hostname instead...
+- */
+-
+- attr->value_tag = IPP_TAG_NAME;
+- attr->num_values = 1;
+- attr->values[0].string.text = _cupsStrAlloc(con->http.hostname);
++ ippDeleteAttribute(job->attrs, attr);
++ ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-originating-host-name", NULL, con->http.hostname);
+ }
+-
+- attr->group_tag = IPP_TAG_JOB;
++ else
++ attr->group_tag = IPP_TAG_JOB;
+ }
+ else
+ {
+@@ -1832,8 +1798,8 @@
+
+ attr = ippAddStrings(job->attrs, IPP_TAG_JOB, IPP_TAG_NAME, "job-sheets",
+ 2, NULL, NULL);
+- attr->values[0].string.text = _cupsStrRetain(printer->job_sheets[0]);
+- attr->values[1].string.text = _cupsStrRetain(printer->job_sheets[1]);
++ attr->values[0].string.text = _cupsStrAlloc(printer->job_sheets[0]);
++ attr->values[1].string.text = _cupsStrAlloc(printer->job_sheets[1]);
+ }
+
+ job->job_sheets = attr;
+@@ -1859,7 +1825,8 @@
+ * Force the leading banner to have the classification on it...
+ */
+
+- cupsdSetString(&attr->values[0].string.text, Classification);
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(Classification);
+
+ cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
+ "job-sheets=\"%s,none\", "
+@@ -1876,7 +1843,8 @@
+ * Can't put two different security markings on the same document!
+ */
+
+- cupsdSetString(&attr->values[1].string.text, attr->values[0].string.text);
++ _cupsStrFree(attr->values[1].string.text);
++ attr->values[1].string.text = _cupsStrAlloc(attr->values[0].string.text);
+
+ cupsdLogJob(job, CUPSD_LOG_NOTICE, "CLASSIFICATION FORCED "
+ "job-sheets=\"%s,%s\", "
+@@ -1916,18 +1884,26 @@
+ if (attr->num_values > 1 &&
+ !strcmp(attr->values[0].string.text, attr->values[1].string.text))
+ {
+- cupsdSetString(&(attr->values[0].string.text), Classification);
+- cupsdSetString(&(attr->values[1].string.text), Classification);
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(Classification);
++ _cupsStrFree(attr->values[1].string.text);
++ attr->values[1].string.text = _cupsStrAlloc(Classification);
+ }
+ else
+ {
+ if (attr->num_values == 1 ||
+ strcmp(attr->values[0].string.text, "none"))
+- cupsdSetString(&(attr->values[0].string.text), Classification);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(Classification);
++ }
+
+ if (attr->num_values > 1 &&
+ strcmp(attr->values[1].string.text, "none"))
+- cupsdSetString(&(attr->values[1].string.text), Classification);
++ {
++ _cupsStrFree(attr->values[1].string.text);
++ attr->values[1].string.text = _cupsStrAlloc(Classification);
++ }
+ }
+
+ if (attr->num_values > 1)
+@@ -4150,7 +4126,8 @@
+ if (attr)
+ {
+ attr->value_tag = IPP_TAG_KEYWORD;
+- cupsdSetString(&(attr->values[0].string.text), "no-hold");
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc("no-hold");
+ }
+
+ /*
+@@ -9491,7 +9468,6 @@
+ if (format)
+ {
+ _cupsStrFree(format->values[0].string.text);
+-
+ format->values[0].string.text = _cupsStrAlloc(mimetype);
+ }
+ else
+@@ -10028,9 +10004,8 @@
+
+ if (attr)
+ {
++ attr->value_tag = IPP_TAG_KEYWORD;
+ _cupsStrFree(attr->values[0].string.text);
+-
+- attr->value_tag = IPP_TAG_KEYWORD;
+ attr->values[0].string.text = _cupsStrAlloc("no-hold");
+
+ cupsdAddEvent(CUPSD_EVENT_JOB_CONFIG_CHANGED, cupsdFindDest(job->dest), job,
+@@ -10719,7 +10694,6 @@
+ IPP_TAG_MIMETYPE)) != NULL)
+ {
+ _cupsStrFree(jformat->values[0].string.text);
+-
+ jformat->values[0].string.text = _cupsStrAlloc(mimetype);
+ }
+ else
+Index: scheduler/job.c
+===================================================================
+--- scheduler/job.c (revision 12588)
++++ scheduler/job.c (working copy)
+@@ -406,7 +406,10 @@
+
+ if ((attr = ippFindAttribute(job->attrs, "job-actual-printer-uri",
+ IPP_TAG_URI)) != NULL)
+- cupsdSetString(&attr->values[0].string.text, printer->uri);
++ {
++ _cupsStrFree(attr->values[0].string.text);
++ attr->values[0].string.text = _cupsStrAlloc(printer->uri);
++ }
+ else
+ ippAddString(job->attrs, IPP_TA