summaryrefslogtreecommitdiff
path: root/patches/source
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source')
-rw-r--r--patches/source/NetworkManager/55NetworkManager39
-rwxr-xr-xpatches/source/NetworkManager/NetworkManager.SlackBuild181
-rw-r--r--patches/source/NetworkManager/NetworkManager.conf7
-rw-r--r--patches/source/NetworkManager/conf.d/00-dhcp-client.conf8
-rw-r--r--patches/source/NetworkManager/conf.d/00-rc-manager.conf2
-rw-r--r--patches/source/NetworkManager/doinst.sh42
-rw-r--r--patches/source/NetworkManager/rc.networkmanager113
-rw-r--r--patches/source/NetworkManager/slack-desc19
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00158
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00262
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00348
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00447
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00563
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00648
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00750
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-008188
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-00964
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-010157
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-01149
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-01243
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-01366
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-014102
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-01558
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-016132
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-01751
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-01844
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-01984
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-020110
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-02152
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-02256
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-023104
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-02454
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-025123
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-02660
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-027221
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-0282265
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-02959
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-0302064
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-031112
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-03251
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-033225
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-03490
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-03563
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-03657
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-03743
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-03888
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-03957
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04047
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04172
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04255
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04359
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04448
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04552
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04655
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-047150
-rw-r--r--patches/source/bash/bash-4.3-patches/bash43-04854
-rwxr-xr-xpatches/source/bash/bash.SlackBuild170
-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.SlackBuild165
-rw-r--r--patches/source/bind/bind.libidn.patch297
-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/bluez/bluez-5.30-obexd_without_systemd-1.patch61
-rwxr-xr-xpatches/source/bluez/bluez.SlackBuild178
-rw-r--r--patches/source/bluez/btusb.conf3
-rw-r--r--patches/source/bluez/config/defaultconfig9
-rw-r--r--patches/source/bluez/config/rc.bluetooth74
-rw-r--r--patches/source/bluez/config/uart.conf6
-rw-r--r--patches/source/bluez/doinst.sh27
-rw-r--r--patches/source/bluez/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/curl/cacert-fetch.sh1
-rw-r--r--patches/source/curl/cacert.pem3338
-rwxr-xr-xpatches/source/curl/curl.SlackBuild153
-rw-r--r--patches/source/curl/slack-desc19
-rw-r--r--patches/source/dbus/dbus-1.10.x-allow_root_globally.diff18
-rwxr-xr-xpatches/source/dbus/dbus.SlackBuild151
-rw-r--r--patches/source/dbus/dbus.expat222fix.diff74
-rw-r--r--patches/source/dbus/doinst.sh26
-rw-r--r--patches/source/dbus/rc.messagebus81
-rw-r--r--patches/source/dbus/slack-desc18
-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
-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.SlackBuild93
-rw-r--r--patches/source/expat/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.diff12
-rw-r--r--patches/source/freetype/slack-desc19
-rw-r--r--patches/source/gcc/0001-i386-Move-struct-ix86_frame-to-machine_function.diff239
-rw-r--r--patches/source/gcc/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff72
-rw-r--r--patches/source/gcc/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff59
-rw-r--r--patches/source/gcc/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff63
-rw-r--r--patches/source/gcc/0005-x86-Add-mindirect-branch-doc.diff279
-rw-r--r--patches/source/gcc/0005-x86-Add-mindirect-branch.diff1870
-rw-r--r--patches/source/gcc/0006-x86-Add-mfunction-return-doc.diff300
-rw-r--r--patches/source/gcc/0006-x86-Add-mfunction-return.diff1409
-rw-r--r--patches/source/gcc/0007-x86-Add-mindirect-branch-register-doc.diff231
-rw-r--r--patches/source/gcc/0007-x86-Add-mindirect-branch-register.diff812
-rw-r--r--patches/source/gcc/0008-x86-Add-V-register-operand-modifier-doc.diff65
-rw-r--r--patches/source/gcc/0008-x86-Add-V-register-operand-modifier.diff125
-rw-r--r--patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff275
-rw-r--r--patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff102
-rw-r--r--patches/source/gcc/antlr-runtime-3.4.jarbin0 -> 164368 bytes
-rw-r--r--patches/source/gcc/c89.sh10
-rw-r--r--patches/source/gcc/c99.sh10
-rw-r--r--patches/source/gcc/create_gcj_jvm.sh93
-rw-r--r--patches/source/gcc/ecj-4.9.jarbin0 -> 1619429 bytes
-rw-r--r--patches/source/gcc/ecj.sh5
-rw-r--r--patches/source/gcc/ecj.url1
-rw-r--r--patches/source/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch29
-rw-r--r--patches/source/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch16
-rw-r--r--patches/source/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch14
-rw-r--r--patches/source/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch102
-rw-r--r--patches/source/gcc/fastjar-patches/1004-fastjar-man.patch27
-rw-r--r--patches/source/gcc/gcc-no_fixincludes.diff27
-rwxr-xr-xpatches/source/gcc/gcc.SlackBuild827
-rw-r--r--patches/source/gcc/slack-desc.gcc19
-rw-r--r--patches/source/gcc/slack-desc.gcc-g++19
-rw-r--r--patches/source/gcc/slack-desc.gcc-gfortran19
-rw-r--r--patches/source/gcc/slack-desc.gcc-gnat19
-rw-r--r--patches/source/gcc/slack-desc.gcc-go19
-rw-r--r--patches/source/gcc/slack-desc.gcc-java19
-rw-r--r--patches/source/gcc/slack-desc.gcc-objc19
-rwxr-xr-xpatches/source/gd/gd.SlackBuild122
-rw-r--r--patches/source/gd/slack-desc19
-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/getmail/getmail.SlackBuild65
-rw-r--r--patches/source/getmail/slack-desc19
-rwxr-xr-xpatches/source/gimp/gimp.SlackBuild136
-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
-rwxr-xr-xpatches/source/gkrellm/gkrellm.SlackBuild149
-rw-r--r--patches/source/gkrellm/gkrellm.theme.defaults.diff11
-rw-r--r--patches/source/gkrellm/slack-desc19
-rw-r--r--patches/source/glib2/0001-GDBusProxy-Fix-a-memory-leak-during-initialization.patch25
-rw-r--r--patches/source/glib2/doinst.sh32
-rw-r--r--patches/source/glib2/glib.bug.758823.diff40
-rwxr-xr-xpatches/source/glib2/glib2.SlackBuild145
-rw-r--r--patches/source/glib2/libglib2.csh27
-rw-r--r--patches/source/glib2/libglib2.sh26
-rw-r--r--patches/source/glib2/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-glibc179
-rw-r--r--patches/source/glibc/doinst.sh-glibc-solibs137
-rw-r--r--patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff26
-rw-r--r--patches/source/glibc/glibc-c-utf8-locale.patch251
-rwxr-xr-xpatches/source/glibc/glibc-cvs-checkout.sh3
-rw-r--r--patches/source/glibc/glibc.3776f38f.diff52
-rw-r--r--patches/source/glibc/glibc.46703a39.diff119
-rw-r--r--patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff32
-rw-r--r--patches/source/glibc/glibc.CVE-2017-1000366.3c7cd212.diff32
-rwxr-xr-xpatches/source/glibc/glibc.SlackBuild440
-rw-r--r--patches/source/glibc/glibc.adc7e06f.diff38
-rw-r--r--patches/source/glibc/glibc.c69d4a0f.diff201
-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.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
-rwxr-xr-xpatches/source/gnupg/gnupg.SlackBuild115
-rw-r--r--patches/source/gnupg/slack-desc.gnupg19
-rwxr-xr-xpatches/source/gnutls/gnutls.SlackBuild141
-rw-r--r--patches/source/gnutls/slack-desc19
-rw-r--r--patches/source/gtk+2/doinst.sh26
-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.SlackBuild203
-rw-r--r--patches/source/gtk+2/gtk.gtk-faq.diff11
-rw-r--r--patches/source/gtk+2/gtk.gtk-tut.diff11
-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/intltool/intltool-0.51.0-perl-5.22.patch44
-rwxr-xr-xpatches/source/intltool/intltool.SlackBuild132
-rw-r--r--patches/source/intltool/no-guess-builddir.diff31
-rw-r--r--patches/source/intltool/slack-desc19
-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/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.patch14
-rw-r--r--patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch62
-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/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.diff105
-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
-rw-r--r--patches/source/libcgroup/doinst.sh43
-rwxr-xr-xpatches/source/libcgroup/libcgroup.SlackBuild171
-rw-r--r--patches/source/libcgroup/libcgroup.conf.diff8
-rw-r--r--patches/source/libcgroup/libcgroup.init.diff136
-rw-r--r--patches/source/libcgroup/slack-desc19
-rwxr-xr-xpatches/source/libgcrypt/libgcrypt.SlackBuild127
-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/libpcap/libpcap.SlackBuild128
-rw-r--r--patches/source/libpcap/slack-desc19
-rwxr-xr-xpatches/source/libplist/libplist.SlackBuild138
-rw-r--r--patches/source/libplist/slack-desc19
-rwxr-xr-xpatches/source/libpng/libpng.SlackBuild142
-rw-r--r--patches/source/libpng/libpng.url1
-rw-r--r--patches/source/libpng/slack-desc19
-rw-r--r--patches/source/libsoup/libsoup.CVE-2017-2885.diff43
-rwxr-xr-xpatches/source/libsoup/libsoup.SlackBuild101
-rw-r--r--patches/source/libsoup/slack-desc19
-rw-r--r--patches/source/libtiff/libtiff-am-version.patch31
-rwxr-xr-xpatches/source/libtiff/libtiff.SlackBuild120
-rw-r--r--patches/source/libtiff/slack-desc19
-rw-r--r--patches/source/libtirpc/doinst.sh13
-rwxr-xr-xpatches/source/libtirpc/libtirpc.SlackBuild164
-rw-r--r--patches/source/libtirpc/slack-desc19
-rw-r--r--patches/source/libtool/doinst.sh18
-rwxr-xr-xpatches/source/libtool/libtool.SlackBuild104
-rw-r--r--patches/source/libtool/libtool.no.moved.warning.diff42
-rw-r--r--patches/source/libtool/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
-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
-rw-r--r--patches/source/libzip/libzip.CVE-2017-14107.diff14
-rwxr-xr-xpatches/source/libzip/libzip.SlackBuild140
-rw-r--r--patches/source/libzip/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/mariadb/doinst.sh28
-rwxr-xr-xpatches/source/mariadb/mariadb.SlackBuild199
-rw-r--r--patches/source/mariadb/mirror.url1
-rw-r--r--patches/source/mariadb/rc.mysqld102
-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/autoconf/autoconf-2.13-consolidated_fixes-1.patch504
-rwxr-xr-xpatches/source/mozilla-firefox/autoconf/autoconf.build81
-rw-r--r--patches/source/mozilla-firefox/build-with-clang.diff13
-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.SlackBuild307
-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
-rw-r--r--patches/source/mozilla-thunderbird/autoconf/autoconf-2.13-consolidated_fixes-1.patch504
-rwxr-xr-xpatches/source/mozilla-thunderbird/autoconf/autoconf.build81
-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.SlackBuild247
-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
-rwxr-xr-xpatches/source/nasm/nasm.SlackBuild90
-rw-r--r--patches/source/nasm/slack-desc19
-rw-r--r--patches/source/network-manager-applet/doinst.sh16
-rwxr-xr-xpatches/source/network-manager-applet/network-manager-applet.SlackBuild124
-rw-r--r--patches/source/network-manager-applet/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.ntpd56
-rw-r--r--patches/source/ntp/slack-desc19
-rw-r--r--patches/source/openexr/openexr.CVE-2017-9110-to-9116.patch82
-rwxr-xr-xpatches/source/openexr/openexr.SlackBuild113
-rw-r--r--patches/source/openexr/slack-desc19
-rwxr-xr-xpatches/source/openjpeg/openjpeg.SlackBuild121
-rw-r--r--patches/source/openjpeg/openjpeg2_remove-thirdparty.patch11
-rw-r--r--patches/source/openjpeg/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.SlackBuild223
-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
-rw-r--r--patches/source/php/doinst.sh30
-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.SlackBuild312
-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.SlackBuild231
-rw-r--r--patches/source/pidgin/slack-desc19
-rw-r--r--patches/source/pkg-config/doinst.sh9
-rwxr-xr-xpatches/source/pkg-config/pkg-config.SlackBuild120
-rwxr-xr-xpatches/source/pkg-config/scripts/pkgconfig.csh6
-rwxr-xr-xpatches/source/pkg-config/scripts/pkgconfig.sh7
-rw-r--r--patches/source/pkg-config/slack-desc19
-rwxr-xr-xpatches/source/procps-ng/procps-ng.SlackBuild251
-rw-r--r--patches/source/procps-ng/psmisc.3638cc55b4d08851faba46635d737b24d016665b.diff25
-rw-r--r--patches/source/procps-ng/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.SlackBuild139
-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/rpcbind/0001-man-rpcibind.8-Clarify-state-file-usage-and-history.patch39
-rw-r--r--patches/source/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch218
-rw-r--r--patches/source/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch29
-rw-r--r--patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch69
-rw-r--r--patches/source/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch96
-rw-r--r--patches/source/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch96
-rw-r--r--patches/source/rpcbind/01.rpcbind-manpage-statefile-explanation.patch25
-rw-r--r--patches/source/rpcbind/doinst.sh24
-rw-r--r--patches/source/rpcbind/rc.rpc64
-rwxr-xr-xpatches/source/rpcbind/rpcbind.SlackBuild155
-rw-r--r--patches/source/rpcbind/rpcbind.lwrap.needs.lnsl.diff14
-rw-r--r--patches/source/rpcbind/slack-desc19
-rwxr-xr-xpatches/source/rsync/rsync.SlackBuild110
-rw-r--r--patches/source/rsync/slack-desc19
-rwxr-xr-xpatches/source/ruby/ruby.SlackBuild138
-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.sh42
-rw-r--r--patches/source/samba/pytalloc-util.pc11
-rw-r--r--patches/source/samba/rc.samba48
-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/scim/scim-setup.desktop28
-rwxr-xr-xpatches/source/scim/scim.SlackBuild250
-rw-r--r--patches/source/scim/scim.desktop20
-rw-r--r--patches/source/scim/slack-desc19
-rw-r--r--patches/source/screen/26source_encoding.patch353
-rw-r--r--patches/source/screen/45suppress_remap.patch13
-rw-r--r--patches/source/screen/52fix_screen_utf8_nfd.patch41
-rw-r--r--patches/source/screen/58-show-encoding-hardstatus.patch41
-rw-r--r--patches/source/screen/60-revert-screenrc-change.diff13
-rwxr-xr-xpatches/source/screen/screen.SlackBuild158
-rw-r--r--patches/source/screen/screen.no_libelf.diff19
-rw-r--r--patches/source/screen/slack-desc19
-rw-r--r--patches/source/sdl/SDL_mixer.usrlocal.diff11
-rw-r--r--patches/source/sdl/SDL_ttf.shaded.text.diff11
-rw-r--r--patches/source/sdl/libsdl-1.2.15-resizing.patch63
-rw-r--r--patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch23
-rwxr-xr-xpatches/source/sdl/sdl.SlackBuild255
-rw-r--r--patches/source/sdl/slack-desc19
-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.SlackBuild289
-rw-r--r--patches/source/seamonkey/seamonkey.desktop9
-rw-r--r--patches/source/seamonkey/slack-desc19
-rw-r--r--patches/source/squashfs-tools/0001-kfreebsd.patch123
-rw-r--r--patches/source/squashfs-tools/0002-fix_phys_mem_calculation.patch159
-rw-r--r--patches/source/squashfs-tools/0003-CVE-2015-4645_and_CVE-2015-4646.patch76
-rw-r--r--patches/source/squashfs-tools/0004-unsquashfs-add-support-for-LZMA-magics.patch102
-rw-r--r--patches/source/squashfs-tools/0006-uptream-fix-race.patch54
-rw-r--r--patches/source/squashfs-tools/0007-fix-2GB-limit-in-mksquashfs.patch27
-rw-r--r--patches/source/squashfs-tools/slack-desc19
-rwxr-xr-xpatches/source/squashfs-tools/squashfs-tools.SlackBuild122
-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
-rwxr-xr-xpatches/source/subversion/subversion.SlackBuild174
-rw-r--r--patches/source/sudo/doinst.sh14
-rw-r--r--patches/source/sudo/slack-desc19
-rwxr-xr-xpatches/source/sudo/sudo.SlackBuild125
-rw-r--r--patches/source/tcpdump/slack-desc19
-rwxr-xr-xpatches/source/tcpdump/tcpdump.SlackBuild104
-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/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-server53
-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.patch15
-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-12177.diff41
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12178.diff29
-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-12180_12181_12182.diff601
-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-12184_12185_12186_12187.diff139
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13721.diff27
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff116
-rw-r--r--patches/source/xorg-server/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch49
-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
-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
718 files changed, 75764 insertions, 0 deletions
diff --git a/patches/source/NetworkManager/55NetworkManager b/patches/source/NetworkManager/55NetworkManager
new file mode 100644
index 00000000..d7b3ee6a
--- /dev/null
+++ b/patches/source/NetworkManager/55NetworkManager
@@ -0,0 +1,39 @@
+#!/bin/sh
+# If we are running NetworkManager, tell it we are going to sleep.
+
+. "${PM_FUNCTIONS}"
+
+suspend_nm()
+{
+ # Tell NetworkManager to shut down networking
+ printf "Having NetworkManager put all interaces to sleep..."
+ dbus_send --system --print-reply \
+ --dest=org.freedesktop.NetworkManager \
+ /org/freedesktop/NetworkManager \
+ org.freedesktop.NetworkManager.Sleep \
+ boolean:true && \
+ echo Done. || echo Failed.
+}
+
+resume_nm()
+{
+ # Wake up NetworkManager and make it do a new connection
+ printf "Having NetworkManager wake interfaces back up..."
+ dbus_send --system --print-reply \
+ --dest=org.freedesktop.NetworkManager \
+ /org/freedesktop/NetworkManager \
+ org.freedesktop.NetworkManager.Sleep \
+ boolean:false && \
+ echo Done. || echo Failed.
+}
+
+case "$1" in
+ hibernate|suspend)
+ suspend_nm
+ ;;
+ thaw|resume)
+ resume_nm
+ ;;
+ *) exit $NA
+ ;;
+esac
diff --git a/patches/source/NetworkManager/NetworkManager.SlackBuild b/patches/source/NetworkManager/NetworkManager.SlackBuild
new file mode 100755
index 00000000..ae5dc7ca
--- /dev/null
+++ b/patches/source/NetworkManager/NetworkManager.SlackBuild
@@ -0,0 +1,181 @@
+#!/bin/sh
+
+# Copyright 2010, 2011, 2014, 2016 Robby Workman, Northport, Alabama, USA
+# Copyright 2013, 2014, 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.
+
+# Modified 2011, 2012 by Eric Hameleers, Eindhoven, NL
+
+PKGNAM=NetworkManager
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Find the version number for pppd, used to specify the plugin directory:
+PPPD=$(echo /usr/lib${LIBDIRSUFFIX}/pppd/?.?.? | rev | cut -f 1 -d / | rev)
+
+# Apply bugfix patches from upstream git:
+for dfile in $CWD/patches/* ; do
+ zcat $dfile | patch -p1 --verbose || exit 1
+done
+
+# For git-patched builds
+autoreconf -vif
+automake
+./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --with-udev-dir=/lib/udev \
+ --with-pppd-plugin-dir=/usr/lib${LIBDIRSUFFIX}/pppd/$PPPD \
+ --with-crypto=nss \
+ --enable-more-warnings=no \
+ --without-resolvconf \
+ --with-dhcpcd=/sbin/dhcpcd \
+ --with-dhclient=yes \
+ --with-modem-manager-1=yes \
+ --with-nmtui=yes \
+ --disable-vala \
+ --disable-json-validation \
+ --with-session-tracking=consolekit \
+ --with-suspend-resume=consolekit \
+ --with-hostname-persist=slackware \
+ --build=$TARGET || exit 1
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Fix hardlinked manpages:
+( cd $PKG/usr/man/man1
+ ln -sf nmtui.1 nmtui-connect.1
+ ln -sf nmtui.1 nmtui-edit.1
+ ln -sf nmtui.1 nmtui-hostname.1
+)
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# In case NetworkManager tries to install something here:
+rm -f $PKG/etc/rc.d/rc.networkmanager
+
+# Don't clobber existing rc.networkmanager
+# Don't run NetworkManager by default just because it got installed.
+# Instead, the init script will have to be made executable first.
+# This should avoid nasty surprises on potentially remotely located machines.
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.networkmanager > $PKG/etc/rc.d/rc.networkmanager.new
+chmod 0644 $PKG/etc/rc.d/rc.networkmanager.new
+
+# Add the pm-utils hook back in
+# xfce4-power-manager needs to be built *without* NM support
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/
+cat $CWD/55NetworkManager > $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/55NetworkManager
+chmod 0755 $PKG/usr/lib${LIBDIRSUFFIX}/pm-utils/sleep.d/55NetworkManager
+
+# Add default (plain) config file to enable keyfile plugin
+cat $CWD/NetworkManager.conf > $PKG/etc/NetworkManager/NetworkManager.conf.new
+
+# Set dhcp client to "dhcpcd" and rc-manager to "file" by default
+mkdir -p $PKG/etc/NetworkManager/conf.d
+cat $CWD/conf.d/00-dhcp-client.conf > $PKG/etc/NetworkManager/conf.d/00-dhcp-client.conf.new
+cat $CWD/conf.d/00-rc-manager.conf > $PKG/etc/NetworkManager/conf.d/00-rc-manager.conf.new
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTING COPYING ChangeLog INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG/usr/doc/$PKGNAM-$VERSION/ChangeLog
+ touch -r ChangeLog $PKG/usr/doc/$PKGNAM-$VERSION/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 --prepend -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/NetworkManager/NetworkManager.conf b/patches/source/NetworkManager/NetworkManager.conf
new file mode 100644
index 00000000..eb8f6ae1
--- /dev/null
+++ b/patches/source/NetworkManager/NetworkManager.conf
@@ -0,0 +1,7 @@
+# /etc/NetworkManager/NetworkManager.conf
+#
+# See additional config files (such as for DHCP settings) in ./conf.d
+
+[main]
+plugins=keyfile
+
diff --git a/patches/source/NetworkManager/conf.d/00-dhcp-client.conf b/patches/source/NetworkManager/conf.d/00-dhcp-client.conf
new file mode 100644
index 00000000..7b52815f
--- /dev/null
+++ b/patches/source/NetworkManager/conf.d/00-dhcp-client.conf
@@ -0,0 +1,8 @@
+[main]
+# Choose a DHCP client below. Upstream recommends dhclient, but results may vary.
+# dhcpcd is the DHCP client usually used by Slackware:
+dhcp=dhcpcd
+# dhclient is the ISC reference DHCP client, part of the dhcp package:
+#dhcp=dhclient
+# This is a simple DHCP client that is built into NetworkManager:
+#dhcp=internal
diff --git a/patches/source/NetworkManager/conf.d/00-rc-manager.conf b/patches/source/NetworkManager/conf.d/00-rc-manager.conf
new file mode 100644
index 00000000..c848c003
--- /dev/null
+++ b/patches/source/NetworkManager/conf.d/00-rc-manager.conf
@@ -0,0 +1,2 @@
+[main]
+rc-manager=file
diff --git a/patches/source/NetworkManager/doinst.sh b/patches/source/NetworkManager/doinst.sh
new file mode 100644
index 00000000..6c88b8cf
--- /dev/null
+++ b/patches/source/NetworkManager/doinst.sh
@@ -0,0 +1,42 @@
+
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ mv ${NEW} ${OLD}
+}
+
+if [ -e etc/HOSTNAME ]; then
+ sed -i "s,yourhostname,$(cat etc/HOSTNAME | cut -f1 -d .)," \
+ etc/NetworkManager/NetworkManager.conf.new
+fi
+
+# Preserve permissions, but move this into place. Otherwise the net
+# connection could be lost at a remote location.
+preserve_perms etc/rc.d/rc.networkmanager.new
+config etc/NetworkManager/NetworkManager.conf.new
+config etc/NetworkManager/conf.d/00-rc-manager.conf.new
+config etc/NetworkManager/conf.d/00-dhcp-client.conf.new
+
+# If the .pid file is found in the old location, move it to the new one:
+if [ -r var/run/NetworkManager.pid ]; then
+ mv var/run/NetworkManager.pid var/run/NetworkManager/NetworkManager.pid
+fi
+
diff --git a/patches/source/NetworkManager/rc.networkmanager b/patches/source/NetworkManager/rc.networkmanager
new file mode 100644
index 00000000..b6b311ed
--- /dev/null
+++ b/patches/source/NetworkManager/rc.networkmanager
@@ -0,0 +1,113 @@
+#!/bin/sh
+#
+# NetworkManager: NetworkManager daemon
+#
+# description: This is a daemon for automatically switching network \
+# connections to the best available connection. \
+#
+# processname: NetworkManager
+# pidfile: /var/run/NetworkManager/NetworkManager.pid
+#
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+
+NETWORKMANAGER_BIN=${sbindir}/NetworkManager
+
+# Sanity checks.
+[ -x $NETWORKMANAGER_BIN ] || exit 0
+
+PIDFILE=/var/run/NetworkManager/NetworkManager.pid
+
+nm_start()
+{
+ if [ "`pgrep dbus-daemon`" = "" ]; then
+ echo "D-BUS must be running to start NetworkManager"
+ return
+ fi
+
+ # Just in case the pidfile is still there, we may need to nuke it.
+ if [ -e "$PIDFILE" ]; then
+ rm -f $PIDFILE
+ fi
+
+ echo "Starting NetworkManager daemon: $NETWORKMANAGER_BIN"
+ XDG_CACHE_HOME=/root/.cache $NETWORKMANAGER_BIN
+}
+
+nm_status()
+{
+ local pidlist=`cat $PIDFILE 2>/dev/null`
+ if [ -z "$pidlist" ]; then
+ return 1
+ fi
+ local command=`ps -p $pidlist -o comm=`
+ if [ "$command" != 'NetworkManager' ]; then
+ return 1
+ fi
+}
+
+nm_stop()
+{
+ echo -en "Stopping NetworkManager: "
+ # Shut down any DHCP connections, otherwise the processes will be orphaned
+ # and the connections will not come up when NetworkManager restarts.
+ if ps ax | grep /sbin/dhcpcd | grep -q libexec/nm-dhcp ; then
+ ps ax | grep /sbin/dhcpcd | grep libexec/nm-dhcp | while read line ; do
+ kill -HUP $(echo $line | cut -b 1-5)
+ done
+ fi
+ if ps ax | grep /sbin/dhclient | grep -q /var/lib/NetworkManager ; then
+ ps ax | grep /sbin/dhclient | grep /var/lib/NetworkManager | while read line ; do
+ kill -HUP $(echo $line | cut -b 1-5)
+ done
+ fi
+ local pidlist=`cat $PIDFILE 2>/dev/null`
+ if [ ! -z "$pidlist" ]; then
+ kill $pidlist &>/dev/null
+ sleep 3
+ rm -f $PIDFILE &>/dev/null
+ fi
+ # If wpa_supplicant is running here, it needs to be shut down as well.
+ # Since you're asking for NetworkManager to shut down, we have to assume
+ # that wpa_supplicant was started by it.
+ if [ -r /var/run/wpa_supplicant.pid ]; then
+ kill $(cat /var/run/wpa_supplicant.pid)
+ elif [ -r /run/wpa_supplicant.pid ]; then
+ kill $(cat /run/wpa_supplicant.pid)
+ fi
+ echo "stopped";
+ sleep 3
+}
+
+nm_restart()
+{
+ nm_stop
+ nm_start
+}
+
+case "$1" in
+'start')
+ if ( ! nm_status ); then
+ nm_start
+ else
+ echo "NetworkManager is already running (will not start it twice)."
+ fi
+ ;;
+'stop')
+ nm_stop
+ ;;
+'restart')
+ nm_restart
+ ;;
+'status')
+ if ( nm_status ); then
+ echo "NetworkManager is currently running"
+ else
+ echo "NetworkManager is not running."
+ fi
+ ;;
+*)
+ echo "usage $0 start|stop|status|restart"
+esac
diff --git a/patches/source/NetworkManager/slack-desc b/patches/source/NetworkManager/slack-desc
new file mode 100644
index 00000000..96496048
--- /dev/null
+++ b/patches/source/NetworkManager/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------------------------------------------------------|
+NetworkManager: NetworkManager (Networking that Just Works)
+NetworkManager:
+NetworkManager: The point of NetworkManager is to make networking configuration and
+NetworkManager: setup as painless and automatic as possible. NetworkManager sets IP
+NetworkManager: addresses, default routes, associating with wireless access points
+NetworkManager: or wired LANs, and other network configuration settings in a simple,
+NetworkManager: automated fashion (manual overrides are still possible).
+NetworkManager:
+NetworkManager: Home page: http://projects.gnome.org/NetworkManager/
+NetworkManager:
+NetworkManager:
diff --git a/patches/source/bash/bash-4.3-patches/bash43-001 b/patches/source/bash/bash-4.3-patches/bash43-001
new file mode 100644
index 00000000..ea1c6b26
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-001
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-001
+
+Bug-Reported-by: NBaH <nbah@sfr.fr>
+Bug-Reference-ID: <ler0b5$iu9$1@speranza.aioe.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00092.html
+
+Bug-Description:
+
+A missing check for a valid option prevented `test -R' from working. There
+is another problem that causes bash to look up the wrong variable name when
+processing the argument to `test -R'.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/test.c 2014-02-04 16:52:58.000000000 -0500
+--- test.c 2014-02-28 21:22:44.000000000 -0500
+***************
+*** 647,652 ****
+
+ case 'R':
+! v = find_variable (arg);
+! return (v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v) ? TRUE : FALSE);
+ }
+
+--- 647,652 ----
+
+ case 'R':
+! v = find_variable_noref (arg);
+! return ((v && invisible_p (v) == 0 && var_isset (v) && nameref_p (v)) ? TRUE : FALSE);
+ }
+
+***************
+*** 724,727 ****
+--- 724,728 ----
+ case 'u': case 'v': case 'w': case 'x': case 'z':
+ case 'G': case 'L': case 'O': case 'S': case 'N':
++ case 'R':
+ return (1);
+ }
+*** ../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 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.3-patches/bash43-002 b/patches/source/bash/bash-4.3-patches/bash43-002
new file mode 100644
index 00000000..735b7b81
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-002
@@ -0,0 +1,62 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-002
+
+Bug-Reported-by: Moe Tunes <moetunes42@gmail.com>
+Bug-Reference-ID: <53103F49.3070100@gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00086.html
+
+Bug-Description:
+
+A change to save state while running the DEBUG trap caused pipelines to hang
+on systems which need process group synchronization while building pipelines.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/trap.c 2014-02-05 10:03:21.000000000 -0500
+--- trap.c 2014-02-28 09:51:43.000000000 -0500
+***************
+*** 921,925 ****
+
+ #if defined (JOB_CONTROL)
+! save_pipeline (1); /* XXX only provides one save level */
+ #endif
+
+--- 921,926 ----
+
+ #if defined (JOB_CONTROL)
+! if (sig != DEBUG_TRAP) /* run_debug_trap does this */
+! save_pipeline (1); /* XXX only provides one save level */
+ #endif
+
+***************
+*** 941,945 ****
+
+ #if defined (JOB_CONTROL)
+! restore_pipeline (1);
+ #endif
+
+--- 942,947 ----
+
+ #if defined (JOB_CONTROL)
+! if (sig != DEBUG_TRAP) /* run_debug_trap does this */
+! restore_pipeline (1);
+ #endif
+
+*** ../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 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.3-patches/bash43-003 b/patches/source/bash/bash-4.3-patches/bash43-003
new file mode 100644
index 00000000..0f32f410
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-003
@@ -0,0 +1,48 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-003
+
+Bug-Reported-by: Anatol Pomozov <anatol.pomozov@gmail.com>
+Bug-Reference-ID: <CAOMFOmXy3mT2So5GQ5F-smCVArQuAeBwZ2QKzgCtMeXJoDeYOQ@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
+
+Bug-Description:
+
+When in callback mode, some readline commands can cause readline to seg
+fault by passing invalid contexts to callback functions.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/lib/readline/readline.c 2013-10-28 14:58:06.000000000 -0400
+--- lib/readline/readline.c 2014-03-10 14:15:02.000000000 -0400
+***************
+*** 745,749 ****
+
+ RL_CHECK_SIGNALS ();
+! if (r == 0) /* success! */
+ {
+ _rl_keyseq_chain_dispose ();
+--- 745,750 ----
+
+ RL_CHECK_SIGNALS ();
+! /* We only treat values < 0 specially to simulate recursion. */
+! if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
+ {
+ _rl_keyseq_chain_dispose ();
+*** ../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 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.3-patches/bash43-004 b/patches/source/bash/bash-4.3-patches/bash43-004
new file mode 100644
index 00000000..010f04a2
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-004
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-004
+
+Bug-Reported-by: Daan van Rossum <daan@flash.uchicago.edu>
+Bug-Reference-ID: <20140307072523.GA14250@flash.uchicago.edu>
+Bug-Reference-URL:
+
+Bug-Description:
+
+The `.' command in vi mode cannot undo multi-key commands beginning with
+`c', `d', and `y' (command plus motion specifier).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/lib/readline/readline.c 2013-10-28 14:58:06.000000000 -0400
+--- lib/readline/readline.c 2014-03-07 15:20:33.000000000 -0500
+***************
+*** 965,969 ****
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
+! rl_key_sequence_length == 1 && /* XXX */
+ _rl_vi_textmod_command (key))
+ _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
+--- 965,969 ----
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
+! _rl_dispatching_keymap == vi_movement_keymap &&
+ _rl_vi_textmod_command (key))
+ _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
+*** ../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 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.3-patches/bash43-005 b/patches/source/bash/bash-4.3-patches/bash43-005
new file mode 100644
index 00000000..bcd40697
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-005
@@ -0,0 +1,63 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-005
+
+Bug-Reported-by: David Sines <dave.gma@googlemail.com>
+Bug-Reference-ID: <CAO3BAa_CK_Rgkhdfzs+NJ4KFYdB9qW3pvXQK0xLCi6GMmDU8bw@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00037.html
+
+Bug-Description:
+
+When in Posix mode, bash did not correctly interpret the ANSI-C-style
+$'...' quoting mechanism when performing pattern substitution word
+expansions within double quotes.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/parse.y 2014-02-11 09:42:10.000000000 -0500
+--- parse.y 2014-03-07 20:57:15.000000000 -0500
+***************
+*** 3399,3403 ****
+ unescaped double-quotes or single-quotes, if any, shall occur." */
+ /* This was changed in Austin Group Interp 221 */
+! if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
+ continue;
+
+--- 3399,3403 ----
+ unescaped double-quotes or single-quotes, if any, shall occur." */
+ /* This was changed in Austin Group Interp 221 */
+! if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2 && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
+ continue;
+
+*** ../bash-4.3/y.tab.c 2014-02-11 10:57:47.000000000 -0500
+--- y.tab.c 2014-03-28 10:41:15.000000000 -0400
+***************
+*** 5711,5715 ****
+ unescaped double-quotes or single-quotes, if any, shall occur." */
+ /* This was changed in Austin Group Interp 221 */
+! if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
+ continue;
+
+--- 5711,5715 ----
+ unescaped double-quotes or single-quotes, if any, shall occur." */
+ /* This was changed in Austin Group Interp 221 */
+! if MBTEST(posixly_correct && shell_compatibility_level > 41 && dolbrace_state != DOLBRACE_QUOTE && dolbrace_state != DOLBRACE_QUOTE2 && (flags & P_DQUOTE) && (flags & P_DOLBRACE) && ch == '\'')
+ continue;
+
+*** ../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 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.3-patches/bash43-006 b/patches/source/bash/bash-4.3-patches/bash43-006
new file mode 100644
index 00000000..24ff057a
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-006
@@ -0,0 +1,48 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-006
+
+Bug-Reported-by: Eduardo A . Bustamante Lopez <dualbus@gmail.com>
+Bug-Reference-ID: <20140228170013.GA16015@dualbus.me>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-02/msg00091.html
+
+Bug-Description:
+
+A shell that started with job control active but was not interactive left
+the terminal in the wrong process group when exiting, causing its parent
+shell to get a stop signal when it attempted to read from the terminal.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/jobs.c 2014-01-10 09:05:34.000000000 -0500
+--- jobs.c 2014-03-02 18:05:09.000000000 -0500
+***************
+*** 4375,4379 ****
+ end_job_control ()
+ {
+! if (interactive_shell) /* XXX - should it be interactive? */
+ {
+ terminate_stopped_jobs ();
+--- 4375,4379 ----
+ end_job_control ()
+ {
+! if (interactive_shell || job_control) /* XXX - should it be just job_control? */
+ {
+ terminate_stopped_jobs ();
+*** ../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 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.3-patches/bash43-007 b/patches/source/bash/bash-4.3-patches/bash43-007
new file mode 100644
index 00000000..0d62c9ec
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-007
@@ -0,0 +1,50 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-007
+
+Bug-Reported-by: geir.hauge@gmail.com
+Bug-Reference-ID: <20140318093650.B181C1C5B0B@gina.itea.ntnu.no>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00095.html
+
+Bug-Description:
+
+Using compound assignments for associative arrays like
+
+assoc=( [x]= [y]=bar )
+
+left the value corresponding to the key `x' NULL. This caused subsequent
+lookups to interpret it as unset.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/arrayfunc.c 2013-08-02 16:19:59.000000000 -0400
+--- arrayfunc.c 2014-03-18 11:08:15.000000000 -0400
+***************
+*** 598,601 ****
+--- 598,606 ----
+ {
+ val = expand_assignment_string_to_string (val, 0);
++ if (val == 0)
++ {
++ val = (char *)xmalloc (1);
++ val[0] = '\0'; /* like do_assignment_internal */
++ }
+ free_val = 1;
+ }
+*** ../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 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.3-patches/bash43-008 b/patches/source/bash/bash-4.3-patches/bash43-008
new file mode 100644
index 00000000..0ae7c952
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-008
@@ -0,0 +1,188 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-008
+
+Bug-Reported-by: Stephane Chazelas <stephane.chazelas@gmail.com>
+Bug-Reference-ID: <20140318135901.GB22158@chaz.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00098.html
+
+Bug-Description:
+
+Some extended glob patterns incorrectly matched filenames with a leading
+dot, regardless of the setting of the `dotglob' option.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3/lib/glob/gmisc.c 2013-10-28 14:45:25.000000000 -0400
+--- lib/glob/gmisc.c 2014-03-19 09:16:08.000000000 -0400
+***************
+*** 211,214 ****
+--- 211,215 ----
+ case '!':
+ case '@':
++ case '?':
+ return (pat[1] == LPAREN);
+ default:
+*** ../bash-4.3/lib/glob/glob.c 2014-01-31 21:43:51.000000000 -0500
+--- lib/glob/glob.c 2014-03-20 09:01:26.000000000 -0400
+***************
+*** 180,202 ****
+ int flags;
+ {
+! char *pp, *pe, *t;
+! int n, r;
+
+ pp = pat + 2;
+! pe = pp + strlen (pp) - 1; /*(*/
+! if (*pe != ')')
+! return 0;
+! if ((t = strchr (pp, '|')) == 0) /* easy case first */
+ {
+ *pe = '\0';
+ r = skipname (pp, dname, flags); /*(*/
+ *pe = ')';
+ return r;
+ }
+ while (t = glob_patscan (pp, pe, '|'))
+ {
+ n = t[-1];
+ t[-1] = '\0';
+ r = skipname (pp, dname, flags);
+ t[-1] = n;
+ if (r == 0) /* if any pattern says not skip, we don't skip */
+--- 180,215 ----
+ int flags;
+ {
+! char *pp, *pe, *t, *se;
+! int n, r, negate;
+
++ negate = *pat == '!';
+ pp = pat + 2;
+! se = pp + strlen (pp) - 1; /* end of string */
+! pe = glob_patscan (pp, se, 0); /* end of extglob pattern (( */
+! /* we should check for invalid extglob pattern here */
+! /* if pe != se we have more of the pattern at the end of the extglob
+! pattern. Check the easy case first ( */
+! if (pe == se && *pe == ')' && (t = strchr (pp, '|')) == 0)
+ {
+ *pe = '\0';
++ #if defined (HANDLE_MULTIBYTE)
++ r = mbskipname (pp, dname, flags);
++ #else
+ r = skipname (pp, dname, flags); /*(*/
++ #endif
+ *pe = ')';
+ return r;
+ }
++
++ /* check every subpattern */
+ while (t = glob_patscan (pp, pe, '|'))
+ {
+ n = t[-1];
+ t[-1] = '\0';
++ #if defined (HANDLE_MULTIBYTE)
++ r = mbskipname (pp, dname, flags);
++ #else
+ r = skipname (pp, dname, flags);
++ #endif
+ t[-1] = n;
+ if (r == 0) /* if any pattern says not skip, we don't skip */
+***************
+*** 205,219 ****
+ } /*(*/
+
+! if (pp == pe) /* glob_patscan might find end of pattern */
+ return r;
+
+! *pe = '\0';
+! # if defined (HANDLE_MULTIBYTE)
+! r = mbskipname (pp, dname, flags); /*(*/
+! # else
+! r = skipname (pp, dname, flags); /*(*/
+! # endif
+! *pe = ')';
+! return r;
+ }
+ #endif
+--- 218,227 ----
+ } /*(*/
+
+! /* glob_patscan might find end of pattern */
+! if (pp == se)
+ return r;
+
+! /* but if it doesn't then we didn't match a leading dot */
+! return 0;
+ }
+ #endif
+***************
+*** 278,289 ****
+ {
+ #if EXTENDED_GLOB
+! wchar_t *pp, *pe, *t, n;
+! int r;
+
+ pp = pat + 2;
+! pe = pp + wcslen (pp) - 1; /*(*/
+! if (*pe != L')')
+! return 0;
+! if ((t = wcschr (pp, L'|')) == 0)
+ {
+ *pe = L'\0';
+--- 286,298 ----
+ {
+ #if EXTENDED_GLOB
+! wchar_t *pp, *pe, *t, n, *se;
+! int r, negate;
+
++ negate = *pat == L'!';
+ pp = pat + 2;
+! se = pp + wcslen (pp) - 1; /*(*/
+! pe = glob_patscan_wc (pp, se, 0);
+!
+! if (pe == se && *pe == ')' && (t = wcschr (pp, L'|')) == 0)
+ {
+ *pe = L'\0';
+***************
+*** 292,295 ****
+--- 301,306 ----
+ return r;
+ }
++
++ /* check every subpattern */
+ while (t = glob_patscan_wc (pp, pe, '|'))
+ {
+***************
+*** 306,313 ****
+ return r;
+
+! *pe = L'\0';
+! r = wchkname (pp, dname); /*(*/
+! *pe = L')';
+! return r;
+ #else
+ return (wchkname (pat, dname));
+--- 317,322 ----
+ return r;
+
+! /* but if it doesn't then we didn't match a leading dot */
+! return 0;
+ #else
+ return (wchkname (pat, dname));
+*** ../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 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.3-patches/bash43-009 b/patches/source/bash/bash-4.3-patches/bash43-009
new file mode 100644
index 00000000..015835cd
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-009
@@ -0,0 +1,64 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-009
+
+Bug-Reported-by: Matthias Klose <doko@debian.org>
+Bug-Reference-ID: <53346FC8.6090005@debian.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00171.html
+
+Bug-Description:
+
+There is a problem with unsigned sign extension when attempting to reallocate
+the input line when it is fewer than 3 characters long and there has been a
+history expansion. The sign extension causes the shell to not reallocate the
+line, which results in a segmentation fault when it writes past the end.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/parse.y 2014-02-11 09:42:10.000000000 -0500
+--- parse.y 2014-03-27 16:33:29.000000000 -0400
+***************
+*** 2425,2429 ****
+ if (shell_input_line_terminator != EOF)
+ {
+! if (shell_input_line_size < SIZE_MAX && shell_input_line_len > shell_input_line_size - 3)
+ shell_input_line = (char *)xrealloc (shell_input_line,
+ 1 + (shell_input_line_size += 2));
+--- 2425,2429 ----
+ if (shell_input_line_terminator != EOF)
+ {
+! if (shell_input_line_size < SIZE_MAX-3 && (shell_input_line_len+3 > shell_input_line_size))
+ shell_input_line = (char *)xrealloc (shell_input_line,
+ 1 + (shell_input_line_size += 2));
+*** ../bash-4.3-patched/y.tab.c 2014-03-28 11:17:06.000000000 -0400
+--- y.tab.c 2014-04-07 11:48:31.000000000 -0400
+***************
+*** 4737,4741 ****
+ if (shell_input_line_terminator != EOF)
+ {
+! if (shell_input_line_size < SIZE_MAX && shell_input_line_len > shell_input_line_size - 3)
+ shell_input_line = (char *)xrealloc (shell_input_line,
+ 1 + (shell_input_line_size += 2));
+--- 4737,4741 ----
+ if (shell_input_line_terminator != EOF)
+ {
+! if (shell_input_line_size < SIZE_MAX-3 && (shell_input_line_len+3 > shell_input_line_size))
+ shell_input_line = (char *)xrealloc (shell_input_line,
+ 1 + (shell_input_line_size += 2));
+*** ../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 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.3-patches/bash43-010 b/patches/source/bash/bash-4.3-patches/bash43-010
new file mode 100644
index 00000000..835a96ea
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-010
@@ -0,0 +1,157 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-010
+
+Bug-Reported-by: Albert Shih <Albert.Shih@obspm.fr>
+Bug-Reference-ID: Wed, 5 Mar 2014 23:01:40 +0100
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00028.html
+
+Bug-Description:
+
+Patch (apply with `patch -p0'):
+
+This patch changes the behavior of programmable completion to compensate
+for two assumptions made by the bash-completion package. Bash-4.3 changed
+to dequote the argument to programmable completion only under certain
+circumstances, to make the behavior of compgen more consistent when run
+from the command line -- closer to the behavior when run by a shell function
+run as part of programmable completion. Bash-completion can pass quoted
+arguments to compgen when the original word to be completed was not quoted,
+expecting programmable completion to dequote the word before attempting
+completion.
+
+This patch fixes two cases:
+
+1. An empty string that bash-completion passes to compgen as a quoted null
+ string ('').
+
+2. An unquoted word that bash-completion quotes using single quotes or
+ backslashes before passing it to compgen.
+
+In these cases, since readline did not detect a quote character in the original
+word to be completed, bash-4.3
+
+*** ../bash-4.3/externs.h 2014-01-02 14:58:20.000000000 -0500
+--- externs.h 2014-03-13 14:42:57.000000000 -0400
+***************
+*** 325,328 ****
+--- 325,329 ----
+ extern char *sh_backslash_quote_for_double_quotes __P((char *));
+ extern int sh_contains_shell_metas __P((char *));
++ extern int sh_contains_quotes __P((char *));
+
+ /* declarations for functions defined in lib/sh/spell.c */
+*** ../bash-4.3/lib/sh/shquote.c 2013-03-31 21:53:32.000000000 -0400
+--- lib/sh/shquote.c 2014-03-13 14:42:57.000000000 -0400
+***************
+*** 312,313 ****
+--- 312,327 ----
+ return (0);
+ }
++
++ int
++ sh_contains_quotes (string)
++ char *string;
++ {
++ char *s;
++
++ for (s = string; s && *s; s++)
++ {
++ if (*s == '\'' || *s == '"' || *s == '\\')
++ return 1;
++ }
++ return 0;
++ }
+*** ../bash-4.3/pcomplete.c 2013-08-26 15:23:45.000000000 -0400
+--- pcomplete.c 2014-03-25 17:23:23.000000000 -0400
+***************
+*** 184,187 ****
+--- 184,188 ----
+ COMPSPEC *pcomp_curcs;
+ const char *pcomp_curcmd;
++ const char *pcomp_curtxt;
+
+ #ifdef DEBUG
+***************
+*** 754,757 ****
+--- 755,784 ----
+ dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character);
+ }
++ /* Intended to solve a mismatched assumption by bash-completion. If
++ the text to be completed is empty, but bash-completion turns it into
++ a quoted string ('') assuming that this code will dequote it before
++ calling readline, do the dequoting. */
++ else if (iscompgen && iscompleting &&
++ pcomp_curtxt && *pcomp_curtxt == 0 &&
++ text && (*text == '\'' || *text == '"') && text[1] == text[0] && text[2] == 0 &&
++ rl_filename_dequoting_function)
++ dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character);
++ /* Another mismatched assumption by bash-completion. If compgen is being
++ run as part of bash-completion, and the argument to compgen is not
++ the same as the word originally passed to the programmable completion
++ code, dequote the argument if it has quote characters. It's an
++ attempt to detect when bash-completion is quoting its filename
++ argument before calling compgen. */
++ /* We could check whether gen_shell_function_matches is in the call
++ stack by checking whether the gen-shell-function-matches tag is in
++ the unwind-protect stack, but there's no function to do that yet.
++ We could simply check whether we're executing in a function by
++ checking variable_context, and may end up doing that. */
++ else if (iscompgen && iscompleting && rl_filename_dequoting_function &&
++ pcomp_curtxt && text &&
++ STREQ (pcomp_curtxt, text) == 0 &&
++ variable_context &&
++ sh_contains_quotes (text)) /* guess */
++ dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character);
+ else
+ dfn = savestring (text);
+***************
+*** 1523,1527 ****
+ {
+ COMPSPEC *cs, *oldcs;
+! const char *oldcmd;
+ STRINGLIST *ret;
+
+--- 1550,1554 ----
+ {
+ COMPSPEC *cs, *oldcs;
+! const char *oldcmd, *oldtxt;
+ STRINGLIST *ret;
+
+***************
+*** 1546,1552 ****
+--- 1573,1581 ----
+ oldcs = pcomp_curcs;
+ oldcmd = pcomp_curcmd;
++ oldtxt = pcomp_curtxt;
+
+ pcomp_curcs = cs;
+ pcomp_curcmd = cmd;
++ pcomp_curtxt = word;
+
+ ret = gen_compspec_completions (cs, cmd, word, start, end, foundp);
+***************
+*** 1554,1557 ****
+--- 1583,1587 ----
+ pcomp_curcs = oldcs;
+ pcomp_curcmd = oldcmd;
++ pcomp_curtxt = oldtxt;
+
+ /* We need to conditionally handle setting *retryp here */
+*** ../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 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.3-patches/bash43-011 b/patches/source/bash/bash-4.3-patches/bash43-011
new file mode 100644
index 00000000..cdc1572e
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-011
@@ -0,0 +1,49 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-011
+
+Bug-Reported-by: Egmont Koblinger <egmont@gmail.com>
+Bug-Reference-ID: <CAGWcZk+bU5Jo1M+tutGvL-250UBE9DXjpeJVofYJSFcqFEVfMg@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00153.html
+
+Bug-Description:
+
+The signal handling changes to bash and readline (to avoid running any code
+in a signal handler context) cause the cursor to be placed on the wrong
+line of a multi-line command after a ^C interrupts editing.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/lib/readline/display.c 2013-12-27 13:10:56.000000000 -0500
+--- lib/readline/display.c 2014-03-27 11:52:45.000000000 -0400
+***************
+*** 2678,2682 ****
+ if (_rl_echoing_p)
+ {
+! _rl_move_vert (_rl_vis_botlin);
+ _rl_vis_botlin = 0;
+ fflush (rl_outstream);
+--- 2678,2683 ----
+ if (_rl_echoing_p)
+ {
+! if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */
+! _rl_move_vert (_rl_vis_botlin);
+ _rl_vis_botlin = 0;
+ fflush (rl_outstream);
+*** ../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 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.3-patches/bash43-012 b/patches/source/bash/bash-4.3-patches/bash43-012
new file mode 100644
index 00000000..176fa15b
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-012
@@ -0,0 +1,43 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-012
+
+Bug-Reported-by: Eduardo A. Bustamante López<dualbus@gmail.com>
+Bug-Reference-ID: <5346B54C.4070205@case.edu>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00051.html
+
+Bug-Description:
+
+When a SIGCHLD trap runs a command containing a shell builtin while
+a script is running `wait' to wait for all running children to complete,
+the SIGCHLD trap will not be run once for each child that terminates.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/jobs.c 2014-03-28 10:54:19.000000000 -0400
+--- jobs.c 2014-04-15 08:47:03.000000000 -0400
+***************
+*** 3598,3601 ****
+--- 3598,3602 ----
+ unwind_protect_pointer (the_pipeline);
+ unwind_protect_pointer (subst_assign_varlist);
++ unwind_protect_pointer (this_shell_builtin);
+
+ /* We have to add the commands this way because they will be run
+*** ../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 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.3-patches/bash43-013 b/patches/source/bash/bash-4.3-patches/bash43-013
new file mode 100644
index 00000000..8f4006b4
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-013
@@ -0,0 +1,66 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-013
+
+Bug-Reported-by: <Trond.Endrestol@ximalas.info>
+Bug-Reference-ID: <alpine.BSF.2.03.1404192114310.1973@enterprise.ximalas.info>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00069.html
+
+Bug-Description:
+
+Using reverse-i-search when horizontal scrolling is enabled does not redisplay
+the entire line containing the successful search results.
+
+Patch (apply with `patch -p0'):
+*** ../bash-4.3-patched/lib/readline/display.c 2014-04-08 18:19:36.000000000 -0400
+--- lib/readline/display.c 2014-04-20 18:32:52.000000000 -0400
+***************
+*** 1638,1642 ****
+ the spot of first difference is before the end of the invisible chars,
+ lendiff needs to be adjusted. */
+! if (current_line == 0 && !_rl_horizontal_scroll_mode &&
+ current_invis_chars != visible_wrap_offset)
+ {
+--- 1638,1642 ----
+ the spot of first difference is before the end of the invisible chars,
+ lendiff needs to be adjusted. */
+! if (current_line == 0 && /* !_rl_horizontal_scroll_mode && */
+ current_invis_chars != visible_wrap_offset)
+ {
+***************
+*** 1826,1831 ****
+ _rl_last_c_pos += bytes_to_insert;
+
+ if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new)))
+! goto clear_rest_of_line;
+ }
+ }
+--- 1826,1836 ----
+ _rl_last_c_pos += bytes_to_insert;
+
++ /* XXX - we only want to do this if we are at the end of the line
++ so we move there with _rl_move_cursor_relative */
+ if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new)))
+! {
+! _rl_move_cursor_relative (ne-new, new);
+! goto clear_rest_of_line;
+! }
+ }
+ }
+*** ../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 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.3-patches/bash43-014 b/patches/source/bash/bash-4.3-patches/bash43-014
new file mode 100644
index 00000000..f8371967
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-014
@@ -0,0 +1,102 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-014
+
+Bug-Reported-by: Greg Wooledge <wooledg@eeg.ccf.org>
+Bug-Reference-ID: <20140418202123.GB7660@eeg.ccf.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/help-bash/2014-04/msg00004.html
+
+Bug-Description:
+
+Under certain circumstances, $@ is expanded incorrectly in contexts where
+word splitting is not performed.
+
+Patch (apply with `patch -p0'):
+*** ../bash-4.3-patched/subst.c 2014-01-23 16:26:37.000000000 -0500
+--- subst.c 2014-04-19 15:41:26.000000000 -0400
+***************
+*** 3249,3254 ****
+--- 3249,3256 ----
+ return ((char *)NULL);
+
++ expand_no_split_dollar_star = 1;
+ w->flags |= W_NOSPLIT2;
+ l = call_expand_word_internal (w, 0, 0, (int *)0, (int *)0);
++ expand_no_split_dollar_star = 0;
+ if (l)
+ {
+***************
+*** 7848,7851 ****
+--- 7850,7857 ----
+ according to POSIX.2, this expands to a list of the positional
+ parameters no matter what IFS is set to. */
++ /* XXX - what to do when in a context where word splitting is not
++ performed? Even when IFS is not the default, posix seems to imply
++ that we behave like unquoted $* ? Maybe we should use PF_NOSPLIT2
++ here. */
+ temp = string_list_dollar_at (list, (pflags & PF_ASSIGNRHS) ? (quoted|Q_DOUBLE_QUOTES) : quoted);
+
+***************
+*** 8817,8820 ****
+--- 8823,8827 ----
+ {
+ char *ifs_chars;
++ char *tstring;
+
+ ifs_chars = (quoted_dollar_at || has_dollar_at) ? ifs_value : (char *)NULL;
+***************
+*** 8831,8834 ****
+--- 8838,8865 ----
+ if (split_on_spaces)
+ list = list_string (istring, " ", 1); /* XXX quoted == 1? */
++ /* If we have $@ (has_dollar_at != 0) and we are in a context where we
++ don't want to split the result (W_NOSPLIT2), and we are not quoted,
++ we have already separated the arguments with the first character of
++ $IFS. In this case, we want to return a list with a single word
++ with the separator possibly replaced with a space (it's what other
++ shells seem to do).
++ quoted_dollar_at is internal to this function and is set if we are
++ passed an argument that is unquoted (quoted == 0) but we encounter a
++ double-quoted $@ while expanding it. */
++ else if (has_dollar_at && quoted_dollar_at == 0 && ifs_chars && quoted == 0 && (word->flags & W_NOSPLIT2))
++ {
++ /* Only split and rejoin if we have to */
++ if (*ifs_chars && *ifs_chars != ' ')
++ {
++ list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1);
++ tstring = string_list (list);
++ }
++ else
++ tstring = istring;
++ tword = make_bare_word (tstring);
++ if (tstring != istring)
++ free (tstring);
++ goto set_word_flags;
++ }
+ else if (has_dollar_at && ifs_chars)
+ list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1);
+***************
+*** 8836,8839 ****
+--- 8867,8871 ----
+ {
+ tword = make_bare_word (istring);
++ set_word_flags:
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || (quoted_state == WHOLLY_QUOTED))
+ tword->flags |= W_QUOTED;
+*** ../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 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.3-patches/bash43-015 b/patches/source/bash/bash-4.3-patches/bash43-015
new file mode 100644
index 00000000..9c4e5ea4
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-015
@@ -0,0 +1,58 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-015
+
+Bug-Reported-by: Clark Wang <dearvoid@gmail.com>
+Bug-Reference-ID: <CADv8-og2TOSoabXeNVXVGaXN3tEMHnYVq1rwOLe5meaRPSGRig@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00095.html
+
+Bug-Description:
+
+When completing directory names, the directory name is dequoted twice.
+This causes problems for directories with single and double quotes in
+their names.
+
+Patch (apply with `patch -p0'):
+*** ../bash-4.3-patched/bashline.c 2014-02-09 19:56:58.000000000 -0500
+--- bashline.c 2014-04-25 14:57:52.000000000 -0400
+***************
+*** 4168,4174 ****
+
+ qc = rl_dispatching ? rl_completion_quote_character : 0;
+! dfn = bash_dequote_filename ((char *)text, qc);
+ m1 = rl_completion_matches (dfn, rl_filename_completion_function);
+! free (dfn);
+
+ if (m1 == 0 || m1[0] == 0)
+--- 4209,4222 ----
+
+ qc = rl_dispatching ? rl_completion_quote_character : 0;
+! /* If rl_completion_found_quote != 0, rl_completion_matches will call the
+! filename dequoting function, causing the directory name to be dequoted
+! twice. */
+! if (rl_dispatching && rl_completion_found_quote == 0)
+! dfn = bash_dequote_filename ((char *)text, qc);
+! else
+! dfn = (char *)text;
+ m1 = rl_completion_matches (dfn, rl_filename_completion_function);
+! if (dfn != text)
+! free (dfn);
+
+ if (m1 == 0 || m1[0] == 0)
+*** ../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 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.3-patches/bash43-016 b/patches/source/bash/bash-4.3-patches/bash43-016
new file mode 100644
index 00000000..882d5939
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-016
@@ -0,0 +1,132 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-016
+
+Bug-Reported-by: Pierre Gaston <pierre.gaston@gmail.com>
+Bug-Reference-ID: <CAPSX3sTCD61k1VQLJ5r-LWzEt+e7Xc-fxXmwn2u8EA5gJJej8Q@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00100.html
+
+Bug-Description:
+
+An extended glob pattern containing a slash (`/') causes the globbing code
+to misinterpret it as a directory separator.
+
+Patch (apply with `patch -p0'):
+*** ../bash-4.3-patched/lib/glob/glob.c 2014-03-28 10:54:23.000000000 -0400
+--- lib/glob/glob.c 2014-05-02 10:24:28.000000000 -0400
+***************
+*** 124,127 ****
+--- 124,129 ----
+ extern wchar_t *glob_patscan_wc __P((wchar_t *, wchar_t *, int));
+
++ extern char *glob_dirscan __P((char *, int));
++
+ /* Compile `glob_loop.c' for single-byte characters. */
+ #define CHAR unsigned char
+***************
+*** 188,191 ****
+--- 190,196 ----
+ pe = glob_patscan (pp, se, 0); /* end of extglob pattern (( */
+ /* we should check for invalid extglob pattern here */
++ if (pe == 0)
++ return 0;
++
+ /* if pe != se we have more of the pattern at the end of the extglob
+ pattern. Check the easy case first ( */
+***************
+*** 1016,1020 ****
+ char **result;
+ unsigned int result_size;
+! char *directory_name, *filename, *dname;
+ unsigned int directory_len;
+ int free_dirname; /* flag */
+--- 1021,1025 ----
+ char **result;
+ unsigned int result_size;
+! char *directory_name, *filename, *dname, *fn;
+ unsigned int directory_len;
+ int free_dirname; /* flag */
+***************
+*** 1032,1035 ****
+--- 1037,1052 ----
+ /* Find the filename. */
+ filename = strrchr (pathname, '/');
++ #if defined (EXTENDED_GLOB)
++ if (filename && extended_glob)
++ {
++ fn = glob_dirscan (pathname, '/');
++ #if DEBUG_MATCHING
++ if (fn != filename)
++ fprintf (stderr, "glob_filename: glob_dirscan: fn (%s) != filename (%s)\n", fn ? fn : "(null)", filename);
++ #endif
++ filename = fn;
++ }
++ #endif
++
+ if (filename == NULL)
+ {
+*** ../bash-4.3-patched/lib/glob/gmisc.c 2014-03-28 10:54:23.000000000 -0400
+--- lib/glob/gmisc.c 2014-05-02 09:35:57.000000000 -0400
+***************
+*** 43,46 ****
+--- 43,48 ----
+ #define WRPAREN L')'
+
++ extern char *glob_patscan __P((char *, char *, int));
++
+ /* Return 1 of the first character of WSTRING could match the first
+ character of pattern WPAT. Wide character version. */
+***************
+*** 376,377 ****
+--- 378,410 ----
+ return matlen;
+ }
++
++ /* Skip characters in PAT and return the final occurrence of DIRSEP. This
++ is only called when extended_glob is set, so we have to skip over extglob
++ patterns x(...) */
++ char *
++ glob_dirscan (pat, dirsep)
++ char *pat;
++ int dirsep;
++ {
++ char *p, *d, *pe, *se;
++
++ d = pe = se = 0;
++ for (p = pat; p && *p; p++)
++ {
++ if (extglob_pattern_p (p))
++ {
++ if (se == 0)
++ se = p + strlen (p) - 1;
++ pe = glob_patscan (p + 2, se, 0);
++ if (pe == 0)
++ continue;
++ else if (*pe == 0)
++ break;
++ p = pe - 1; /* will do increment above */
++ continue;
++ }
++ if (*p == dirsep)
++ d = p;
++ }
++ return d;
++ }
+
+*** ../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 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.3-patches/bash43-017 b/patches/source/bash/bash-4.3-patches/bash43-017
new file mode 100644
index 00000000..4016fb93
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-017
@@ -0,0 +1,51 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-017
+
+Bug-Reported-by: Dan Douglas <ormaaj@gmail.com>
+Bug-Reference-ID: <7781746.RhfoTROLxF@smorgbox>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-05/msg00026.html
+
+Bug-Description:
+
+The code that creates local variables should not clear the `invisible'
+attribute when returning an existing local variable. Let the code that
+actually assigns a value clear it.
+
+Patch (apply with `patch -p0'):
+*** ../bash-4.3-patched/variables.c 2014-02-14 11:55:12.000000000 -0500
+--- variables.c 2014-05-07 10:53:57.000000000 -0400
+***************
+*** 2198,2205 ****
+ old_var = find_variable (name);
+ if (old_var && local_p (old_var) && old_var->context == variable_context)
+! {
+! VUNSETATTR (old_var, att_invisible); /* XXX */
+! return (old_var);
+! }
+
+ was_tmpvar = old_var && tempvar_p (old_var);
+--- 2260,2264 ----
+ old_var = find_variable (name);
+ if (old_var && local_p (old_var) && old_var->context == variable_context)
+! return (old_var);
+
+ was_tmpvar = old_var && tempvar_p (old_var);
+
+*** ../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 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.3-patches/bash43-018 b/patches/source/bash/bash-4.3-patches/bash43-018
new file mode 100644
index 00000000..39499f66
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-018
@@ -0,0 +1,44 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-018
+
+Bug-Reported-by: Geir Hauge <geir.hauge@gmail.com>
+Bug-Reference-ID: <CAO-BiTLOvfPXDypg61jcBausADrxUKJejakV2WTWP26cW0=rgA@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-05/msg00040.html
+
+Bug-Description:
+
+When assigning an array variable using the compound assignment syntax,
+but using `declare' with the rhs of the compound assignment quoted, the
+shell did not mark the variable as visible after successfully performing
+the assignment.
+
+Patch (apply with `patch -p0'):
+*** ../bash-4.3-patched/arrayfunc.c 2014-03-28 10:54:21.000000000 -0400
+--- arrayfunc.c 2014-05-12 11:19:00.000000000 -0400
+***************
+*** 180,183 ****
+--- 180,184 ----
+ FREE (newval);
+
++ VUNSETATTR (entry, att_invisible); /* no longer invisible */
+ return (entry);
+ }
+
+*** ../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 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.3-patches/bash43-019 b/patches/source/bash/bash-4.3-patches/bash43-019
new file mode 100644
index 00000000..a93714be
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-019
@@ -0,0 +1,84 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-019
+
+Bug-Reported-by: John Lenton
+Bug-Reference-ID:
+Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476
+
+Bug-Description:
+
+The -t timeout option to `read' does not work when the -e option is used.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/lib/readline/input.c 2014-01-10 15:07:08.000000000 -0500
+--- lib/readline/input.c 2014-05-22 18:40:59.000000000 -0400
+***************
+*** 535,540 ****
+--- 538,551 ----
+ else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM)
+ return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
++ /* keyboard-generated signals of interest */
+ else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT)
+ RL_CHECK_SIGNALS ();
++ /* non-keyboard-generated signals of interest */
++ else if (_rl_caught_signal == SIGALRM
++ #if defined (SIGVTALRM)
++ || _rl_caught_signal == SIGVTALRM
++ #endif
++ )
++ RL_CHECK_SIGNALS ();
+
+ if (rl_signal_event_hook)
+*** ../bash-4.3-patched/builtins/read.def 2013-09-02 11:54:00.000000000 -0400
+--- builtins/read.def 2014-05-08 11:43:35.000000000 -0400
+***************
+*** 443,447 ****
+ #if defined (READLINE)
+ if (edit)
+! add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
+ #endif
+ falarm (tmsec, tmusec);
+--- 443,450 ----
+ #if defined (READLINE)
+ if (edit)
+! {
+! add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
+! add_unwind_protect (bashline_reset_event_hook, (char *)NULL);
+! }
+ #endif
+ falarm (tmsec, tmusec);
+***************
+*** 1022,1025 ****
+--- 1025,1029 ----
+ old_attempted_completion_function = rl_attempted_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
++ bashline_set_event_hook ();
+ if (itext)
+ {
+***************
+*** 1033,1036 ****
+--- 1037,1041 ----
+ rl_attempted_completion_function = old_attempted_completion_function;
+ old_attempted_completion_function = (rl_completion_func_t *)NULL;
++ bashline_reset_event_hook ();
+
+ if (ret == 0)
+*** ../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 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.3-patches/bash43-020 b/patches/source/bash/bash-4.3-patches/bash43-020
new file mode 100644
index 00000000..5f533ef8
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-020
@@ -0,0 +1,110 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-020
+
+Bug-Reported-by: Jared Yanovich <slovichon@gmail.com>
+Bug-Reference-ID: <20140417073654.GB26875@nightderanger.psc.edu>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00065.html
+
+Bug-Description:
+
+When PS2 contains a command substitution, here-documents entered in an
+interactive shell can sometimes cause a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/shell.h 2012-12-25 21:11:01.000000000 -0500
+--- shell.h 2014-06-03 09:24:28.000000000 -0400
+***************
+*** 169,173 ****
+ int expand_aliases;
+ int echo_input_at_read;
+!
+ } sh_parser_state_t;
+
+--- 169,174 ----
+ int expand_aliases;
+ int echo_input_at_read;
+! int need_here_doc;
+!
+ } sh_parser_state_t;
+
+*** ../bash-4.3-patched/parse.y 2014-05-14 09:16:40.000000000 -0400
+--- parse.y 2014-04-30 09:27:59.000000000 -0400
+***************
+*** 2643,2647 ****
+
+ r = 0;
+! while (need_here_doc)
+ {
+ parser_state |= PST_HEREDOC;
+--- 2643,2647 ----
+
+ r = 0;
+! while (need_here_doc > 0)
+ {
+ parser_state |= PST_HEREDOC;
+***************
+*** 6076,6079 ****
+--- 6076,6080 ----
+ ps->expand_aliases = expand_aliases;
+ ps->echo_input_at_read = echo_input_at_read;
++ ps->need_here_doc = need_here_doc;
+
+ ps->token = token;
+***************
+*** 6124,6127 ****
+--- 6125,6129 ----
+ expand_aliases = ps->expand_aliases;
+ echo_input_at_read = ps->echo_input_at_read;
++ need_here_doc = ps->need_here_doc;
+
+ FREE (token);
+*** ../bash-4.3-patched/y.tab.c 2014-04-07 11:56:12.000000000 -0400
+--- y.tab.c 2014-07-30 09:55:57.000000000 -0400
+***************
+*** 4955,4959 ****
+
+ r = 0;
+! while (need_here_doc)
+ {
+ parser_state |= PST_HEREDOC;
+--- 5151,5155 ----
+
+ r = 0;
+! while (need_here_doc > 0)
+ {
+ parser_state |= PST_HEREDOC;
+***************
+*** 8388,8391 ****
+--- 8584,8588 ----
+ ps->expand_aliases = expand_aliases;
+ ps->echo_input_at_read = echo_input_at_read;
++ ps->need_here_doc = need_here_doc;
+
+ ps->token = token;
+***************
+*** 8436,8439 ****
+--- 8633,8637 ----
+ expand_aliases = ps->expand_aliases;
+ echo_input_at_read = ps->echo_input_at_read;
++ need_here_doc = ps->need_here_doc;
+
+ FREE (token);
+*** ../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 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.3-patches/bash43-021 b/patches/source/bash/bash-4.3-patches/bash43-021
new file mode 100644
index 00000000..fd1c945e
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-021
@@ -0,0 +1,52 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-021
+
+Bug-Reported-by: Jared Yanovich <slovichon@gmail.com>
+Bug-Reference-ID: <20140625225019.GJ17044@nightderanger.psc.edu>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00070.html
+
+Bug-Description:
+
+When the readline `revert-all-at-newline' option is set, pressing newline
+when the current line is one retrieved from history results in a double free
+and a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/lib/readline/misc.c 2012-09-01 18:03:11.000000000 -0400
+--- lib/readline/misc.c 2014-06-30 13:41:19.000000000 -0400
+***************
+*** 462,465 ****
+--- 462,466 ----
+ /* Set up rl_line_buffer and other variables from history entry */
+ rl_replace_from_history (entry, 0); /* entry->line is now current */
++ entry->data = 0; /* entry->data is now current undo list */
+ /* Undo all changes to this history entry */
+ while (rl_undo_list)
+***************
+*** 469,473 ****
+ FREE (entry->line);
+ entry->line = savestring (rl_line_buffer);
+- entry->data = 0;
+ }
+ entry = previous_history ();
+--- 470,473 ----
+
+*** ../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 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.3-patches/bash43-022 b/patches/source/bash/bash-4.3-patches/bash43-022
new file mode 100644
index 00000000..7ce39ec0
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-022
@@ -0,0 +1,56 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-022
+
+Bug-Reported-by: scorp.dev.null@gmail.com
+Bug-Reference-ID: <E1WxXw8-0007iE-Bi@pcm14>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00061.html
+
+Bug-Description:
+
+Using nested pipelines within loops with the `lastpipe' option set can result
+in a segmentation fault.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/execute_cmd.c 2014-01-31 10:54:52.000000000 -0500
+--- execute_cmd.c 2014-06-19 08:05:49.000000000 -0400
+***************
+*** 2410,2414 ****
+ lstdin = wait_for (lastpid);
+ #if defined (JOB_CONTROL)
+! exec_result = job_exit_status (lastpipe_jid);
+ #endif
+ unfreeze_jobs_list ();
+--- 2425,2438 ----
+ lstdin = wait_for (lastpid);
+ #if defined (JOB_CONTROL)
+! /* If wait_for removes the job from the jobs table, use result of last
+! command as pipeline's exit status as usual. The jobs list can get
+! frozen and unfrozen at inconvenient times if there are multiple pipelines
+! running simultaneously. */
+! if (INVALID_JOB (lastpipe_jid) == 0)
+! exec_result = job_exit_status (lastpipe_jid);
+! else if (pipefail_opt)
+! exec_result = exec_result | lstdin; /* XXX */
+! /* otherwise we use exec_result */
+!
+ #endif
+ unfreeze_jobs_list ();
+*** ../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 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.3-patches/bash43-023 b/patches/source/bash/bash-4.3-patches/bash43-023
new file mode 100644
index 00000000..d1e4e9d7
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-023
@@ -0,0 +1,104 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-023
+
+Bug-Reported-by: Tim Friske <me@timfriske.com>
+Bug-Reference-ID: <CAM1RzOcOR9zzC2i+aeES6LtbHNHoOV+0pZEYPrqxv_QAii-RXA@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00056.html
+
+Bug-Description:
+
+Bash does not correctly parse process substitution constructs that contain
+unbalanced parentheses as part of the contained command.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/subst.h 2014-01-11 21:02:27.000000000 -0500
+--- subst.h 2014-07-20 17:25:01.000000000 -0400
+***************
+*** 83,87 ****
+ Start extracting at (SINDEX) as if we had just seen "<(".
+ Make (SINDEX) get the position just after the matching ")". */
+! extern char *extract_process_subst __P((char *, char *, int *));
+ #endif /* PROCESS_SUBSTITUTION */
+
+--- 83,87 ----
+ Start extracting at (SINDEX) as if we had just seen "<(".
+ Make (SINDEX) get the position just after the matching ")". */
+! extern char *extract_process_subst __P((char *, char *, int *, int));
+ #endif /* PROCESS_SUBSTITUTION */
+
+*** ../bash-4.3-patched/subst.c 2014-05-15 08:26:45.000000000 -0400
+--- subst.c 2014-07-20 17:26:44.000000000 -0400
+***************
+*** 1193,1202 ****
+ Make (SINDEX) get the position of the matching ")". */ /*))*/
+ char *
+! extract_process_subst (string, starter, sindex)
+ char *string;
+ char *starter;
+ int *sindex;
+ {
+ return (extract_delimited_string (string, sindex, starter, "(", ")", SX_COMMAND));
+ }
+ #endif /* PROCESS_SUBSTITUTION */
+--- 1193,1208 ----
+ Make (SINDEX) get the position of the matching ")". */ /*))*/
+ char *
+! extract_process_subst (string, starter, sindex, xflags)
+ char *string;
+ char *starter;
+ int *sindex;
++ int xflags;
+ {
++ #if 0
+ return (extract_delimited_string (string, sindex, starter, "(", ")", SX_COMMAND));
++ #else
++ xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0);
++ return (xparse_dolparen (string, string+*sindex, sindex, xflags));
++ #endif
+ }
+ #endif /* PROCESS_SUBSTITUTION */
+***************
+*** 1786,1790 ****
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+! temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+ free (temp); /* no SX_ALLOC here */
+ i = si;
+--- 1792,1796 ----
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+! temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si, 0);
+ free (temp); /* no SX_ALLOC here */
+ i = si;
+***************
+*** 8250,8254 ****
+ t_index = sindex + 1; /* skip past both '<' and LPAREN */
+
+! temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index); /*))*/
+ sindex = t_index;
+
+--- 8256,8260 ----
+ t_index = sindex + 1; /* skip past both '<' and LPAREN */
+
+! temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index, 0); /*))*/
+ sindex = t_index;
+
+*** ../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 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.3-patches/bash43-024 b/patches/source/bash/bash-4.3-patches/bash43-024
new file mode 100644
index 00000000..a24b8fbb
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-024
@@ -0,0 +1,54 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-024
+
+Bug-Reported-by: Corentin Peuvrel <cpeuvrel@pom-monitoring.com>
+Bug-Reference-ID: <53CE9E5D.6050203@pom-monitoring.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-07/msg00021.html
+
+Bug-Description:
+
+Indirect variable references do not work correctly if the reference
+variable expands to an array reference using a subscript other than 0
+(e.g., foo='bar[1]' ; echo ${!foo}).
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/subst.c 2014-06-03 09:32:44.000000000 -0400
+--- subst.c 2014-07-23 09:58:19.000000000 -0400
+***************
+*** 7375,7379 ****
+
+ if (want_indir)
+! tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
+ else
+ tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND|(pflags&(PF_NOSPLIT2|PF_ASSIGNRHS)), &ind);
+--- 7445,7455 ----
+
+ if (want_indir)
+! {
+! tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
+! /* Turn off the W_ARRAYIND flag because there is no way for this function
+! to return the index we're supposed to be using. */
+! if (tdesc && tdesc->flags)
+! tdesc->flags &= ~W_ARRAYIND;
+! }
+ else
+ tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND|(pflags&(PF_NOSPLIT2|PF_ASSIGNRHS)), &ind);
+*** ../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 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.3-patches/bash43-025 b/patches/source/bash/bash-4.3-patches/bash43-025
new file mode 100644
index 00000000..721aca03
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-025
@@ -0,0 +1,123 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-025
+
+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.3-patched/builtins/common.h 2013-07-08 16:54:47.000000000 -0400
+--- builtins/common.h 2014-09-12 14:25:47.000000000 -0400
+***************
+*** 34,37 ****
+--- 49,54 ----
+ #define SEVAL_PARSEONLY 0x020
+ #define SEVAL_NOLONGJMP 0x040
++ #define SEVAL_FUNCDEF 0x080 /* only allow function definitions */
++ #define SEVAL_ONECMD 0x100 /* only allow a single command */
+
+ /* Flags for describe_command, shared between type.def and command.def */
+*** ../bash-4.3-patched/builtins/evalstring.c 2014-02-11 09:42:10.000000000 -0500
+--- builtins/evalstring.c 2014-09-14 14:15:13.000000000 -0400
+***************
+*** 309,312 ****
+--- 313,324 ----
+ 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");
+***************
+*** 369,372 ****
+--- 381,387 ----
+ dispose_fd_bitmap (bitmap);
+ discard_unwind_frame ("pe_dispose");
++
++ if (flags & SEVAL_ONECMD)
++ break;
+ }
+ }
+*** ../bash-4.3-patched/variables.c 2014-05-15 08:26:50.000000000 -0400
+--- variables.c 2014-09-14 14:23:35.000000000 -0400
+***************
+*** 359,369 ****
+ strcpy (temp_string + char_index + 1, string);
+
+! if (posixly_correct == 0 || legal_identifier (name))
+! 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))
+--- 364,372 ----
+ strcpy (temp_string + char_index + 1, string);
+
+! /* Don't import function names that are invalid identifiers from the
+! environment, though we still allow them to be defined as shell
+! variables. */
+! if (legal_identifier (name))
+! parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST|SEVAL_FUNCDEF|SEVAL_ONECMD);
+
+ if (temp_var = find_function (name))
+***************
+*** 382,389 ****
+ 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)
+--- 385,388 ----
+*** ../bash-4.3-patched/subst.c 2014-08-11 11:16:35.000000000 -0400
+--- subst.c 2014-09-12 15:31:04.000000000 -0400
+***************
+*** 8048,8052 ****
+ goto return0;
+ }
+! else if (var = find_variable_last_nameref (temp1))
+ {
+ temp = nameref_cell (var);
+--- 8118,8124 ----
+ goto return0;
+ }
+! else if (var && (invisible_p (var) || var_isset (var) == 0))
+! temp = (char *)NULL;
+! else if ((var = find_variable_last_nameref (temp1)) && var_isset (var) && invisible_p (var) == 0)
+ {
+ temp = nameref_cell (var);
+*** ../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 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.3-patches/bash43-026 b/patches/source/bash/bash-4.3-patches/bash43-026
new file mode 100644
index 00000000..d5d5b1dd
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-026
@@ -0,0 +1,60 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-026
+
+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.3.25/parse.y 2014-07-30 10:14:31.000000000 -0400
+--- parse.y 2014-09-25 20:20:21.000000000 -0400
+***************
+*** 2954,2957 ****
+--- 2954,2959 ----
+ word_desc_to_read = (WORD_DESC *)NULL;
+
++ eol_ungetc_lookahead = 0;
++
+ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
+*** ../bash-4.3.25/y.tab.c 2014-07-30 10:14:32.000000000 -0400
+--- y.tab.c 2014-09-25 20:21:48.000000000 -0400
+***************
+*** 5266,5269 ****
+--- 5266,5271 ----
+ word_desc_to_read = (WORD_DESC *)NULL;
+
++ eol_ungetc_lookahead = 0;
++
+ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
+***************
+*** 8540,8542 ****
+ }
+ #endif /* HANDLE_MULTIBYTE */
+-
+--- 8542,8543 ----
+*** ../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 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.3-patches/bash43-027 b/patches/source/bash/bash-4.3-patches/bash43-027
new file mode 100644
index 00000000..ef48bd82
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-027
@@ -0,0 +1,221 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-027
+
+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.3.26/variables.c 2014-09-25 23:02:18.000000000 -0400
+--- variables.c 2014-09-27 20:52:04.000000000 -0400
+***************
+*** 84,87 ****
+--- 84,92 ----
+ #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;
+
+***************
+*** 280,284 ****
+ 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 *));
+--- 285,289 ----
+ 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 *));
+***************
+*** 350,369 ****
+ /* 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, though we still allow them to be defined as shell
+ variables. */
+! 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));
+--- 355,385 ----
+ /* 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, though we still allow them to be defined as shell
+ variables. */
+! 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));
+***************
+*** 378,383 ****
+ }
+ last_command_exit_value = 1;
+! report_error (_("error importing function definition for `%s'"), name);
+ }
+ }
+ #if defined (ARRAY_VARS)
+--- 394,402 ----
+ }
+ last_command_exit_value = 1;
+! report_error (_("error importing function definition for `%s'"), tname);
+ }
++
++ /* Restore original suffix */
++ tname[namelen] = BASHFUNC_SUFFIX[0];
+ }
+ #if defined (ARRAY_VARS)
+***************
+*** 2955,2959 ****
+
+ INVALIDATE_EXPORTSTR (var);
+! var->exportstr = mk_env_string (name, value);
+
+ array_needs_making = 1;
+--- 2974,2978 ----
+
+ INVALIDATE_EXPORTSTR (var);
+! var->exportstr = mk_env_string (name, value, 0);
+
+ array_needs_making = 1;
+***************
+*** 3853,3871 ****
+
+ 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);
+ }
+--- 3872,3911 ----
+
+ 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);
+ }
+***************
+*** 3953,3957 ****
+ using the cached exportstr... */
+ list[list_index] = USE_EXPORTSTR ? savestring (value)
+! : mk_env_string (var->name, value);
+
+ if (USE_EXPORTSTR == 0)
+--- 3993,3997 ----
+ 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.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 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.3-patches/bash43-028 b/patches/source/bash/bash-4.3-patches/bash43-028
new file mode 100644
index 00000000..7448cf81
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-028
@@ -0,0 +1,2265 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-028
+
+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.3-patched/parse.y 2014-09-25 23:02:35.000000000 -0400
+--- parse.y 2014-09-29 16:47:03.000000000 -0400
+***************
+*** 169,172 ****
+--- 169,175 ----
+ 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));
+***************
+*** 266,270 ****
+ /* 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;
+
+--- 269,275 ----
+ /* 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;
+
+***************
+*** 308,312 ****
+ 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;
+
+--- 313,317 ----
+ 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;
+
+***************
+*** 521,525 ****
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS WORD
+--- 526,530 ----
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | NUMBER LESS_LESS WORD
+***************
+*** 528,532 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS WORD
+--- 533,537 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | REDIR_WORD LESS_LESS WORD
+***************
+*** 535,539 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_MINUS WORD
+--- 540,544 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ($$);
+ }
+ | LESS_LESS_MINUS WORD
+***************
+*** 542,546 ****
+ redir.filename = $2;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS_MINUS WORD
+--- 547,551 ----
+ redir.filename = $2;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | NUMBER LESS_LESS_MINUS WORD
+***************
+*** 549,553 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS_MINUS WORD
+--- 554,558 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ($$);
+ }
+ | REDIR_WORD LESS_LESS_MINUS WORD
+***************
+*** 556,560 ****
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_LESS WORD
+--- 561,565 ----
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ($$);
+ }
+ | LESS_LESS_LESS WORD
+***************
+*** 2637,2640 ****
+--- 2642,2660 ----
+ 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.3.27/y.tab.c 2014-10-01 11:38:24.000000000 -0400
+--- y.tab.c 2014-10-01 12:46:11.000000000 -0400
+***************
+*** 169,173 ****
+
+ /* Copy the first part of user declarations. */
+! #line 21 "/usr/homes/chet/src/bash/src/parse.y"
+
+ #include "config.h"
+--- 169,173 ----
+
+ /* Copy the first part of user declarations. */
+! #line 21 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+
+ #include "config.h"
+***************
+*** 320,323 ****
+--- 320,326 ----
+ 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));
+***************
+*** 417,421 ****
+ /* 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;
+
+--- 420,426 ----
+ /* 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;
+
+***************
+*** 459,463 ****
+ 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;
+
+--- 464,468 ----
+ 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;
+
+***************
+*** 493,497 ****
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+ typedef union YYSTYPE
+! #line 324 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ WORD_DESC *word; /* the word that we read. */
+--- 498,502 ----
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+ typedef union YYSTYPE
+! #line 329 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ WORD_DESC *word; /* the word that we read. */
+***************
+*** 504,508 ****
+ }
+ /* Line 193 of yacc.c. */
+! #line 507 "y.tab.c"
+ YYSTYPE;
+ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
+--- 509,513 ----
+ }
+ /* Line 193 of yacc.c. */
+! #line 512 "y.tab.c"
+ YYSTYPE;
+ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
+***************
+*** 517,521 ****
+
+ /* Line 216 of yacc.c. */
+! #line 520 "y.tab.c"
+
+ #ifdef short
+--- 522,526 ----
+
+ /* Line 216 of yacc.c. */
+! #line 525 "y.tab.c"
+
+ #ifdef short
+***************
+*** 887,907 ****
+ static const yytype_uint16 yyrline[] =
+ {
+! 0, 377, 377, 388, 397, 412, 422, 424, 428, 434,
+! 440, 446, 452, 458, 464, 470, 476, 482, 488, 494,
+! 500, 506, 512, 518, 525, 532, 539, 546, 553, 560,
+! 566, 572, 578, 584, 590, 596, 602, 608, 614, 620,
+! 626, 632, 638, 644, 650, 656, 662, 668, 674, 680,
+! 686, 692, 700, 702, 704, 708, 712, 723, 725, 729,
+! 731, 733, 749, 751, 755, 757, 759, 761, 763, 765,
+! 767, 769, 771, 773, 775, 779, 784, 789, 794, 799,
+! 804, 809, 814, 821, 826, 831, 836, 843, 848, 853,
+! 858, 863, 868, 875, 880, 885, 892, 895, 898, 902,
+! 904, 935, 942, 947, 964, 969, 986, 993, 995, 997,
+! 1002, 1006, 1010, 1014, 1016, 1018, 1022, 1023, 1027, 1029,
+! 1031, 1033, 1037, 1039, 1041, 1043, 1045, 1047, 1051, 1053,
+! 1062, 1070, 1071, 1077, 1078, 1085, 1089, 1091, 1093, 1100,
+! 1102, 1104, 1108, 1109, 1112, 1114, 1116, 1120, 1121, 1130,
+! 1143, 1159, 1174, 1176, 1178, 1185, 1188, 1192, 1194, 1200,
+! 1206, 1223, 1243, 1245, 1268, 1272, 1274, 1276
+ };
+ #endif
+--- 892,912 ----
+ static const yytype_uint16 yyrline[] =
+ {
+! 0, 382, 382, 393, 402, 417, 427, 429, 433, 439,
+! 445, 451, 457, 463, 469, 475, 481, 487, 493, 499,
+! 505, 511, 517, 523, 530, 537, 544, 551, 558, 565,
+! 571, 577, 583, 589, 595, 601, 607, 613, 619, 625,
+! 631, 637, 643, 649, 655, 661, 667, 673, 679, 685,
+! 691, 697, 705, 707, 709, 713, 717, 728, 730, 734,
+! 736, 738, 754, 756, 760, 762, 764, 766, 768, 770,
+! 772, 774, 776, 778, 780, 784, 789, 794, 799, 804,
+! 809, 814, 819, 826, 831, 836, 841, 848, 853, 858,
+! 863, 868, 873, 880, 885, 890, 897, 900, 903, 907,
+! 909, 940, 947, 952, 969, 974, 991, 998, 1000, 1002,
+! 1007, 1011, 1015, 1019, 1021, 1023, 1027, 1028, 1032, 1034,
+! 1036, 1038, 1042, 1044, 1046, 1048, 1050, 1052, 1056, 1058,
+! 1067, 1075, 1076, 1082, 1083, 1090, 1094, 1096, 1098, 1105,
+! 1107, 1109, 1113, 1114, 1117, 1119, 1121, 1125, 1126, 1135,
+! 1148, 1164, 1179, 1181, 1183, 1190, 1193, 1197, 1199, 1205,
+! 1211, 1228, 1248, 1250, 1273, 1277, 1279, 1281
+ };
+ #endif
+***************
+*** 2094,2098 ****
+ {
+ case 2:
+! #line 378 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ /* Case of regular command. Discard the error
+--- 2099,2103 ----
+ {
+ case 2:
+! #line 383 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Case of regular command. Discard the error
+***************
+*** 2108,2112 ****
+
+ case 3:
+! #line 389 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ /* Case of regular command, but not a very
+--- 2113,2117 ----
+
+ case 3:
+! #line 394 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Case of regular command, but not a very
+***************
+*** 2120,2124 ****
+
+ case 4:
+! #line 398 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ /* Error during parsing. Return NULL command. */
+--- 2125,2129 ----
+
+ case 4:
+! #line 403 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Error during parsing. Return NULL command. */
+***************
+*** 2138,2142 ****
+
+ case 5:
+! #line 413 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+--- 2143,2147 ----
+
+ case 5:
+! #line 418 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+***************
+*** 2149,2163 ****
+
+ case 6:
+! #line 423 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 7:
+! #line 425 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(2) - (2)].word), (yyvsp[(1) - (2)].word_list)); }
+ break;
+
+ case 8:
+! #line 429 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2154,2168 ----
+
+ case 6:
+! #line 428 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 7:
+! #line 430 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(2) - (2)].word), (yyvsp[(1) - (2)].word_list)); }
+ break;
+
+ case 8:
+! #line 434 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2168,2172 ****
+
+ case 9:
+! #line 435 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2173,2177 ----
+
+ case 9:
+! #line 440 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2177,2181 ****
+
+ case 10:
+! #line 441 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2182,2186 ----
+
+ case 10:
+! #line 446 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2186,2190 ****
+
+ case 11:
+! #line 447 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2191,2195 ----
+
+ case 11:
+! #line 452 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2195,2199 ****
+
+ case 12:
+! #line 453 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2200,2204 ----
+
+ case 12:
+! #line 458 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2204,2208 ****
+
+ case 13:
+! #line 459 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2209,2213 ----
+
+ case 13:
+! #line 464 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2213,2217 ****
+
+ case 14:
+! #line 465 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2218,2222 ----
+
+ case 14:
+! #line 470 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2222,2226 ****
+
+ case 15:
+! #line 471 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2227,2231 ----
+
+ case 15:
+! #line 476 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2231,2235 ****
+
+ case 16:
+! #line 477 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2236,2240 ----
+
+ case 16:
+! #line 482 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2240,2244 ****
+
+ case 17:
+! #line 483 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2245,2249 ----
+
+ case 17:
+! #line 488 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2249,2253 ****
+
+ case 18:
+! #line 489 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2254,2258 ----
+
+ case 18:
+! #line 494 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2258,2262 ****
+
+ case 19:
+! #line 495 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2263,2267 ----
+
+ case 19:
+! #line 500 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2267,2271 ****
+
+ case 20:
+! #line 501 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2272,2276 ----
+
+ case 20:
+! #line 506 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2276,2280 ****
+
+ case 21:
+! #line 507 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2281,2285 ----
+
+ case 21:
+! #line 512 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2285,2289 ****
+
+ case 22:
+! #line 513 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2290,2294 ----
+
+ case 22:
+! #line 518 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2294,2358 ****
+
+ case 23:
+! #line 519 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 24:
+! #line 526 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 25:
+! #line 533 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 26:
+! #line 540 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 27:
+! #line 547 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
+! redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 28:
+! #line 554 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 29:
+! #line 561 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2299,2363 ----
+
+ case 23:
+! #line 524 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ((yyval.redirect));
+ }
+ break;
+
+ case 24:
+! #line 531 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
+! push_heredoc ((yyval.redirect));
+ }
+ break;
+
+ case 25:
+! #line 538 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ((yyval.redirect));
+ }
+ break;
+
+ case 26:
+! #line 545 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ((yyval.redirect));
+ }
+ break;
+
+ case 27:
+! #line 552 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
+! push_heredoc ((yyval.redirect));
+ }
+ break;
+
+ case 28:
+! #line 559 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+! push_heredoc ((yyval.redirect));
+ }
+ break;
+
+ case 29:
+! #line 566 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2363,2367 ****
+
+ case 30:
+! #line 567 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2368,2372 ----
+
+ case 30:
+! #line 572 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2372,2376 ****
+
+ case 31:
+! #line 573 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2377,2381 ----
+
+ case 31:
+! #line 578 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2381,2385 ****
+
+ case 32:
+! #line 579 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2386,2390 ----
+
+ case 32:
+! #line 584 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2390,2394 ****
+
+ case 33:
+! #line 585 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2395,2399 ----
+
+ case 33:
+! #line 590 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2399,2403 ****
+
+ case 34:
+! #line 591 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2404,2408 ----
+
+ case 34:
+! #line 596 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2408,2412 ****
+
+ case 35:
+! #line 597 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2413,2417 ----
+
+ case 35:
+! #line 602 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2417,2421 ****
+
+ case 36:
+! #line 603 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2422,2426 ----
+
+ case 36:
+! #line 608 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2426,2430 ****
+
+ case 37:
+! #line 609 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2431,2435 ----
+
+ case 37:
+! #line 614 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2435,2439 ****
+
+ case 38:
+! #line 615 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2440,2444 ----
+
+ case 38:
+! #line 620 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2444,2448 ****
+
+ case 39:
+! #line 621 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2449,2453 ----
+
+ case 39:
+! #line 626 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2453,2457 ****
+
+ case 40:
+! #line 627 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2458,2462 ----
+
+ case 40:
+! #line 632 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2462,2466 ****
+
+ case 41:
+! #line 633 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2467,2471 ----
+
+ case 41:
+! #line 638 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2471,2475 ****
+
+ case 42:
+! #line 639 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2476,2480 ----
+
+ case 42:
+! #line 644 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2480,2484 ****
+
+ case 43:
+! #line 645 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2485,2489 ----
+
+ case 43:
+! #line 650 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2489,2493 ****
+
+ case 44:
+! #line 651 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2494,2498 ----
+
+ case 44:
+! #line 656 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2498,2502 ****
+
+ case 45:
+! #line 657 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2503,2507 ----
+
+ case 45:
+! #line 662 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2507,2511 ****
+
+ case 46:
+! #line 663 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2512,2516 ----
+
+ case 46:
+! #line 668 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2516,2520 ****
+
+ case 47:
+! #line 669 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+--- 2521,2525 ----
+
+ case 47:
+! #line 674 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2525,2529 ****
+
+ case 48:
+! #line 675 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2530,2534 ----
+
+ case 48:
+! #line 680 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2534,2538 ****
+
+ case 49:
+! #line 681 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2539,2543 ----
+
+ case 49:
+! #line 686 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2543,2547 ****
+
+ case 50:
+! #line 687 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2548,2552 ----
+
+ case 50:
+! #line 692 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2552,2556 ****
+
+ case 51:
+! #line 693 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+--- 2557,2561 ----
+
+ case 51:
+! #line 698 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2561,2580 ****
+
+ case 52:
+! #line 701 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 53:
+! #line 703 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 54:
+! #line 705 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.element).redirect = (yyvsp[(1) - (1)].redirect); (yyval.element).word = 0; }
+ break;
+
+ case 55:
+! #line 709 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.redirect) = (yyvsp[(1) - (1)].redirect);
+--- 2566,2585 ----
+
+ case 52:
+! #line 706 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 53:
+! #line 708 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 54:
+! #line 710 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.element).redirect = (yyvsp[(1) - (1)].redirect); (yyval.element).word = 0; }
+ break;
+
+ case 55:
+! #line 714 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.redirect) = (yyvsp[(1) - (1)].redirect);
+***************
+*** 2583,2587 ****
+
+ case 56:
+! #line 713 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ register REDIRECT *t;
+--- 2588,2592 ----
+
+ case 56:
+! #line 718 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ register REDIRECT *t;
+***************
+*** 2595,2619 ****
+
+ case 57:
+! #line 724 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(1) - (1)].element), (COMMAND *)NULL); }
+ break;
+
+ case 58:
+! #line 726 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(2) - (2)].element), (yyvsp[(1) - (2)].command)); }
+ break;
+
+ case 59:
+! #line 730 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = clean_simple_command ((yyvsp[(1) - (1)].command)); }
+ break;
+
+ case 60:
+! #line 732 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 61:
+! #line 734 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2600,2624 ----
+
+ case 57:
+! #line 729 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(1) - (1)].element), (COMMAND *)NULL); }
+ break;
+
+ case 58:
+! #line 731 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(2) - (2)].element), (yyvsp[(1) - (2)].command)); }
+ break;
+
+ case 59:
+! #line 735 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = clean_simple_command ((yyvsp[(1) - (1)].command)); }
+ break;
+
+ case 60:
+! #line 737 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 61:
+! #line 739 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2634,2703 ****
+
+ case 62:
+! #line 750 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 63:
+! #line 752 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 64:
+! #line 756 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 65:
+! #line 758 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 66:
+! #line 760 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_while_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 67:
+! #line 762 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_until_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 68:
+! #line 764 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 69:
+! #line 766 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 70:
+! #line 768 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 71:
+! #line 770 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 72:
+! #line 772 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 73:
+! #line 774 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 74:
+! #line 776 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 75:
+! #line 780 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2639,2708 ----
+
+ case 62:
+! #line 755 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 63:
+! #line 757 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 64:
+! #line 761 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 65:
+! #line 763 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 66:
+! #line 765 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_while_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 67:
+! #line 767 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_until_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 68:
+! #line 769 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 69:
+! #line 771 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 70:
+! #line 773 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 71:
+! #line 775 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 72:
+! #line 777 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 73:
+! #line 779 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 74:
+! #line 781 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 75:
+! #line 785 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2707,2711 ****
+
+ case 76:
+! #line 785 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2712,2716 ----
+
+ case 76:
+! #line 790 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2715,2719 ****
+
+ case 77:
+! #line 790 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2720,2724 ----
+
+ case 77:
+! #line 795 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2723,2727 ****
+
+ case 78:
+! #line 795 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2728,2732 ----
+
+ case 78:
+! #line 800 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2731,2735 ****
+
+ case 79:
+! #line 800 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2736,2740 ----
+
+ case 79:
+! #line 805 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2739,2743 ****
+
+ case 80:
+! #line 805 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2744,2748 ----
+
+ case 80:
+! #line 810 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2747,2751 ****
+
+ case 81:
+! #line 810 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+--- 2752,2756 ----
+
+ case 81:
+! #line 815 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+***************
+*** 2755,2759 ****
+
+ case 82:
+! #line 815 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+--- 2760,2764 ----
+
+ case 82:
+! #line 820 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+***************
+*** 2763,2767 ****
+
+ case 83:
+! #line 822 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+--- 2768,2772 ----
+
+ case 83:
+! #line 827 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+***************
+*** 2771,2775 ****
+
+ case 84:
+! #line 827 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+--- 2776,2780 ----
+
+ case 84:
+! #line 832 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+***************
+*** 2779,2783 ****
+
+ case 85:
+! #line 832 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+--- 2784,2788 ----
+
+ case 85:
+! #line 837 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+***************
+*** 2787,2791 ****
+
+ case 86:
+! #line 837 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+--- 2792,2796 ----
+
+ case 86:
+! #line 842 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+***************
+*** 2795,2799 ****
+
+ case 87:
+! #line 844 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2800,2804 ----
+
+ case 87:
+! #line 849 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2803,2807 ****
+
+ case 88:
+! #line 849 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2808,2812 ----
+
+ case 88:
+! #line 854 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2811,2815 ****
+
+ case 89:
+! #line 854 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2816,2820 ----
+
+ case 89:
+! #line 859 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2819,2823 ****
+
+ case 90:
+! #line 859 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2824,2828 ----
+
+ case 90:
+! #line 864 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2827,2831 ****
+
+ case 91:
+! #line 864 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2832,2836 ----
+
+ case 91:
+! #line 869 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2835,2839 ****
+
+ case 92:
+! #line 869 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2840,2844 ----
+
+ case 92:
+! #line 874 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2843,2847 ****
+
+ case 93:
+! #line 876 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
+--- 2848,2852 ----
+
+ case 93:
+! #line 881 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
+***************
+*** 2851,2855 ****
+
+ case 94:
+! #line 881 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (7)].word), (yyvsp[(5) - (7)].pattern), word_lineno[word_top]);
+--- 2856,2860 ----
+
+ case 94:
+! #line 886 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (7)].word), (yyvsp[(5) - (7)].pattern), word_lineno[word_top]);
+***************
+*** 2859,2863 ****
+
+ case 95:
+! #line 886 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (yyvsp[(5) - (6)].pattern), word_lineno[word_top]);
+--- 2864,2868 ----
+
+ case 95:
+! #line 891 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (yyvsp[(5) - (6)].pattern), word_lineno[word_top]);
+***************
+*** 2867,2891 ****
+
+ case 96:
+! #line 893 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(1) - (5)].word), (yyvsp[(5) - (5)].command), function_dstart, function_bstart); }
+ break;
+
+ case 97:
+! #line 896 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (6)].word), (yyvsp[(6) - (6)].command), function_dstart, function_bstart); }
+ break;
+
+ case 98:
+! #line 899 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (4)].word), (yyvsp[(4) - (4)].command), function_dstart, function_bstart); }
+ break;
+
+ case 99:
+! #line 903 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 100:
+! #line 905 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2872,2896 ----
+
+ case 96:
+! #line 898 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(1) - (5)].word), (yyvsp[(5) - (5)].command), function_dstart, function_bstart); }
+ break;
+
+ case 97:
+! #line 901 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (6)].word), (yyvsp[(6) - (6)].command), function_dstart, function_bstart); }
+ break;
+
+ case 98:
+! #line 904 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (4)].word), (yyvsp[(4) - (4)].command), function_dstart, function_bstart); }
+ break;
+
+ case 99:
+! #line 908 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 100:
+! #line 910 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2919,2923 ****
+
+ case 101:
+! #line 936 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_subshell_command ((yyvsp[(2) - (3)].command));
+--- 2924,2928 ----
+
+ case 101:
+! #line 941 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_subshell_command ((yyvsp[(2) - (3)].command));
+***************
+*** 2927,2931 ****
+
+ case 102:
+! #line 943 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (2)].command));
+--- 2932,2936 ----
+
+ case 102:
+! #line 948 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (2)].command));
+***************
+*** 2935,2939 ****
+
+ case 103:
+! #line 948 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2940,2944 ----
+
+ case 103:
+! #line 953 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2955,2959 ****
+
+ case 104:
+! #line 965 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ((yyvsp[(2) - (3)].word)->word, (yyvsp[(3) - (3)].command));
+--- 2960,2964 ----
+
+ case 104:
+! #line 970 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_coproc_command ((yyvsp[(2) - (3)].word)->word, (yyvsp[(3) - (3)].command));
+***************
+*** 2963,2967 ****
+
+ case 105:
+! #line 970 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+--- 2968,2972 ----
+
+ case 105:
+! #line 975 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2983,2987 ****
+
+ case 106:
+! #line 987 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[(2) - (2)].command)));
+--- 2988,2992 ----
+
+ case 106:
+! #line 992 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[(2) - (2)].command)));
+***************
+*** 2991,3105 ****
+
+ case 107:
+! #line 994 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (COMMAND *)NULL); }
+ break;
+
+ case 108:
+! #line 996 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (7)].command), (yyvsp[(4) - (7)].command), (yyvsp[(6) - (7)].command)); }
+ break;
+
+ case 109:
+! #line 998 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(5) - (6)].command)); }
+ break;
+
+ case 110:
+! #line 1003 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_group_command ((yyvsp[(2) - (3)].command)); }
+ break;
+
+ case 111:
+! #line 1007 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_arith_command ((yyvsp[(1) - (1)].word_list)); }
+ break;
+
+ case 112:
+! #line 1011 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(2) - (3)].command); }
+ break;
+
+ case 113:
+! #line 1015 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (4)].command), (yyvsp[(4) - (4)].command), (COMMAND *)NULL); }
+ break;
+
+ case 114:
+! #line 1017 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(6) - (6)].command)); }
+ break;
+
+ case 115:
+! #line 1019 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 117:
+! #line 1024 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (2)].pattern)->next = (yyvsp[(1) - (2)].pattern); (yyval.pattern) = (yyvsp[(2) - (2)].pattern); }
+ break;
+
+ case 118:
+! #line 1028 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (yyvsp[(4) - (4)].command)); }
+ break;
+
+ case 119:
+! #line 1030 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 120:
+! #line 1032 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 121:
+! #line 1034 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 122:
+! #line 1038 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 123:
+! #line 1040 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 124:
+! #line 1042 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 125:
+! #line 1044 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 126:
+! #line 1046 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 127:
+! #line 1048 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 128:
+! #line 1052 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 129:
+! #line 1054 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(3) - (3)].word), (yyvsp[(1) - (3)].word_list)); }
+ break;
+
+ case 130:
+! #line 1063 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+--- 2996,3110 ----
+
+ case 107:
+! #line 999 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (COMMAND *)NULL); }
+ break;
+
+ case 108:
+! #line 1001 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (7)].command), (yyvsp[(4) - (7)].command), (yyvsp[(6) - (7)].command)); }
+ break;
+
+ case 109:
+! #line 1003 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(5) - (6)].command)); }
+ break;
+
+ case 110:
+! #line 1008 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_group_command ((yyvsp[(2) - (3)].command)); }
+ break;
+
+ case 111:
+! #line 1012 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_arith_command ((yyvsp[(1) - (1)].word_list)); }
+ break;
+
+ case 112:
+! #line 1016 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(2) - (3)].command); }
+ break;
+
+ case 113:
+! #line 1020 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (4)].command), (yyvsp[(4) - (4)].command), (COMMAND *)NULL); }
+ break;
+
+ case 114:
+! #line 1022 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(6) - (6)].command)); }
+ break;
+
+ case 115:
+! #line 1024 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 117:
+! #line 1029 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (2)].pattern)->next = (yyvsp[(1) - (2)].pattern); (yyval.pattern) = (yyvsp[(2) - (2)].pattern); }
+ break;
+
+ case 118:
+! #line 1033 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (yyvsp[(4) - (4)].command)); }
+ break;
+
+ case 119:
+! #line 1035 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 120:
+! #line 1037 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 121:
+! #line 1039 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 122:
+! #line 1043 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 123:
+! #line 1045 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 124:
+! #line 1047 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 125:
+! #line 1049 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 126:
+! #line 1051 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 127:
+! #line 1053 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 128:
+! #line 1057 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 129:
+! #line 1059 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(3) - (3)].word), (yyvsp[(1) - (3)].word_list)); }
+ break;
+
+ case 130:
+! #line 1068 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+***************
+*** 3110,3114 ****
+
+ case 132:
+! #line 1072 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+--- 3115,3119 ----
+
+ case 132:
+! #line 1077 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+***************
+*** 3117,3121 ****
+
+ case 134:
+! #line 1079 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+--- 3122,3126 ----
+
+ case 134:
+! #line 1084 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+***************
+*** 3127,3141 ****
+
+ case 136:
+! #line 1090 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 137:
+! #line 1092 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 138:
+! #line 1094 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (4)].command)->type == cm_connection)
+--- 3132,3146 ----
+
+ case 136:
+! #line 1095 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 137:
+! #line 1097 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 138:
+! #line 1099 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (4)].command)->type == cm_connection)
+***************
+*** 3147,3181 ****
+
+ case 139:
+! #line 1101 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 140:
+! #line 1103 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 141:
+! #line 1105 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 144:
+! #line 1113 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.number) = '\n'; }
+ break;
+
+ case 145:
+! #line 1115 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.number) = ';'; }
+ break;
+
+ case 146:
+! #line 1117 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.number) = yacc_EOF; }
+ break;
+
+ case 149:
+! #line 1131 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (1)].command);
+--- 3152,3186 ----
+
+ case 139:
+! #line 1106 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 140:
+! #line 1108 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 141:
+! #line 1110 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 144:
+! #line 1118 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = '\n'; }
+ break;
+
+ case 145:
+! #line 1120 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = ';'; }
+ break;
+
+ case 146:
+! #line 1122 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = yacc_EOF; }
+ break;
+
+ case 149:
+! #line 1136 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (1)].command);
+***************
+*** 3193,3197 ****
+
+ case 150:
+! #line 1144 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (2)].command)->type == cm_connection)
+--- 3198,3202 ----
+
+ case 150:
+! #line 1149 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (2)].command)->type == cm_connection)
+***************
+*** 3212,3216 ****
+
+ case 151:
+! #line 1160 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (2)].command);
+--- 3217,3221 ----
+
+ case 151:
+! #line 1165 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (2)].command);
+***************
+*** 3228,3242 ****
+
+ case 152:
+! #line 1175 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 153:
+! #line 1177 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 154:
+! #line 1179 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+--- 3233,3247 ----
+
+ case 152:
+! #line 1180 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 153:
+! #line 1182 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 154:
+! #line 1184 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+***************
+*** 3248,3267 ****
+
+ case 155:
+! #line 1186 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), ';'); }
+ break;
+
+ case 156:
+! #line 1189 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 157:
+! #line 1193 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 158:
+! #line 1195 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+--- 3253,3272 ----
+
+ case 155:
+! #line 1191 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), ';'); }
+ break;
+
+ case 156:
+! #line 1194 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 157:
+! #line 1198 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 158:
+! #line 1200 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+***************
+*** 3272,3276 ****
+
+ case 159:
+! #line 1201 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+--- 3277,3281 ----
+
+ case 159:
+! #line 1206 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+***************
+*** 3281,3285 ****
+
+ case 160:
+! #line 1207 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ ELEMENT x;
+--- 3286,3290 ----
+
+ case 160:
+! #line 1212 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ ELEMENT x;
+***************
+*** 3301,3305 ****
+
+ case 161:
+! #line 1224 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ ELEMENT x;
+--- 3306,3310 ----
+
+ case 161:
+! #line 1229 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ ELEMENT x;
+***************
+*** 3322,3331 ****
+
+ case 162:
+! #line 1244 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|'); }
+ break;
+
+ case 163:
+! #line 1246 "/usr/homes/chet/src/bash/src/parse.y"
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+--- 3327,3336 ----
+
+ case 162:
+! #line 1249 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|'); }
+ break;
+
+ case 163:
+! #line 1251 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+***************
+*** 3353,3372 ****
+
+ case 164:
+! #line 1269 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 165:
+! #line 1273 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE; }
+ break;
+
+ case 166:
+! #line 1275 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+
+ case 167:
+! #line 1277 "/usr/homes/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+--- 3358,3377 ----
+
+ case 164:
+! #line 1274 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 165:
+! #line 1278 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE; }
+ break;
+
+ case 166:
+! #line 1280 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+
+ case 167:
+! #line 1282 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+***************
+*** 3374,3378 ****
+
+ /* Line 1267 of yacc.c. */
+! #line 3377 "y.tab.c"
+ default: break;
+ }
+--- 3379,3383 ----
+
+ /* Line 1267 of yacc.c. */
+! #line 3382 "y.tab.c"
+ default: break;
+ }
+***************
+*** 3588,3592 ****
+
+
+! #line 1279 "/usr/homes/chet/src/bash/src/parse.y"
+
+
+--- 3593,3597 ----
+
+
+! #line 1284 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+
+
+***************
+*** 4949,4952 ****
+--- 4954,4972 ----
+ 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 ()
+***************
+*** 8542,8543 ****
+--- 8562,8564 ----
+ }
+ #endif /* HANDLE_MULTIBYTE */
++
+*** ../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 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.3-patches/bash43-029 b/patches/source/bash/bash-4.3-patches/bash43-029
new file mode 100644
index 00000000..93bd390a
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-029
@@ -0,0 +1,59 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-029
+
+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.3.28/make_cmd.c 2011-12-16 08:08:01.000000000 -0500
+--- make_cmd.c 2014-10-02 11:24:23.000000000 -0400
+***************
+*** 693,696 ****
+--- 693,697 ----
+ temp->redirector = source;
+ temp->redirectee = dest_and_filename;
++ temp->here_doc_eof = 0;
+ temp->instruction = instruction;
+ temp->flags = 0;
+*** ../bash-4.3.28/copy_cmd.c 2009-09-11 16:28:02.000000000 -0400
+--- copy_cmd.c 2014-10-02 11:24:23.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.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 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.3-patches/bash43-030 b/patches/source/bash/bash-4.3-patches/bash43-030
new file mode 100644
index 00000000..78984da2
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-030
@@ -0,0 +1,2064 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-030
+
+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.3.29/builtins/evalstring.c 2014-10-01 12:57:47.000000000 -0400
+--- builtins/evalstring.c 2014-10-03 11:57:04.000000000 -0400
+***************
+*** 309,318 ****
+ 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;
+ }
+
+--- 313,335 ----
+ 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;
+! }
+ }
+
+***************
+*** 379,383 ****
+
+ if (flags & SEVAL_ONECMD)
+! break;
+ }
+ }
+--- 396,403 ----
+
+ if (flags & SEVAL_ONECMD)
+! {
+! reset_parser ();
+! break;
+! }
+ }
+ }
+*** ../bash-4.3.29/parse.y 2014-10-01 12:58:43.000000000 -0400
+--- parse.y 2014-10-03 14:48:59.000000000 -0400
+***************
+*** 2539,2542 ****
+--- 2539,2552 ----
+ }
+
++ 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. */
+***************
+*** 4028,4033 ****
+ /* 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
+--- 4053,4058 ----
+ /* 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.3.29/shell.h 2014-10-01 12:57:39.000000000 -0400
+--- shell.h 2014-10-03 14:49:12.000000000 -0400
+***************
+*** 181,184 ****
+--- 181,186 ----
+
+ /* 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.3.28/y.tab.c 2014-10-01 13:09:46.000000000 -0400
+--- y.tab.c 2014-10-04 19:26:22.000000000 -0400
+***************
+*** 169,173 ****
+
+ /* Copy the first part of user declarations. */
+! #line 21 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+
+ #include "config.h"
+--- 169,173 ----
+
+ /* Copy the first part of user declarations. */
+! #line 21 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+
+ #include "config.h"
+***************
+*** 498,502 ****
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+ typedef union YYSTYPE
+! #line 329 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ WORD_DESC *word; /* the word that we read. */
+--- 498,502 ----
+ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+ typedef union YYSTYPE
+! #line 329 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ WORD_DESC *word; /* the word that we read. */
+***************
+*** 2099,2103 ****
+ {
+ case 2:
+! #line 383 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Case of regular command. Discard the error
+--- 2099,2103 ----
+ {
+ case 2:
+! #line 383 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ /* Case of regular command. Discard the error
+***************
+*** 2113,2117 ****
+
+ case 3:
+! #line 394 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Case of regular command, but not a very
+--- 2113,2117 ----
+
+ case 3:
+! #line 394 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ /* Case of regular command, but not a very
+***************
+*** 2125,2129 ****
+
+ case 4:
+! #line 403 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Error during parsing. Return NULL command. */
+--- 2125,2129 ----
+
+ case 4:
+! #line 403 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ /* Error during parsing. Return NULL command. */
+***************
+*** 2143,2147 ****
+
+ case 5:
+! #line 418 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+--- 2143,2147 ----
+
+ case 5:
+! #line 418 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+***************
+*** 2154,2168 ****
+
+ case 6:
+! #line 428 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 7:
+! #line 430 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(2) - (2)].word), (yyvsp[(1) - (2)].word_list)); }
+ break;
+
+ case 8:
+! #line 434 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2154,2168 ----
+
+ case 6:
+! #line 428 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 7:
+! #line 430 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(2) - (2)].word), (yyvsp[(1) - (2)].word_list)); }
+ break;
+
+ case 8:
+! #line 434 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2173,2177 ****
+
+ case 9:
+! #line 440 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2173,2177 ----
+
+ case 9:
+! #line 440 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2182,2186 ****
+
+ case 10:
+! #line 446 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2182,2186 ----
+
+ case 10:
+! #line 446 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2191,2195 ****
+
+ case 11:
+! #line 452 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2191,2195 ----
+
+ case 11:
+! #line 452 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2200,2204 ****
+
+ case 12:
+! #line 458 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2200,2204 ----
+
+ case 12:
+! #line 458 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2209,2213 ****
+
+ case 13:
+! #line 464 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2209,2213 ----
+
+ case 13:
+! #line 464 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2218,2222 ****
+
+ case 14:
+! #line 470 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2218,2222 ----
+
+ case 14:
+! #line 470 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2227,2231 ****
+
+ case 15:
+! #line 476 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2227,2231 ----
+
+ case 15:
+! #line 476 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2236,2240 ****
+
+ case 16:
+! #line 482 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2236,2240 ----
+
+ case 16:
+! #line 482 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2245,2249 ****
+
+ case 17:
+! #line 488 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2245,2249 ----
+
+ case 17:
+! #line 488 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2254,2258 ****
+
+ case 18:
+! #line 494 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2254,2258 ----
+
+ case 18:
+! #line 494 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2263,2267 ****
+
+ case 19:
+! #line 500 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2263,2267 ----
+
+ case 19:
+! #line 500 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2272,2276 ****
+
+ case 20:
+! #line 506 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2272,2276 ----
+
+ case 20:
+! #line 506 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2281,2285 ****
+
+ case 21:
+! #line 512 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2281,2285 ----
+
+ case 21:
+! #line 512 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2290,2294 ****
+
+ case 22:
+! #line 518 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2290,2294 ----
+
+ case 22:
+! #line 518 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2299,2303 ****
+
+ case 23:
+! #line 524 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2299,2303 ----
+
+ case 23:
+! #line 524 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2309,2313 ****
+
+ case 24:
+! #line 531 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2309,2313 ----
+
+ case 24:
+! #line 531 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2319,2323 ****
+
+ case 25:
+! #line 538 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2319,2323 ----
+
+ case 25:
+! #line 538 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2329,2333 ****
+
+ case 26:
+! #line 545 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2329,2333 ----
+
+ case 26:
+! #line 545 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2339,2343 ****
+
+ case 27:
+! #line 552 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2339,2343 ----
+
+ case 27:
+! #line 552 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2349,2353 ****
+
+ case 28:
+! #line 559 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2349,2353 ----
+
+ case 28:
+! #line 559 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2359,2363 ****
+
+ case 29:
+! #line 566 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2359,2363 ----
+
+ case 29:
+! #line 566 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2368,2372 ****
+
+ case 30:
+! #line 572 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2368,2372 ----
+
+ case 30:
+! #line 572 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2377,2381 ****
+
+ case 31:
+! #line 578 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2377,2381 ----
+
+ case 31:
+! #line 578 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2386,2390 ****
+
+ case 32:
+! #line 584 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2386,2390 ----
+
+ case 32:
+! #line 584 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2395,2399 ****
+
+ case 33:
+! #line 590 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2395,2399 ----
+
+ case 33:
+! #line 590 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2404,2408 ****
+
+ case 34:
+! #line 596 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2404,2408 ----
+
+ case 34:
+! #line 596 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2413,2417 ****
+
+ case 35:
+! #line 602 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2413,2417 ----
+
+ case 35:
+! #line 602 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2422,2426 ****
+
+ case 36:
+! #line 608 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2422,2426 ----
+
+ case 36:
+! #line 608 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2431,2435 ****
+
+ case 37:
+! #line 614 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2431,2435 ----
+
+ case 37:
+! #line 614 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2440,2444 ****
+
+ case 38:
+! #line 620 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2440,2444 ----
+
+ case 38:
+! #line 620 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2449,2453 ****
+
+ case 39:
+! #line 626 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2449,2453 ----
+
+ case 39:
+! #line 626 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2458,2462 ****
+
+ case 40:
+! #line 632 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2458,2462 ----
+
+ case 40:
+! #line 632 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2467,2471 ****
+
+ case 41:
+! #line 638 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2467,2471 ----
+
+ case 41:
+! #line 638 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2476,2480 ****
+
+ case 42:
+! #line 644 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2476,2480 ----
+
+ case 42:
+! #line 644 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2485,2489 ****
+
+ case 43:
+! #line 650 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2485,2489 ----
+
+ case 43:
+! #line 650 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2494,2498 ****
+
+ case 44:
+! #line 656 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2494,2498 ----
+
+ case 44:
+! #line 656 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2503,2507 ****
+
+ case 45:
+! #line 662 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2503,2507 ----
+
+ case 45:
+! #line 662 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2512,2516 ****
+
+ case 46:
+! #line 668 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2512,2516 ----
+
+ case 46:
+! #line 668 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2521,2525 ****
+
+ case 47:
+! #line 674 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 0;
+--- 2521,2525 ----
+
+ case 47:
+! #line 674 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 0;
+***************
+*** 2530,2534 ****
+
+ case 48:
+! #line 680 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+--- 2530,2534 ----
+
+ case 48:
+! #line 680 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+***************
+*** 2539,2543 ****
+
+ case 49:
+! #line 686 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+--- 2539,2543 ----
+
+ case 49:
+! #line 686 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+***************
+*** 2548,2552 ****
+
+ case 50:
+! #line 692 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2548,2552 ----
+
+ case 50:
+! #line 692 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2557,2561 ****
+
+ case 51:
+! #line 698 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ source.dest = 1;
+--- 2557,2561 ----
+
+ case 51:
+! #line 698 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ source.dest = 1;
+***************
+*** 2566,2585 ****
+
+ case 52:
+! #line 706 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 53:
+! #line 708 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 54:
+! #line 710 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.element).redirect = (yyvsp[(1) - (1)].redirect); (yyval.element).word = 0; }
+ break;
+
+ case 55:
+! #line 714 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.redirect) = (yyvsp[(1) - (1)].redirect);
+--- 2566,2585 ----
+
+ case 52:
+! #line 706 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 53:
+! #line 708 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 54:
+! #line 710 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.element).redirect = (yyvsp[(1) - (1)].redirect); (yyval.element).word = 0; }
+ break;
+
+ case 55:
+! #line 714 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.redirect) = (yyvsp[(1) - (1)].redirect);
+***************
+*** 2588,2592 ****
+
+ case 56:
+! #line 718 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ register REDIRECT *t;
+--- 2588,2592 ----
+
+ case 56:
+! #line 718 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ register REDIRECT *t;
+***************
+*** 2600,2624 ****
+
+ case 57:
+! #line 729 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(1) - (1)].element), (COMMAND *)NULL); }
+ break;
+
+ case 58:
+! #line 731 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(2) - (2)].element), (yyvsp[(1) - (2)].command)); }
+ break;
+
+ case 59:
+! #line 735 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = clean_simple_command ((yyvsp[(1) - (1)].command)); }
+ break;
+
+ case 60:
+! #line 737 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 61:
+! #line 739 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+--- 2600,2624 ----
+
+ case 57:
+! #line 729 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(1) - (1)].element), (COMMAND *)NULL); }
+ break;
+
+ case 58:
+! #line 731 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(2) - (2)].element), (yyvsp[(1) - (2)].command)); }
+ break;
+
+ case 59:
+! #line 735 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = clean_simple_command ((yyvsp[(1) - (1)].command)); }
+ break;
+
+ case 60:
+! #line 737 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 61:
+! #line 739 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2639,2708 ****
+
+ case 62:
+! #line 755 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 63:
+! #line 757 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 64:
+! #line 761 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 65:
+! #line 763 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 66:
+! #line 765 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_while_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 67:
+! #line 767 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_until_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 68:
+! #line 769 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 69:
+! #line 771 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 70:
+! #line 773 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 71:
+! #line 775 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 72:
+! #line 777 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 73:
+! #line 779 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 74:
+! #line 781 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 75:
+! #line 785 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2639,2708 ----
+
+ case 62:
+! #line 755 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 63:
+! #line 757 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 64:
+! #line 761 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 65:
+! #line 763 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 66:
+! #line 765 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_while_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 67:
+! #line 767 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_until_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 68:
+! #line 769 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 69:
+! #line 771 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 70:
+! #line 773 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 71:
+! #line 775 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 72:
+! #line 777 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 73:
+! #line 779 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 74:
+! #line 781 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 75:
+! #line 785 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2712,2716 ****
+
+ case 76:
+! #line 790 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2712,2716 ----
+
+ case 76:
+! #line 790 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2720,2724 ****
+
+ case 77:
+! #line 795 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2720,2724 ----
+
+ case 77:
+! #line 795 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2728,2732 ****
+
+ case 78:
+! #line 800 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2728,2732 ----
+
+ case 78:
+! #line 800 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2736,2740 ****
+
+ case 79:
+! #line 805 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2736,2740 ----
+
+ case 79:
+! #line 805 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2744,2748 ****
+
+ case 80:
+! #line 810 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2744,2748 ----
+
+ case 80:
+! #line 810 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2752,2756 ****
+
+ case 81:
+! #line 815 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+--- 2752,2756 ----
+
+ case 81:
+! #line 815 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+***************
+*** 2760,2764 ****
+
+ case 82:
+! #line 820 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+--- 2760,2764 ----
+
+ case 82:
+! #line 820 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+***************
+*** 2768,2772 ****
+
+ case 83:
+! #line 827 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+--- 2768,2772 ----
+
+ case 83:
+! #line 827 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+***************
+*** 2776,2780 ****
+
+ case 84:
+! #line 832 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+--- 2776,2780 ----
+
+ case 84:
+! #line 832 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+***************
+*** 2784,2788 ****
+
+ case 85:
+! #line 837 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+--- 2784,2788 ----
+
+ case 85:
+! #line 837 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+***************
+*** 2792,2796 ****
+
+ case 86:
+! #line 842 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+--- 2792,2796 ----
+
+ case 86:
+! #line 842 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+***************
+*** 2800,2804 ****
+
+ case 87:
+! #line 849 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2800,2804 ----
+
+ case 87:
+! #line 849 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2808,2812 ****
+
+ case 88:
+! #line 854 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+--- 2808,2812 ----
+
+ case 88:
+! #line 854 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+***************
+*** 2816,2820 ****
+
+ case 89:
+! #line 859 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2816,2820 ----
+
+ case 89:
+! #line 859 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2824,2828 ****
+
+ case 90:
+! #line 864 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+--- 2824,2828 ----
+
+ case 90:
+! #line 864 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+***************
+*** 2832,2836 ****
+
+ case 91:
+! #line 869 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2832,2836 ----
+
+ case 91:
+! #line 869 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2840,2844 ****
+
+ case 92:
+! #line 874 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+--- 2840,2844 ----
+
+ case 92:
+! #line 874 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+***************
+*** 2848,2852 ****
+
+ case 93:
+! #line 881 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
+--- 2848,2852 ----
+
+ case 93:
+! #line 881 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
+***************
+*** 2856,2860 ****
+
+ case 94:
+! #line 886 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (7)].word), (yyvsp[(5) - (7)].pattern), word_lineno[word_top]);
+--- 2856,2860 ----
+
+ case 94:
+! #line 886 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (7)].word), (yyvsp[(5) - (7)].pattern), word_lineno[word_top]);
+***************
+*** 2864,2868 ****
+
+ case 95:
+! #line 891 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (yyvsp[(5) - (6)].pattern), word_lineno[word_top]);
+--- 2864,2868 ----
+
+ case 95:
+! #line 891 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (yyvsp[(5) - (6)].pattern), word_lineno[word_top]);
+***************
+*** 2872,2896 ****
+
+ case 96:
+! #line 898 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(1) - (5)].word), (yyvsp[(5) - (5)].command), function_dstart, function_bstart); }
+ break;
+
+ case 97:
+! #line 901 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (6)].word), (yyvsp[(6) - (6)].command), function_dstart, function_bstart); }
+ break;
+
+ case 98:
+! #line 904 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (4)].word), (yyvsp[(4) - (4)].command), function_dstart, function_bstart); }
+ break;
+
+ case 99:
+! #line 908 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 100:
+! #line 910 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+--- 2872,2896 ----
+
+ case 96:
+! #line 898 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(1) - (5)].word), (yyvsp[(5) - (5)].command), function_dstart, function_bstart); }
+ break;
+
+ case 97:
+! #line 901 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (6)].word), (yyvsp[(6) - (6)].command), function_dstart, function_bstart); }
+ break;
+
+ case 98:
+! #line 904 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (4)].word), (yyvsp[(4) - (4)].command), function_dstart, function_bstart); }
+ break;
+
+ case 99:
+! #line 908 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 100:
+! #line 910 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2924,2928 ****
+
+ case 101:
+! #line 941 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_subshell_command ((yyvsp[(2) - (3)].command));
+--- 2924,2928 ----
+
+ case 101:
+! #line 941 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_subshell_command ((yyvsp[(2) - (3)].command));
+***************
+*** 2932,2936 ****
+
+ case 102:
+! #line 948 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (2)].command));
+--- 2932,2936 ----
+
+ case 102:
+! #line 948 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (2)].command));
+***************
+*** 2940,2944 ****
+
+ case 103:
+! #line 953 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+--- 2940,2944 ----
+
+ case 103:
+! #line 953 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2960,2964 ****
+
+ case 104:
+! #line 970 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_coproc_command ((yyvsp[(2) - (3)].word)->word, (yyvsp[(3) - (3)].command));
+--- 2960,2964 ----
+
+ case 104:
+! #line 970 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_coproc_command ((yyvsp[(2) - (3)].word)->word, (yyvsp[(3) - (3)].command));
+***************
+*** 2968,2972 ****
+
+ case 105:
+! #line 975 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ COMMAND *tc;
+--- 2968,2972 ----
+
+ case 105:
+! #line 975 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ COMMAND *tc;
+***************
+*** 2988,2992 ****
+
+ case 106:
+! #line 992 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[(2) - (2)].command)));
+--- 2988,2992 ----
+
+ case 106:
+! #line 992 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[(2) - (2)].command)));
+***************
+*** 2996,3110 ****
+
+ case 107:
+! #line 999 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (COMMAND *)NULL); }
+ break;
+
+ case 108:
+! #line 1001 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (7)].command), (yyvsp[(4) - (7)].command), (yyvsp[(6) - (7)].command)); }
+ break;
+
+ case 109:
+! #line 1003 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(5) - (6)].command)); }
+ break;
+
+ case 110:
+! #line 1008 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_group_command ((yyvsp[(2) - (3)].command)); }
+ break;
+
+ case 111:
+! #line 1012 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_arith_command ((yyvsp[(1) - (1)].word_list)); }
+ break;
+
+ case 112:
+! #line 1016 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(2) - (3)].command); }
+ break;
+
+ case 113:
+! #line 1020 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (4)].command), (yyvsp[(4) - (4)].command), (COMMAND *)NULL); }
+ break;
+
+ case 114:
+! #line 1022 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(6) - (6)].command)); }
+ break;
+
+ case 115:
+! #line 1024 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 117:
+! #line 1029 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (2)].pattern)->next = (yyvsp[(1) - (2)].pattern); (yyval.pattern) = (yyvsp[(2) - (2)].pattern); }
+ break;
+
+ case 118:
+! #line 1033 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (yyvsp[(4) - (4)].command)); }
+ break;
+
+ case 119:
+! #line 1035 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 120:
+! #line 1037 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 121:
+! #line 1039 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 122:
+! #line 1043 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 123:
+! #line 1045 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 124:
+! #line 1047 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 125:
+! #line 1049 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 126:
+! #line 1051 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 127:
+! #line 1053 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 128:
+! #line 1057 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 129:
+! #line 1059 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(3) - (3)].word), (yyvsp[(1) - (3)].word_list)); }
+ break;
+
+ case 130:
+! #line 1068 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+--- 2996,3110 ----
+
+ case 107:
+! #line 999 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (COMMAND *)NULL); }
+ break;
+
+ case 108:
+! #line 1001 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (7)].command), (yyvsp[(4) - (7)].command), (yyvsp[(6) - (7)].command)); }
+ break;
+
+ case 109:
+! #line 1003 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(5) - (6)].command)); }
+ break;
+
+ case 110:
+! #line 1008 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_group_command ((yyvsp[(2) - (3)].command)); }
+ break;
+
+ case 111:
+! #line 1012 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_arith_command ((yyvsp[(1) - (1)].word_list)); }
+ break;
+
+ case 112:
+! #line 1016 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(2) - (3)].command); }
+ break;
+
+ case 113:
+! #line 1020 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (4)].command), (yyvsp[(4) - (4)].command), (COMMAND *)NULL); }
+ break;
+
+ case 114:
+! #line 1022 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(6) - (6)].command)); }
+ break;
+
+ case 115:
+! #line 1024 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 117:
+! #line 1029 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyvsp[(2) - (2)].pattern)->next = (yyvsp[(1) - (2)].pattern); (yyval.pattern) = (yyvsp[(2) - (2)].pattern); }
+ break;
+
+ case 118:
+! #line 1033 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (yyvsp[(4) - (4)].command)); }
+ break;
+
+ case 119:
+! #line 1035 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 120:
+! #line 1037 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 121:
+! #line 1039 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 122:
+! #line 1043 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 123:
+! #line 1045 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 124:
+! #line 1047 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 125:
+! #line 1049 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 126:
+! #line 1051 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 127:
+! #line 1053 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 128:
+! #line 1057 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 129:
+! #line 1059 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(3) - (3)].word), (yyvsp[(1) - (3)].word_list)); }
+ break;
+
+ case 130:
+! #line 1068 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+***************
+*** 3115,3119 ****
+
+ case 132:
+! #line 1077 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+--- 3115,3119 ----
+
+ case 132:
+! #line 1077 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+***************
+*** 3122,3126 ****
+
+ case 134:
+! #line 1084 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+--- 3122,3126 ----
+
+ case 134:
+! #line 1084 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+***************
+*** 3132,3146 ****
+
+ case 136:
+! #line 1095 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 137:
+! #line 1097 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 138:
+! #line 1099 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (4)].command)->type == cm_connection)
+--- 3132,3146 ----
+
+ case 136:
+! #line 1095 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 137:
+! #line 1097 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 138:
+! #line 1099 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ if ((yyvsp[(1) - (4)].command)->type == cm_connection)
+***************
+*** 3152,3186 ****
+
+ case 139:
+! #line 1106 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 140:
+! #line 1108 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 141:
+! #line 1110 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 144:
+! #line 1118 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = '\n'; }
+ break;
+
+ case 145:
+! #line 1120 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = ';'; }
+ break;
+
+ case 146:
+! #line 1122 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = yacc_EOF; }
+ break;
+
+ case 149:
+! #line 1136 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (1)].command);
+--- 3152,3186 ----
+
+ case 139:
+! #line 1106 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 140:
+! #line 1108 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 141:
+! #line 1110 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 144:
+! #line 1118 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.number) = '\n'; }
+ break;
+
+ case 145:
+! #line 1120 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.number) = ';'; }
+ break;
+
+ case 146:
+! #line 1122 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.number) = yacc_EOF; }
+ break;
+
+ case 149:
+! #line 1136 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (1)].command);
+***************
+*** 3198,3202 ****
+
+ case 150:
+! #line 1149 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (2)].command)->type == cm_connection)
+--- 3198,3202 ----
+
+ case 150:
+! #line 1149 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ if ((yyvsp[(1) - (2)].command)->type == cm_connection)
+***************
+*** 3217,3221 ****
+
+ case 151:
+! #line 1165 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (2)].command);
+--- 3217,3221 ----
+
+ case 151:
+! #line 1165 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (2)].command);
+***************
+*** 3233,3247 ****
+
+ case 152:
+! #line 1180 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 153:
+! #line 1182 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 154:
+! #line 1184 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+--- 3233,3247 ----
+
+ case 152:
+! #line 1180 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 153:
+! #line 1182 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 154:
+! #line 1184 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+***************
+*** 3253,3272 ****
+
+ case 155:
+! #line 1191 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), ';'); }
+ break;
+
+ case 156:
+! #line 1194 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 157:
+! #line 1198 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 158:
+! #line 1200 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+--- 3253,3272 ----
+
+ case 155:
+! #line 1191 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), ';'); }
+ break;
+
+ case 156:
+! #line 1194 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 157:
+! #line 1198 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 158:
+! #line 1200 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+***************
+*** 3277,3281 ****
+
+ case 159:
+! #line 1206 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+--- 3277,3281 ----
+
+ case 159:
+! #line 1206 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+***************
+*** 3286,3290 ****
+
+ case 160:
+! #line 1212 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ ELEMENT x;
+--- 3286,3290 ----
+
+ case 160:
+! #line 1212 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ ELEMENT x;
+***************
+*** 3306,3310 ****
+
+ case 161:
+! #line 1229 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ ELEMENT x;
+--- 3306,3310 ----
+
+ case 161:
+! #line 1229 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ ELEMENT x;
+***************
+*** 3327,3336 ****
+
+ case 162:
+! #line 1249 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|'); }
+ break;
+
+ case 163:
+! #line 1251 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+--- 3327,3336 ----
+
+ case 162:
+! #line 1249 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|'); }
+ break;
+
+ case 163:
+! #line 1251 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+***************
+*** 3358,3377 ****
+
+ case 164:
+! #line 1274 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 165:
+! #line 1278 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE; }
+ break;
+
+ case 166:
+! #line 1280 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+
+ case 167:
+! #line 1282 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+--- 3358,3377 ----
+
+ case 164:
+! #line 1274 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 165:
+! #line 1278 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE; }
+ break;
+
+ case 166:
+! #line 1280 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+
+ case 167:
+! #line 1282 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+***************
+*** 3593,3597 ****
+
+
+! #line 1284 "/usr/src/local/chet/src/bash/bash-4.3.28/parse.y"
+
+
+--- 3593,3597 ----
+
+
+! #line 1284 "/usr/src/local/bash/bash-4.3-patched/parse.y"
+
+
+***************
+*** 4851,4854 ****
+--- 4851,4864 ----
+ }
+
++ 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. */
+***************
+*** 6340,6345 ****
+ /* 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
+--- 6350,6355 ----
+ /* 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.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 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.3-patches/bash43-031 b/patches/source/bash/bash-4.3-patches/bash43-031
new file mode 100644
index 00000000..a6519560
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-031
@@ -0,0 +1,112 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-031
+
+Bug-Reported-by: lolilolicon <lolilolicon@gmail.com>
+Bug-Reference-ID: <CAMtVo_Nz=32Oq=zWTb6=+8gUNXOo2rRvud1W4oPnA-cgVk_ZqQ@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00139.html
+
+Bug-Description:
+
+The new nameref assignment functionality introduced in bash-4.3 did not perform
+enough validation on the variable value and would create variables with
+invalid names.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/subst.h 2014-01-11 21:02:27.000000000 -0500
+--- subst.h 2014-09-01 12:16:56.000000000 -0400
+***************
+*** 48,51 ****
+--- 48,52 ----
+ #define ASS_MKGLOBAL 0x0008 /* force global assignment */
+ #define ASS_NAMEREF 0x0010 /* assigning to nameref variable */
++ #define ASS_FROMREF 0x0020 /* assigning from value of nameref variable */
+
+ /* Flags for the string extraction functions. */
+*** ../bash-4.3-patched/variables.c 2014-05-15 08:26:50.000000000 -0400
+--- variables.c 2014-09-01 14:37:44.000000000 -0400
+***************
+*** 2504,2511 ****
+ int hflags, aflags;
+ {
+! char *newval;
+ SHELL_VAR *entry;
+
+ entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table);
+ /* Follow the nameref chain here if this is the global variables table */
+ if (entry && nameref_p (entry) && (invisible_p (entry) == 0) && table == global_variables->table)
+--- 2566,2590 ----
+ int hflags, aflags;
+ {
+! char *newname, *newval;
+ SHELL_VAR *entry;
++ #if defined (ARRAY_VARS)
++ arrayind_t ind;
++ char *subp;
++ int sublen;
++ #endif
+
++ newname = 0;
++ #if defined (ARRAY_VARS)
++ if ((aflags & ASS_FROMREF) && (hflags & HASH_NOSRCH) == 0 && valid_array_reference (name))
++ {
++ newname = array_variable_name (name, &subp, &sublen);
++ if (newname == 0)
++ return (SHELL_VAR *)NULL; /* XXX */
++ entry = hash_lookup (newname, table);
++ }
++ else
++ #endif
+ entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table);
++
+ /* Follow the nameref chain here if this is the global variables table */
+ if (entry && nameref_p (entry) && (invisible_p (entry) == 0) && table == global_variables->table)
+***************
+*** 2538,2541 ****
+--- 2617,2630 ----
+ }
+ }
++ #if defined (ARRAY_VARS)
++ else if (entry == 0 && newname)
++ {
++ entry = make_new_array_variable (newname); /* indexed array by default */
++ if (entry == 0)
++ return entry;
++ ind = array_expand_index (name, subp, sublen);
++ bind_array_element (entry, ind, value, aflags);
++ }
++ #endif
+ else if (entry == 0)
+ {
+***************
+*** 2658,2662 ****
+ if (nameref_cell (nv) == 0)
+ return (bind_variable_internal (nv->name, value, nvc->table, 0, flags));
+! return (bind_variable_internal (nameref_cell (nv), value, nvc->table, 0, flags));
+ }
+ else
+--- 2747,2752 ----
+ if (nameref_cell (nv) == 0)
+ return (bind_variable_internal (nv->name, value, nvc->table, 0, flags));
+! /* XXX - bug here with ref=array[index] */
+! return (bind_variable_internal (nameref_cell (nv), value, nvc->table, 0, flags|ASS_FROMREF));
+ }
+ else
+*** ../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 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.3-patches/bash43-032 b/patches/source/bash/bash-4.3-patches/bash43-032
new file mode 100644
index 00000000..0843719c
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-032
@@ -0,0 +1,51 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-032
+
+Bug-Reported-by: crispusfairbairn@gmail.com
+Bug-Reference-ID: <b5e499f7-3b98-408d-9f94-c0387580e73a@googlegroups.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00013.html
+
+Bug-Description:
+
+When bash is running in Posix mode, it allows signals -- including SIGCHLD --
+to interrupt the `wait' builtin, as Posix requires. However, the interrupt
+causes bash to not run a SIGCHLD trap for all exited children. This patch
+fixes the issue and restores the documented behavior in Posix mode.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/jobs.c 2014-05-14 09:20:15.000000000 -0400
+--- jobs.c 2014-09-09 11:50:38.000000000 -0400
+***************
+*** 3340,3344 ****
+ {
+ interrupt_immediately = 0;
+! trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */
+ wait_signal_received = SIGCHLD;
+ /* If we're in a signal handler, let CHECK_WAIT_INTR pick it up;
+--- 3346,3352 ----
+ {
+ interrupt_immediately = 0;
+! /* This was trap_handler (SIGCHLD) but that can lose traps if
+! children_exited > 1 */
+! queue_sigchld_trap (children_exited);
+ wait_signal_received = SIGCHLD;
+ /* If we're in a signal handler, let CHECK_WAIT_INTR pick it up;
+*** ../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 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.3-patches/bash43-033 b/patches/source/bash/bash-4.3-patches/bash43-033
new file mode 100644
index 00000000..5f5147ff
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-033
@@ -0,0 +1,225 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-033
+
+Bug-Reported-by: mickael9@gmail.com, Jan Rome <jan.rome@gmail.com>
+Bug-Reference-ID: <20140907224046.382ED3610CC@mickael-laptop.localdomain>,
+ <540D661D.50908@gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00029.html
+ http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00030.html
+
+Bug-Description:
+
+Bash does not clean up the terminal state in all cases where bash or
+readline modifies it and bash is subsequently terminated by a fatal signal.
+This happens when the `read' builtin modifies the terminal settings, both
+when readline is active and when it is not. It occurs most often when a script
+installs a trap that exits on a signal without re-sending the signal to itself.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/shell.c 2014-01-14 08:04:32.000000000 -0500
+--- shell.c 2014-12-22 10:27:50.000000000 -0500
+***************
+*** 74,77 ****
+--- 74,78 ----
+
+ #if defined (READLINE)
++ # include <readline/readline.h>
+ # include "bashline.h"
+ #endif
+***************
+*** 910,913 ****
+--- 912,923 ----
+ fflush (stderr);
+
++ /* Clean up the terminal if we are in a state where it's been modified. */
++ #if defined (READLINE)
++ if (RL_ISSTATE (RL_STATE_TERMPREPPED) && rl_deprep_term_function)
++ (*rl_deprep_term_function) ();
++ #endif
++ if (read_tty_modified ())
++ read_tty_cleanup ();
++
+ /* Do trap[0] if defined. Allow it to override the exit status
+ passed to us. */
+*** ../bash-4.3-patched/builtins/read.def 2014-10-01 12:57:38.000000000 -0400
+--- builtins/read.def 2014-12-22 10:48:54.000000000 -0500
+***************
+*** 141,148 ****
+ int sigalrm_seen;
+
+! static int reading;
+ static SigHandler *old_alrm;
+ static unsigned char delim;
+
+ /* In all cases, SIGALRM just sets a flag that we check periodically. This
+ avoids problems with the semi-tricky stuff we do with the xfree of
+--- 141,150 ----
+ int sigalrm_seen;
+
+! static int reading, tty_modified;
+ static SigHandler *old_alrm;
+ static unsigned char delim;
+
++ static struct ttsave termsave;
++
+ /* In all cases, SIGALRM just sets a flag that we check periodically. This
+ avoids problems with the semi-tricky stuff we do with the xfree of
+***************
+*** 189,193 ****
+ SHELL_VAR *var;
+ TTYSTRUCT ttattrs, ttset;
+- struct ttsave termsave;
+ #if defined (ARRAY_VARS)
+ WORD_LIST *alist;
+--- 191,194 ----
+***************
+*** 222,226 ****
+ USE_VAR(lastsig);
+
+! sigalrm_seen = reading = 0;
+
+ i = 0; /* Index into the string that we are reading. */
+--- 223,227 ----
+ USE_VAR(lastsig);
+
+! sigalrm_seen = reading = tty_modified = 0;
+
+ i = 0; /* Index into the string that we are reading. */
+***************
+*** 439,442 ****
+--- 440,445 ----
+ goto assign_vars;
+ }
++ if (interactive_shell == 0)
++ initialize_terminating_signals ();
+ old_alrm = set_signal_handler (SIGALRM, sigalrm);
+ add_unwind_protect (reset_alarm, (char *)NULL);
+***************
+*** 483,487 ****
+--- 486,493 ----
+ if (i < 0)
+ sh_ttyerror (1);
++ tty_modified = 1;
+ add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
++ if (interactive_shell == 0)
++ initialize_terminating_signals ();
+ }
+ }
+***************
+*** 498,502 ****
+--- 504,511 ----
+ sh_ttyerror (1);
+
++ tty_modified = 1;
+ add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
++ if (interactive_shell == 0)
++ initialize_terminating_signals ();
+ }
+
+***************
+*** 589,592 ****
+--- 598,603 ----
+ else
+ lastsig = 0;
++ if (terminating_signal && tty_modified)
++ ttyrestore (&termsave); /* fix terminal before exiting */
+ CHECK_TERMSIG;
+ eof = 1;
+***************
+*** 979,982 ****
+--- 990,1007 ----
+ {
+ ttsetattr (ttp->fd, ttp->attrs);
++ tty_modified = 0;
++ }
++
++ void
++ read_tty_cleanup ()
++ {
++ if (tty_modified)
++ ttyrestore (&termsave);
++ }
++
++ int
++ read_tty_modified ()
++ {
++ return (tty_modified);
+ }
+
+*** ../bash-4.3-patched/builtins/common.h 2014-10-01 12:57:47.000000000 -0400
+--- builtins/common.h 2014-12-22 10:10:14.000000000 -0500
+***************
+*** 123,126 ****
+--- 141,148 ----
+ extern void getopts_reset __P((int));
+
++ /* Functions from read.def */
++ extern void read_tty_cleanup __P((void));
++ extern int read_tty_modified __P((void));
++
+ /* Functions from set.def */
+ extern int minus_o_option_value __P((char *));
+*** ../bash-4.3-patched/bashline.c 2014-05-14 09:22:39.000000000 -0400
+--- bashline.c 2014-09-08 11:28:56.000000000 -0400
+***************
+*** 203,206 ****
+--- 203,207 ----
+ extern int array_needs_making;
+ extern int posixly_correct, no_symbolic_links;
++ extern int sigalrm_seen;
+ extern char *current_prompt_string, *ps1_prompt;
+ extern STRING_INT_ALIST word_token_alist[];
+***************
+*** 4209,4214 ****
+ /* If we're going to longjmp to top_level, make sure we clean up readline.
+ check_signals will call QUIT, which will eventually longjmp to top_level,
+! calling run_interrupt_trap along the way. */
+! if (interrupt_state)
+ rl_cleanup_after_signal ();
+ bashline_reset_event_hook ();
+--- 4262,4268 ----
+ /* If we're going to longjmp to top_level, make sure we clean up readline.
+ check_signals will call QUIT, which will eventually longjmp to top_level,
+! calling run_interrupt_trap along the way. The check for sigalrm_seen is
+! to clean up the read builtin's state. */
+! if (terminating_signal || interrupt_state || sigalrm_seen)
+ rl_cleanup_after_signal ();
+ bashline_reset_event_hook ();
+*** ../bash-4.3-patched/sig.c 2014-01-10 15:06:06.000000000 -0500
+--- sig.c 2014-09-08 11:26:33.000000000 -0400
+***************
+*** 533,538 ****
+ /* Set the event hook so readline will call it after the signal handlers
+ finish executing, so if this interrupted character input we can get
+! quick response. */
+! if (interactive_shell && interactive && no_line_editing == 0)
+ bashline_set_event_hook ();
+ #endif
+--- 533,540 ----
+ /* Set the event hook so readline will call it after the signal handlers
+ finish executing, so if this interrupted character input we can get
+! quick response. If readline is active or has modified the terminal we
+! need to set this no matter what the signal is, though the check for
+! RL_STATE_TERMPREPPED is possibly redundant. */
+! if (RL_ISSTATE (RL_STATE_SIGHANDLER) || RL_ISSTATE (RL_STATE_TERMPREPPED))
+ bashline_set_event_hook ();
+ #endif
+*** ../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 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.3-patches/bash43-034 b/patches/source/bash/bash-4.3-patches/bash43-034
new file mode 100644
index 00000000..17372aa2
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-034
@@ -0,0 +1,90 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-034
+
+Bug-Reported-by: Dreamcat4 <dreamcat4@gmail.com>
+Bug-Reference-ID: <CAN39uTpAEs2GFu4ebC_SfSVMRTh-DJ9YanrY4BZZ3OO+CCHjng@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-05/msg00001.html
+
+Bug-Description:
+
+If neither the -f nor -v options is supplied to unset, and a name argument is
+found to be a function and unset, subsequent name arguments are not treated as
+variables before attempting to unset a function by that name.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/builtins/set.def 2013-04-19 07:20:34.000000000 -0400
+--- builtins/set.def 2015-05-05 13:25:36.000000000 -0400
+***************
+*** 752,758 ****
+--- 797,805 ----
+ {
+ int unset_function, unset_variable, unset_array, opt, nameref, any_failed;
++ int global_unset_func, global_unset_var;
+ char *name;
+
+ unset_function = unset_variable = unset_array = nameref = any_failed = 0;
++ global_unset_func = global_unset_var = 0;
+
+ reset_internal_getopt ();
+***************
+*** 762,769 ****
+ {
+ case 'f':
+! unset_function = 1;
+ break;
+ case 'v':
+! unset_variable = 1;
+ break;
+ case 'n':
+--- 809,816 ----
+ {
+ case 'f':
+! global_unset_func = 1;
+ break;
+ case 'v':
+! global_unset_var = 1;
+ break;
+ case 'n':
+***************
+*** 778,782 ****
+ list = loptend;
+
+! if (unset_function && unset_variable)
+ {
+ builtin_error (_("cannot simultaneously unset a function and a variable"));
+--- 825,829 ----
+ list = loptend;
+
+! if (global_unset_func && global_unset_var)
+ {
+ builtin_error (_("cannot simultaneously unset a function and a variable"));
+***************
+*** 796,799 ****
+--- 843,849 ----
+ name = list->word->word;
+
++ unset_function = global_unset_func;
++ unset_variable = global_unset_var;
++
+ #if defined (ARRAY_VARS)
+ unset_array = 0;
+
+*** ../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 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.3-patches/bash43-035 b/patches/source/bash/bash-4.3-patches/bash43-035
new file mode 100644
index 00000000..f18bc602
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-035
@@ -0,0 +1,63 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-035
+
+Bug-Reported-by: <romerox.adrian@gmail.com>
+Bug-Reference-ID: <CABV5r3zhPXmSKUe9uedeGc5YFBM2njJ1iVmY2h5neWdQpDBQug@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00045.html
+
+Bug-Description:
+
+A locale with a long name can trigger a buffer overflow and core dump. This
+applies on systems that do not have locale_charset in libc, are not using
+GNU libiconv, and are not using the libintl that ships with bash in lib/intl.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/lib/sh/unicode.c 2014-01-30 16:47:19.000000000 -0500
+--- lib/sh/unicode.c 2015-05-01 08:58:30.000000000 -0400
+***************
+*** 79,83 ****
+ if (s)
+ {
+! strcpy (charsetbuf, s+1);
+ t = strchr (charsetbuf, '@');
+ if (t)
+--- 79,84 ----
+ if (s)
+ {
+! strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1);
+! charsetbuf[sizeof (charsetbuf) - 1] = '\0';
+ t = strchr (charsetbuf, '@');
+ if (t)
+***************
+*** 85,89 ****
+ return charsetbuf;
+ }
+! strcpy (charsetbuf, locale);
+ return charsetbuf;
+ }
+--- 86,91 ----
+ return charsetbuf;
+ }
+! strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1);
+! charsetbuf[sizeof (charsetbuf) - 1] = '\0';
+ return charsetbuf;
+ }
+*** ../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 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.3-patches/bash43-036 b/patches/source/bash/bash-4.3-patches/bash43-036
new file mode 100644
index 00000000..5b42c246
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-036
@@ -0,0 +1,57 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-036
+
+Bug-Reported-by: emanuelczirai@cryptolab.net
+Bug-Reference-ID: <f962e4f556da5ebfadaf7afe9c78a8cb@cryptolab.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00071.html
+
+Bug-Description:
+
+When evaluating and setting integer variables, and the assignment fails to
+create a variable (for example, when performing an operation on an array
+variable with an invalid subscript), bash attempts to dereference a null
+pointer, causing a segmentation violation.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-20150206/variables.c 2015-01-23 20:39:27.000000000 -0500
+--- variables.c 2015-02-19 13:56:12.000000000 -0500
+***************
+*** 2834,2841 ****
+ v = bind_variable (lhs, rhs, 0);
+
+! if (v && isint)
+! VSETATTR (v, att_integer);
+!
+! VUNSETATTR (v, att_invisible);
+
+ return (v);
+--- 2834,2843 ----
+ v = bind_variable (lhs, rhs, 0);
+
+! if (v)
+! {
+! if (isint)
+! VSETATTR (v, att_integer);
+! VUNSETATTR (v, att_invisible);
+! }
+
+ return (v);
+*** ../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 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.3-patches/bash43-037 b/patches/source/bash/bash-4.3-patches/bash43-037
new file mode 100644
index 00000000..f04012ba
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-037
@@ -0,0 +1,43 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-037
+
+Bug-Reported-by: Greg Wooledge <wooledg@eeg.ccf.org>
+Bug-Reference-ID: <20150204144240.GN13956@eeg.ccf.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00007.html
+
+Bug-Description:
+
+If an associative array uses `@' or `*' as a subscript, `declare -p' produces
+output that cannot be reused as input.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/assoc.c 2011-11-05 16:39:05.000000000 -0400
+--- assoc.c 2015-02-04 15:28:25.000000000 -0500
+***************
+*** 437,440 ****
+--- 440,445 ----
+ if (sh_contains_shell_metas (tlist->key))
+ istr = sh_double_quote (tlist->key);
++ else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0')
++ istr = sh_double_quote (tlist->key);
+ else
+ istr = tlist->key;
+*** ../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 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.3-patches/bash43-038 b/patches/source/bash/bash-4.3-patches/bash43-038
new file mode 100644
index 00000000..e0de74e0
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-038
@@ -0,0 +1,88 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-038
+
+Bug-Reported-by: worley@alum.mit.edu (Dale R. Worley)
+Bug-Reference-ID: <201406100051.s5A0pCeB014978@hobgoblin.ariadne.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00028.html
+
+Bug-Description:
+
+There are a number of instances where `time' is not recognized as a reserved
+word when the shell grammar says it should be.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/parse.y 2014-04-07 11:56:12.000000000 -0400
+--- parse.y 2014-06-11 10:25:53.000000000 -0400
+***************
+*** 2819,2827 ****
+ case OR_OR:
+ case '&':
+ case DO:
+ case THEN:
+ case ELSE:
+ case '{': /* } */
+! case '(': /* ) */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+--- 2819,2832 ----
+ case OR_OR:
+ case '&':
++ case WHILE:
+ case DO:
++ case UNTIL:
++ case IF:
+ case THEN:
++ case ELIF:
+ case ELSE:
+ case '{': /* } */
+! case '(': /* )( */
+! case ')': /* only valid in case statement */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+*** ../bash-4.3-patched/y.tab.c 2014-10-05 13:52:50.000000000 -0400
+--- y.tab.c 2015-05-19 15:08:43.000000000 -0400
+***************
+*** 5131,5139 ****
+ case OR_OR:
+ case '&':
+ case DO:
+ case THEN:
+ case ELSE:
+ case '{': /* } */
+! case '(': /* ) */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+--- 5131,5144 ----
+ case OR_OR:
+ case '&':
++ case WHILE:
+ case DO:
++ case UNTIL:
++ case IF:
+ case THEN:
++ case ELIF:
+ case ELSE:
+ case '{': /* } */
+! case '(': /* )( */
+! case ')': /* only valid in case statement */
+ case BANG: /* ! time pipeline */
+ case TIME: /* time time pipeline */
+*** ../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 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.3-patches/bash43-039 b/patches/source/bash/bash-4.3-patches/bash43-039
new file mode 100644
index 00000000..e5e38870
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-039
@@ -0,0 +1,57 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-039
+
+Bug-Reported-by: SN <poczta-sn@gazeta.pl>
+Bug-Reference-ID: <54E2554C.205@gazeta.pl>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00060.html
+
+Bug-Description:
+
+Using the output of `declare -p' when run in a function can result in variables
+that are invisible to `declare -p'. This problem occurs when an assignment
+builtin such as `declare' receives a quoted compound array assignment as one of
+its arguments.
+
+Patch (apply with `patch -p0'):
+
+*** /usr/src/local/bash/bash-4.3-patched/arrayfunc.c 2014-10-01 13:08:48.000000000 -0400
+--- arrayfunc.c 2015-02-19 14:33:05.000000000 -0500
+***************
+*** 405,408 ****
+--- 405,411 ----
+ else
+ array_insert (a, i, l->word->word);
++
++ VUNSETATTR (var, att_invisible); /* no longer invisible */
++
+ return var;
+ }
+***************
+*** 635,638 ****
+--- 638,645 ----
+ if (nlist)
+ dispose_words (nlist);
++
++ if (var)
++ VUNSETATTR (var, att_invisible); /* no longer invisible */
++
+ return (var);
+ }
+*** ../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 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.3-patches/bash43-040 b/patches/source/bash/bash-4.3-patches/bash43-040
new file mode 100644
index 00000000..978ce1cd
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-040
@@ -0,0 +1,47 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-040
+
+Bug-Reported-by: Jean Delvare <jdelvare@suse.de>
+Bug-Reference-ID: <20150609180231.5f463695@endymion.delvare>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00033.html
+
+Bug-Description:
+
+There is a memory leak that occurs when bash expands an array reference on
+the rhs of an assignment statement.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/subst.c 2014-10-01 12:57:47.000000000 -0400
+--- subst.c 2015-06-22 09:16:53.000000000 -0400
+***************
+*** 5783,5787 ****
+ if (pflags & PF_ASSIGNRHS)
+ {
+! temp = array_variable_name (name, &tt, (int *)0);
+ if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']')
+ temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind);
+--- 5783,5787 ----
+ if (pflags & PF_ASSIGNRHS)
+ {
+! var = array_variable_part (name, &tt, (int *)0);
+ if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']')
+ temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind);
+*** ../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 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.3-patches/bash43-041 b/patches/source/bash/bash-4.3-patches/bash43-041
new file mode 100644
index 00000000..a040a2ac
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-041
@@ -0,0 +1,72 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-041
+
+Bug-Reported-by: Hanno Böck <hanno@hboeck.de>
+Bug-Reference-ID: <20150623131106.6f111da9@pc1>, <20150707004640.0e61d2f9@pc1>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00089.html,
+ http://lists.gnu.org/archive/html/bug-bash/2015-07/msg00018.html
+
+Bug-Description:
+
+There are several out-of-bounds read errors that occur when completing command
+lines where assignment statements appear before the command name. The first
+two appear only when programmable completion is enabled; the last one only
+happens when listing possible completions.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3.40/bashline.c 2014-12-29 14:39:43.000000000 -0500
+--- bashline.c 2015-08-12 10:21:58.000000000 -0400
+***************
+*** 1469,1476 ****
+--- 1469,1489 ----
+ os = start;
+ n = 0;
++ was_assignment = 0;
+ s = find_cmd_start (os);
+ e = find_cmd_end (end);
+ do
+ {
++ /* Don't read past the end of rl_line_buffer */
++ if (s > rl_end)
++ {
++ s1 = s = e1;
++ break;
++ }
++ /* Or past point if point is within an assignment statement */
++ else if (was_assignment && s > rl_point)
++ {
++ s1 = s = e1;
++ break;
++ }
+ /* Skip over assignment statements preceding a command name. If we
+ don't find a command name at all, we can perform command name
+*** ../bash-4.3.40/lib/readline/complete.c 2013-10-14 09:27:10.000000000 -0400
+--- lib/readline/complete.c 2015-07-31 09:34:39.000000000 -0400
+***************
+*** 690,693 ****
+--- 690,695 ----
+ if (temp == 0 || *temp == '\0')
+ return (pathname);
++ else if (temp[1] == 0 && temp == pathname)
++ return (pathname);
+ /* If the basename is NULL, we might have a pathname like '/usr/src/'.
+ Look for a previous slash and, if one is found, return the portion
+*** ../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 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.3-patches/bash43-042 b/patches/source/bash/bash-4.3-patches/bash43-042
new file mode 100644
index 00000000..cc3e17c6
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-042
@@ -0,0 +1,55 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-042
+
+Bug-Reported-by: Nathan Neulinger <nneul@neulinger.org>
+Bug-Reference-ID: <558EFDF2.7060402@neulinger.org>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00096.html
+
+Bug-Description:
+
+There is a problem when parsing command substitutions containing `case'
+commands within pipelines that causes the parser to not correctly identify
+the end of the command substitution.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/parse.y 2015-05-18 19:27:05.000000000 -0400
+--- parse.y 2015-06-29 10:59:27.000000000 -0400
+***************
+*** 3709,3712 ****
+--- 3709,3714 ----
+ tflags |= LEX_INWORD;
+ lex_wlen = 0;
++ if (tflags & LEX_RESWDOK)
++ lex_rwlen = 0;
+ }
+ }
+*** ../bash-4.3-patched/parse.y 2015-05-18 19:27:05.000000000 -0400
+--- y.tab.c 2015-06-29 10:59:27.000000000 -0400
+***************
+*** 6021,6024 ****
+--- 6021,6026 ----
+ tflags |= LEX_INWORD;
+ lex_wlen = 0;
++ if (tflags & LEX_RESWDOK)
++ lex_rwlen = 0;
+ }
+ }
+*** ../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 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.3-patches/bash43-043 b/patches/source/bash/bash-4.3-patches/bash43-043
new file mode 100644
index 00000000..ad82c292
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-043
@@ -0,0 +1,59 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-043
+
+Bug-Reported-by: lolilolicon <lolilolicon@gmail.com>
+Bug-Reference-ID: <CAMtVo_MF16KWanCB4C8WxA88Qt26zWsvV6V7+_U2fM0E6tCDxw@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00040.html
+
+Bug-Description:
+
+When the lastpipe option is enabled, the last component can contain nested
+pipelines and cause a segmentation fault under certain circumestances.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.3-patched/execute_cmd.c 2014-07-30 10:26:52.000000000 -0400
+--- execute_cmd.c 2014-08-15 08:55:24.000000000 -0400
+***************
+*** 2406,2412 ****
+ {
+ #if defined (JOB_CONTROL)
+! append_process (savestring (the_printed_command), dollar_dollar_pid, exec_result, lastpipe_jid);
+! #endif
+ lstdin = wait_for (lastpid);
+ #if defined (JOB_CONTROL)
+ /* If wait_for removes the job from the jobs table, use result of last
+--- 2433,2447 ----
+ {
+ #if defined (JOB_CONTROL)
+! if (INVALID_JOB (lastpipe_jid) == 0)
+! {
+! append_process (savestring (the_printed_command_except_trap), dollar_dollar_pid, exec_result, lastpipe_jid);
+! lstdin = wait_for (lastpid);
+! }
+! else
+! lstdin = wait_for_single_pid (lastpid); /* checks bgpids list */
+! #else
+ lstdin = wait_for (lastpid);
++ #endif
++
+ #if defined (JOB_CONTROL)
+ /* If wait_for removes the job from the jobs table, use result of last
+*** ../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 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.3-patches/bash43-044 b/patches/source/bash/bash-4.3-patches/bash43-044
new file mode 100644
index 00000000..d8f1ce07
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-044
@@ -0,0 +1,48 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-044
+
+Bug-Reported-by: Ondrej Oprala <ooprala@redhat.com>
+Bug-Reference-ID: <539ED55B.2080103@redhat.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00046.html
+
+Bug-Description:
+
+A typo prevents the `compat42' shopt option from working as intended.
+
+Patch (apply with `patch -p0'):
+
+diff -rC 2 bash-4.3.42/builtins/shopt.def bash-4.3.43/builtins/shopt.def
+*** bash-4.3.42/builtins/shopt.def 2013-02-27 09:43:20.000000000 -0500
+--- builtins/shopt.def 2015-10-16 11:25:28.000000000 -0400
+***************
+*** 161,165 ****
+ { "compat40", &shopt_compat40, set_compatibility_level },
+ { "compat41", &shopt_compat41, set_compatibility_level },
+! { "compat42", &shopt_compat41, set_compatibility_level },
+ #if defined (READLINE)
+ { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL},
+--- 161,165 ----
+ { "compat40", &shopt_compat40, set_compatibility_level },
+ { "compat41", &shopt_compat41, set_compatibility_level },
+! { "compat42", &shopt_compat42, set_compatibility_level },
+ #if defined (READLINE)
+ { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL},
+
+*** ../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 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.3-patches/bash43-045 b/patches/source/bash/bash-4.3-patches/bash43-045
new file mode 100644
index 00000000..25dc3587
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-045
@@ -0,0 +1,52 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-045
+
+Bug-Reported-by: Basin Ilya <basinilya@gmail.com>
+Bug-Reference-ID: <5624C0AC.8070802@gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-10/msg00141.html
+
+Bug-Description:
+
+If a file open attempted as part of a redirection fails because it is interrupted
+by a signal, the shell needs to process any pending traps to allow the redirection
+to be canceled.
+
+Patch (apply with `patch -p0'):
+
+*** bash-20150109/redir.c 2014-12-03 10:47:38.000000000 -0500
+--- redir.c 2015-01-16 10:15:47.000000000 -0500
+***************
+*** 672,676 ****
+ e = errno;
+ if (fd < 0 && e == EINTR)
+! QUIT;
+ errno = e;
+ }
+--- 672,679 ----
+ e = errno;
+ if (fd < 0 && e == EINTR)
+! {
+! QUIT;
+! run_pending_traps ();
+! }
+ errno = e;
+ }
+
+*** ../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 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.3-patches/bash43-046 b/patches/source/bash/bash-4.3-patches/bash43-046
new file mode 100644
index 00000000..bea3970a
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/bash43-046
@@ -0,0 +1,55 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.3
+Patch-ID: bash43-046
+
+Bug-Reported-by: Sergey Tselikh <stselikh@gmail.com>
+Bug-Reference-ID: <20150816110235.91f3e12e3f20d20cdaad963e@gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-08/msg00080.html
+
+Bug-Description:
+
+An incorrect conversion from an indexed to associative array can result in a
+core dump.
+
+Patch (apply with `patch -p0'):
+
+*** /fs2/chet/bash/bash-20150813/subst.c 2015-08-13 11:32:54.000000000 -0400
+--- subst.c 2015-08-18 10:13:59.000000000 -0400
+***************
+*** 9562,9566 ****
+ opts[opti] = '\0';
+ if (opti > 0)
+! make_internal_declare (tlist->word->word, opts);
+
+ t = do_word_assignment (tlist->word, 0);
+--- 9562,9573 ----
+ opts[opti] = '\0';
+ if (opti > 0)
+! {
+! t = make_internal_declare (tlist->word->word, opts);
+! if (t != EXECUTION_SUCCESS)
+! {
+! last_command_exit_value = t;
+! exp_jump_to_top_level (DISCARD);
+! }
+! }
+
+ t = do_word_assignment (tlist->word, 0);
+
+*** ../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 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.3-patches/bash43-047 b/patches/source/bash/bash-4.3-patches/bash43-047
new file mode 100644
index 00000000..316e3afc
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/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-4.3-patches/bash43-048 b/patches/source/bash/bash-4.3-patches/bash43-048
new file mode 100644
index 00000000..6a8588ec
--- /dev/null
+++ b/patches/source/bash/bash-4.3-patches/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..a2950c26
--- /dev/null
+++ b/patches/source/bash/bash.SlackBuild
@@ -0,0 +1,170 @@
+#!/bin/sh
+
+# Copyright 2005-2015 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:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mcpu=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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
+
+# 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 || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+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..f20a83f9
--- /dev/null
+++ b/patches/source/bind/bind.SlackBuild
@@ -0,0 +1,165 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 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=bind
+VERSION=${VERSION:-9.10.6-P1}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=/bind-$(mcookie)
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG/etc/default
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+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
+
+# Thanks to Fedora for libidn support patch:
+zcat $CWD/bind.libidn.patch.gz | patch -p1 --verbose || exit 1
+
+# 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 \
+ --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
+
+# Symlink hardlinked man pages:
+( cd $PKG/usr/man/man1
+ ln -sf isc-config.sh.1 bind9-config.1
+)
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ 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.libidn.patch b/patches/source/bind/bind.libidn.patch
new file mode 100644
index 00000000..6e042be7
--- /dev/null
+++ b/patches/source/bind/bind.libidn.patch
@@ -0,0 +1,297 @@
+diff --git a/bin/dig/Makefile.in b/bin/dig/Makefile.in
+index bd219c5..f71685b 100644
+--- a/bin/dig/Makefile.in
++++ b/bin/dig/Makefile.in
+@@ -38,10 +38,10 @@ DEPLIBS = ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCDEPLIBS} \
+ ${ISCCFGDEPLIBS} ${LWRESDEPLIBS}
+
+ LIBS = ${LWRESLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
+- ${ISCLIBS} @IDNLIBS@ @LIBS@
++ ${ISCLIBS} @IDNLIBS@ @LIBS@ -lidn
+
+ NOSYMLIBS = ${LWRESLIBS} ${BIND9LIBS} ${ISCCFGLIBS} \
+- ${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@
++ ${ISCNOSYMLIBS} @IDNLIBS@ @LIBS@ -lidn
+
+ SUBDIRS =
+
+@@ -59,6 +59,8 @@ HTMLPAGES = dig.html host.html nslookup.html
+
+ MANOBJS = ${MANPAGES} ${HTMLPAGES}
+
++EXT_CFLAGS = -DWITH_LIBIDN
++
+ @BIND9_MAKE_RULES@
+
+ dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
+diff --git a/bin/dig/dig.docbook b/bin/dig/dig.docbook
+index 7a7e8e4..b36047f 100644
+--- a/bin/dig/dig.docbook
++++ b/bin/dig/dig.docbook
+@@ -1251,8 +1251,8 @@ dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
+ <command>dig</command> appropriately converts character encoding of
+ domain name before sending a request to DNS server or displaying a
+ reply from the server.
+- If you'd like to turn off the IDN support for some reason, defines
+- the <envar>IDN_DISABLE</envar> environment variable.
++ If you'd like to turn off the IDN support for some reason, define
++ the <envar>CHARSET=ASCII</envar> environment variable.
+ The IDN support is disabled if the variable is set when
+ <command>dig</command> runs.
+ </para>
+diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
+index 1f8bcf2..f657c30 100644
+--- a/bin/dig/dighost.c
++++ b/bin/dig/dighost.c
+@@ -33,6 +33,11 @@
+ #include <idn/api.h>
+ #endif
+
++#ifdef WITH_LIBIDN
++#include <stringprep.h>
++#include <idna.h>
++#endif
++
+ #include <dns/byaddr.h>
+ #ifdef DIG_SIGCHASE
+ #include <dns/callbacks.h>
+@@ -158,6 +163,14 @@ static void idn_check_result(idn_result_t r, const char *msg);
+ int idnoptions = 0;
+ #endif
+
++#ifdef WITH_LIBIDN
++static isc_result_t libidn_locale_to_utf8 (const char* from, char *to);
++static isc_result_t libidn_utf8_to_ascii (const char* from, char *to);
++static isc_result_t output_filter (isc_buffer_t *buffer,
++ unsigned int used_org,
++ isc_boolean_t absolute);
++#endif
++
+ isc_socket_t *keep = NULL;
+ isc_sockaddr_t keepaddr;
+
+@@ -1448,8 +1461,15 @@ setup_system(isc_boolean_t ipv4only, isc_boolean_t ipv6only) {
+
+ #ifdef WITH_IDN
+ initialize_idn();
++
++#endif
++#ifdef WITH_LIBIDN
++ result = dns_name_settotextfilter(output_filter);
++ check_result(result, "dns_name_settotextfilter");
++#ifdef HAVE_SETLOCALE
++ setlocale (LC_ALL, "");
++#endif
+ #endif
+-
+ if (keyfile[0] != 0)
+ setup_file_key();
+ else if (keysecret[0] != 0)
+@@ -2231,8 +2251,11 @@ setup_lookup(dig_lookup_t *lookup) {
+ idn_result_t mr;
+ char utf8_textname[MXNAME], utf8_origin[MXNAME], idn_textname[MXNAME];
+ #endif
++#ifdef WITH_LIBIDN
++ char utf8_str[MXNAME], utf8_name[MXNAME], ascii_name[MXNAME];
++#endif
+
+-#ifdef WITH_IDN
++#if defined (WITH_IDN) || defined (WITH_LIBIDN)
+ result = dns_name_settotextfilter(lookup->idnout ?
+ output_filter : NULL);
+ check_result(result, "dns_name_settotextfilter");
+@@ -2274,6 +2297,14 @@ setup_lookup(dig_lookup_t *lookup) {
+ mr = idn_encodename(IDN_LOCALCONV | IDN_DELIMMAP, lookup->textname,
+ utf8_textname, sizeof(utf8_textname));
+ idn_check_result(mr, "convert textname to UTF-8");
++#elif defined (WITH_LIBIDN)
++ result = libidn_locale_to_utf8 (lookup->textname, utf8_str);
++ check_result (result, "convert textname to UTF-8");
++ len = strlen (utf8_str);
++ if (len < MXNAME)
++ (void) strcpy (utf8_name, utf8_str);
++ else
++ fatal ("Too long name");
+ #endif
+
+ /*
+@@ -2286,15 +2317,11 @@ setup_lookup(dig_lookup_t *lookup) {
+ if (lookup->new_search) {
+ #ifdef WITH_IDN
+ if ((count_dots(utf8_textname) >= ndots) || !usesearch) {
+- lookup->origin = NULL; /* Force abs lookup */
+- lookup->done_as_is = ISC_TRUE;
+- lookup->need_search = usesearch;
+- } else if (lookup->origin == NULL && usesearch) {
+- lookup->origin = ISC_LIST_HEAD(search_list);
+- lookup->need_search = ISC_FALSE;
+- }
++#elif defined (WITH_LIBIDN)
++ if ((count_dots(utf8_name) >= ndots) || !usesearch) {
+ #else
+ if ((count_dots(lookup->textname) >= ndots) || !usesearch) {
++#endif
+ lookup->origin = NULL; /* Force abs lookup */
+ lookup->done_as_is = ISC_TRUE;
+ lookup->need_search = usesearch;
+@@ -2302,7 +2329,6 @@ setup_lookup(dig_lookup_t *lookup) {
+ lookup->origin = ISC_LIST_HEAD(search_list);
+ lookup->need_search = ISC_FALSE;
+ }
+-#endif
+ }
+
+ #ifdef WITH_IDN
+@@ -2319,6 +2345,20 @@ setup_lookup(dig_lookup_t *lookup) {
+ IDN_IDNCONV | IDN_LENCHECK, utf8_textname,
+ idn_textname, sizeof(idn_textname));
+ idn_check_result(mr, "convert UTF-8 textname to IDN encoding");
++#elif defined (WITH_LIBIDN)
++ if (lookup->origin != NULL) {
++ result = libidn_locale_to_utf8 (lookup->origin->origin, utf8_str);
++ check_result (result, "convert origin to UTF-8");
++ if (len > 0 && utf8_name[len - 1] != '.') {
++ utf8_name[len++] = '.';
++ if (len + strlen (utf8_str) < MXNAME)
++ (void) strcpy (utf8_name + len, utf8_str);
++ else
++ fatal ("Too long name + origin");
++ }
++ }
++
++ result = libidn_utf8_to_ascii (utf8_name, ascii_name);
+ #else
+ if (lookup->origin != NULL) {
+ debug("trying origin %s", lookup->origin->origin);
+@@ -2389,6 +2429,13 @@ setup_lookup(dig_lookup_t *lookup) {
+ result = dns_name_fromtext(lookup->name, &b,
+ dns_rootname, 0,
+ &lookup->namebuf);
++#elif defined (WITH_LIBIDN)
++ len = strlen (ascii_name);
++ isc_buffer_init(&b, ascii_name, len);
++ isc_buffer_add(&b, len);
++ result = dns_name_fromtext(lookup->name, &b,
++ dns_rootname, 0,
++ &lookup->namebuf);
+ #else
+ len = (unsigned int) strlen(lookup->textname);
+ isc_buffer_init(&b, lookup->textname, len);
+@@ -4377,7 +4424,7 @@ destroy_libs(void) {
+ void * ptr;
+ dig_message_t *chase_msg;
+ #endif
+-#ifdef WITH_IDN
++#if defined (WITH_IDN) || defined (WITH_LIBIDN)
+ isc_result_t result;
+ #endif
+
+@@ -4418,6 +4465,10 @@ destroy_libs(void) {
+ result = dns_name_settotextfilter(NULL);
+ check_result(result, "dns_name_settotextfilter");
+ #endif
++#ifdef WITH_LIBIDN
++ result = dns_name_settotextfilter (NULL);
++ check_result(result, "clearing dns_name_settotextfilter");
++#endif
+ dns_name_destroy();
+
+ if (commctx != NULL) {
+@@ -4603,6 +4654,97 @@ idn_check_result(idn_result_t r, const char *msg) {
+ }
+ }
+ #endif /* WITH_IDN */
++#ifdef WITH_LIBIDN
++static isc_result_t
++libidn_locale_to_utf8 (const char *from, char *to) {
++ char *utf8_str;
++
++ debug ("libidn_locale_to_utf8");
++ utf8_str = stringprep_locale_to_utf8 (from);
++ if (utf8_str != NULL) {
++ (void) strcpy (to, utf8_str);
++ free (utf8_str);
++ return ISC_R_SUCCESS;
++ }
++
++ debug ("libidn_locale_to_utf8: failure");
++ return ISC_R_FAILURE;
++}
++static isc_result_t
++libidn_utf8_to_ascii (const char *from, char *to) {
++ char *ascii;
++ int iresult;
++
++ debug ("libidn_utf8_to_ascii");
++ iresult = idna_to_ascii_8z (from, &ascii, 0);
++ if (iresult != IDNA_SUCCESS) {
++ debug ("idna_to_ascii_8z: %s", idna_strerror (iresult));
++ return ISC_R_FAILURE;
++ }
++
++ (void) strcpy (to, ascii);
++ free (ascii);
++ return ISC_R_SUCCESS;
++}
++
++static isc_result_t
++output_filter (isc_buffer_t *buffer, unsigned int used_org,
++ isc_boolean_t absolute) {
++
++ char tmp1[MXNAME], *tmp2;
++ size_t fromlen, tolen;
++ isc_boolean_t end_with_dot;
++ int iresult;
++
++ debug ("output_filter");
++
++ fromlen = isc_buffer_usedlength (buffer) - used_org;
++ if (fromlen >= MXNAME)
++ return ISC_R_SUCCESS;
++ memcpy (tmp1, (char *) isc_buffer_base (buffer) + used_org, fromlen);
++ end_with_dot = (tmp1[fromlen - 1] == '.') ? ISC_TRUE : ISC_FALSE;
++ if (absolute && !end_with_dot) {
++ fromlen++;
++ if (fromlen >= MXNAME)
++ return ISC_R_SUCCESS;
++ tmp1[fromlen - 1] = '.';
++ }
++ tmp1[fromlen] = '\0';
++
++ iresult = idna_to_unicode_8z8z (tmp1, &tmp2, 0);
++ if (iresult != IDNA_SUCCESS) {
++ debug ("output_filter: %s", idna_strerror (iresult));
++ return ISC_R_SUCCESS;
++ }
++
++ (void) strcpy (tmp1, tmp2);
++ free (tmp2);
++
++ tmp2 = stringprep_utf8_to_locale (tmp1);
++ if (tmp2 == NULL) {
++ debug ("output_filter: stringprep_utf8_to_locale failed");
++ return ISC_R_SUCCESS;
++ }
++
++ (void) strcpy (tmp1, tmp2);
++ free (tmp2);
++
++ tolen = strlen (tmp1);
++ if (absolute && !end_with_dot && tmp1[tolen - 1] == '.')
++ tolen--;
++
++ if (isc_buffer_length (buffer) < used_org + tolen)
++ return ISC_R_NOSPACE;
++
++ debug ("%s", tmp1);
++
++ isc_buffer_subtract (buffer, isc_buffer_usedlength (buffer) - used_org);
++ memcpy (isc_buffer_used (buffer), tmp1, tolen);
++ isc_buffer_add (buffer, tolen);
++
++ return ISC_R_SUCCESS;
++}
++#endif /* WITH_LIBIDN*/
+
+ #ifdef DIG_SIGCHASE
+ void
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/bluez/bluez-5.30-obexd_without_systemd-1.patch b/patches/source/bluez/bluez-5.30-obexd_without_systemd-1.patch
new file mode 100644
index 00000000..749787c5
--- /dev/null
+++ b/patches/source/bluez/bluez-5.30-obexd_without_systemd-1.patch
@@ -0,0 +1,61 @@
+Submitted By: Armin K. <krejzi at email dot com>
+Date: 2013-04-29
+Initial Package Version: 5.17
+Upstream Status: unknown
+Origin: Arch Linux (Giovanni Campagna)
+Description: Allow using obexd without systemd in the user session
+
+Not all sessions run systemd --user (actually, the majority
+doesn't), so the dbus daemon must be able to spawn obexd
+directly, and to do so it needs the full path of the daemon.
+---
+ Makefile.obexd | 4 ++--
+ obexd/src/org.bluez.obex.service | 4 ----
+ obexd/src/org.bluez.obex.service.in | 4 ++++
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+ delete mode 100644 obexd/src/org.bluez.obex.service
+ create mode 100644 obexd/src/org.bluez.obex.service.in
+
+diff --git a/Makefile.obexd b/Makefile.obexd
+index 3760867..142e7c3 100644
+--- a/Makefile.obexd
++++ b/Makefile.obexd
+@@ -2,12 +2,12 @@
+ if SYSTEMD
+ systemduserunitdir = @SYSTEMD_USERUNITDIR@
+ systemduserunit_DATA = obexd/src/obex.service
++endif
+
+ dbussessionbusdir = @DBUS_SESSIONBUSDIR@
+ dbussessionbus_DATA = obexd/src/org.bluez.obex.service
+-endif
+
+-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
+
+ obex_plugindir = $(libdir)/obex/plugins
+
+diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
+deleted file mode 100644
+index a538088..0000000
+--- a/obexd/src/org.bluez.obex.service
++++ /dev/null
+@@ -1,4 +0,0 @@
+-[D-BUS Service]
+-Name=org.bluez.obex
+-Exec=/bin/false
+-SystemdService=dbus-org.bluez.obex.service
+diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
+new file mode 100644
+index 0000000..9c815f2
+--- /dev/null
++++ b/obexd/src/org.bluez.obex.service.in
+@@ -0,0 +1,4 @@
++[D-BUS Service]
++Name=org.bluez.obex
++Exec=@libexecdir@/obexd
++SystemdService=dbus-org.bluez.obex.service
+--
+1.8.3.1
+
+
diff --git a/patches/source/bluez/bluez.SlackBuild b/patches/source/bluez/bluez.SlackBuild
new file mode 100755
index 00000000..4225f828
--- /dev/null
+++ b/patches/source/bluez/bluez.SlackBuild
@@ -0,0 +1,178 @@
+#!/bin/sh
+
+# Copyright 2009, 2010, 2011, 2012, 2013, 2016 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.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+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 || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/bluez-5.30-obexd_without_systemd-1.patch.gz | patch -p1 --verbose || exit 1
+
+autoreconf -vif
+
+sed -i -e 's|-lreadline|\0 -lncursesw|g' Makefile.{in,tools}
+
+# We're adding --enable-deprecated due to this commit:
+#
+# commit b1eb2c4cd057624312e0412f6c4be000f7fc3617
+#Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
+#Date: Wed Jan 4 14:23:58 2017 +0200
+#
+# build: Hide deprecated tools under --enable-deprecated
+#
+# This marks the following tools as deprecated as they are not longer
+# maintained or have been replaced by other tools:
+#
+# hciattach hciconfig hcitool hcidump rfcomm sdptool ciptool gatttool
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="-L/usr/lib$LIBDIRSUFFIX" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --localstatedir=/var \
+ --docdir=/usr/doc/${PKGNAM}-${VERSION} \
+ --enable-library \
+ --disable-systemd \
+ --enable-deprecated \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Use reset=1 for the btusb module, which supposedly fixes reconnect problems:
+mkdir -p $PKG/lib/modprobe.d
+cp -a $CWD/btusb.conf $PKG/lib/modprobe.d
+chown root:root $PKG/lib/modprobe.d/btusb.conf
+chmod 644 $PKG/lib/modprobe.d/btusb.conf
+
+# Add bluetoothd to /usr/sbin
+mkdir -p $PKG/usr/sbin
+ln -s ../libexec/bluetooth/bluetoothd $PKG/usr/sbin
+
+# Install the configuration files
+mkdir -p $PKG/etc/bluetooth $PKG/etc/default
+cat src/main.conf > $PKG/etc/bluetooth/main.conf.new
+cat profiles/input/input.conf > $PKG/etc/bluetooth/input.conf.new
+cat profiles/network/network.conf > $PKG/etc/bluetooth/network.conf.new
+cat profiles/proximity/proximity.conf > $PKG/etc/bluetooth/proximity.conf.new
+cat $CWD/config/uart.conf > $PKG/etc/bluetooth/uart.conf.new
+cat $CWD/config/defaultconfig > $PKG/etc/default/bluetooth.new
+
+# Add an init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/config/rc.bluetooth > $PKG/etc/rc.d/rc.bluetooth.new
+
+# Let's go ahead and let that start by default, unless an existing init
+# script is not executable:
+chmod 755 $PKG/etc/rc.d/rc.bluetooth.new
+
+# If the deprecated utility gatttool was built, go ahead and install it:
+if [ -x attrib/gatttool ]; then
+ cp attrib/gatttool $PKG/usr/bin
+ chown root:root $PKG/usr/bin/gatttool
+ chmod 755 $PKG/usr/bin/gatttool
+fi
+
+# 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 README* TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/bluez/btusb.conf b/patches/source/bluez/btusb.conf
new file mode 100644
index 00000000..3072d788
--- /dev/null
+++ b/patches/source/bluez/btusb.conf
@@ -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/defaultconfig b/patches/source/bluez/config/defaultconfig
new file mode 100644
index 00000000..b4da786e
--- /dev/null
+++ b/patches/source/bluez/config/defaultconfig
@@ -0,0 +1,9 @@
+# /etc/default/bluetooth
+
+# A space delimied list of devices to start at boot time
+ACTIVE_HCI_DEVICES_ON_BOOT="hci0"
+
+# A semicolon delimited list of SDP (Service Discovery Protocol)
+# operations for bluetooth devices. See the sdptool for more details.
+SDPTOOL_OPTIONS=""
+
diff --git a/patches/source/bluez/config/rc.bluetooth b/patches/source/bluez/config/rc.bluetooth
new file mode 100644
index 00000000..b56fcd10
--- /dev/null
+++ b/patches/source/bluez/config/rc.bluetooth
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+# /etc/rc.d/rc.bluetooth (based on BLFS script)
+
+# Populated from /etc/default/bluetooth:
+# ACTIVE_HCI_DEVICES_ON_BOOT and SDPTOOL_OPTIONS
+
+[ -r /etc/default/bluetooth ] && . /etc/default/bluetooth
+
+start_hci_dev() {
+ for dev in ${ACTIVE_HCI_DEVICES_ON_BOOT} ; do
+ hciconfig $dev up > /dev/null 2>&1
+ done
+}
+
+run_sdptool() {
+ # Declaring IFS local in this function, removes the need to save/restore it
+ local IFS option
+ test -x /usr/bin/sdptool || return 1
+ IFS=";"
+ for option in ${SDPTOOL_OPTIONS}; do
+ IFS=" "
+ /usr/bin/sdptool $option > /dev/null 2>&1
+ done
+}
+
+start_uarts() {
+ [ -r /etc/bluetooth/uart.conf ] || return
+ grep -v '^[[:space:]]*(#|$)' /etc/bluetooth/uart.conf | while read i; do
+ /usr/bin/hciattach $i > /dev/null 2>&1
+ done
+}
+
+stop_uarts() {
+ killall /usr/bin/hciattach > /dev/null 2>&1
+}
+
+start() {
+ if [ -d /sys/class/bluetooth ]; then
+ # Start as background process and assume OK
+ echo -n "Starting Bluetooth services: bluetoothd "
+ /usr/sbin/bluetoothd &
+ echo -n "hciconfig "
+ start_hci_dev
+ echo -n "sdptool "
+ run_sdptool
+ echo "hciattach"
+ start_uarts
+ fi
+}
+
+stop() {
+ stop_uarts
+ killall /usr/sbin/bluetoothd > /dev/null 2>&1
+}
+
+case "${1}" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 1
+ start
+ ;;
+ *)
+ echo "Usage: ${0} {start|stop|restart}"
+ exit 1
+ ;;
+esac
+
diff --git a/patches/source/bluez/config/uart.conf b/patches/source/bluez/config/uart.conf
new file mode 100644
index 00000000..b2e276f4
--- /dev/null
+++ b/patches/source/bluez/config/uart.conf
@@ -0,0 +1,6 @@
+# /etc/bluetooth/uart.conf
+
+# Attach serial devices via UART HCI to BlueZ stack
+# Use one line per device
+# See the hciattach man page for options
+
diff --git a/patches/source/bluez/doinst.sh b/patches/source/bluez/doinst.sh
new file mode 100644
index 00000000..7fc21383
--- /dev/null
+++ b/patches/source/bluez/doinst.sh
@@ -0,0 +1,27 @@
+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/bluetooth/input.conf.new
+config etc/bluetooth/main.conf.new
+config etc/bluetooth/network.conf.new
+config etc/bluetooth/proximity.conf.new
+config etc/bluetooth/uart.conf.new
+config etc/default/bluetooth.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/ca-certificates/ca-certificates.SlackBuild b/patches/source/ca-certificates/ca-certificates.SlackBuild
new file mode 100755
index 00000000..6b3cf010
--- /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.2}
+
+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/curl/cacert-fetch.sh b/patches/source/curl/cacert-fetch.sh
new file mode 100755
index 00000000..d0f156e2
--- /dev/null
+++ b/patches/source/curl/cacert-fetch.sh
@@ -0,0 +1 @@
+lftpget http://curl.haxx.se/ca/cacert.pem && rm cacert.pem.bz2 && bzip2 -9 cacert.pem
diff --git a/patches/source/curl/cacert.pem b/patches/source/curl/cacert.pem
new file mode 100644
index 00000000..45654c0b
--- /dev/null
+++ b/patches/source/curl/cacert.pem
@@ -0,0 +1,3338 @@
+##
+## Bundle of CA Root Certificates
+##
+## Certificate data from Mozilla as of: Wed Mar 7 04:12:06 2018 GMT
+##
+## This is a bundle of X.509 certificates of public Certificate Authorities
+## (CA). These were automatically extracted from Mozilla's root certificates
+## file (certdata.txt). This file can be found in the mozilla source tree:
+## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
+##
+## It contains the certificates in PEM format and therefore
+## can be directly used with curl / libcurl / php_curl, or with
+## an Apache+mod_ssl webserver for SSL client authentication.
+## Just configure this file as the SSLCACertificateFile.
+##
+## Conversion done with mk-ca-bundle.pl version 1.27.
+## SHA256: 704f02707ec6b4c4a7597a8c6039b020def11e64f3ef0605a9c3543d48038a57
+##
+
+
+GlobalSign Root CA
+==================
+-----BEGIN CERTIFICATE-----
+MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx
+GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds
+b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV
+BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD
+VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa
+DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc
+THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb
+Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP
+c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX
+gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV
+HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF
+AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj
+Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG
+j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH
+hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC
+X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==
+-----END CERTIFICATE-----
+
+GlobalSign Root CA - R2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv
+YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
+bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
+aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
+bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6
+ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp
+s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN
+S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL
+TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C
+ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E
+FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i
+YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN
+BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp
+9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu
+01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7
+9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7
+TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==
+-----END CERTIFICATE-----
+
+Verisign Class 3 Public Primary Certification Authority - G3
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
+CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
+dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
+EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
+cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
+EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
+055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
+ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
+j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
+/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
+xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
+t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
+-----END CERTIFICATE-----
+
+Entrust.net Premium 2048 Secure Server CA
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
+ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
+bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
+BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx
+NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3
+d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl
+MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u
+ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL
+Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr
+hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW
+nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi
+VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ
+KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy
+T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf
+zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT
+J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e
+nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE=
+-----END CERTIFICATE-----
+
+Baltimore CyberTrust Root
+=========================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
+ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li
+ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC
+SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs
+dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME
+uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB
+UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C
+G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9
+XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr
+l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI
+VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB
+BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh
+cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5
+hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa
+Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
+RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
+-----END CERTIFICATE-----
+
+AddTrust External Root
+======================
+-----BEGIN CERTIFICATE-----
+MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
+QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
+VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
+NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
+cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
+Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
+Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
+aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
+2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
+7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
+BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
+VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
+VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
+IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
+j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
+6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
+e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
+G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority
+====================================
+-----BEGIN CERTIFICATE-----
+MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
+BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
+b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG
+A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0
+MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu
+MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu
+Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v
+dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz
+A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww
+Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68
+j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN
+rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw
+DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1
+MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH
+hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA
+A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM
+Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa
+v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS
+W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0
+tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8
+-----END CERTIFICATE-----
+
+GeoTrust Global CA
+==================
+-----BEGIN CERTIFICATE-----
+MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK
+Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw
+MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j
+LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo
+BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet
+8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc
+T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU
+vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD
+AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk
+DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q
+zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4
+d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2
+mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p
+XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm
+Mw==
+-----END CERTIFICATE-----
+
+GeoTrust Universal CA
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
+R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1
+MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu
+Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP
+ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t
+JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e
+RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs
+7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d
+8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V
+qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga
+Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB
+Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu
+KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08
+ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0
+XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB
+hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc
+aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2
+qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL
+oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK
+xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF
+KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2
+DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK
+xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU
+p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI
+P/rmMuGNG2+k5o7Y+SlIis5z/iw=
+-----END CERTIFICATE-----
+
+GeoTrust Universal CA 2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN
+R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0
+MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg
+SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA
+A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0
+DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17
+j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q
+JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a
+QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2
+WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP
+20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn
+ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC
+SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG
+8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2
++/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E
+BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z
+dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ
+4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+
+mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq
+A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg
+Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP
+pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d
+FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp
+gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
+X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
+-----END CERTIFICATE-----
+
+Visa eCommerce Root
+===================
+-----BEGIN CERTIFICATE-----
+MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG
+EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug
+QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2
+WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm
+VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv
+bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL
+F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b
+RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0
+TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI
+/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs
+GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG
+MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc
+CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW
+YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz
+zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu
+YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt
+398znM/jra6O1I7mT1GvFpLgXPYHDw==
+-----END CERTIFICATE-----
+
+Comodo AAA Services root
+========================
+-----BEGIN CERTIFICATE-----
+MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
+R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg
+TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw
+MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl
+c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV
+BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG
+C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs
+i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW
+Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH
+Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK
+Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f
+BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl
+cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz
+LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm
+7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz
+Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z
+8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C
+12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg==
+-----END CERTIFICATE-----
+
+QuoVadis Root CA
+================
+-----BEGIN CERTIFICATE-----
+MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE
+ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0
+eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz
+MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp
+cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD
+EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk
+J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL
+F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL
+YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen
+AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w
+PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y
+ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7
+MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj
+YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs
+ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh
+Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW
+Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu
+BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw
+FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6
+tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo
+fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul
+LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x
+gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi
+5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi
+5nrQNiOKSnQ2+Q==
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 2
+==================
+-----BEGIN CERTIFICATE-----
+MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
+EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx
+ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
+aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6
+XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk
+lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB
+lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy
+lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt
+66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn
+wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh
+D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy
+BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie
+J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud
+DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU
+a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT
+ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv
+Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3
+UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm
+VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK
++JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW
+IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1
+WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X
+f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II
+4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8
+VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 3
+==================
+-----BEGIN CERTIFICATE-----
+MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT
+EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx
+OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM
+aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg
+DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij
+KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K
+DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv
+BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp
+p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8
+nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX
+MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM
+Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz
+uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT
+BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj
+YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0
+aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB
+BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD
+VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4
+ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE
+AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV
+qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s
+hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z
+POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2
+Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
+8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
+bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
+g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
+vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
+qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
+-----END CERTIFICATE-----
+
+Security Communication Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
+HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
+U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
+8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
+DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
+5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
+DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
+JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
+DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
+0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
+mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
+s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
+6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
+FL39vmwLAw==
+-----END CERTIFICATE-----
+
+Sonera Class 2 Root CA
+======================
+-----BEGIN CERTIFICATE-----
+MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
+U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
+NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
+IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
+/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
+dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
+f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
+tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
+nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
+XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
+0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
+cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
+Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
+EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
+llpwrN9M
+-----END CERTIFICATE-----
+
+XRamp Global CA Root
+====================
+-----BEGIN CERTIFICATE-----
+MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE
+BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj
+dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx
+HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg
+U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp
+dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu
+IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx
+foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE
+zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs
+AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry
+xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap
+oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC
+AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc
+/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt
+qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n
+nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz
+8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw=
+-----END CERTIFICATE-----
+
+Go Daddy Class 2 CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY
+VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG
+A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g
+RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD
+ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv
+2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32
+qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j
+YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY
+vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O
+BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o
+atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu
+MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG
+A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim
+PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt
+I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ
+HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI
+Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b
+vZ8=
+-----END CERTIFICATE-----
+
+Starfield Class 2 CA
+====================
+-----BEGIN CERTIFICATE-----
+MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc
+U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg
+Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo
+MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG
+A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG
+SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY
+bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ
+JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm
+epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN
+F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF
+MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f
+hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo
+bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g
+QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs
+afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
+PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
+xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
+KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
+QBFGmh95DmK/D5fs4C8fF5Q=
+-----END CERTIFICATE-----
+
+Taiwan GRCA
+===========
+-----BEGIN CERTIFICATE-----
+MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG
+EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X
+DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv
+dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN
+w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5
+BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O
+1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO
+htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov
+J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7
+Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t
+B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB
+O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8
+lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV
+HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2
+09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ
+TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj
+Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2
+Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU
+D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz
+DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk
+Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk
+7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ
+CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy
++fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root CA
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
+IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx
+MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
+ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO
+9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy
+UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW
+/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy
+oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf
+GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF
+66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq
+hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc
+EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn
+SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i
+8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
+-----END CERTIFICATE-----
+
+DigiCert Global Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
+HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw
+MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
+dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn
+TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5
+BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H
+4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y
+7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB
+o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm
+8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF
+BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr
+EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt
+tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886
+UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
+CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
+-----END CERTIFICATE-----
+
+DigiCert High Assurance EV Root CA
+==================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
+KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
+MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
+MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
+Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
+Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
+OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
+MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ
+NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe
+h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
+Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY
+JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ
+V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp
+myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK
+mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe
+vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K
+-----END CERTIFICATE-----
+
+Certplus Class 2 Primary CA
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE
+BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN
+OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy
+dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR
+5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ
+Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO
+YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e
+e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME
+CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ
+YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t
+L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD
+P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R
+TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+
+7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW
+//1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7
+l7+ijrRU
+-----END CERTIFICATE-----
+
+DST Root CA X3
+==============
+-----BEGIN CERTIFICATE-----
+MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK
+ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X
+DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1
+cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT
+rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9
+UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy
+xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d
+utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T
+AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ
+MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug
+dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE
+GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw
+RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS
+fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
+-----END CERTIFICATE-----
+
+SwissSign Gold CA - G2
+======================
+-----BEGIN CERTIFICATE-----
+MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw
+EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN
+MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp
+c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq
+t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C
+jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg
+vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF
+ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR
+AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend
+jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO
+peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR
+7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi
+GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64
+OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
+L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm
+5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr
+44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
+Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
+Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
+mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
+vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
+KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
+NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
+viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
+-----END CERTIFICATE-----
+
+SwissSign Silver CA - G2
+========================
+-----BEGIN CERTIFICATE-----
+MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT
+BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X
+DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3
+aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG
+9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644
+N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm
++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH
+6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu
+MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h
+qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5
+FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs
+ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc
+celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X
+CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/
+BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB
+tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
+cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P
+4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F
+kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
+3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
+/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
+DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
+e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
+WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
+DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
+DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
+EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx
+CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ
+cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN
+b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9
+nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge
+RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt
+tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI
+hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K
+Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN
+NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa
+Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG
+1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk=
+-----END CERTIFICATE-----
+
+thawte Primary Root CA
+======================
+-----BEGIN CERTIFICATE-----
+MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE
+BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
+aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3
+MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg
+SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv
+KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT
+FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs
+oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ
+1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc
+q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K
+aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p
+afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
+VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
+AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
+uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
+xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
+jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
+z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G5
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
+ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
+yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
+biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh
+dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt
+YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
+ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz
+j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD
+Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/
+Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r
+fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/
+BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv
+Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy
+aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG
+SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+
+X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE
+KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC
+Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE
+ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq
+-----END CERTIFICATE-----
+
+SecureTrust CA
+==============
+-----BEGIN CERTIFICATE-----
+MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG
+EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy
+dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe
+BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC
+ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX
+OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t
+DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH
+GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b
+01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH
+ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/
+BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj
+aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
+KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu
+SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf
+mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ
+nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR
+3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE=
+-----END CERTIFICATE-----
+
+Secure Global CA
+================
+-----BEGIN CERTIFICATE-----
+MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG
+EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH
+bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg
+MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg
+Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx
+YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ
+bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g
+8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV
+HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi
+0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
+EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn
+oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA
+MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+
+OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn
+CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
+3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
+f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
+-----END CERTIFICATE-----
+
+COMODO Certification Authority
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
+dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb
+MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD
+T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH
++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww
+xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV
+4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA
+1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI
+rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k
+b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC
+AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP
+OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/
+RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc
+IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
+-----END CERTIFICATE-----
+
+Network Solutions Certificate Authority
+=======================================
+-----BEGIN CERTIFICATE-----
+MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
+EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
+IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
+MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
+MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
+CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
+jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
+aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
+crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
+/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
+AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
+bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
+A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
+4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
+GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
+wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
+ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
+-----END CERTIFICATE-----
+
+COMODO ECC Certification Authority
+==================================
+-----BEGIN CERTIFICATE-----
+MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
+R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
+ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
+GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
+Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo
+b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X
+4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni
+wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E
+BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG
+FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
+U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
+-----END CERTIFICATE-----
+
+OISTE WISeKey Global Root GA CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE
+BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG
+A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH
+bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD
+VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw
+IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
+IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
+Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg
+Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD
+d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ
+/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R
+LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
+AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
+KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm
+MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4
++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
+hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY
+okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0=
+-----END CERTIFICATE-----
+
+Certigna
+========
+-----BEGIN CERTIFICATE-----
+MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw
+EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3
+MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI
+Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q
+XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH
+GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p
+ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg
+DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf
+Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ
+tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ
+BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J
+SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA
+hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+
+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu
+PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY
+1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
+WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
+-----END CERTIFICATE-----
+
+Deutsche Telekom Root CA 2
+==========================
+-----BEGIN CERTIFICATE-----
+MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT
+RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG
+A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5
+MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G
+A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS
+b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5
+bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI
+KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY
+AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK
+Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV
+jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV
+HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr
+E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy
+zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8
+rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G
+dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU
+Cm26OWMohpLzGITY+9HPBVZkVw==
+-----END CERTIFICATE-----
+
+Cybertrust Global Root
+======================
+-----BEGIN CERTIFICATE-----
+MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li
+ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4
+MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD
+ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
++Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW
+0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL
+AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin
+89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT
+8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP
+BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2
+MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G
+A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO
+lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi
+5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
+hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
+X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
+WL1WMRJOEcgh4LMRkWXbtKaIOM5V
+-----END CERTIFICATE-----
+
+ePKI Root Certification Authority
+=================================
+-----BEGIN CERTIFICATE-----
+MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
+EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
+Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
+MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
+MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs
+IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi
+lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv
+qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX
+12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O
+WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+
+ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao
+lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/
+vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi
+Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi
+MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH
+ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0
+1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq
+KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV
+xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP
+NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r
+GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE
+xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx
+gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
+sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
+BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
+-----END CERTIFICATE-----
+
+certSIGN ROOT CA
+================
+-----BEGIN CERTIFICATE-----
+MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD
+VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa
+Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE
+CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I
+JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH
+rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2
+ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD
+0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943
+AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B
+Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB
+AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8
+SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0
+x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt
+vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz
+TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G3
+=============================================
+-----BEGIN CERTIFICATE-----
+MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
+BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0
+IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy
+eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz
+NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo
+YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT
+LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j
+K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE
+c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C
+IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu
+dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr
+2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9
+cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE
+Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
+AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
+t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
+-----END CERTIFICATE-----
+
+thawte Primary Root CA - G2
+===========================
+-----BEGIN CERTIFICATE-----
+MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
+VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu
+IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg
+Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV
+MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG
+b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt
+IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS
+LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5
+8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU
+mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN
+G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K
+rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg==
+-----END CERTIFICATE-----
+
+thawte Primary Root CA - G3
+===========================
+-----BEGIN CERTIFICATE-----
+MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE
+BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2
+aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv
+cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w
+ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh
+d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD
+VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG
+A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At
+P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC
++BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY
+7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW
+vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ
+KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK
+A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
+t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC
+8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm
+er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
+-----END CERTIFICATE-----
+
+GeoTrust Primary Certification Authority - G2
+=============================================
+-----BEGIN CERTIFICATE-----
+MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
+VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
+Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
+ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
+OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
+MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
+b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
+BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
+KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
+VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
+EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
+ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
+npaqBA+K
+-----END CERTIFICATE-----
+
+VeriSign Universal Root Certification Authority
+===============================================
+-----BEGIN CERTIFICATE-----
+MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
+BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
+ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
+IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
+IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
+UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
+cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
+IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0
+aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj
+1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP
+MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72
+9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I
+AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR
+tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G
+CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O
+a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud
+DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3
+Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx
+Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx
+P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P
+wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
+mJO37M2CYfE45k+XmCpajQ==
+-----END CERTIFICATE-----
+
+VeriSign Class 3 Public Primary Certification Authority - G4
+============================================================
+-----BEGIN CERTIFICATE-----
+MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
+VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
+b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
+ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
+YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
+MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
+cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
+b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
+IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
+Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
+rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
+HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
+Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
+A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
+AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
+-----END CERTIFICATE-----
+
+NetLock Arany (Class Gold) Főtanúsítvány
+========================================
+-----BEGIN CERTIFICATE-----
+MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G
+A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610
+dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB
+cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx
+MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO
+ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv
+biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6
+c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu
+0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw
+/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk
+H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw
+fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1
+neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB
+BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW
+qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta
+YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
+bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna
+NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
+dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA - G2
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC
+TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
+ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ
+5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn
+vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj
+CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil
+e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR
+OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI
+CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65
+48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi
+trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737
+qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB
+AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC
+ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV
+HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA
+A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz
++51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj
+f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN
+kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk
+CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF
+URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb
+CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h
+oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV
+IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm
+66+KAQ==
+-----END CERTIFICATE-----
+
+Hongkong Post Root CA 1
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT
+DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx
+NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n
+IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
+ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
+auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
+qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
+V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
+HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
+h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
+l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
+IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
+T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
+c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
+-----END CERTIFICATE-----
+
+SecureSign RootCA11
+===================
+-----BEGIN CERTIFICATE-----
+MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi
+SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS
+b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw
+KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1
+cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL
+TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO
+wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq
+g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP
+O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA
+bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX
+t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh
+OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r
+bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ
+Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01
+y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061
+lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I=
+-----END CERTIFICATE-----
+
+Microsec e-Szigno Root CA 2009
+==============================
+-----BEGIN CERTIFICATE-----
+MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER
+MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv
+c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o
+dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE
+BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt
+U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA
+fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG
+0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA
+pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm
+1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC
+AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf
+QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE
+FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o
+lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX
+I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775
+tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02
+yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi
+LXpUq3DDfSJlgnCW
+-----END CERTIFICATE-----
+
+GlobalSign Root CA - R3
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv
+YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh
+bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT
+aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln
+bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt
+iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ
+0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3
+rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl
+OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2
+xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7
+lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8
+EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E
+bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
+YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
+kpeDMdmztcpHWD9f
+-----END CERTIFICATE-----
+
+Autoridad de Certificacion Firmaprofesional CIF A62634068
+=========================================================
+-----BEGIN CERTIFICATE-----
+MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA
+BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2
+MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw
+QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB
+NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD
+Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P
+B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY
+7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH
+ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI
+plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX
+MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX
+LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK
+bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU
+vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud
+EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH
+DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp
+cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA
+bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx
+ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx
+51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk
+R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP
+T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f
+Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl
+osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR
+crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR
+saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD
+KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi
+6Et8Vcad+qMUu2WFbm5PEn4KPJ2V
+-----END CERTIFICATE-----
+
+Izenpe.com
+==========
+-----BEGIN CERTIFICATE-----
+MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG
+EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz
+MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu
+QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ
+03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK
+ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU
++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC
+PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT
+OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK
+F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK
+0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+
+0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB
+leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID
+AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+
+SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG
+NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx
+MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O
+BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l
+Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga
+kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q
+hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs
+g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5
+aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5
+nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC
+ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo
+Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z
+WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw==
+-----END CERTIFICATE-----
+
+Chambers of Commerce Root - 2008
+================================
+-----BEGIN CERTIFICATE-----
+MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy
+Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl
+ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF
+EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl
+cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC
+AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA
+XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj
+h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/
+ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk
+NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g
+D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331
+lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ
+0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj
+ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2
+EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI
+G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ
+BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh
+bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh
+bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC
+CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH
+AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1
+wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH
+3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU
+RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6
+M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1
+YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF
+9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
+zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
+nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
+OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
+-----END CERTIFICATE-----
+
+Global Chambersign Root - 2008
+==============================
+-----BEGIN CERTIFICATE-----
+MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
+MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
+bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
+QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
+NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
+Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
+QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
+aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf
+VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf
+XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0
+ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB
+/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA
+TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M
+H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe
+Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF
+HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh
+wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB
+AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT
+BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE
+BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm
+aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm
+aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp
+1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0
+dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG
+/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6
+ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s
+dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
+9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
+foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
+qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
+P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
+c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
+09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
+-----END CERTIFICATE-----
+
+Go Daddy Root Certificate Authority - G2
+========================================
+-----BEGIN CERTIFICATE-----
+MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu
+MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5
+MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6
+b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G
+A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI
+hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq
+9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD
++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd
+fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl
+NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9
+BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac
+vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r
+5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV
+N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
+LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
+-----END CERTIFICATE-----
+
+Starfield Root Certificate Authority - G2
+=========================================
+-----BEGIN CERTIFICATE-----
+MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
+eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw
+DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg
+VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB
+dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv
+W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs
+bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk
+N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf
+ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU
+JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol
+TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx
+4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw
+F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
+pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
+c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
+-----END CERTIFICATE-----
+
+Starfield Services Root Certificate Authority - G2
+==================================================
+-----BEGIN CERTIFICATE-----
+MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
+B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
+b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl
+IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV
+BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT
+dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg
+Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
+AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2
+h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa
+hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP
+LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB
+rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
+AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG
+SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP
+E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy
+xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
+iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza
+YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6
+-----END CERTIFICATE-----
+
+AffirmTrust Commercial
+======================
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw
+MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
+bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb
+DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV
+C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6
+BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww
+MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV
+HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG
+hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi
+qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv
+0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh
+sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
+-----END CERTIFICATE-----
+
+AffirmTrust Networking
+======================
+-----BEGIN CERTIFICATE-----
+MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw
+MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
+bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF
+AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE
+Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI
+dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24
+/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb
+h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV
+HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu
+UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6
+12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23
+WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9
+/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s=
+-----END CERTIFICATE-----
+
+AffirmTrust Premium
+===================
+-----BEGIN CERTIFICATE-----
+MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS
+BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy
+OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy
+dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn
+BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV
+5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs
++7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd
+GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R
+p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI
+S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04
+6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5
+/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo
++Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB
+/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv
+MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
+Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC
+6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S
+L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK
++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV
+BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg
+IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60
+g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb
+zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==
+-----END CERTIFICATE-----
+
+AffirmTrust Premium ECC
+=======================
+-----BEGIN CERTIFICATE-----
+MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
+BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx
+MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U
+cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA
+IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ
+N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW
+BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK
+BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X
+57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM
+eQ==
+-----END CERTIFICATE-----
+
+Certum Trusted Network CA
+=========================
+-----BEGIN CERTIFICATE-----
+MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK
+ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy
+MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU
+ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
+AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC
+l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J
+J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4
+fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0
+cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB
+Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw
+DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj
+jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1
+mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
+Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
+03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
+-----END CERTIFICATE-----
+
+TWCA Root Certification Authority
+=================================
+-----BEGIN CERTIFICATE-----
+MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
+VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
+EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
+IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
+AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
+QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
+oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
+4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
+y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
+BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
+9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
+mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
+QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
+T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
+Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
+-----END CERTIFICATE-----
+
+Security Communication RootCA2
+==============================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
+U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh
+dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC
+SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy
+aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++
++T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbWQonCv/Q4EpVMVAX3NuRFg3sUZdbcDE3R
+3n4MqzvEFb46VqZab3ZpUql6ucjrappdUtAtCms1FgkQhNBqyjoGADdH5H5XTz+L62e4iKrFvlNV
+spHEfbmwhRkGeC7bYRr6hfVKkaHnFtWOojnflLhwHyg/i/xAXmODPIMqGplrz95Zajv8bxbXH/1K
+EOtOghY6rCcMU/Gt1SSwawNQwS08Ft1ENCcadfsCAwEAAaNCMEAwHQYDVR0OBBYEFAqFqXdlBZh8
+QIH4D5csOPEK7DzPMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEB
+CwUAA4IBAQBMOqNErLlFsceTfsgLCkLfZOoc7llsCLqJX2rKSpWeeo8HxdpFcoJxDjrSzG+ntKEj
+u/Ykn8sX/oymzsLS28yN/HH8AynBbF0zX2S2ZTuJbxh2ePXcokgfGT+Ok+vx+hfuzU7jBBJV1uXk
+3fs+BXziHV7Gp7yXT2g69ekuCkO2r1dcYmh8t/2jioSgrGK+KwmHNPBqAbubKVY8/gA3zyNs8U6q
+tnRGEmyR7jTV7JqR50S+kDFy1UkC9gLl9B/rfNmWVan/7Ir5mUf/NVoCqgTLiluHcSmRvaS0eg29
+mvVXIwAHIRc/SjnRBUkLp7Y3gaVdjKozXoEofKd9J+sAro03
+-----END CERTIFICATE-----
+
+EC-ACC
+======
+-----BEGIN CERTIFICATE-----
+MIIFVjCCBD6gAwIBAgIQ7is969Qh3hSoYqwE893EATANBgkqhkiG9w0BAQUFADCB8zELMAkGA1UE
+BhMCRVMxOzA5BgNVBAoTMkFnZW5jaWEgQ2F0YWxhbmEgZGUgQ2VydGlmaWNhY2lvIChOSUYgUS0w
+ODAxMTc2LUkpMSgwJgYDVQQLEx9TZXJ2ZWlzIFB1YmxpY3MgZGUgQ2VydGlmaWNhY2lvMTUwMwYD
+VQQLEyxWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5ldC92ZXJhcnJlbCAoYykwMzE1MDMGA1UE
+CxMsSmVyYXJxdWlhIEVudGl0YXRzIGRlIENlcnRpZmljYWNpbyBDYXRhbGFuZXMxDzANBgNVBAMT
+BkVDLUFDQzAeFw0wMzAxMDcyMzAwMDBaFw0zMTAxMDcyMjU5NTlaMIHzMQswCQYDVQQGEwJFUzE7
+MDkGA1UEChMyQWdlbmNpYSBDYXRhbGFuYSBkZSBDZXJ0aWZpY2FjaW8gKE5JRiBRLTA4MDExNzYt
+SSkxKDAmBgNVBAsTH1NlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8xNTAzBgNVBAsTLFZl
+Z2V1IGh0dHBzOi8vd3d3LmNhdGNlcnQubmV0L3ZlcmFycmVsIChjKTAzMTUwMwYDVQQLEyxKZXJh
+cnF1aWEgRW50aXRhdHMgZGUgQ2VydGlmaWNhY2lvIENhdGFsYW5lczEPMA0GA1UEAxMGRUMtQUND
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsyLHT+KXQpWIR4NA9h0X84NzJB5R85iK
+w5K4/0CQBXCHYMkAqbWUZRkiFRfCQ2xmRJoNBD45b6VLeqpjt4pEndljkYRm4CgPukLjbo73FCeT
+ae6RDqNfDrHrZqJyTxIThmV6PttPB/SnCWDaOkKZx7J/sxaVHMf5NLWUhdWZXqBIoH7nF2W4onW4
+HvPlQn2v7fOKSGRdghST2MDk/7NQcvJ29rNdQlB50JQ+awwAvthrDk4q7D7SzIKiGGUzE3eeml0a
+E9jD2z3Il3rucO2n5nzbcc8tlGLfbdb1OL4/pYUKGbio2Al1QnDE6u/LDsg0qBIimAy4E5S2S+zw
+0JDnJwIDAQABo4HjMIHgMB0GA1UdEQQWMBSBEmVjX2FjY0BjYXRjZXJ0Lm5ldDAPBgNVHRMBAf8E
+BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUoMOLRKo3pUW/l4Ba0fF4opvpXY0wfwYD
+VR0gBHgwdjB0BgsrBgEEAfV4AQMBCjBlMCwGCCsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0
+Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l
+dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ
+lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa
+Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe
+l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2
+E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D
+5EI=
+-----END CERTIFICATE-----
+
+Hellenic Academic and Research Institutions RootCA 2011
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIIEMTCCAxmgAwIBAgIBADANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UEBhMCR1IxRDBCBgNVBAoT
+O0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9y
+aXR5MUAwPgYDVQQDEzdIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
+IFJvb3RDQSAyMDExMB4XDTExMTIwNjEzNDk1MloXDTMxMTIwMTEzNDk1MlowgZUxCzAJBgNVBAYT
+AkdSMUQwQgYDVQQKEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25z
+IENlcnQuIEF1dGhvcml0eTFAMD4GA1UEAxM3SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNo
+IEluc3RpdHV0aW9ucyBSb290Q0EgMjAxMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
+AKlTAOMupvaO+mDYLZU++CwqVE7NuYRhlFhPjz2L5EPzdYmNUeTDN9KKiE15HrcS3UN4SoqS5tdI
+1Q+kOilENbgH9mgdVc04UfCMJDGFr4PJfel3r+0ae50X+bOdOFAPplp5kYCvN66m0zH7tSYJnTxa
+71HFK9+WXesyHgLacEnsbgzImjeN9/E2YEsmLIKe0HjzDQ9jpFEw4fkrJxIH2Oq9GGKYsFk3fb7u
+8yBRQlqD75O6aRXxYp2fmTmCobd0LovUxQt7L/DICto9eQqakxylKHJzkUOap9FNhYS5qXSPFEDH
+3N6sQWRstBmbAmNtJGSPRLIl6s5ddAxjMlyNh+UCAwEAAaOBiTCBhjAPBgNVHRMBAf8EBTADAQH/
+MAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQUppFC/RNhSiOeCKQp5dgTBCPuQSUwRwYDVR0eBEAwPqA8
+MAWCAy5ncjAFggMuZXUwBoIELmVkdTAGggQub3JnMAWBAy5ncjAFgQMuZXUwBoEELmVkdTAGgQQu
+b3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAf73lB4XtuP7KMhjdCSk4cNx6NZrokgclPEg8hwAOXhiVt
+XdMiKahsog2p6z0GW5k6x8zDmjR/qw7IThzh+uTczQ2+vyT+bOdrwg3IBp5OjWEopmr95fZi6hg8
+TqBTnbI6nOulnJEWtk2C4AwFSKls9cz4y51JtPACpf1wA+2KIaWuE4ZJwzNzvoc7dIsXRSZMFpGD
+/md9zU1jZ/rzAxKWeAaNsWftjj++n08C9bMJL/NMh98qy5V8AcysNnq/onN694/BtZqhFLKPM58N
+7yLcZnuEvUUXBj08yrl3NI/K6s8/MT7jiOOASSXIl7WdmplNsDz4SgCbZN2fOUvRJ9e4
+-----END CERTIFICATE-----
+
+Actalis Authentication Root CA
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFuzCCA6OgAwIBAgIIVwoRl0LE48wwDQYJKoZIhvcNAQELBQAwazELMAkGA1UEBhMCSVQxDjAM
+BgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlzIFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UE
+AwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290IENBMB4XDTExMDkyMjExMjIwMloXDTMwMDky
+MjExMjIwMlowazELMAkGA1UEBhMCSVQxDjAMBgNVBAcMBU1pbGFuMSMwIQYDVQQKDBpBY3RhbGlz
+IFMucC5BLi8wMzM1ODUyMDk2NzEnMCUGA1UEAwweQWN0YWxpcyBBdXRoZW50aWNhdGlvbiBSb290
+IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAp8bEpSmkLO/lGMWwUKNvUTufClrJ
+wkg4CsIcoBh/kbWHuUA/3R1oHwiD1S0eiKD4j1aPbZkCkpAW1V8IbInX4ay8IMKx4INRimlNAJZa
+by/ARH6jDuSRzVju3PvHHkVH3Se5CAGfpiEd9UEtL0z9KK3giq0itFZljoZUj5NDKd45RnijMCO6
+zfB9E1fAXdKDa0hMxKufgFpbOr3JpyI/gCczWw63igxdBzcIy2zSekciRDXFzMwujt0q7bd9Zg1f
+YVEiVRvjRuPjPdA1YprbrxTIW6HMiRvhMCb8oJsfgadHHwTrozmSBp+Z07/T6k9QnBn+locePGX2
+oxgkg4YQ51Q+qDp2JE+BIcXjDwL4k5RHILv+1A7TaLndxHqEguNTVHnd25zS8gebLra8Pu2Fbe8l
+EfKXGkJh90qX6IuxEAf6ZYGyojnP9zz/GPvG8VqLWeICrHuS0E4UT1lF9gxeKF+w6D9Fz8+vm2/7
+hNN3WpVvrJSEnu68wEqPSpP4RCHiMUVhUE4Q2OM1fEwZtN4Fv6MGn8i1zeQf1xcGDXqVdFUNaBr8
+EBtiZJ1t4JWgw5QHVw0U5r0F+7if5t+L4sbnfpb2U8WANFAoWPASUHEXMLrmeGO89LKtmyuy/uE5
+jF66CyCU3nuDuP/jVo23Eek7jPKxwV2dpAtMK9myGPW1n0sCAwEAAaNjMGEwHQYDVR0OBBYEFFLY
+iDrIn3hm7YnzezhwlMkCAjbQMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUUtiIOsifeGbt
+ifN7OHCUyQICNtAwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBCwUAA4ICAQALe3KHwGCmSUyI
+WOYdiPcUZEim2FgKDk8TNd81HdTtBjHIgT5q1d07GjLukD0R0i70jsNjLiNmsGe+b7bAEzlgqqI0
+JZN1Ut6nna0Oh4lScWoWPBkdg/iaKWW+9D+a2fDzWochcYBNy+A4mz+7+uAwTc+G02UQGRjRlwKx
+K3JCaKygvU5a2hi/a5iB0P2avl4VSM0RFbnAKVy06Ij3Pjaut2L9HmLecHgQHEhb2rykOLpn7VU+
+Xlff1ANATIGk0k9jpwlCCRT8AKnCgHNPLsBA2RF7SOp6AsDT6ygBJlh0wcBzIm2Tlf05fbsq4/aC
+4yyXX04fkZT6/iyj2HYauE2yOE+b+h1IYHkm4vP9qdCa6HCPSXrW5b0KDtst842/6+OkfcvHlXHo
+2qN8xcL4dJIEG4aspCJTQLas/kx2z/uUMsA1n3Y/buWQbqCmJqK4LL7RK4X9p2jIugErsWx0Hbhz
+lefut8cl8ABMALJ+tguLHPPAUJ4lueAI3jZm/zel0btUZCzJJ7VLkn5l/9Mt4blOvH+kQSGQQXem
+OR/qnuOf0GZvBeyqdn6/axag67XH/JJULysRJyU3eExRarDzzFhdFPFqSBX/wge2sY0PjlxQRrM9
+vwGYT7JZVEc+NHt4bVaTLnPqZih4zR0Uv6CPLy64Lo7yFIrM6bV8+2ydDKXhlg==
+-----END CERTIFICATE-----
+
+Trustis FPS Root CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIDZzCCAk+gAwIBAgIQGx+ttiD5JNM2a/fH8YygWTANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQG
+EwJHQjEYMBYGA1UEChMPVHJ1c3RpcyBMaW1pdGVkMRwwGgYDVQQLExNUcnVzdGlzIEZQUyBSb290
+IENBMB4XDTAzMTIyMzEyMTQwNloXDTI0MDEyMTExMzY1NFowRTELMAkGA1UEBhMCR0IxGDAWBgNV
+BAoTD1RydXN0aXMgTGltaXRlZDEcMBoGA1UECxMTVHJ1c3RpcyBGUFMgUm9vdCBDQTCCASIwDQYJ
+KoZIhvcNAQEBBQADggEPADCCAQoCggEBAMVQe547NdDfxIzNjpvto8A2mfRC6qc+gIMPpqdZh8mQ
+RUN+AOqGeSoDvT03mYlmt+WKVoaTnGhLaASMk5MCPjDSNzoiYYkchU59j9WvezX2fihHiTHcDnlk
+H5nSW7r+f2C/revnPDgpai/lkQtV/+xvWNUtyd5MZnGPDNcE2gfmHhjjvSkCqPoc4Vu5g6hBSLwa
+cY3nYuUtsuvffM/bq1rKMfFMIvMFE/eC+XN5DL7XSxzA0RU8k0Fk0ea+IxciAIleH2ulrG6nS4zt
+o3Lmr2NNL4XSFDWaLk6M6jKYKIahkQlBOrTh4/L68MkKokHdqeMDx4gVOxzUGpTXn2RZEm0CAwEA
+AaNTMFEwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBS6+nEleYtXQSUhhgtx67JkDoshZzAd
+BgNVHQ4EFgQUuvpxJXmLV0ElIYYLceuyZA6LIWcwDQYJKoZIhvcNAQEFBQADggEBAH5Y//01GX2c
+GE+esCu8jowU/yyg2kdbw++BLa8F6nRIW/M+TgfHbcWzk88iNVy2P3UnXwmWzaD+vkAMXBJV+JOC
+yinpXj9WV4s4NvdFGkwozZ5BuO1WTISkQMi4sKUraXAEasP41BIy+Q7DsdwyhEQsb8tGD+pmQQ9P
+8Vilpg0ND2HepZ5dfWWhPBfnqFVO76DH7cZEf1T1o+CP8HxVIo8ptoGj4W1OLBuAZ+ytIJ8MYmHV
+l/9D7S3B2l0pKoU/rGXuhg8FjZBf3+6f9L/uHfuY5H+QK4R4EA5sSVPvFVtlRkpdr7r7OnIdzfYl
+iB6XzCGcKQENZetX2fNXlrtIzYE=
+-----END CERTIFICATE-----
+
+Buypass Class 2 Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
+QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMiBSb290IENBMB4X
+DTEwMTAyNjA4MzgwM1oXDTQwMTAyNjA4MzgwM1owTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
+eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDIgUm9vdCBDQTCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANfHXvfBB9R3+0Mh9PT1aeTuMgHbo4Yf5FkNuud1
+g1Lr6hxhFUi7HQfKjK6w3Jad6sNgkoaCKHOcVgb/S2TwDCo3SbXlzwx87vFKu3MwZfPVL4O2fuPn
+9Z6rYPnT8Z2SdIrkHJasW4DptfQxh6NR/Md+oW+OU3fUl8FVM5I+GC911K2GScuVr1QGbNgGE41b
+/+EmGVnAJLqBcXmQRFBoJJRfuLMR8SlBYaNByyM21cHxMlAQTn/0hpPshNOOvEu/XAFOBz3cFIqU
+CqTqc/sLUegTBxj6DvEr0VQVfTzh97QZQmdiXnfgolXsttlpF9U6r0TtSsWe5HonfOV116rLJeff
+awrbD02TTqigzXsu8lkBarcNuAeBfos4GzjmCleZPe4h6KP1DBbdi+w0jpwqHAAVF41og9JwnxgI
+zRFo1clrUs3ERo/ctfPYV3Me6ZQ5BL/T3jjetFPsaRyifsSP5BtwrfKi+fv3FmRmaZ9JUaLiFRhn
+Bkp/1Wy1TbMz4GHrXb7pmA8y1x1LPC5aAVKRCfLf6o3YBkBjqhHk/sM3nhRSP/TizPJhk9H9Z2vX
+Uq6/aKtAQ6BXNVN48FP4YUIHZMbXb5tMOA1jrGKvNouicwoN9SG9dKpN6nIDSdvHXx1iY8f93ZHs
+M+71bbRuMGjeyNYmsHVee7QHIJihdjK4TWxPAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFMmAd+BikoL1RpzzuvdMw964o605MA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
+AAOCAgEAU18h9bqwOlI5LJKwbADJ784g7wbylp7ppHR/ehb8t/W2+xUbP6umwHJdELFx7rxP462s
+A20ucS6vxOOto70MEae0/0qyexAQH6dXQbLArvQsWdZHEIjzIVEpMMpghq9Gqx3tOluwlN5E40EI
+osHsHdb9T7bWR9AUC8rmyrV7d35BH16Dx7aMOZawP5aBQW9gkOLo+fsicdl9sz1Gv7SEr5AcD48S
+aq/v7h56rgJKihcrdv6sVIkkLE8/trKnToyokZf7KcZ7XC25y2a2t6hbElGFtQl+Ynhw/qlqYLYd
+DnkM/crqJIByw5c/8nerQyIKx+u2DISCLIBrQYoIwOula9+ZEsuK1V6ADJHgJgg2SMX6OBE1/yWD
+LfJ6v9r9jv6ly0UsH8SIU653DtmadsWOLB2jutXsMq7Aqqz30XpN69QH4kj3Io6wpJ9qzo6ysmD0
+oyLQI+uUWnpp3Q+/QFesa1lQ2aOZ4W7+jQF5JyMV3pKdewlNWudLSDBaGOYKbeaP4NK75t98biGC
+wWg5TbSYWGZizEqQXsP6JwSxeRV0mcy+rSDeJmAc61ZRpqPq5KM/p/9h3PFaTWwyI0PurKju7koS
+CTxdccK+efrCh2gdC/1cacwG0Jp9VJkqyTkaGa9LKkPzY11aWOIv4x3kqdbQCtCev9eBCfHJxyYN
+rJgWVqA=
+-----END CERTIFICATE-----
+
+Buypass Class 3 Root CA
+=======================
+-----BEGIN CERTIFICATE-----
+MIIFWTCCA0GgAwIBAgIBAjANBgkqhkiG9w0BAQsFADBOMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU
+QnV5cGFzcyBBUy05ODMxNjMzMjcxIDAeBgNVBAMMF0J1eXBhc3MgQ2xhc3MgMyBSb290IENBMB4X
+DTEwMTAyNjA4Mjg1OFoXDTQwMTAyNjA4Mjg1OFowTjELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1
+eXBhc3MgQVMtOTgzMTYzMzI3MSAwHgYDVQQDDBdCdXlwYXNzIENsYXNzIDMgUm9vdCBDQTCCAiIw
+DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKXaCpUWUOOV8l6ddjEGMnqb8RB2uACatVI2zSRH
+sJ8YZLya9vrVediQYkwiL944PdbgqOkcLNt4EemOaFEVcsfzM4fkoF0LXOBXByow9c3EN3coTRiR
+5r/VUv1xLXA+58bEiuPwKAv0dpihi4dVsjoT/Lc+JzeOIuOoTyrvYLs9tznDDgFHmV0ST9tD+leh
+7fmdvhFHJlsTmKtdFoqwNxxXnUX/iJY2v7vKB3tvh2PX0DJq1l1sDPGzbjniazEuOQAnFN44wOwZ
+ZoYS6J1yFhNkUsepNxz9gjDthBgd9K5c/3ATAOux9TN6S9ZV+AWNS2mw9bMoNlwUxFFzTWsL8TQH
+2xc519woe2v1n/MuwU8XKhDzzMro6/1rqy6any2CbgTUUgGTLT2G/H783+9CHaZr77kgxve9oKeV
+/afmiSTYzIw0bOIjL9kSGiG5VZFvC5F5GQytQIgLcOJ60g7YaEi7ghM5EFjp2CoHxhLbWNvSO1UQ
+RwUVZ2J+GGOmRj8JDlQyXr8NYnon74Do29lLBlo3WiXQCBJ31G8JUJc9yB3D34xFMFbG02SrZvPA
+Xpacw8Tvw3xrizp5f7NJzz3iiZ+gMEuFuZyUJHmPfWupRWgPK9Dx2hzLabjKSWJtyNBjYt1gD1iq
+j6G8BaVmos8bdrKEZLFMOVLAMLrwjEsCsLa3AgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wHQYD
+VR0OBBYEFEe4zf/lb+74suwvTg75JbCOPGvDMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQsF
+AAOCAgEAACAjQTUEkMJAYmDv4jVM1z+s4jSQuKFvdvoWFqRINyzpkMLyPPgKn9iB5btb2iUspKdV
+cSQy9sgL8rxq+JOssgfCX5/bzMiKqr5qb+FJEMwx14C7u8jYog5kV+qi9cKpMRXSIGrs/CIBKM+G
+uIAeqcwRpTzyFrNHnfzSgCHEy9BHcEGhyoMZCCxt8l13nIoUE9Q2HJLw5QY33KbmkJs4j1xrG0aG
+Q0JfPgEHU1RdZX33inOhmlRaHylDFCfChQ+1iHsaO5S3HWCntZznKWlXWpuTekMwGwPXYshApqr8
+ZORK15FTAaggiG6cX0S5y2CBNOxv033aSF/rtJC8LakcC6wc1aJoIIAE1vyxjy+7SjENSoYc6+I2
+KSb12tjE8nVhz36udmNKekBlk4f4HoCMhuWG1o8O/FMsYOgWYRqiPkN7zTlgVGr18okmAWiDSKIz
+6MkEkbIRNBE+6tBDGR8Dk5AM/1E9V/RBbuHLoL7ryWPNbczk+DaqaJ3tvV2XcEQNtg413OEMXbug
+UZTLfhbrES+jkkXITHHZvMmZUldGL1DPvTVp9D0VzgalLA8+9oG6lLvDu79leNKGef9JOxqDDPDe
+eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi
+Cp/HuZc=
+-----END CERTIFICATE-----
+
+T-TeleSec GlobalRoot Class 3
+============================
+-----BEGIN CERTIFICATE-----
+MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
+IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
+cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwHhcNMDgx
+MDAxMTAyOTU2WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
+dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
+ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDMwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQC9dZPwYiJvJK7genasfb3ZJNW4t/zN8ELg63iIVl6bmlQdTQyK
+9tPPcPRStdiTBONGhnFBSivwKixVA9ZIw+A5OO3yXDw/RLyTPWGrTs0NvvAgJ1gORH8EGoel15YU
+NpDQSXuhdfsaa3Ox+M6pCSzyU9XDFES4hqX2iys52qMzVNn6chr3IhUciJFrf2blw2qAsCTz34ZF
+iP0Zf3WHHx+xGwpzJFu5ZeAsVMhg02YXP+HMVDNzkQI6pn97djmiH5a2OK61yJN0HZ65tOVgnS9W
+0eDrXltMEnAMbEQgqxHY9Bn20pxSN+f6tsIxO0rUFJmtxxr1XV/6B7h8DR/Wgx6zAgMBAAGjQjBA
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS1A/d2O2GCahKqGFPr
+AyGUv/7OyjANBgkqhkiG9w0BAQsFAAOCAQEAVj3vlNW92nOyWL6ukK2YJ5f+AbGwUgC4TeQbIXQb
+fsDuXmkqJa9c1h3a0nnJ85cp4IaH3gRZD/FZ1GSFS5mvJQQeyUapl96Cshtwn5z2r3Ex3XsFpSzT
+ucpH9sry9uetuUg/vBa3wW306gmv7PO15wWeph6KU1HWk4HMdJP2udqmJQV0eVp+QD6CSyYRMG7h
+P0HHRwA11fXT91Q+gT3aSWqas+8QPebrb9HIIkfLzM8BMZLZGOMivgkeGj5asuRrDFR6fUNOuIml
+e9eiPZaGzPImNC1qkp2aGtAw4l1OBLBfiyB+d8E9lYLRRpo7PHi4b6HQDWSieB4pTpPDpFQUWw==
+-----END CERTIFICATE-----
+
+EE Certification Centre Root CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIIEAzCCAuugAwIBAgIQVID5oHPtPwBMyonY43HmSjANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
+EwJFRTEiMCAGA1UECgwZQVMgU2VydGlmaXRzZWVyaW1pc2tlc2t1czEoMCYGA1UEAwwfRUUgQ2Vy
+dGlmaWNhdGlvbiBDZW50cmUgUm9vdCBDQTEYMBYGCSqGSIb3DQEJARYJcGtpQHNrLmVlMCIYDzIw
+MTAxMDMwMTAxMDMwWhgPMjAzMDEyMTcyMzU5NTlaMHUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKDBlB
+UyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMSgwJgYDVQQDDB9FRSBDZXJ0aWZpY2F0aW9uIENlbnRy
+ZSBSb290IENBMRgwFgYJKoZIhvcNAQkBFglwa2lAc2suZWUwggEiMA0GCSqGSIb3DQEBAQUAA4IB
+DwAwggEKAoIBAQDIIMDs4MVLqwd4lfNE7vsLDP90jmG7sWLqI9iroWUyeuuOF0+W2Ap7kaJjbMeM
+TC55v6kF/GlclY1i+blw7cNRfdCT5mzrMEvhvH2/UpvObntl8jixwKIy72KyaOBhU8E2lf/slLo2
+rpwcpzIP5Xy0xm90/XsY6KxX7QYgSzIwWFv9zajmofxwvI6Sc9uXp3whrj3B9UiHbCe9nyV0gVWw
+93X2PaRka9ZP585ArQ/dMtO8ihJTmMmJ+xAdTX7Nfh9WDSFwhfYggx/2uh8Ej+p3iDXE/+pOoYtN
+P2MbRMNE1CV2yreN1x5KZmTNXMWcg+HCCIia7E6j8T4cLNlsHaFLAgMBAAGjgYowgYcwDwYDVR0T
+AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBLyWj7qVhy/zQas8fElyalL1BSZ
+MEUGA1UdJQQ+MDwGCCsGAQUFBwMCBggrBgEFBQcDAQYIKwYBBQUHAwMGCCsGAQUFBwMEBggrBgEF
+BQcDCAYIKwYBBQUHAwkwDQYJKoZIhvcNAQEFBQADggEBAHv25MANqhlHt01Xo/6tu7Fq1Q+e2+Rj
+xY6hUFaTlrg4wCQiZrxTFGGVv9DHKpY5P30osxBAIWrEr7BSdxjhlthWXePdNl4dp1BUoMUq5KqM
+lIpPnTX/dqQGE5Gion0ARD9V04I8GtVbvFZMIi5GQ4okQC3zErg7cBqklrkar4dBGmoYDQZPxz5u
+uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU
+3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM
+dcGWxZ0=
+-----END CERTIFICATE-----
+
+D-TRUST Root Class 3 CA 2 2009
+==============================
+-----BEGIN CERTIFICATE-----
+MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe
+Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE
+LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw
+DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD
+ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA
+BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv
+KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z
+p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC
+AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ
+4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y
+eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw
+MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G
+PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw
+OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm
+2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0
+o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV
+dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph
+X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I=
+-----END CERTIFICATE-----
+
+D-TRUST Root Class 3 CA 2 EV 2009
+=================================
+-----BEGIN CERTIFICATE-----
+MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
+OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK
+DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw
+OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS
+egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh
+zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T
+7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60
+sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35
+11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv
+cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v
+ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El
+MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp
+b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh
+c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+
+PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05
+nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX
+ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA
+NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv
+w9y4AyHqnxbxLFS1
+-----END CERTIFICATE-----
+
+CA Disig Root R2
+================
+-----BEGIN CERTIFICATE-----
+MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw
+EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp
+ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx
+EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp
+c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC
+w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia
+xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7
+A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S
+GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV
+g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa
+5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE
+koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A
+Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i
+Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV
+HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u
+Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM
+tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV
+sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je
+dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8
+1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx
+mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01
+utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0
+sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg
+UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV
+7+ZtsH8tZ/3zbBt1RqPlShfppNcL
+-----END CERTIFICATE-----
+
+ACCVRAIZ1
+=========
+-----BEGIN CERTIFICATE-----
+MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB
+SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1
+MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH
+UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC
+DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM
+jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0
+RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD
+aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ
+0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG
+WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7
+8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR
+5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J
+9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK
+Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw
+Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu
+Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2
+VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM
+Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA
+QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh
+AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA
+YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj
+AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA
+IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk
+aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0
+dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2
+MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI
+hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E
+R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN
+YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49
+nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ
+TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3
+sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h
+I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg
+Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd
+3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p
+EfbRD0tVNEYqi4Y7
+-----END CERTIFICATE-----
+
+TWCA Global Root CA
+===================
+-----BEGIN CERTIFICATE-----
+MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT
+CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD
+QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK
+EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg
+Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C
+nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV
+r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR
+Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV
+tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W
+KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99
+sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p
+yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn
+kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI
+zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC
+AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g
+cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn
+LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M
+8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg
+/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg
+lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP
+A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m
+i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8
+EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3
+zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0=
+-----END CERTIFICATE-----
+
+TeliaSonera Root CA v1
+======================
+-----BEGIN CERTIFICATE-----
+MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE
+CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4
+MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW
+VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+
+6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA
+3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k
+B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn
+Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH
+oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3
+F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ
+oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7
+gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc
+TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB
+AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW
+DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm
+zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx
+0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW
+pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV
+G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc
+c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT
+JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2
+qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6
+Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems
+WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY=
+-----END CERTIFICATE-----
+
+E-Tugra Certification Authority
+===============================
+-----BEGIN CERTIFICATE-----
+MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w
+DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls
+ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN
+ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw
+NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx
+QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl
+cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD
+DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
+MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd
+hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K
+CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g
+ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ
+BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0
+E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz
+rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq
+jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn
+rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5
+dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB
+/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG
+MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK
+kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO
+XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807
+VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo
+a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc
+dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV
+KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT
+Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0
+8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G
+C7TbO6Orb1wdtn7os4I07QZcJA==
+-----END CERTIFICATE-----
+
+T-TeleSec GlobalRoot Class 2
+============================
+-----BEGIN CERTIFICATE-----
+MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM
+IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU
+cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx
+MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz
+dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD
+ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3
+DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ
+SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F
+vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970
+2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV
+WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy
+YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4
+r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf
+vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR
+3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN
+9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg==
+-----END CERTIFICATE-----
+
+Atos TrustedRoot 2011
+=====================
+-----BEGIN CERTIFICATE-----
+MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU
+cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4
+MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG
+A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV
+hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr
+54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+
+DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320
+HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR
+z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R
+l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ
+bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB
+CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h
+k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh
+TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9
+61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G
+3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 1 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE
+PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm
+PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6
+Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN
+ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l
+g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV
+7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX
+9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f
+iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg
+t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI
+hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC
+MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3
+GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct
+Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP
++V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh
+3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa
+wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6
+O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0
+FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV
+hMJKzRwuJIczYOXD
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 2 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh
+ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY
+NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t
+oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o
+MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l
+V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo
+L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ
+sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD
+6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh
+lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI
+hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66
+AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K
+pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9
+x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz
+dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X
+U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw
+mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD
+zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN
+JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr
+O3jtZsSOeWmD3n+M
+-----END CERTIFICATE-----
+
+QuoVadis Root CA 3 G3
+=====================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG
+A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv
+b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN
+MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg
+RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286
+IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL
+Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe
+6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3
+I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U
+VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7
+5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi
+Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM
+dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt
+rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI
+hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px
+KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS
+t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ
+TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du
+DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib
+Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD
+hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX
+0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW
+dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2
+PpxxVJkES/1Y+Zj0
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root G2
+===========================
+-----BEGIN CERTIFICATE-----
+MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw
+IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw
+MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL
+ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw
+ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH
+35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq
+bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw
+VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP
+YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn
+lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO
+w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv
+0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz
+d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW
+hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M
+jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo
+IhNzbM8m9Yop5w==
+-----END CERTIFICATE-----
+
+DigiCert Assured ID Root G3
+===========================
+-----BEGIN CERTIFICATE-----
+MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV
+UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD
+VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
+MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ
+BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb
+RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs
+KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF
+UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy
+YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy
+1vUhZscv6pZjamVFkpUBtA==
+-----END CERTIFICATE-----
+
+DigiCert Global Root G2
+=======================
+-----BEGIN CERTIFICATE-----
+MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw
+HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx
+MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
+dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq
+hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ
+kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO
+3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV
+BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM
+UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB
+o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu
+5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr
+F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U
+WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH
+QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/
+iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl
+MrY=
+-----END CERTIFICATE-----
+
+DigiCert Global Root G3
+=======================
+-----BEGIN CERTIFICATE-----
+MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV
+UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD
+VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw
+MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k
+aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C
+AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O
+YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP
+BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp
+Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y
+3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34
+VOKa5Vt8sycX
+-----END CERTIFICATE-----
+
+DigiCert Trusted Root G4
+========================
+-----BEGIN CERTIFICATE-----
+MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG
+EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw
+HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1
+MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
+d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp
+pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o
+k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa
+vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY
+QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6
+MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm
+mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7
+f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH
+dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8
+oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
+DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD
+ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY
+ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr
+yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy
+7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah
+ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN
+5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb
+/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa
+5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK
+G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP
+82Z+
+-----END CERTIFICATE-----
+
+COMODO RSA Certification Authority
+==================================
+-----BEGIN CERTIFICATE-----
+MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC
+R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
+ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB
+dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn
+dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ
+FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+
+5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG
+x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX
+2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL
+OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3
+sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C
+GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5
+WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E
+FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
+DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt
+rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+
+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg
+tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW
+sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp
+pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA
+zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq
+ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52
+7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I
+LaZRfyHBNVOFBkpdn627G190
+-----END CERTIFICATE-----
+
+USERTrust RSA Certification Authority
+=====================================
+-----BEGIN CERTIFICATE-----
+MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE
+BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
+ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE
+BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK
+ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh
+dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz
+0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j
+Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn
+RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O
++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq
+/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE
+Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM
+lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8
+yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+
+eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
+BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF
+MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW
+FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ
+7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ
+Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM
+8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi
+FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi
+yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c
+J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw
+sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx
+Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9
+-----END CERTIFICATE-----
+
+USERTrust ECC Certification Authority
+=====================================
+-----BEGIN CERTIFICATE-----
+MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
+aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC
+VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
+aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv
+biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2
+0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez
+nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV
+HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB
+HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu
+9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg=
+-----END CERTIFICATE-----
+
+GlobalSign ECC Root CA - R4
+===========================
+-----BEGIN CERTIFICATE-----
+MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl
+OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P
+AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV
+MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF
+JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q=
+-----END CERTIFICATE-----
+
+GlobalSign ECC Root CA - R5
+===========================
+-----BEGIN CERTIFICATE-----
+MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb
+R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD
+EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6
+SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS
+h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd
+BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx
+uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7
+yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3
+-----END CERTIFICATE-----
+
+Staat der Nederlanden Root CA - G3
+==================================
+-----BEGIN CERTIFICATE-----
+MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC
+TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l
+ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y
+olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t
+x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy
+EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K
+Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur
+mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5
+1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp
+07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo
+FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE
+41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB
+AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu
+yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD
+U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq
+KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1
+v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA
+8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b
+8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r
+mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq
+1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI
+JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV
+tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk=
+-----END CERTIFICATE-----
+
+Staat der Nederlanden EV Root CA
+================================
+-----BEGIN CERTIFICATE-----
+MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE
+CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
+RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M
+MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl
+cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk
+SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW
+O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r
+0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8
+Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV
+XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr
+08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV
+0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd
+74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx
+fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC
+MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa
+ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI
+eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu
+c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq
+5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN
+b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN
+f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi
+5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4
+WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK
+DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy
+eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg==
+-----END CERTIFICATE-----
+
+IdenTrust Commercial Root CA 1
+==============================
+-----BEGIN CERTIFICATE-----
+MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG
+EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS
+b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES
+MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB
+IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld
+hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/
+mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi
+1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C
+XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl
+3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy
+NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV
+WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg
+xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix
+uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC
+AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI
+hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH
+6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg
+ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt
+ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV
+YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX
+feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro
+kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe
+2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz
+Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R
+cGzM7vRX+Bi6hG6H
+-----END CERTIFICATE-----
+
+IdenTrust Public Sector Root CA 1
+=================================
+-----BEGIN CERTIFICATE-----
+MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG
+EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv
+ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV
+UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS
+b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy
+P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6
+Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI
+rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf
+qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS
+mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn
+ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh
+LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v
+iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL
+4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B
+Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw
+DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj
+t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A
+mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt
+GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt
+m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx
+NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4
+Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI
+ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC
+ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ
+3Wl9af0AVqW3rLatt8o+Ae+c
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority - G2
+=========================================
+-----BEGIN CERTIFICATE-----
+MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV
+BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy
+bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug
+b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw
+HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT
+DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx
+OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s
+eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi
+MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP
+/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz
+HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU
+s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y
+TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx
+AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6
+0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z
+iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ
+Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi
+nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+
+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO
+e4pIb4tF9g==
+-----END CERTIFICATE-----
+
+Entrust Root Certification Authority - EC1
+==========================================
+-----BEGIN CERTIFICATE-----
+MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx
+FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn
+YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl
+ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5
+IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw
+FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs
+LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg
+dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt
+IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy
+AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef
+9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
+FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h
+vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8
+kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G
+-----END CERTIFICATE-----
+
+CFCA EV ROOT
+============
+-----BEGIN CERTIFICATE-----
+MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE
+CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB
+IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw
+MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD
+DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV
+BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD
+7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN
+uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW
+ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7
+xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f
+py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K
+gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol
+hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ
+tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf
+BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB
+/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB
+ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q
+ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua
+4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG
+E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX
+BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn
+aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy
+PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX
+kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C
+ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su
+-----END CERTIFICATE-----
+
+TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5
+====================================================
+-----BEGIN CERTIFICATE-----
+MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN
+BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp
+bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg
+RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw
+ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w
+SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE
+n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp
+ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
+CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537
+jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m
+ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP
+9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV
+4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH
+HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI
+hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo
+BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq
+URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl
+lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8
+B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU=
+-----END CERTIFICATE-----
+
+Certinomis - Root CA
+====================
+-----BEGIN CERTIFICATE-----
+MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
+Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAbBgNVBAMTFENlcnRpbm9taXMg
+LSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMzMTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIx
+EzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRD
+ZXJ0aW5vbWlzIC0gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQos
+P5L2fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJflLieY6pOo
+d5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQVWZUKxkd8aRi5pwP5ynap
+z8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDFTKWrteoB4owuZH9kb/2jJZOLyKIOSY00
+8B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09x
+RLWtwHkziOC/7aOgFLScCbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE
+6OXWk6RiwsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJwx3t
+FvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SGm/lg0h9tkQPTYKbV
+PZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4F2iw4lNVYC2vPsKD2NkJK/DAZNuH
+i5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZngWVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGj
+YzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I
+6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF
+AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV
+WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw
+Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX
+lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ
+y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9
+Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng
+DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi
+I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM
+cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr
+hkIGuUE=
+-----END CERTIFICATE-----
+
+OISTE WISeKey Global Root GB CA
+===============================
+-----BEGIN CERTIFICATE-----
+MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG
+EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl
+ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw
+MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD
+VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds
+b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX
+scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP
+rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk
+9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o
+Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg
+GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI
+hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD
+dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0
+VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui
+HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic
+Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM=
+-----END CERTIFICATE-----
+
+SZAFIR ROOT CA2
+===============
+-----BEGIN CERTIFICATE-----
+MIIDcjCCAlqgAwIBAgIUPopdB+xV0jLVt+O2XwHrLdzk1uQwDQYJKoZIhvcNAQELBQAwUTELMAkG
+A1UEBhMCUEwxKDAmBgNVBAoMH0tyYWpvd2EgSXpiYSBSb3psaWN6ZW5pb3dhIFMuQS4xGDAWBgNV
+BAMMD1NaQUZJUiBST09UIENBMjAeFw0xNTEwMTkwNzQzMzBaFw0zNTEwMTkwNzQzMzBaMFExCzAJ
+BgNVBAYTAlBMMSgwJgYDVQQKDB9LcmFqb3dhIEl6YmEgUm96bGljemVuaW93YSBTLkEuMRgwFgYD
+VQQDDA9TWkFGSVIgUk9PVCBDQTIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC3vD5Q
+qEvNQLXOYeeWyrSh2gwisPq1e3YAd4wLz32ohswmUeQgPYUM1ljj5/QqGJ3a0a4m7utT3PSQ1hNK
+DJA8w/Ta0o4NkjrcsbH/ON7Dui1fgLkCvUqdGw+0w8LBZwPd3BucPbOw3gAeqDRHu5rr/gsUvTaE
+2g0gv/pby6kWIK05YO4vdbbnl5z5Pv1+TW9NL++IDWr63fE9biCloBK0TXC5ztdyO4mTp4CEHCdJ
+ckm1/zuVnsHMyAHs6A6KCpbns6aH5db5BSsNl0BwPLqsdVqc1U2dAgrSS5tmS0YHF2Wtn2yIANwi
+ieDhZNRnvDF5YTy7ykHNXGoAyDw4jlivAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0P
+AQH/BAQDAgEGMB0GA1UdDgQWBBQuFqlKGLXLzPVvUPMjX/hd56zwyDANBgkqhkiG9w0BAQsFAAOC
+AQEAtXP4A9xZWx126aMqe5Aosk3AM0+qmrHUuOQn/6mWmc5G4G18TKI4pAZw8PRBEew/R40/cof5
+O/2kbytTAOD/OblqBw7rHRz2onKQy4I9EYKL0rufKq8h5mOGnXkZ7/e7DDWQw4rtTw/1zBLZpD67
+oPwglV9PJi8RI4NOdQcPv5vRtB3pEAT+ymCPoky4rc/hkA/NrgrHXXu3UNLUYfrVFdvXn4dRVOul
+4+vJhaAlIDf7js4MNIThPIGyd05DpYhfhmehPea0XGG2Ptv+tyjFogeutcrKjSoS75ftwjCkySp6
++/NNIxuZMzSgLvWpCz/UXeHPhJ/iGcJfitYgHuNztw==
+-----END CERTIFICATE-----
+
+Certum Trusted Network CA 2
+===========================
+-----BEGIN CERTIFICATE-----
+MIIF0jCCA7qgAwIBAgIQIdbQSk8lD8kyN/yqXhKN6TANBgkqhkiG9w0BAQ0FADCBgDELMAkGA1UE
+BhMCUEwxIjAgBgNVBAoTGVVuaXpldG8gVGVjaG5vbG9naWVzIFMuQS4xJzAlBgNVBAsTHkNlcnR1
+bSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEkMCIGA1UEAxMbQ2VydHVtIFRydXN0ZWQgTmV0d29y
+ayBDQSAyMCIYDzIwMTExMDA2MDgzOTU2WhgPMjA0NjEwMDYwODM5NTZaMIGAMQswCQYDVQQGEwJQ
+TDEiMCAGA1UEChMZVW5pemV0byBUZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENl
+cnRpZmljYXRpb24gQXV0aG9yaXR5MSQwIgYDVQQDExtDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENB
+IDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC9+Xj45tWADGSdhhuWZGc/IjoedQF9
+7/tcZ4zJzFxrqZHmuULlIEub2pt7uZld2ZuAS9eEQCsn0+i6MLs+CRqnSZXvK0AkwpfHp+6bJe+o
+CgCXhVqqndwpyeI1B+twTUrWwbNWuKFBOJvR+zF/j+Bf4bE/D44WSWDXBo0Y+aomEKsq09DRZ40b
+Rr5HMNUuctHFY9rnY3lEfktjJImGLjQ/KUxSiyqnwOKRKIm5wFv5HdnnJ63/mgKXwcZQkpsCLL2p
+uTRZCr+ESv/f/rOf69me4Jgj7KZrdxYq28ytOxykh9xGc14ZYmhFV+SQgkK7QtbwYeDBoz1mo130
+GO6IyY0XRSmZMnUCMe4pJshrAua1YkV/NxVaI2iJ1D7eTiew8EAMvE0Xy02isx7QBlrd9pPPV3WZ
+9fqGGmd4s7+W/jTcvedSVuWz5XV710GRBdxdaeOVDUO5/IOWOZV7bIBaTxNyxtd9KXpEulKkKtVB
+Rgkg/iKgtlswjbyJDNXXcPiHUv3a76xRLgezTv7QCdpw75j6VuZt27VXS9zlLCUVyJ4ueE742pye
+hizKV/Ma5ciSixqClnrDvFASadgOWkaLOusm+iPJtrCBvkIApPjW/jAux9JG9uWOdf3yzLnQh1vM
+BhBgu4M1t15n3kfsmUjxpKEV/q2MYo45VU85FrmxY53/twIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MB0GA1UdDgQWBBS2oVQ5AsOgP46KvPrU+Bym0ToO/TAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI
+hvcNAQENBQADggIBAHGlDs7k6b8/ONWJWsQCYftMxRQXLYtPU2sQF/xlhMcQSZDe28cmk4gmb3DW
+Al45oPePq5a1pRNcgRRtDoGCERuKTsZPpd1iHkTfCVn0W3cLN+mLIMb4Ck4uWBzrM9DPhmDJ2vuA
+L55MYIR4PSFk1vtBHxgP58l1cb29XN40hz5BsA72udY/CROWFC/emh1auVbONTqwX3BNXuMp8SMo
+clm2q8KMZiYcdywmdjWLKKdpoPk79SPdhRB0yZADVpHnr7pH1BKXESLjokmUbOe3lEu6LaTaM4tM
+pkT/WjzGHWTYtTHkpjx6qFcL2+1hGsvxznN3Y6SHb0xRONbkX8eftoEq5IVIeVheO/jbAoJnwTnb
+w3RLPTYe+SmTiGhbqEQZIfCn6IENLOiTNrQ3ssqwGyZ6miUfmpqAnksqP/ujmv5zMnHCnsZy4Ypo
+J/HkD7TETKVhk/iXEAcqMCWpuchxuO9ozC1+9eB+D4Kob7a6bINDd82Kkhehnlt4Fj1F4jNy3eFm
+ypnTycUm/Q1oBEauttmbjL4ZvrHG8hnjXALKLNhvSgfZyTXaQHXyxKcZb55CEJh15pWLYLztxRLX
+is7VmFxWlgPF7ncGNf/P5O4/E2Hu29othfDNrp2yGAlFw5Khchf8R7agCyzxxN5DaAhqXzvwdmP7
+zAYspsbiDrW5viSP
+-----END CERTIFICATE-----
+
+Hellenic Academic and Research Institutions RootCA 2015
+=======================================================
+-----BEGIN CERTIFICATE-----
+MIIGCzCCA/OgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcT
+BkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0
+aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNVBAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNl
+YXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIwMTUwHhcNMTUwNzA3MTAxMTIxWhcNNDAwNjMwMTAx
+MTIxWjCBpjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0aGVuczFEMEIGA1UEChM7SGVsbGVuaWMg
+QWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDZXJ0LiBBdXRob3JpdHkxQDA+BgNV
+BAMTN0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgUm9vdENBIDIw
+MTUwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDC+Kk/G4n8PDwEXT2QNrCROnk8Zlrv
+bTkBSRq0t89/TSNTt5AA4xMqKKYx8ZEA4yjsriFBzh/a/X0SWwGDD7mwX5nh8hKDgE0GPt+sr+eh
+iGsxr/CL0BgzuNtFajT0AoAkKAoCFZVedioNmToUW/bLy1O8E00BiDeUJRtCvCLYjqOWXjrZMts+
+6PAQZe104S+nfK8nNLspfZu2zwnI5dMK/IhlZXQK3HMcXM1AsRzUtoSMTFDPaI6oWa7CJ06CojXd
+FPQf/7J31Ycvqm59JCfnxssm5uX+Zwdj2EUN3TpZZTlYepKZcj2chF6IIbjV9Cz82XBST3i4vTwr
+i5WY9bPRaM8gFH5MXF/ni+X1NYEZN9cRCLdmvtNKzoNXADrDgfgXy5I2XdGj2HUb4Ysn6npIQf1F
+GQatJ5lOwXBH3bWfgVMS5bGMSF0xQxfjjMZ6Y5ZLKTBOhE5iGV48zpeQpX8B653g+IuJ3SWYPZK2
+fu/Z8VFRfS0myGlZYeCsargqNhEEelC9MoS+L9xy1dcdFkfkR2YgP/SWxa+OAXqlD3pk9Q0Yh9mu
+iNX6hME6wGkoLfINaFGq46V3xqSQDqE3izEjR8EJCOtu93ib14L8hCCZSRm2Ekax+0VVFqmjZayc
+Bw/qa9wfLgZy7IaIEuQt218FL+TwA9MmM+eAws1CoRc0CwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD
+AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUcRVnyMjJvXVdctA4GGqd83EkVAswDQYJKoZI
+hvcNAQELBQADggIBAHW7bVRLqhBYRjTyYtcWNl0IXtVsyIe9tC5G8jH4fOpCtZMWVdyhDBKg2mF+
+D1hYc2Ryx+hFjtyp8iY/xnmMsVMIM4GwVhO+5lFc2JsKT0ucVlMC6U/2DWDqTUJV6HwbISHTGzrM
+d/K4kPFox/la/vot9L/J9UUbzjgQKjeKeaO04wlshYaT/4mWJ3iBj2fjRnRUjtkNaeJK9E10A/+y
+d+2VZ5fkscWrv2oj6NSU4kQoYsRL4vDY4ilrGnB+JGGTe08DMiUNRSQrlrRGar9KC/eaj8GsGsVn
+82800vpzY4zvFrCopEYq+OsS7HK07/grfoxSwIuEVPkvPuNVqNxmsdnhX9izjFk0WaSrT2y7Hxjb
+davYy5LNlDhhDgcGH0tGEPEVvo2FXDtKK4F5D7Rpn0lQl033DlZdwJVqwjbDG2jJ9SrcR5q+ss7F
+Jej6A7na+RZukYT1HCjI/CbM1xyQVqdfbzoEvM14iQuODy+jqk+iGxI9FghAD/FGTNeqewjBCvVt
+J94Cj8rDtSvK6evIIVM4pcw72Hc3MKJP2W/R8kCtQXoXxdZKNYm3QdV8hn9VTYNKpXMgwDqvkPGa
+JI7ZjnHKe7iG2rKPmT4dEw0SEe7Uq/DpFXYC5ODfqiAeW2GFZECpkJcNrVPSWh2HagCXZWK0vm9q
+p/UsQu0yrbYhnr68
+-----END CERTIFICATE-----
+
+Hellenic Academic and Research Institutions ECC RootCA 2015
+===========================================================
+-----BEGIN CERTIFICATE-----
+MIICwzCCAkqgAwIBAgIBADAKBggqhkjOPQQDAjCBqjELMAkGA1UEBhMCR1IxDzANBgNVBAcTBkF0
+aGVuczFEMEIGA1UEChM7SGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9u
+cyBDZXJ0LiBBdXRob3JpdHkxRDBCBgNVBAMTO0hlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJj
+aCBJbnN0aXR1dGlvbnMgRUNDIFJvb3RDQSAyMDE1MB4XDTE1MDcwNzEwMzcxMloXDTQwMDYzMDEw
+MzcxMlowgaoxCzAJBgNVBAYTAkdSMQ8wDQYDVQQHEwZBdGhlbnMxRDBCBgNVBAoTO0hlbGxlbmlj
+IEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ2VydC4gQXV0aG9yaXR5MUQwQgYD
+VQQDEztIZWxsZW5pYyBBY2FkZW1pYyBhbmQgUmVzZWFyY2ggSW5zdGl0dXRpb25zIEVDQyBSb290
+Q0EgMjAxNTB2MBAGByqGSM49AgEGBSuBBAAiA2IABJKgQehLgoRc4vgxEZmGZE4JJS+dQS8KrjVP
+dJWyUWRrjWvmP3CV8AVER6ZyOFB2lQJajq4onvktTpnvLEhvTCUp6NFxW98dwXU3tNf6e3pCnGoK
+Vlp8aQuqgAkkbH7BRqNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O
+BBYEFLQiC4KZJAEOnLvkDv2/+5cgk5kqMAoGCCqGSM49BAMCA2cAMGQCMGfOFmI4oqxiRaeplSTA
+GiecMjvAwNW6qef4BENThe5SId6d9SWDPp5YSy/XZxMOIQIwBeF1Ad5o7SofTUwJCA3sS61kFyjn
+dc5FZXIhF8siQQ6ME5g4mlRtm8rifOoCWCKR
+-----END CERTIFICATE-----
+
+Certplus Root CA G1
+===================
+-----BEGIN CERTIFICATE-----
+MIIFazCCA1OgAwIBAgISESBVg+QtPlRWhS2DN7cs3EYRMA0GCSqGSIb3DQEBDQUAMD4xCzAJBgNV
+BAYTAkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTAe
+Fw0xNDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhD
+ZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBANpQh7bauKk+nWT6VjOaVj0W5QOVsjQcmm1iBdTYj+eJZJ+622SLZOZ5KmHN
+r49aiZFluVj8tANfkT8tEBXgfs+8/H9DZ6itXjYj2JizTfNDnjl8KvzsiNWI7nC9hRYt6kuJPKNx
+Qv4c/dMcLRC4hlTqQ7jbxofaqK6AJc96Jh2qkbBIb6613p7Y1/oA/caP0FG7Yn2ksYyy/yARujVj
+BYZHYEMzkPZHogNPlk2dT8Hq6pyi/jQu3rfKG3akt62f6ajUeD94/vI4CTYd0hYCyOwqaK/1jpTv
+LRN6HkJKHRUxrgwEV/xhc/MxVoYxgKDEEW4wduOU8F8ExKyHcomYxZ3MVwia9Az8fXoFOvpHgDm2
+z4QTd28n6v+WZxcIbekN1iNQMLAVdBM+5S//Ds3EC0pd8NgAM0lm66EYfFkuPSi5YXHLtaW6uOrc
+4nBvCGrch2c0798wct3zyT8j/zXhviEpIDCB5BmlIOklynMxdCm+4kLV87ImZsdo/Rmz5yCTmehd
+4F6H50boJZwKKSTUzViGUkAksnsPmBIgJPaQbEfIDbsYIC7Z/fyL8inqh3SV4EJQeIQEQWGw9CEj
+jy3LKCHyamz0GqbFFLQ3ZU+V/YDI+HLlJWvEYLF7bY5KinPOWftwenMGE9nTdDckQQoRb5fc5+R+
+ob0V8rqHDz1oihYHAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0G
+A1UdDgQWBBSowcCbkahDFXxdBie0KlHYlwuBsTAfBgNVHSMEGDAWgBSowcCbkahDFXxdBie0KlHY
+lwuBsTANBgkqhkiG9w0BAQ0FAAOCAgEAnFZvAX7RvUz1isbwJh/k4DgYzDLDKTudQSk0YcbX8ACh
+66Ryj5QXvBMsdbRX7gp8CXrc1cqh0DQT+Hern+X+2B50ioUHj3/MeXrKls3N/U/7/SMNkPX0XtPG
+YX2eEeAC7gkE2Qfdpoq3DIMku4NQkv5gdRE+2J2winq14J2by5BSS7CTKtQ+FjPlnsZlFT5kOwQ/
+2wyPX1wdaR+v8+khjPPvl/aatxm2hHSco1S1cE5j2FddUyGbQJJD+tZ3VTNPZNX70Cxqjm0lpu+F
+6ALEUz65noe8zDUa3qHpimOHZR4RKttjd5cUvpoUmRGywO6wT/gUITJDT5+rosuoD6o7BlXGEilX
+CNQ314cnrUlZp5GrRHpejXDbl85IULFzk/bwg2D5zfHhMf1bfHEhYxQUqq/F3pN+aLHsIqKqkHWe
+tUNy6mSjhEv9DKgma3GX7lZjZuhCVPnHHd/Qj1vfyDBviP4NxDMcU6ij/UgQ8uQKTuEVV/xuZDDC
+VRHc6qnNSlSsKWNEz0pAoNZoWRsz+e86i9sgktxChL8Bq4fA1SCC28a5g4VCXA9DO2pJNdWY9BW/
++mGBDAkgGNLQFwzLSABQ6XaCjGTXOqAHVcweMcDvOrRl++O/QmueD6i9a5jc2NvLi6Td11n0bt3+
+qsOR0C5CB8AMTVPNJLFMWx5R9N/pkvo=
+-----END CERTIFICATE-----
+
+Certplus Root CA G2
+===================
+-----BEGIN CERTIFICATE-----
+MIICHDCCAaKgAwIBAgISESDZkc6uo+jF5//pAq/Pc7xVMAoGCCqGSM49BAMDMD4xCzAJBgNVBAYT
+AkZSMREwDwYDVQQKDAhDZXJ0cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjAeFw0x
+NDA1MjYwMDAwMDBaFw0zODAxMTUwMDAwMDBaMD4xCzAJBgNVBAYTAkZSMREwDwYDVQQKDAhDZXJ0
+cGx1czEcMBoGA1UEAwwTQ2VydHBsdXMgUm9vdCBDQSBHMjB2MBAGByqGSM49AgEGBSuBBAAiA2IA
+BM0PW1aC3/BFGtat93nwHcmsltaeTpwftEIRyoa/bfuFo8XlGVzX7qY/aWfYeOKmycTbLXku54uN
+Am8xIk0G42ByRZ0OQneezs/lf4WbGOT8zC5y0xaTTsqZY1yhBSpsBqNjMGEwDgYDVR0PAQH/BAQD
+AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMB8GA1Ud
+IwQYMBaAFNqDYwJ5jtpMxjwjFNiPwyCrKGBZMAoGCCqGSM49BAMDA2gAMGUCMHD+sAvZ94OX7PNV
+HdTcswYO/jOYnYs5kGuUIe22113WTNchp+e/IQ8rzfcq3IUHnQIxAIYUFuXcsGXCwI4Un78kFmjl
+vPl5adytRSv3tjFzzAalU5ORGpOucGpnutee5WEaXw==
+-----END CERTIFICATE-----
+
+OpenTrust Root CA G1
+====================
+-----BEGIN CERTIFICATE-----
+MIIFbzCCA1egAwIBAgISESCzkFU5fX82bWTCp59rY45nMA0GCSqGSIb3DQEBCwUAMEAxCzAJBgNV
+BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcx
+MB4XDTE0MDUyNjA4NDU1MFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM
+CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzEwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQD4eUbalsUwXopxAy1wpLuwxQjczeY1wICkES3d5oeuXT2R0odsN7fa
+Yp6bwiTXj/HbpqbfRm9RpnHLPhsxZ2L3EVs0J9V5ToybWL0iEA1cJwzdMOWo010hOHQX/uMftk87
+ay3bfWAfjH1MBcLrARYVmBSO0ZB3Ij/swjm4eTrwSSTilZHcYTSSjFR077F9jAHiOH3BX2pfJLKO
+YheteSCtqx234LSWSE9mQxAGFiQD4eCcjsZGT44ameGPuY4zbGneWK2gDqdkVBFpRGZPTBKnjix9
+xNRbxQA0MMHZmf4yzgeEtE7NCv82TWLxp2NX5Ntqp66/K7nJ5rInieV+mhxNaMbBGN4zK1FGSxyO
+9z0M+Yo0FMT7MzUj8czxKselu7Cizv5Ta01BG2Yospb6p64KTrk5M0ScdMGTHPjgniQlQ/GbI4Kq
+3ywgsNw2TgOzfALU5nsaqocTvz6hdLubDuHAk5/XpGbKuxs74zD0M1mKB3IDVedzagMxbm+WG+Oi
+n6+Sx+31QrclTDsTBM8clq8cIqPQqwWyTBIjUtz9GVsnnB47ev1CI9sjgBPwvFEVVJSmdz7QdFG9
+URQIOTfLHzSpMJ1ShC5VkLG631UAC9hWLbFJSXKAqWLXwPYYEQRVzXR7z2FwefR7LFxckvzluFqr
+TJOVoSfupb7PcSNCupt2LQIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUl0YhVyE12jZVx/PxN3DlCPaTKbYwHwYDVR0jBBgwFoAUl0YhVyE12jZVx/Px
+N3DlCPaTKbYwDQYJKoZIhvcNAQELBQADggIBAB3dAmB84DWn5ph76kTOZ0BP8pNuZtQ5iSas000E
+PLuHIT839HEl2ku6q5aCgZG27dmxpGWX4m9kWaSW7mDKHyP7Rbr/jyTwyqkxf3kfgLMtMrpkZ2Cv
+uVnN35pJ06iCsfmYlIrM4LvgBBuZYLFGZdwIorJGnkSI6pN+VxbSFXJfLkur1J1juONI5f6ELlgK
+n0Md/rcYkoZDSw6cMoYsYPXpSOqV7XAp8dUv/TW0V8/bhUiZucJvbI/NeJWsZCj9VrDDb8O+WVLh
+X4SPgPL0DTatdrOjteFkdjpY3H1PXlZs5VVZV6Xf8YpmMIzUUmI4d7S+KNfKNsSbBfD4Fdvb8e80
+nR14SohWZ25g/4/Ii+GOvUKpMwpZQhISKvqxnUOOBZuZ2mKtVzazHbYNeS2WuOvyDEsMpZTGMKcm
+GS3tTAZQMPH9WD25SxdfGbRqhFS0OE85og2WaMMolP3tLR9Ka0OWLpABEPs4poEL0L9109S5zvE/
+bw4cHjdx5RiHdRk/ULlepEU0rbDK5uUTdg8xFKmOLZTW1YVNcxVPS/KyPu1svf0OnWZzsD2097+o
+4BGkxK51CUpjAEggpsadCwmKtODmzj7HPiY46SvepghJAwSQiumPv+i2tCqjI40cHLI5kqiPAlxA
+OXXUc0ECd97N4EOH1uS6SsNsEn/+KuYj1oxx
+-----END CERTIFICATE-----
+
+OpenTrust Root CA G2
+====================
+-----BEGIN CERTIFICATE-----
+MIIFbzCCA1egAwIBAgISESChaRu/vbm9UpaPI+hIvyYRMA0GCSqGSIb3DQEBDQUAMEAxCzAJBgNV
+BAYTAkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEcy
+MB4XDTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoM
+CU9wZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzIwggIiMA0GCSqGSIb3DQEB
+AQUAA4ICDwAwggIKAoICAQDMtlelM5QQgTJT32F+D3Y5z1zCU3UdSXqWON2ic2rxb95eolq5cSG+
+Ntmh/LzubKh8NBpxGuga2F8ORAbtp+Dz0mEL4DKiltE48MLaARf85KxP6O6JHnSrT78eCbY2albz
+4e6WiWYkBuTNQjpK3eCasMSCRbP+yatcfD7J6xcvDH1urqWPyKwlCm/61UWY0jUJ9gNDlP7ZvyCV
+eYCYitmJNbtRG6Q3ffyZO6v/v6wNj0OxmXsWEH4db0fEFY8ElggGQgT4hNYdvJGmQr5J1WqIP7wt
+UdGejeBSzFfdNTVY27SPJIjki9/ca1TSgSuyzpJLHB9G+h3Ykst2Z7UJmQnlrBcUVXDGPKBWCgOz
+3GIZ38i1MH/1PCZ1Eb3XG7OHngevZXHloM8apwkQHZOJZlvoPGIytbU6bumFAYueQ4xncyhZW+vj
+3CzMpSZyYhK05pyDRPZRpOLAeiRXyg6lPzq1O4vldu5w5pLeFlwoW5cZJ5L+epJUzpM5ChaHvGOz
+9bGTXOBut9Dq+WIyiET7vycotjCVXRIouZW+j1MY5aIYFuJWpLIsEPUdN6b4t/bQWVyJ98LVtZR0
+0dX+G7bw5tYee9I8y6jj9RjzIR9u701oBnstXW5DiabA+aC/gh7PU3+06yzbXfZqfUAkBXKJOAGT
+y3HCOV0GEfZvePg3DTmEJwIDAQABo2MwYTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB
+/zAdBgNVHQ4EFgQUajn6QiL35okATV59M4PLuG53hq8wHwYDVR0jBBgwFoAUajn6QiL35okATV59
+M4PLuG53hq8wDQYJKoZIhvcNAQENBQADggIBAJjLq0A85TMCl38th6aP1F5Kr7ge57tx+4BkJamz
+Gj5oXScmp7oq4fBXgwpkTx4idBvpkF/wrM//T2h6OKQQbA2xx6R3gBi2oihEdqc0nXGEL8pZ0keI
+mUEiyTCYYW49qKgFbdEfwFFEVn8nNQLdXpgKQuswv42hm1GqO+qTRmTFAHneIWv2V6CG1wZy7HBG
+S4tz3aAhdT7cHcCP009zHIXZ/n9iyJVvttN7jLpTwm+bREx50B1ws9efAvSyB7DH5fitIw6mVskp
+EndI2S9G/Tvw/HRwkqWOOAgfZDC2t0v7NqwQjqBSM2OdAzVWxWm9xiNaJ5T2pBL4LTM8oValX9YZ
+6e18CL13zSdkzJTaTkZQh+D5wVOAHrut+0dSixv9ovneDiK3PTNZbNTe9ZUGMg1RGUFcPk8G97kr
+gCf2o6p6fAbhQ8MTOWIaNr3gKC6UAuQpLmBVrkA9sHSSXvAgZJY/X0VdiLWK2gKgW0VU3jg9CcCo
+SmVGFvyqv1ROTVu+OEO3KMqLM6oaJbolXCkvW0pujOotnCr2BXbgd5eAiN1nE28daCSLT7d0geX0
+YJ96Vdc+N9oWaz53rK4YcJUIeSkDiv7BO7M/Gg+kO14fWKGVyasvc0rQLW6aWQ9VGHgtPFGml4vm
+u7JwqkwR3v98KzfUetF3NI/n+UL3PIEMS1IK
+-----END CERTIFICATE-----
+
+OpenTrust Root CA G3
+====================
+-----BEGIN CERTIFICATE-----
+MIICITCCAaagAwIBAgISESDm+Ez8JLC+BUCs2oMbNGA/MAoGCCqGSM49BAMDMEAxCzAJBgNVBAYT
+AkZSMRIwEAYDVQQKDAlPcGVuVHJ1c3QxHTAbBgNVBAMMFE9wZW5UcnVzdCBSb290IENBIEczMB4X
+DTE0MDUyNjAwMDAwMFoXDTM4MDExNTAwMDAwMFowQDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCU9w
+ZW5UcnVzdDEdMBsGA1UEAwwUT3BlblRydXN0IFJvb3QgQ0EgRzMwdjAQBgcqhkjOPQIBBgUrgQQA
+IgNiAARK7liuTcpm3gY6oxH84Bjwbhy6LTAMidnW7ptzg6kjFYwvWYpa3RTqnVkrQ7cG7DK2uu5B
+ta1doYXM6h0UZqNnfkbilPPntlahFVmhTzeXuSIevRHr9LIfXsMUmuXZl5mjYzBhMA4GA1UdDwEB
+/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAf
+BgNVHSMEGDAWgBRHd8MUi2I5DMlv4VBN0BBY3JWIbTAKBggqhkjOPQQDAwNpADBmAjEAj6jcnboM
+BBf6Fek9LykBl7+BFjNAk2z8+e2AcG+qj9uEwov1NcoG3GRvaBbhj5G5AjEA2Euly8LQCGzpGPta
+3U1fJAuwACEl74+nBCZx4nxp5V2a+EEfOzmTk51V6s2N8fvB
+-----END CERTIFICATE-----
+
+ISRG Root X1
+============
+-----BEGIN CERTIFICATE-----
+MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAwTzELMAkGA1UE
+BhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2VhcmNoIEdyb3VwMRUwEwYDVQQD
+EwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQG
+EwJVUzEpMCcGA1UEChMgSW50ZXJuZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMT
+DElTUkcgUm9vdCBYMTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54r
+Vygch77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+0TM8ukj1
+3Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6UA5/TR5d8mUgjU+g4rk8K
+b4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sWT8KOEUt+zwvo/7V3LvSye0rgTBIlDHCN
+Aymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyHB5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ
+4Q7e2RCOFvu396j3x+UCB5iPNgiV5+I3lg02dZ77DnKxHZu8A/lJBdiB3QW0KtZB6awBdpUKD9jf
+1b0SHzUvKBds0pjBqAlkd25HN7rOrFleaJ1/ctaJxQZBKT5ZPt0m9STJEadao0xAH0ahmbWnOlFu
+hjuefXKnEgV4We0+UXgVCwOPjdAvBbI+e0ocS3MFEvzG6uBQE3xDk3SzynTnjh8BCNAw1FtxNrQH
+usEwMFxIt4I7mKZ9YIqioymCzLq9gwQbooMDQaHWBfEbwrbwqHyGO0aoSCqI3Haadr8faqU9GY/r
+OPNk3sgrDQoo//fb4hVC1CLQJ13hef4Y53CIrU7m2Ys6xt0nUW7/vGT1M0NPAgMBAAGjQjBAMA4G
+A1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR5tFnme7bl5AFzgAiIyBpY
+9umbbjANBgkqhkiG9w0BAQsFAAOCAgEAVR9YqbyyqFDQDLHYGmkgJykIrGF1XIpu+ILlaS/V9lZL
+ubhzEFnTIZd+50xx+7LSYK05qAvqFyFWhfFQDlnrzuBZ6brJFe+GnY+EgPbk6ZGQ3BebYhtF8GaV
+0nxvwuo77x/Py9auJ/GpsMiu/X1+mvoiBOv/2X/qkSsisRcOj/KKNFtY2PwByVS5uCbMiogziUwt
+hDyC3+6WVwW6LLv3xLfHTjuCvjHIInNzktHCgKQ5ORAzI4JMPJ+GslWYHb4phowim57iaztXOoJw
+TdwJx4nLCgdNbOhdjsnvzqvHu7UrTkXWStAmzOVyyghqpZXjFaH3pO3JLF+l+/+sKAIuvtd7u+Nx
+e5AW0wdeRlN8NwdCjNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZA
+JzVcoyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq4RgqsahD
+YVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPAmRGunUHBcnWEvgJBQl9n
+JEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57demyPxgcYxn/eR44/KJ4EBs+lVDR3veyJ
+m+kXQ99b21/+jh5Xos1AnX5iItreGCc=
+-----END CERTIFICATE-----
+
+AC RAIZ FNMT-RCM
+================
+-----BEGIN CERTIFICATE-----
+MIIFgzCCA2ugAwIBAgIPXZONMGc2yAYdGsdUhGkHMA0GCSqGSIb3DQEBCwUAMDsxCzAJBgNVBAYT
+AkVTMREwDwYDVQQKDAhGTk1ULVJDTTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTAeFw0wODEw
+MjkxNTU5NTZaFw0zMDAxMDEwMDAwMDBaMDsxCzAJBgNVBAYTAkVTMREwDwYDVQQKDAhGTk1ULVJD
+TTEZMBcGA1UECwwQQUMgUkFJWiBGTk1ULVJDTTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
+ggIBALpxgHpMhm5/yBNtwMZ9HACXjywMI7sQmkCpGreHiPibVmr75nuOi5KOpyVdWRHbNi63URcf
+qQgfBBckWKo3Shjf5TnUV/3XwSyRAZHiItQDwFj8d0fsjz50Q7qsNI1NOHZnjrDIbzAzWHFctPVr
+btQBULgTfmxKo0nRIBnuvMApGGWn3v7v3QqQIecaZ5JCEJhfTzC8PhxFtBDXaEAUwED653cXeuYL
+j2VbPNmaUtu1vZ5Gzz3rkQUCwJaydkxNEJY7kvqcfw+Z374jNUUeAlz+taibmSXaXvMiwzn15Cou
+08YfxGyqxRxqAQVKL9LFwag0Jl1mpdICIfkYtwb1TplvqKtMUejPUBjFd8g5CSxJkjKZqLsXF3mw
+WsXmo8RZZUc1g16p6DULmbvkzSDGm0oGObVo/CK67lWMK07q87Hj/LaZmtVC+nFNCM+HHmpxffnT
+tOmlcYF7wk5HlqX2doWjKI/pgG6BU6VtX7hI+cL5NqYuSf+4lsKMB7ObiFj86xsc3i1w4peSMKGJ
+47xVqCfWS+2QrYv6YyVZLag13cqXM7zlzced0ezvXg5KkAYmY6252TUtB7p2ZSysV4999AeU14EC
+ll2jB0nVetBX+RvnU0Z1qrB5QstocQjpYL05ac70r8NWQMetUqIJ5G+GR4of6ygnXYMgrwTJbFaa
+i0b1AgMBAAGjgYMwgYAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYE
+FPd9xf3E6Jobd2Sn9R2gzL+HYJptMD4GA1UdIAQ3MDUwMwYEVR0gADArMCkGCCsGAQUFBwIBFh1o
+dHRwOi8vd3d3LmNlcnQuZm5tdC5lcy9kcGNzLzANBgkqhkiG9w0BAQsFAAOCAgEAB5BK3/MjTvDD
+nFFlm5wioooMhfNzKWtN/gHiqQxjAb8EZ6WdmF/9ARP67Jpi6Yb+tmLSbkyU+8B1RXxlDPiyN8+s
+D8+Nb/kZ94/sHvJwnvDKuO+3/3Y3dlv2bojzr2IyIpMNOmqOFGYMLVN0V2Ue1bLdI4E7pWYjJ2cJ
+j+F3qkPNZVEI7VFY/uY5+ctHhKQV8Xa7pO6kO8Rf77IzlhEYt8llvhjho6Tc+hj507wTmzl6NLrT
+Qfv6MooqtyuGC2mDOL7Nii4LcK2NJpLuHvUBKwrZ1pebbuCoGRw6IYsMHkCtA+fdZn71uSANA+iW
++YJF1DngoABd15jmfZ5nc8OaKveri6E6FO80vFIOiZiaBECEHX5FaZNXzuvO+FB8TxxuBEOb+dY7
+Ixjp6o7RTUaN8Tvkasq6+yO3m/qZASlaWFot4/nUbQ4mrcFuNLwy+AwF+mWj2zs3gyLp1txyM/1d
+8iC9djwj2ij3+RvrWWTV3F9yfiD8zYm1kGdNYno/Tq0dwzn+evQoFt9B9kiABdcPUXmsEKvU7ANm
+5mqwujGSQkBqvjrTcuFqN1W8rB2Vt2lh8kORdOag0wokRqEIr9baRRmW1FMdW4R58MD3R++Lj8UG
+rp1MYp3/RgT408m2ECVAdf4WqslKYIYvuu8wd+RU4riEmViAqhOLUTpPSPaLtrM=
+-----END CERTIFICATE-----
+
+Amazon Root CA 1
+================
+-----BEGIN CERTIFICATE-----
+MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsFADA5MQswCQYD
+VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAxMB4XDTE1
+MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv
+bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
+ggEBALJ4gHHKeNXjca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgH
+FzZM9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qwIFAGbHrQ
+gLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6VOujw5H5SNz/0egwLX0t
+dHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L93FcXmn/6pUCyziKrlA4b9v7LWIbxcce
+VOF34GfID5yHI9Y/QCB/IIDEgEw+OyQmjgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB
+/zAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3
+DQEBCwUAA4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDIU5PM
+CCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUsN+gDS63pYaACbvXy
+8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vvo/ufQJVtMVT8QtPHRh8jrdkPSHCa
+2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2
+xJNDd2ZhwLnoQdeXeGADbkpyrqXRfboQnoZsG4q5WTP468SQvvG5
+-----END CERTIFICATE-----
+
+Amazon Root CA 2
+================
+-----BEGIN CERTIFICATE-----
+MIIFQTCCAymgAwIBAgITBmyf0pY1hp8KD+WGePhbJruKNzANBgkqhkiG9w0BAQwFADA5MQswCQYD
+VQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAyMB4XDTE1
+MDUyNjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpv
+bjEZMBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC
+ggIBAK2Wny2cSkxKgXlRmeyKy2tgURO8TW0G/LAIjd0ZEGrHJgw12MBvIITplLGbhQPDW9tK6Mj4
+kHbZW0/jTOgGNk3Mmqw9DJArktQGGWCsN0R5hYGCrVo34A3MnaZMUnbqQ523BNFQ9lXg1dKmSYXp
+N+nKfq5clU1Imj+uIFptiJXZNLhSGkOQsL9sBbm2eLfq0OQ6PBJTYv9K8nu+NQWpEjTj82R0Yiw9
+AElaKP4yRLuH3WUnAnE72kr3H9rN9yFVkE8P7K6C4Z9r2UXTu/Bfh+08LDmG2j/e7HJV63mjrdvd
+fLC6HM783k81ds8P+HgfajZRRidhW+mez/CiVX18JYpvL7TFz4QuK/0NURBs+18bvBt+xa47mAEx
+kv8LV/SasrlX6avvDXbR8O70zoan4G7ptGmh32n2M8ZpLpcTnqWHsFcQgTfJU7O7f/aS0ZzQGPSS
+btqDT6ZjmUyl+17vIWR6IF9sZIUVyzfpYgwLKhbcAS4y2j5L9Z469hdAlO+ekQiG+r5jqFoz7Mt0
+Q5X5bGlSNscpb/xVA1wf+5+9R+vnSUeVC06JIglJ4PVhHvG/LopyboBZ/1c6+XUyo05f7O0oYtlN
+c/LMgRdg7c3r3NunysV+Ar3yVAhU/bQtCSwXVEqY0VThUWcI0u1ufm8/0i2BWSlmy5A5lREedCf+
+3euvAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSw
+DPBMMPQFWAJI/TPlUq9LhONmUjANBgkqhkiG9w0BAQwFAAOCAgEAqqiAjw54o+Ci1M3m9Zh6O+oA
+A7CXDpO8Wqj2LIxyh6mx/H9z/WNxeKWHWc8w4Q0QshNabYL1auaAn6AFC2jkR2vHat+2/XcycuUY
++gn0oJMsXdKMdYV2ZZAMA3m3MSNjrXiDCYZohMr/+c8mmpJ5581LxedhpxfL86kSk5Nrp+gvU5LE
+YFiwzAJRGFuFjWJZY7attN6a+yb3ACfAXVU3dJnJUH/jWS5E4ywl7uxMMne0nxrpS10gxdr9HIcW
+xkPo1LsmmkVwXqkLN1PiRnsn/eBG8om3zEK2yygmbtmlyTrIQRNg91CMFa6ybRoVGld45pIq2WWQ
+gj9sAq+uEjonljYE1x2igGOpm/HlurR8FLBOybEfdF849lHqm/osohHUqS0nGkWxr7JOcQ3AWEbW
+aQbLU8uz/mtBzUF+fUwPfHJ5elnNXkoOrJupmHN5fLT0zLm4BwyydFy4x2+IoZCn9Kr5v2c69BoV
+Yh63n749sSmvZ6ES8lgQGVMDMBu4Gon2nL2XA46jCfMdiyHxtN/kHNGfZQIG6lzWE7OE76KlXIx3
+KadowGuuQNKotOrN8I1LOJwZmhsoVLiJkO/KdYE+HvJkJMcYr07/R54H9jVlpNMKVv/1F2Rs76gi
+JUmTtt8AF9pYfl3uxRuw0dFfIRDH+fO6AgonB8Xx1sfT4PsJYGw=
+-----END CERTIFICATE-----
+
+Amazon Root CA 3
+================
+-----BEGIN CERTIFICATE-----
+MIIBtjCCAVugAwIBAgITBmyf1XSXNmY/Owua2eiedgPySjAKBggqhkjOPQQDAjA5MQswCQYDVQQG
+EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSAzMB4XDTE1MDUy
+NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ
+MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgMzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCmXp8ZB
+f8ANm+gBG1bG8lKlui2yEujSLtf6ycXYqm0fc4E7O5hrOXwzpcVOho6AF2hiRVd9RFgdszflZwjr
+Zt6jQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBSrttvXBp43
+rDCGB5Fwx5zEGbF4wDAKBggqhkjOPQQDAgNJADBGAiEA4IWSoxe3jfkrBqWTrBqYaGFy+uGh0Psc
+eGCmQ5nFuMQCIQCcAu/xlJyzlvnrxir4tiz+OpAUFteMYyRIHN8wfdVoOw==
+-----END CERTIFICATE-----
+
+Amazon Root CA 4
+================
+-----BEGIN CERTIFICATE-----
+MIIB8jCCAXigAwIBAgITBmyf18G7EEwpQ+Vxe3ssyBrBDjAKBggqhkjOPQQDAzA5MQswCQYDVQQG
+EwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6b24gUm9vdCBDQSA0MB4XDTE1MDUy
+NjAwMDAwMFoXDTQwMDUyNjAwMDAwMFowOTELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZ
+MBcGA1UEAxMQQW1hem9uIFJvb3QgQ0EgNDB2MBAGByqGSM49AgEGBSuBBAAiA2IABNKrijdPo1MN
+/sGKe0uoe0ZLY7Bi9i0b2whxIdIA6GO9mif78DluXeo9pcmBqqNbIJhFXRbb/egQbeOc4OO9X4Ri
+83BkM6DLJC9wuoihKqB1+IGuYgbEgds5bimwHvouXKNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
+HQ8BAf8EBAMCAYYwHQYDVR0OBBYEFNPsxzplbszh2naaVvuc84ZtV+WBMAoGCCqGSM49BAMDA2gA
+MGUCMDqLIfG9fhGt0O9Yli/W651+kI0rz2ZVwyzjKKlwCkcO8DdZEv8tmZQoTipPNU0zWgIxAOp1
+AE47xDqUEpHJWEadIRNyp4iciuRMStuW1KyLa2tJElMzrdfkviT8tQp21KW8EA==
+-----END CERTIFICATE-----
+
+LuxTrust Global Root 2
+======================
+-----BEGIN CERTIFICATE-----
+MIIFwzCCA6ugAwIBAgIUCn6m30tEntpqJIWe5rgV0xZ/u7EwDQYJKoZIhvcNAQELBQAwRjELMAkG
+A1UEBhMCTFUxFjAUBgNVBAoMDUx1eFRydXN0IFMuQS4xHzAdBgNVBAMMFkx1eFRydXN0IEdsb2Jh
+bCBSb290IDIwHhcNMTUwMzA1MTMyMTU3WhcNMzUwMzA1MTMyMTU3WjBGMQswCQYDVQQGEwJMVTEW
+MBQGA1UECgwNTHV4VHJ1c3QgUy5BLjEfMB0GA1UEAwwWTHV4VHJ1c3QgR2xvYmFsIFJvb3QgMjCC
+AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANeFl78RmOnwYoNMPIf5U2o3C/IPPIfOb9wm
+Kb3FibrJgz337spbxm1Jc7TJRqMbNBM/wYlFV/TZsfs2ZUv7COJIcRHIbjuend+JZTemhfY7RBi2
+xjcwYkSSl2l9QjAk5A0MiWtj3sXh306pFGxT4GHO9hcvHTy95iJMHZP1EMShduxq3sVs35a0VkBC
+wGKSMKEtFZSg0iAGCW5qbeXrt77U8PEVfIvmTroTzEsnXpk8F12PgX8zPU/TPxvsXD/wPEx1bvKm
+1Z3aLQdjAsZy6ZS8TEmVT4hSyNvoaYL4zDRbIvCGp4m9SAptZoFtyMhk+wHh9OHe2Z7d21vUKpkm
+FRseTJIpgp7VkoGSQXAZ96Tlk0u8d2cx3Rz9MXANF5kM+Qw5GSoXtTBxVdUPrljhPS80m8+f9niF
+wpN6cj5mj5wWEWCPnolvZ77gR1o7DJpni89Gxq44o/KnvObWhWszJHAiS8sIm7vI+AIpHb4gDEa/
+a4ebsypmQjVGbKq6rfmYe+lQVRQxv7HaLe2ArWgk+2mr2HETMOZns4dA/Yl+8kPREd8vZS9kzl8U
+ubG/Mb2HeFpZZYiq/FkySIbWTLkpS5XTdvN3JW1CHDiDTf2jX5t/Lax5Gw5CMZdjpPuKadUiDTSQ
+MC6otOBttpSsvItO13D8xTiOZCXhTTmQzsmHhFhxAgMBAAGjgagwgaUwDwYDVR0TAQH/BAUwAwEB
+/zBCBgNVHSAEOzA5MDcGByuBKwEBAQowLDAqBggrBgEFBQcCARYeaHR0cHM6Ly9yZXBvc2l0b3J5
+Lmx1eHRydXN0Lmx1MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBT/GCh2+UgFLKGu8SsbK7JT
++Et8szAdBgNVHQ4EFgQU/xgodvlIBSyhrvErGyuyU/hLfLMwDQYJKoZIhvcNAQELBQADggIBAGoZ
+FO1uecEsh9QNcH7X9njJCwROxLHOk3D+sFTAMs2ZMGQXvw/l4jP9BzZAcg4atmpZ1gDlaCDdLnIN
+H2pkMSCEfUmmWjfrRcmF9dTHF5kH5ptV5AzoqbTOjFu1EVzPig4N1qx3gf4ynCSecs5U89BvolbW
+7MM3LGVYvlcAGvI1+ut7MV3CwRI9loGIlonBWVx65n9wNOeD4rHh4bhY79SV5GCc8JaXcozrhAIu
+ZY+kt9J/Z93I055cqqmkoCUUBpvsT34tC38ddfEz2O3OuHVtPlu5mB0xDVbYQw8wkbIEa91WvpWA
+VWe+2M2D2RjuLg+GLZKecBPs3lHJQ3gCpU3I+V/EkVhGFndadKpAvAefMLmx9xIX3eP/JEAdemrR
+TxgKqpAd60Ae36EeRJIQmvKN4dFLRp7oRUKX6kWZ8+xm1QL68qZKJKrezrnK+T+Tb/mjuuqlPpmt
+/f97mfVl7vBZKGfXkJWkE4SphMHozs51k2MavDzq1WQfLSoSOcbDWjLtR5EWDrw4wVDej8oqkDQc
+7kGUnF4ZLvhFSZl0kbAEb+MEWrGrKqv+x9CWttrhSmQGbmBNvUJO/3jaJMobtNeWOWyu8Q6qp31I
+iyBMz2TWuJdGsE7RKlY6oJO9r4Ak4Ap+58rVyuiFVdw2KuGUaJPHZnJED4AhMmwlxyOAgwrr
+-----END CERTIFICATE-----
+
+TUBITAK Kamu SM SSL Kok Sertifikasi - Surum 1
+=============================================
+-----BEGIN CERTIFICATE-----
+MIIEYzCCA0ugAwIBAgIBATANBgkqhkiG9w0BAQsFADCB0jELMAkGA1UEBhMCVFIxGDAWBgNVBAcT
+D0dlYnplIC0gS29jYWVsaTFCMEAGA1UEChM5VHVya2l5ZSBCaWxpbXNlbCB2ZSBUZWtub2xvamlr
+IEFyYXN0aXJtYSBLdXJ1bXUgLSBUVUJJVEFLMS0wKwYDVQQLEyRLYW11IFNlcnRpZmlrYXN5b24g
+TWVya2V6aSAtIEthbXUgU00xNjA0BgNVBAMTLVRVQklUQUsgS2FtdSBTTSBTU0wgS29rIFNlcnRp
+ZmlrYXNpIC0gU3VydW0gMTAeFw0xMzExMjUwODI1NTVaFw00MzEwMjUwODI1NTVaMIHSMQswCQYD
+VQQGEwJUUjEYMBYGA1UEBxMPR2ViemUgLSBLb2NhZWxpMUIwQAYDVQQKEzlUdXJraXllIEJpbGlt
+c2VsIHZlIFRla25vbG9qaWsgQXJhc3Rpcm1hIEt1cnVtdSAtIFRVQklUQUsxLTArBgNVBAsTJEth
+bXUgU2VydGlmaWthc3lvbiBNZXJrZXppIC0gS2FtdSBTTTE2MDQGA1UEAxMtVFVCSVRBSyBLYW11
+IFNNIFNTTCBLb2sgU2VydGlmaWthc2kgLSBTdXJ1bSAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
+MIIBCgKCAQEAr3UwM6q7a9OZLBI3hNmNe5eA027n/5tQlT6QlVZC1xl8JoSNkvoBHToP4mQ4t4y8
+6Ij5iySrLqP1N+RAjhgleYN1Hzv/bKjFxlb4tO2KRKOrbEz8HdDc72i9z+SqzvBV96I01INrN3wc
+wv61A+xXzry0tcXtAA9TNypN9E8Mg/uGz8v+jE69h/mniyFXnHrfA2eJLJ2XYacQuFWQfw4tJzh0
+3+f92k4S400VIgLI4OD8D62K18lUUMw7D8oWgITQUVbDjlZ/iSIzL+aFCr2lqBs23tPcLG07xxO9
+WSMs5uWk99gL7eqQQESolbuT1dCANLZGeA4fAJNG4e7p+exPFwIDAQABo0IwQDAdBgNVHQ4EFgQU
+ZT/HiobGPN08VFw1+DrtUgxHV8gwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJ
+KoZIhvcNAQELBQADggEBACo/4fEyjq7hmFxLXs9rHmoJ0iKpEsdeV31zVmSAhHqT5Am5EM2fKifh
+AHe+SMg1qIGf5LgsyX8OsNJLN13qudULXjS99HMpw+0mFZx+CFOKWI3QSyjfwbPfIPP54+M638yc
+lNhOT8NrF7f3cuitZjO1JVOr4PhMqZ398g26rrnZqsZr+ZO7rqu4lzwDGrpDxpa5RXI4s6ehlj2R
+e37AIVNMh+3yC1SVUZPVIqUNivGTDj5UDrDYyU7c8jEyVupk+eq1nRZmQnLzf9OxMUP8pI4X8W0j
+q5Rm+K37DwhuJi1/FwcJsoz7UMCflo3Ptv0AnVoUmr8CRPXBwp8iXqIPoeM=
+-----END CERTIFICATE-----
+
+GDCA TrustAUTH R5 ROOT
+======================
+-----BEGIN CERTIFICATE-----
+MIIFiDCCA3CgAwIBAgIIfQmX/vBH6nowDQYJKoZIhvcNAQELBQAwYjELMAkGA1UEBhMCQ04xMjAw
+BgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZIENPLixMVEQuMR8wHQYDVQQD
+DBZHRENBIFRydXN0QVVUSCBSNSBST09UMB4XDTE0MTEyNjA1MTMxNVoXDTQwMTIzMTE1NTk1OVow
+YjELMAkGA1UEBhMCQ04xMjAwBgNVBAoMKUdVQU5HIERPTkcgQ0VSVElGSUNBVEUgQVVUSE9SSVRZ
+IENPLixMVEQuMR8wHQYDVQQDDBZHRENBIFRydXN0QVVUSCBSNSBST09UMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA2aMW8Mh0dHeb7zMNOwZ+Vfy1YI92hhJCfVZmPoiC7XJjDp6L3TQs
+AlFRwxn9WVSEyfFrs0yw6ehGXTjGoqcuEVe6ghWinI9tsJlKCvLriXBjTnnEt1u9ol2x8kECK62p
+OqPseQrsXzrj/e+APK00mxqriCZ7VqKChh/rNYmDf1+uKU49tm7srsHwJ5uu4/Ts765/94Y9cnrr
+pftZTqfrlYwiOXnhLQiPzLyRuEH3FMEjqcOtmkVEs7LXLM3GKeJQEK5cy4KOFxg2fZfmiJqwTTQJ
+9Cy5WmYqsBebnh52nUpmMUHfP/vFBu8btn4aRjb3ZGM74zkYI+dndRTVdVeSN72+ahsmUPI2JgaQ
+xXABZG12ZuGR224HwGGALrIuL4xwp9E7PLOR5G62xDtw8mySlwnNR30YwPO7ng/Wi64HtloPzgsM
+R6flPri9fcebNaBhlzpBdRfMK5Z3KpIhHtmVdiBnaM8Nvd/WHwlqmuLMc3GkL30SgLdTMEZeS1SZ
+D2fJpcjyIMGC7J0R38IC+xo70e0gmu9lZJIQDSri3nDxGGeCjGHeuLzRL5z7D9Ar7Rt2ueQ5Vfj4
+oR24qoAATILnsn8JuLwwoC8N9VKejveSswoAHQBUlwbgsQfZxw9cZX08bVlX5O2ljelAU58VS6Bx
+9hoh49pwBiFYFIeFd3mqgnkCAwEAAaNCMEAwHQYDVR0OBBYEFOLJQJ9NzuiaoXzPDj9lxSmIahlR
+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQDRSVfg
+p8xoWLoBDysZzY2wYUWsEe1jUGn4H3++Fo/9nesLqjJHdtJnJO29fDMylyrHBYZmDRd9FBUb1Ov9
+H5r2XpdptxolpAqzkT9fNqyL7FeoPueBihhXOYV0GkLH6VsTX4/5COmSdI31R9KrO9b7eGZONn35
+6ZLpBN79SWP8bfsUcZNnL0dKt7n/HipzcEYwv1ryL3ml4Y0M2fmyYzeMN2WFcGpcWwlyua1jPLHd
++PwyvzeG5LuOmCd+uh8W4XAR8gPfJWIyJyYYMoSf/wA6E7qaTfRPuBRwIrHKK5DOKcFw9C+df/KQ
+HtZa37dG/OaG+svgIHZ6uqbL9XzeYqWxi+7egmaKTjowHz+Ay60nugxe19CxVsp3cbK1daFQqUBD
+F8Io2c9Si1vIY9RCPqAzekYu9wogRlR+ak8x8YF+QnQ4ZXMn7sZ8uI7XpTrXmKGcjBBV09tL7ECQ
+8s1uV9JiDnxXk7Gnbc2dg7sq5+W2O3FYrf3RRbxake5TFW/TRQl1brqQXR4EzzffHqhmsYzmIGrv
+/EhOdJhCrylvLmrH+33RZjEizIYAfmaDDEL0vTSSwxrqT8p+ck0LcIymSLumoRT2+1hEmRSuqguT
+aaApJUqlyyvdimYHFngVV3Eb7PVHhPOeMTd61X8kreS8/f3MboPoDKi3QWwH3b08hpcv0g==
+-----END CERTIFICATE-----
+
+TrustCor RootCert CA-1
+======================
+-----BEGIN CERTIFICATE-----
+MIIEMDCCAxigAwIBAgIJANqb7HHzA7AZMA0GCSqGSIb3DQEBCwUAMIGkMQswCQYDVQQGEwJQQTEP
+MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
+U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
+dHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0IENBLTEwHhcNMTYwMjA0MTIzMjE2WhcNMjkx
+MjMxMTcyMzE2WjCBpDELMAkGA1UEBhMCUEExDzANBgNVBAgMBlBhbmFtYTEUMBIGA1UEBwwLUGFu
+YW1hIENpdHkxJDAiBgNVBAoMG1RydXN0Q29yIFN5c3RlbXMgUy4gZGUgUi5MLjEnMCUGA1UECwwe
+VHJ1c3RDb3IgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYDVQQDDBZUcnVzdENvciBSb290Q2Vy
+dCBDQS0xMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv463leLCJhJrMxnHQFgKq1mq
+jQCj/IDHUHuO1CAmujIS2CNUSSUQIpidRtLByZ5OGy4sDjjzGiVoHKZaBeYei0i/mJZ0PmnK6bV4
+pQa81QBeCQryJ3pS/C3Vseq0iWEk8xoT26nPUu0MJLq5nux+AHT6k61sKZKuUbS701e/s/OojZz0
+JEsq1pme9J7+wH5COucLlVPat2gOkEz7cD+PSiyU8ybdY2mplNgQTsVHCJCZGxdNuWxu72CVEY4h
+gLW9oHPY0LJ3xEXqWib7ZnZ2+AYfYW0PVcWDtxBWcgYHpfOxGgMFZA6dWorWhnAbJN7+KIor0Gqw
+/Hqi3LJ5DotlDwIDAQABo2MwYTAdBgNVHQ4EFgQU7mtJPHo/DeOxCbeKyKsZn3MzUOcwHwYDVR0j
+BBgwFoAU7mtJPHo/DeOxCbeKyKsZn3MzUOcwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
+AYYwDQYJKoZIhvcNAQELBQADggEBACUY1JGPE+6PHh0RU9otRCkZoB5rMZ5NDp6tPVxBb5UrJKF5
+mDo4Nvu7Zp5I/5CQ7z3UuJu0h3U/IJvOcs+hVcFNZKIZBqEHMwwLKeXx6quj7LUKdJDHfXLy11yf
+ke+Ri7fc7Waiz45mO7yfOgLgJ90WmMCV1Aqk5IGadZQ1nJBfiDcGrVmVCrDRZ9MZyonnMlo2HD6C
+qFqTvsbQZJG2z9m2GM/bftJlo6bEjhcxwft+dtvTheNYsnd6djtsL1Ac59v2Z3kf9YKVmgenFK+P
+3CghZwnS1k1aHBkcjndcw5QkPTJrS37UeJSDvjdNzl/HHk484IkzlQsPpTLWPFp5LBk=
+-----END CERTIFICATE-----
+
+TrustCor RootCert CA-2
+======================
+-----BEGIN CERTIFICATE-----
+MIIGLzCCBBegAwIBAgIIJaHfyjPLWQIwDQYJKoZIhvcNAQELBQAwgaQxCzAJBgNVBAYTAlBBMQ8w
+DQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5MSQwIgYDVQQKDBtUcnVzdENvciBT
+eXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29yIENlcnRpZmljYXRlIEF1dGhvcml0
+eTEfMB0GA1UEAwwWVHJ1c3RDb3IgUm9vdENlcnQgQ0EtMjAeFw0xNjAyMDQxMjMyMjNaFw0zNDEy
+MzExNzI2MzlaMIGkMQswCQYDVQQGEwJQQTEPMA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5h
+bWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3IgU3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5U
+cnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMMFlRydXN0Q29yIFJvb3RDZXJ0
+IENBLTIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnIG7CKqJiJJWQdsg4foDSq8Gb
+ZQWU9MEKENUCrO2fk8eHyLAnK0IMPQo+QVqedd2NyuCb7GgypGmSaIwLgQ5WoD4a3SwlFIIvl9Nk
+RvRUqdw6VC0xK5mC8tkq1+9xALgxpL56JAfDQiDyitSSBBtlVkxs1Pu2YVpHI7TYabS3OtB0PAx1
+oYxOdqHp2yqlO/rOsP9+aij9JxzIsekp8VduZLTQwRVtDr4uDkbIXvRR/u8OYzo7cbrPb1nKDOOb
+XUm4TOJXsZiKQlecdu/vvdFoqNL0Cbt3Nb4lggjEFixEIFapRBF37120Hapeaz6LMvYHL1cEksr1
+/p3C6eizjkxLAjHZ5DxIgif3GIJ2SDpxsROhOdUuxTTCHWKF3wP+TfSvPd9cW436cOGlfifHhi5q
+jxLGhF5DUVCcGZt45vz27Ud+ez1m7xMTiF88oWP7+ayHNZ/zgp6kPwqcMWmLmaSISo5uZk3vFsQP
+eSghYA2FFn3XVDjxklb9tTNMg9zXEJ9L/cb4Qr26fHMC4P99zVvh1Kxhe1fVSntb1IVYJ12/+Ctg
+rKAmrhQhJ8Z3mjOAPF5GP/fDsaOGM8boXg25NSyqRsGFAnWAoOsk+xWq5Gd/bnc/9ASKL3x74xdh
+8N0JqSDIvgmk0H5Ew7IwSjiqqewYmgeCK9u4nBit2uBGF6zPXQIDAQABo2MwYTAdBgNVHQ4EFgQU
+2f4hQG6UnrybPZx9mCAZ5YwwYrIwHwYDVR0jBBgwFoAU2f4hQG6UnrybPZx9mCAZ5YwwYrIwDwYD
+VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAJ5Fngw7tu/h
+Osh80QA9z+LqBrWyOrsGS2h60COXdKcs8AjYeVrXWoSK2BKaG9l9XE1wxaX5q+WjiYndAfrs3fnp
+kpfbsEZC89NiqpX+MWcUaViQCqoL7jcjx1BRtPV+nuN79+TMQjItSQzL/0kMmx40/W5ulop5A7Zv
+2wnL/V9lFDfhOPXzYRZY5LVtDQsEGz9QLX+zx3oaFoBg+Iof6Rsqxvm6ARppv9JYx1RXCI/hOWB3
+S6xZhBqI8d3LT3jX5+EzLfzuQfogsL7L9ziUwOHQhQ+77Sxzq+3+knYaZH9bDTMJBzN7Bj8RpFxw
+PIXAz+OQqIN3+tvmxYxoZxBnpVIt8MSZj3+/0WvitUfW2dCFmU2Umw9Lje4AWkcdEQOsQRivh7dv
+DDqPys/cA8GiCcjl/YBeyGBCARsaU1q7N6a3vLqE6R5sGtRk2tRD/pOLS/IseRYQ1JMLiI+h2IYU
+RpFHmygk71dSTlxCnKr3Sewn6EAes6aJInKc9Q0ztFijMDvd1GpUk74aTfOTlPf8hAs/hCBcNANE
+xdqtvArBAs8e5ZTZ845b2EzwnexhF7sUMlQMAimTHpKG9n/v55IFDlndmQguLvqcAFLTxWYp5KeX
+RKQOKIETNcX2b2TmQcTVL8w0RSXPQQCWPUouwpaYT05KnJe32x+SMsj/D1Fu1uwJ
+-----END CERTIFICATE-----
+
+TrustCor ECA-1
+==============
+-----BEGIN CERTIFICATE-----
+MIIEIDCCAwigAwIBAgIJAISCLF8cYtBAMA0GCSqGSIb3DQEBCwUAMIGcMQswCQYDVQQGEwJQQTEP
+MA0GA1UECAwGUGFuYW1hMRQwEgYDVQQHDAtQYW5hbWEgQ2l0eTEkMCIGA1UECgwbVHJ1c3RDb3Ig
+U3lzdGVtcyBTLiBkZSBSLkwuMScwJQYDVQQLDB5UcnVzdENvciBDZXJ0aWZpY2F0ZSBBdXRob3Jp
+dHkxFzAVBgNVBAMMDlRydXN0Q29yIEVDQS0xMB4XDTE2MDIwNDEyMzIzM1oXDTI5MTIzMTE3Mjgw
+N1owgZwxCzAJBgNVBAYTAlBBMQ8wDQYDVQQIDAZQYW5hbWExFDASBgNVBAcMC1BhbmFtYSBDaXR5
+MSQwIgYDVQQKDBtUcnVzdENvciBTeXN0ZW1zIFMuIGRlIFIuTC4xJzAlBgNVBAsMHlRydXN0Q29y
+IENlcnRpZmljYXRlIEF1dGhvcml0eTEXMBUGA1UEAwwOVHJ1c3RDb3IgRUNBLTEwggEiMA0GCSqG
+SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDPj+ARtZ+odnbb3w9U73NjKYKtR8aja+3+XzP4Q1HpGjOR
+MRegdMTUpwHmspI+ap3tDvl0mEDTPwOABoJA6LHip1GnHYMma6ve+heRK9jGrB6xnhkB1Zem6g23
+xFUfJ3zSCNV2HykVh0A53ThFEXXQmqc04L/NyFIduUd+Dbi7xgz2c1cWWn5DkR9VOsZtRASqnKmc
+p0yJF4OuowReUoCLHhIlERnXDH19MURB6tuvsBzvgdAsxZohmz3tQjtQJvLsznFhBmIhVE5/wZ0+
+fyCMgMsq2JdiyIMzkX2woloPV+g7zPIlstR8L+xNxqE6FXrntl019fZISjZFZtS6mFjBAgMBAAGj
+YzBhMB0GA1UdDgQWBBREnkj1zG1I1KBLf/5ZJC+Dl5mahjAfBgNVHSMEGDAWgBREnkj1zG1I1KBL
+f/5ZJC+Dl5mahjAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQsF
+AAOCAQEABT41XBVwm8nHc2FvcivUwo/yQ10CzsSUuZQRg2dd4mdsdXa/uwyqNsatR5Nj3B5+1t4u
+/ukZMjgDfxT2AHMsWbEhBuH7rBiVDKP/mZb3Kyeb1STMHd3BOuCYRLDE5D53sXOpZCz2HAF8P11F
+hcCF5yWPldwX8zyfGm6wyuMdKulMY/okYWLW2n62HGz1Ah3UKt1VkOsqEUc8Ll50soIipX1TH0Xs
+J5F95yIW6MBoNtjG8U+ARDL54dHRHareqKucBK+tIA5kmE2la8BIWJZpTdwHjFGTot+fDz2LYLSC
+jaoITmJF4PkL0uDgPFveXHEnJcLmA4GLEFPjx1WitJ/X5g==
+-----END CERTIFICATE-----
+
+SSL.com Root Certification Authority RSA
+========================================
+-----BEGIN CERTIFICATE-----
+MIIF3TCCA8WgAwIBAgIIeyyb0xaAMpkwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxDjAM
+BgNVBAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24x
+MTAvBgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBSU0EwHhcNMTYw
+MjEyMTczOTM5WhcNNDEwMjEyMTczOTM5WjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx
+EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NM
+LmNvbSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IFJTQTCCAiIwDQYJKoZIhvcNAQEBBQAD
+ggIPADCCAgoCggIBAPkP3aMrfcvQKv7sZ4Wm5y4bunfh4/WvpOz6Sl2RxFdHaxh3a3by/ZPkPQ/C
+Fp4LZsNWlJ4Xg4XOVu/yFv0AYvUiCVToZRdOQbngT0aXqhvIuG5iXmmxX9sqAn78bMrzQdjt0Oj8
+P2FI7bADFB0QDksZ4LtO7IZl/zbzXmcCC52GVWH9ejjt/uIZALdvoVBidXQ8oPrIJZK0bnoix/ge
+oeOy3ZExqysdBP+lSgQ36YWkMyv94tZVNHwZpEpox7Ko07fKoZOI68GXvIz5HdkihCR0xwQ9aqkp
+k8zruFvh/l8lqjRYyMEjVJ0bmBHDOJx+PYZspQ9AhnwC9FwCTyjLrnGfDzrIM/4RJTXq/LrFYD3Z
+fBjVsqnTdXgDciLKOsMf7yzlLqn6niy2UUb9rwPW6mBo6oUWNmuF6R7As93EJNyAKoFBbZQ+yODJ
+gUEAnl6/f8UImKIYLEJAs/lvOCdLToD0PYFH4Ih86hzOtXVcUS4cK38acijnALXRdMbX5J+tB5O2
+UzU1/Dfkw/ZdFr4hc96SCvigY2q8lpJqPvi8ZVWb3vUNiSYE/CUapiVpy8JtynziWV+XrOvvLsi8
+1xtZPCvM8hnIk2snYxnP/Okm+Mpxm3+T/jRnhE6Z6/yzeAkzcLpmpnbtG3PrGqUNxCITIJRWCk4s
+bE6x/c+cCbqiM+2HAgMBAAGjYzBhMB0GA1UdDgQWBBTdBAkHovV6fVJTEpKV7jiAJQ2mWTAPBgNV
+HRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFN0ECQei9Xp9UlMSkpXuOIAlDaZZMA4GA1UdDwEB/wQE
+AwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAIBgRlCn7Jp0cHh5wYfGVcpNxJK1ok1iOMq8bs3AD/CUr
+dIWQPXhq9LmLpZc7tRiRux6n+UBbkflVma8eEdBcHadm47GUBwwyOabqG7B52B2ccETjit3E+ZUf
+ijhDPwGFpUenPUayvOUiaPd7nNgsPgohyC0zrL/FgZkxdMF1ccW+sfAjRfSda/wZY52jvATGGAsl
+u1OJD7OAUN5F7kR/q5R4ZJjT9ijdh9hwZXT7DrkT66cPYakylszeu+1jTBi7qUD3oFRuIIhxdRjq
+erQ0cuAjJ3dctpDqhiVAq+8zD8ufgr6iIPv2tS0a5sKFsXQP+8hlAqRSAUfdSSLBv9jra6x+3uxj
+MxW3IwiPxg+NQVrdjsW5j+VFP3jbutIbQLH+cU0/4IGiul607BXgk90IH37hVZkLId6Tngr75qNJ
+vTYw/ud3sqB1l7UtgYgXZSD32pAAn8lSzDLKNXz1PQ/YK9f1JmzJBjSWFupwWRoyeXkLtoh/D1JI
+Pb9s2KJELtFOt3JY04kTlf5Eq/jXixtunLwsoFvVagCvXzfh1foQC5ichucmj87w7G6KVwuA406y
+wKBjYZC6VWg3dGq2ktufoYYitmUnDuy2n0Jg5GfCtdpBC8TTi2EbvPofkSvXRAdeuims2cXp71NI
+WuuA8ShYIc2wBlX7Jz9TkHCpBB5XJ7k=
+-----END CERTIFICATE-----
+
+SSL.com Root Certification Authority ECC
+========================================
+-----BEGIN CERTIFICATE-----
+MIICjTCCAhSgAwIBAgIIdebfy8FoW6gwCgYIKoZIzj0EAwIwfDELMAkGA1UEBhMCVVMxDjAMBgNV
+BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xMTAv
+BgNVBAMMKFNTTC5jb20gUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYwMjEy
+MTgxNDAzWhcNNDEwMjEyMTgxNDAzWjB8MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMxEDAO
+BgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjExMC8GA1UEAwwoU1NMLmNv
+bSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuBBAAiA2IA
+BEVuqVDEpiM2nl8ojRfLliJkP9x6jh3MCLOicSS6jkm5BBtHllirLZXI7Z4INcgn64mMU1jrYor+
+8FsPazFSY0E7ic3s7LaNGdM0B9y7xgZ/wkWV7Mt/qCPgCemB+vNH06NjMGEwHQYDVR0OBBYEFILR
+hXMw5zUE044CkvvlpNHEIejNMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUgtGFczDnNQTT
+jgKS++Wk0cQh6M0wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2cAMGQCMG/n61kRpGDPYbCW
+e+0F+S8Tkdzt5fxQaxFGRrMcIQBiu77D5+jNB5n5DQtdcj7EqgIwH7y6C+IwJPt8bYBVCpk+gA0z
+5Wajs6O7pdWLjwkspl1+4vAHCGht0nxpbl/f5Wpl
+-----END CERTIFICATE-----
+
+SSL.com EV Root Certification Authority RSA R2
+==============================================
+-----BEGIN CERTIFICATE-----
+MIIF6zCCA9OgAwIBAgIIVrYpzTS8ePYwDQYJKoZIhvcNAQELBQAwgYIxCzAJBgNVBAYTAlVTMQ4w
+DAYDVQQIDAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9u
+MTcwNQYDVQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIy
+MB4XDTE3MDUzMTE4MTQzN1oXDTQyMDUzMDE4MTQzN1owgYIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQI
+DAVUZXhhczEQMA4GA1UEBwwHSG91c3RvbjEYMBYGA1UECgwPU1NMIENvcnBvcmF0aW9uMTcwNQYD
+VQQDDC5TU0wuY29tIEVWIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgUlNBIFIyMIICIjAN
+BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAjzZlQOHWTcDXtOlG2mvqM0fNTPl9fb69LT3w23jh
+hqXZuglXaO1XPqDQCEGD5yhBJB/jchXQARr7XnAjssufOePPxU7Gkm0mxnu7s9onnQqG6YE3Bf7w
+cXHswxzpY6IXFJ3vG2fThVUCAtZJycxa4bH3bzKfydQ7iEGonL3Lq9ttewkfokxykNorCPzPPFTO
+Zw+oz12WGQvE43LrrdF9HSfvkusQv1vrO6/PgN3B0pYEW3p+pKk8OHakYo6gOV7qd89dAFmPZiw+
+B6KjBSYRaZfqhbcPlgtLyEDhULouisv3D5oi53+aNxPN8k0TayHRwMwi8qFG9kRpnMphNQcAb9Zh
+CBHqurj26bNg5U257J8UZslXWNvNh2n4ioYSA0e/ZhN2rHd9NCSFg83XqpyQGp8hLH94t2S42Oim
+9HizVcuE0jLEeK6jj2HdzghTreyI/BXkmg3mnxp3zkyPuBQVPWKchjgGAGYS5Fl2WlPAApiiECto
+RHuOec4zSnaqW4EWG7WK2NAAe15itAnWhmMOpgWVSbooi4iTsjQc2KRVbrcc0N6ZVTsj9CLg+Slm
+JuwgUHfbSguPvuUCYHBBXtSuUDkiFCbLsjtzdFVHB3mBOagwE0TlBIqulhMlQg+5U8Sb/M3kHN48
++qvWBkofZ6aYMBzdLNvcGJVXZsb/XItW9XcCAwEAAaNjMGEwDwYDVR0TAQH/BAUwAwEB/zAfBgNV
+HSMEGDAWgBT5YLvU49U09rj1BoAlp3PbRmmonjAdBgNVHQ4EFgQU+WC71OPVNPa49QaAJadz20Zp
+qJ4wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQBWs47LCp1Jjr+kxJG7ZhcFUZh1
+++VQLHqe8RT6q9OKPv+RKY9ji9i0qVQBDb6Thi/5Sm3HXvVX+cpVHBK+Rw82xd9qt9t1wkclf7nx
+Y/hoLVUE0fKNsKTPvDxeH3jnpaAgcLAExbf3cqfeIg29MyVGjGSSJuM+LmOW2puMPfgYCdcDzH2G
+guDKBAdRUNf/ktUM79qGn5nX67evaOI5JpS6aLe/g9Pqemc9YmeuJeVy6OLk7K4S9ksrPJ/psEDz
+OFSz/bdoyNrGj1E8svuR3Bznm53htw1yj+KkxKl4+esUrMZDBcJlOSgYAsOCsp0FvmXtll9ldDz7
+CTUue5wT/RsPXcdtgTpWD8w74a8CLyKsRspGPKAcTNZEtF4uXBVmCeEmKf7GUmG6sXP/wwyc5Wxq
+lD8UykAWlYTzWamsX0xhk23RO8yilQwipmdnRC652dKKQbNmC1r7fSOl8hqw/96bg5Qu0T/fkreR
+rwU7ZcegbLHNYhLDkBvjJc40vG93drEQw/cFGsDWr3RiSBd3kmmQYRzelYB0VI8YHMPzA9C/pEN1
+hlMYegouCRw2n5H9gooiS9EOUCXdywMMF8mDAAhONU2Ki+3wApRmLER/y5UnlhetCTCstnEXbosX
+9hwJ1C07mKVx01QT2WDz9UtmT/rx7iASjbSsV7FFY6GsdqnC+w==
+-----END CERTIFICATE-----
+
+SSL.com EV Root Certification Authority ECC
+===========================================
+-----BEGIN CERTIFICATE-----
+MIIClDCCAhqgAwIBAgIILCmcWxbtBZUwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxDjAMBgNV
+BAgMBVRleGFzMRAwDgYDVQQHDAdIb3VzdG9uMRgwFgYDVQQKDA9TU0wgQ29ycG9yYXRpb24xNDAy
+BgNVBAMMK1NTTC5jb20gRVYgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSBFQ0MwHhcNMTYw
+MjEyMTgxNTIzWhcNNDEwMjEyMTgxNTIzWjB/MQswCQYDVQQGEwJVUzEOMAwGA1UECAwFVGV4YXMx
+EDAOBgNVBAcMB0hvdXN0b24xGDAWBgNVBAoMD1NTTCBDb3Jwb3JhdGlvbjE0MDIGA1UEAwwrU1NM
+LmNvbSBFViBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IEVDQzB2MBAGByqGSM49AgEGBSuB
+BAAiA2IABKoSR5CYG/vvw0AHgyBO8TCCogbR8pKGYfL2IWjKAMTH6kMAVIbc/R/fALhBYlzccBYy
+3h+Z1MzFB8gIH2EWB1E9fVwHU+M1OIzfzZ/ZLg1KthkuWnBaBu2+8KGwytAJKaNjMGEwHQYDVR0O
+BBYEFFvKXuXe0oGqzagtZFG22XKbl+ZPMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUW8pe
+5d7SgarNqC1kUbbZcpuX5k8wDgYDVR0PAQH/BAQDAgGGMAoGCCqGSM49BAMCA2gAMGUCMQCK5kCJ
+N+vp1RPZytRrJPOwPYdGWBrssd9v+1a6cGvHOMzosYxPD/fxZ3YOg9AeUY8CMD32IygmTMZgh5Mm
+m7I1HrrW9zzRHM76JTymGoEVW/MSD2zuZYrJh6j5B+BimoxcSg==
+-----END CERTIFICATE-----
diff --git a/patches/source/curl/curl.SlackBuild b/patches/source/curl/curl.SlackBuild
new file mode 100755
index 00000000..fef373d9
--- /dev/null
+++ b/patches/source/curl/curl.SlackBuild
@@ -0,0 +1,153 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2014, 2016, 2017, 2018 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=curl
+VERSION=${VERSION:-$(echo curl-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-curl
+
+# Uncomment to build a no-SSL version:
+#SSLOPT=--without-ssl
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $PKG
+cd $TMP
+rm -rf curl-$VERSION
+tar xvf $CWD/curl-$VERSION.tar.xz || exit 1
+cd curl-$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 \
+ --with-ca-bundle=/usr/share/curl/ca-bundle.crt \
+ --with-libssh2 \
+ --enable-static=no \
+ $SSLOPT || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# We have always installed the man3 documentation, so we'll keep doing it
+# even though these are no longer installed by default. No || exit 1, if
+# it works, it works, and if it doesn't, we tried.
+( cd docs/libcurl
+ make install-man3 DESTDIR=$PKG
+ cd opts
+ make install-man3 DESTDIR=$PKG
+)
+
+mkdir -p $PKG/usr/share/curl
+cp -a $CWD/cacert.pem.bz2 $PKG/usr/share/curl
+( cd $PKG/usr/share/curl
+ bzip2 -d cacert.pem.bz2
+ mv cacert.pem ca-bundle.crt
+ chown root:root ca-bundle.crt
+ chmod 644 ca-bundle.crt
+)
+
+# We don't ship the related perl script (yet):
+rm -f $PKG/usr/man/man1/mk-ca-bundle.1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/libcurl.a
+
+mkdir -p $PKG/usr/doc/curl-$VERSION
+cp -a \
+ COPYING* README* UPGRADE \
+ $PKG/usr/doc/curl-$VERSION
+( cd docs
+ cp -a \
+ BUGS CONTRIBUTE FAQ FEATURES INSTALL INTERNALS MANUAL README* RESOURCES THANKS TODO examples \
+ $PKG/usr/doc/curl-$VERSION )
+# Get rid of .deps cruft:
+rm -rf $PKG/usr/doc/curl-$VERSION/examples/.deps
+
+# 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/${PKGNAM}-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r CHANGES $DOCSDIR/ChangeLog
+fi
+
+# 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
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/curl-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/curl/slack-desc b/patches/source/curl/slack-desc
new file mode 100644
index 00000000..0fe5c532
--- /dev/null
+++ b/patches/source/curl/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------------------------------------------------------|
+curl: curl (command line URL data transfer tool)
+curl:
+curl: Curl is a command line tool for transferring data specified with URL
+curl: syntax. The command is designed to work without user interaction or
+curl: any kind of interactivity. Curl offers a busload of useful tricks
+curl: like proxy support, user authentication, ftp upload, HTTP post, SSL
+curl: (https:) connections, cookies, file transfer resume and more.
+curl:
+curl: libcurl is a library that Curl uses to do its job. It is readily
+curl: available to be used by your software, too.
+curl:
diff --git a/patches/source/dbus/dbus-1.10.x-allow_root_globally.diff b/patches/source/dbus/dbus-1.10.x-allow_root_globally.diff
new file mode 100644
index 00000000..07d1ac33
--- /dev/null
+++ b/patches/source/dbus/dbus-1.10.x-allow_root_globally.diff
@@ -0,0 +1,18 @@
+diff -Nur dbus-1.10.0.orig/bus/system.conf.in dbus-1.10.0/bus/system.conf.in
+--- dbus-1.10.0.orig/bus/system.conf.in 2015-07-21 11:46:00.000000000 -0500
++++ dbus-1.10.0/bus/system.conf.in 2015-10-03 17:47:18.646635691 -0500
+@@ -100,6 +100,14 @@
+ <!-- Include legacy configuration location -->
+ <include ignore_missing="yes">@DBUS_SYSCONFDIR@/dbus-1/system.conf</include>
+
++ <!-- Allow root to do anything over the messagebus.
++ Don't whine about "security" - anyone with root privileges
++ can edit this file anyway, so -ENOHOLE here. -->
++ <policy user="root">
++ <allow send_destination="*"/>
++ <allow send_interface="*"/>
++ </policy>
++
+ <!-- Config files are placed here that among other things, punch
+ holes in the above policy for specific services. -->
+ <includedir>system.d</includedir>
diff --git a/patches/source/dbus/dbus.SlackBuild b/patches/source/dbus/dbus.SlackBuild
new file mode 100755
index 00000000..6b0c343b
--- /dev/null
+++ b/patches/source/dbus/dbus.SlackBuild
@@ -0,0 +1,151 @@
+#!/bin/sh
+
+# Copyright 2007-2010 Robby Workman, Northport, Alabama, USA
+# Copyright 2007-2015 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=dbus
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/dbus-1.10.x-allow_root_globally.diff.gz | patch -p1 --verbose || exit 1
+
+# Don't demand high-quality entropy from expat-2.2.2+ because 1) dbus doesn't
+# need it and 2) it can cause the boot process to hang if dbus times out:
+zcat $CWD/dbus.expat222fix.diff.gz | patch -p1 --verbose || exit 1
+
+# Needed due to expat patch:
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-doxygen-docs \
+ --enable-shared=yes \
+ --enable-static=no \
+ --enable-inotify \
+ --enable-x11-autolaunch \
+ --with-system-pid-file=/var/run/dbus/dbus.pid \
+ --with-system-socket=/var/run/dbus/system_bus_socket \
+ --with-console-auth-dir=/var/run/console \
+ --with-init-scripts=slackware \
+ --build=$ARCH-slackware-linux || exit 1
+
+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
+
+# 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
+
+# Install a custom init script for dbus - the included one is not good for us
+rm $PKG/etc/rc.d/*
+zcat $CWD/rc.messagebus.gz > $PKG/etc/rc.d/rc.messagebus.new
+chmod 0755 $PKG/etc/rc.d/rc.messagebus.new
+
+# Fix some directory ownership
+chown messagebus $PKG/var/lib/dbus
+
+# Add documentation
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* HACKING INSTALL NEWS README* doc/*.{txt,html,dtd} \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+find $PKG/usr/doc/$PKGNAM-$VERSION -type f -exec chmod 0644 {} \;
+
+# 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
+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/dbus/dbus.expat222fix.diff b/patches/source/dbus/dbus.expat222fix.diff
new file mode 100644
index 00000000..4d7f9b74
--- /dev/null
+++ b/patches/source/dbus/dbus.expat222fix.diff
@@ -0,0 +1,74 @@
+From 4397b56a3c31ce0a1b99f528f2422d406ddbc2c8 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv@debian.org>
+Date: Fri, 21 Jul 2017 10:46:39 +0100
+Subject: [PATCH] config-loader-expat: Tell Expat not to defend against hash
+ collisions
+
+By default, Expat uses cryptographic-quality random numbers as a salt for
+its hash algorithm, and since 2.2.1 it gets them from the getrandom
+syscall on Linux. That syscall refuses to return any entropy until the
+kernel's CSPRNG (random pool) has been initialized. Unfortunately, this
+can take as long as 40 seconds on embedded devices with few entropy
+sources, which is too long: if the system dbus-daemon blocks for that
+length of time, important D-Bus clients like systemd and systemd-logind
+time out and fail to connect to it.
+
+We're parsing small configuration files here, and we trust them
+completely, so we don't need to defend against hash collisions: nobody
+is going to be crafting them to cause pathological performance.
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101858
+Signed-off-by: Simon McVittie <smcv@debian.org>
+---
+ bus/config-loader-expat.c | 14 ++++++++++++++
+ configure.ac | 8 ++++++++
+ 2 files changed, 22 insertions(+)
+
+diff --git a/bus/config-loader-expat.c b/bus/config-loader-expat.c
+index b571fda3..27cbe2d0 100644
+--- a/bus/config-loader-expat.c
++++ b/bus/config-loader-expat.c
+@@ -203,6 +203,20 @@ bus_config_load (const DBusString *file,
+ goto failed;
+ }
+
++ /* We do not need protection against hash collisions (CVE-2012-0876)
++ * because we are only parsing trusted XML; and if we let Expat block
++ * waiting for the CSPRNG to be initialized, as it does by default to
++ * defeat CVE-2012-0876, it can cause timeouts during early boot on
++ * entropy-starved embedded devices.
++ *
++ * TODO: When Expat gets a more explicit API for this than
++ * XML_SetHashSalt, check for that too, and use it preferentially.
++ * https://github.com/libexpat/libexpat/issues/91 */
++#if defined(HAVE_XML_SETHASHSALT)
++ /* Any nonzero number will do. https://xkcd.com/221/ */
++ XML_SetHashSalt (expat, 4);
++#endif
++
+ if (!_dbus_string_get_dirname (file, &dirname))
+ {
+ dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);
+diff --git a/configure.ac b/configure.ac
+index e819611a..77548169 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -938,6 +938,14 @@ XML_CFLAGS=
+ AC_SUBST([XML_CFLAGS])
+ AC_SUBST([XML_LIBS])
+
++save_cflags="$CFLAGS"
++save_libs="$LIBS"
++CFLAGS="$CFLAGS $XML_CFLAGS"
++LIBS="$LIBS $XML_LIBS"
++AC_CHECK_FUNCS([XML_SetHashSalt])
++CFLAGS="$save_cflags"
++LIBS="$save_libs"
++
+ # Thread lib detection
+ AC_ARG_VAR([THREAD_LIBS])
+ save_libs="$LIBS"
+--
+2.13.3
+
+
diff --git a/patches/source/dbus/doinst.sh b/patches/source/dbus/doinst.sh
new file mode 100644
index 00000000..dcefd1ff
--- /dev/null
+++ b/patches/source/dbus/doinst.sh
@@ -0,0 +1,26 @@
+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.messagebus.new:
+if [ -e etc/rc.d/rc.messagebus ]; then
+ cp -a etc/rc.d/rc.messagebus etc/rc.d/rc.messagebus.new.incoming
+ cat etc/rc.d/rc.messagebus.new > etc/rc.d/rc.messagebus.new.incoming
+ mv etc/rc.d/rc.messagebus.new.incoming etc/rc.d/rc.messagebus.new
+fi
+
+#config etc/rc.d/rc.messagebus.new
+# No, just install the thing. Leaving it as .new will only lead to problems.
+if [ -r etc/rc.d/rc.messagebus.new ]; then
+ mv etc/rc.d/rc.messagebus.new etc/rc.d/rc.messagebus
+fi
+
diff --git a/patches/source/dbus/rc.messagebus b/patches/source/dbus/rc.messagebus
new file mode 100644
index 00000000..9a1ffce9
--- /dev/null
+++ b/patches/source/dbus/rc.messagebus
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# messagebus: The D-BUS systemwide message bus
+#
+# description: This is a daemon which broadcasts notifications of system events \
+# and other messages. See http://www.freedesktop.org/software/dbus/
+#
+# processname: dbus-daemon
+
+# This is a modified version of the rc.messagebus script distributed with the
+# dbus sources. Thanks to Don Tanner of the GWare <http://gware.org> Project
+# for most of the work involved --Robby Workman <rworkman@slackware.com>
+
+
+PIDFILE=/var/run/dbus/dbus.pid
+
+start() {
+ mkdir -p $(dirname $PIDFILE)
+ if ! ps -u messagebus -c | grep -wq dbus-daemon; then
+ rm -f $(dirname $PIDFILE)/*
+ if [ -x /usr/bin/dbus-uuidgen -a -x /usr/bin/dbus-daemon ] ; then
+ echo "Starting system message bus: /usr/bin/dbus-uuidgen --ensure ; /usr/bin/dbus-daemon --system"
+ /usr/bin/dbus-uuidgen --ensure
+ /usr/bin/dbus-daemon --system 1> /dev/null
+ fi
+ fi
+}
+
+stop() {
+ if [ -e "$PIDFILE" ]; then
+ echo "Stopping system message bus..."
+ pid=$(cat $PIDFILE)
+ kill $pid 1> /dev/null 2> /dev/null
+ # Just in case:
+ killall dbus-daemon 1> /dev/null 2> /dev/null
+ rm -f $PIDFILE
+ fi
+}
+
+reload() {
+ echo "Reloading system message bus configuration..."
+ if [ -e "$PIDFILE" ]; then
+ pid=$(cat $PIDFILE)
+ kill -HUP $pid
+ else
+ killall -HUP dbus-daemon
+ fi
+}
+
+status() {
+ if ps -u messagebus -c | grep -wq dbus-daemon; then
+ echo "System dbus-daemon is running."
+ else
+ echo "System dbus-daemon is stopped."
+ fi
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ echo "You may need to restart your Window Manager to reconnect to the system dbus."
+ ;;
+ reload)
+ reload
+ ;;
+ status)
+ status
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|reload|status}"
+ ;;
+esac
+
diff --git a/patches/source/dbus/slack-desc b/patches/source/dbus/slack-desc
new file mode 100644
index 00000000..0610ab8d
--- /dev/null
+++ b/patches/source/dbus/slack-desc
@@ -0,0 +1,18 @@
+# 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------------------------------------------------------|
+dbus: dbus (D-Bus message bus system)
+dbus:
+dbus: D-Bus supplies both a system daemon (for events such as "new hardware
+dbus: device added" or "printer queue changed") and a per user login
+dbus: session daemon (for general IPC needs among user applications).
+dbus: Also, the message bus is built on top of a general one-to-one message
+dbus: passing framework, which can be used by any two apps to communicate
+dbus: directly (without going through the message bus daemon).
+dbus:
+dbus:
+dbus:
diff --git a/patches/source/dhcp/dhclient-script.PATH.diff b/patches/source/dhcp/dhclient-script.PATH.diff
new file mode 100644
index 00000000..567ed2a4
--- /dev/null
+++ b/patches/source/dhcp/dhclient-script.PATH.diff
@@ -0,0 +1,13 @@
+--- ./client/scripts/linux.orig 2017-07-25 08:39:54.000000000 -0500
++++ ./client/scripts/linux 2017-08-03 15:31:41.067873392 -0500
+@@ -22,6 +22,10 @@
+ # 4. TIMEOUT not tested. ping has a flag I don't know, and I'm suspicious
+ # of the $1 in its args.
+
++# Set a reasonable default path for Linux:
++PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
++export PATH
++
+ # 5. Script refresh in 2017. The aliasing code was too convoluted and needs
+ # to go away. Migrated DHCPv4 script to ip command from iproute2 suite.
+ # This is based on Debian script with some tweaks. ifconfig is no longer
diff --git a/patches/source/dhcp/dhcp-remove-bind-tarball.sh b/patches/source/dhcp/dhcp-remove-bind-tarball.sh
new file mode 100755
index 00000000..5249f967
--- /dev/null
+++ b/patches/source/dhcp/dhcp-remove-bind-tarball.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# Copyright 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.
+
+
+PKGNAM=dhcp
+VERSION=${VERSION:-4.2.1-P1}
+BUILD=${BUILD:-1}
+
+# This is not yet used, but eventually we would like to be able to purge
+# the bundled BIND and use the system's instead. Maybe wishful thinking.
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+cd $TMP
+rm -rf dhcp-$VERSION
+tar xvf $CWD/dhcp-$VERSION.tar.?z* || exit 1
+cd dhcp-$VERSION || exit 1
+
+# good "bob" why? ...
+rm -rf bind/*
+
+# Generate a new .xz compressed tarball in /tmp:
+cd $TMP
+rm -f dhcp-$VERSION.tar*
+tar cf dhcp-$VERSION.tar dhcp-$VERSION
+xz -9 dhcp-$VERSION.tar
+
+echo "$TMP/dhcp-$VERSION.tar.xz created"
+
diff --git a/patches/source/dhcp/dhcp.SlackBuild b/patches/source/dhcp/dhcp.SlackBuild
new file mode 100755
index 00000000..32e372d5
--- /dev/null
+++ b/patches/source/dhcp/dhcp.SlackBuild
@@ -0,0 +1,179 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012 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=dhcp
+# Leave this one .gz as other compressors do not help much and we can keep
+# the original upstream .asc
+VERSION=${VERSION:-$(basename $(echo $PKGNAM-*.tar.gz | cut -f 2- -d -) .tar.gz)}
+BUILD=${BUILD:-1_slack14.2}
+
+PKG_VERSION=$(echo $VERSION | tr - _)
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-dhcp
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf dhcp-$VERSION
+tar xvf $CWD/dhcp-$VERSION.tar.gz || exit 1
+cd dhcp-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Add PATH setting to /sbin/dhclient-script
+zcat $CWD/dhclient-script.PATH.diff.gz | patch -p1 || exit 1
+
+# Fix paths in manual pages
+sed -i \
+ -e "s,ETCDIR,/etc,g" \
+ -e "s,DBDIR,/var/state/dhcp,g" \
+ -e "s,RUNDIR,/var/run,g" \
+ client/*.{5,8} \
+ server/*.{5,8} \
+ doc/*/*.{5,8}
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/dhcp-$VERSION \
+ --build=$ARCH-slackware-linux \
+ --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \
+ --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \
+ --with-cli-lease-file=/var/state/dhcp/dhclient.leases \
+ --with-cli6-lease-file=/var/state/dhcp/dhclient6.leases
+# Default pid dir is still /var/run, so no need to declare it
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# DHCP libraries need not be included, yet.
+rm -rf $PKG/usr/{include,lib${LIBDIRSUFFIX}}
+
+# We need this in /sbin
+mkdir -p $PKG/sbin
+mv $PKG/usr/sbin/dhclient $PKG/sbin
+
+# Install the dhclient-script for linux
+cat client/scripts/linux > $PKG/sbin/dhclient-script
+chmod 700 $PKG/sbin/dhclient-script
+
+# Create the initial *.leases files:
+mkdir -p $PKG/var/state/dhcp
+touch $PKG/var/state/dhcp/dhcpd.leases.new
+touch $PKG/var/state/dhcp/dhcpd6.leases.new
+touch $PKG/var/state/dhcp/dhclient.leases.new
+touch $PKG/var/state/dhcp/dhclient6.leases.new
+
+cat << EOF > $PKG/etc/dhcpd.conf.new
+# dhcpd.conf
+#
+# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
+#
+EOF
+
+cat << EOF > $PKG/etc/dhclient.conf.new
+# dhclient.conf
+#
+# Configuration file for ISC dhclient (see 'man dhclient.conf')
+#
+EOF
+
+# 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/dhcp-$VERSION/examples
+cp -a \
+ LICENSE README RELNOTES \
+ $PKG/usr/doc/dhcp-$VERSION
+mv $PKG/etc/dhcpd.conf $PKG/etc/dhclient.conf \
+ $PKG/usr/doc/dhcp-$VERSION/examples
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$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/dhcp-$PKG_VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/dhcp/doinst.sh b/patches/source/dhcp/doinst.sh
new file mode 100644
index 00000000..a376034a
--- /dev/null
+++ b/patches/source/dhcp/doinst.sh
@@ -0,0 +1,21 @@
+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/dhcpd.conf.new
+config etc/dhclient.conf.new
+config var/state/dhcp/dhcpd.leases.new
+config var/state/dhcp/dhcpd6.leases.new
+config var/state/dhcp/dhclient.leases.new
+config var/state/dhcp/dhclient6.leases.new
+rm -f var/state/dhcp/*.leases.new
+
diff --git a/patches/source/dhcp/slack-desc b/patches/source/dhcp/slack-desc
new file mode 100644
index 00000000..f586e4e1
--- /dev/null
+++ b/patches/source/dhcp/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------------------------------------------------------|
+dhcp: dhcp (DHCP server and client utilities)
+dhcp:
+dhcp: This package provides the ISC's DHCP utilities, including both a
+dhcp: server and client. The DHCP protocol allows a host to contact a
+dhcp: central server which maintains a list of IP addresses which may be
+dhcp: assigned on one or more subnets. A DHCP client may request an
+dhcp: address from this pool, and then use it temporarily for communication
+dhcp: on the network. The DHCP protocol also provides a mechanism whereby
+dhcp: a client can learn important details about the network to which it is
+dhcp: attached, such as the location of a default router or name server.
+dhcp:
diff --git a/patches/source/dnsmasq/dnsmasq.SlackBuild b/patches/source/dnsmasq/dnsmasq.SlackBuild
new file mode 100755
index 00000000..7334056a
--- /dev/null
+++ b/patches/source/dnsmasq/dnsmasq.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2015, 2017 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.
+
+
+VERSION=${VERSION:-$(echo dnsmasq-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-dnsmasq
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf dnsmasq-$VERSION
+tar xvf $CWD/dnsmasq-$VERSION.tar.xz || exit 1
+cd dnsmasq-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/dnsmasq.leasedir.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+make $NUMJOBS all-i18n PREFIX=/usr MANDIR=/usr/man || exit 1
+make install-i18n PREFIX=/usr DESTDIR=$PKG MANDIR=/usr/man || exit 1
+chmod 0755 $PKG/usr/sbin/dnsmasq
+
+mkdir -p $PKG/etc/dnsmasq.d
+
+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
+
+mkdir -p $PKG/var/state/dnsmasq
+
+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/etc
+cat dnsmasq.conf.example > $PKG/etc/dnsmasq.conf.new
+mkdir -p $PKG/etc/rc.d
+zcat $CWD/rc.dnsmasq.gz > $PKG/etc/rc.d/rc.dnsmasq.new
+
+mkdir -p $PKG/usr/doc/dnsmasq-$VERSION
+cp -a \
+ COPYING FAQ doc.html setup.html \
+ $PKG/usr/doc/dnsmasq-$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/*-$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/dnsmasq-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/dnsmasq/dnsmasq.leasedir.diff b/patches/source/dnsmasq/dnsmasq.leasedir.diff
new file mode 100644
index 00000000..9fec6b43
--- /dev/null
+++ b/patches/source/dnsmasq/dnsmasq.leasedir.diff
@@ -0,0 +1,24 @@
+diff -Nur dnsmasq-2.52.orig/dnsmasq.conf.example dnsmasq-2.52/dnsmasq.conf.example
+--- dnsmasq-2.52.orig/dnsmasq.conf.example 2009-11-25 06:55:16.000000000 -0600
++++ dnsmasq-2.52/dnsmasq.conf.example 2010-01-22 15:32:41.137807274 -0600
+@@ -415,7 +415,7 @@
+ # The DHCP server needs somewhere on disk to keep its lease database.
+ # This defaults to a sane location, but if you want to change it, use
+ # the line below.
+-#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
++#dhcp-leasefile=/var/state/dnsmasq/dnsmasq.leases
+
+ # Set the DHCP server to authoritative mode. In this mode it will barge in
+ # and take over the lease for any client which broadcasts on the network,
+diff -Nur dnsmasq-2.52.orig/src/config.h dnsmasq-2.52/src/config.h
+--- dnsmasq-2.52.orig/src/config.h 2010-01-21 08:22:06.000000000 -0600
++++ dnsmasq-2.52/src/config.h 2010-01-22 15:32:41.136833058 -0600
+@@ -47,7 +47,7 @@
+ # elif defined(__sun__) || defined (__sun)
+ # define LEASEFILE "/var/cache/dnsmasq.leases"
+ # else
+-# define LEASEFILE "/var/lib/misc/dnsmasq.leases"
++# define LEASEFILE "/var/state/dnsmasq/dnsmasq.leases"
+ # endif
+ #endif
+
diff --git a/patches/source/dnsmasq/doinst.sh b/patches/source/dnsmasq/doinst.sh
new file mode 100644
index 00000000..9aadc3e5
--- /dev/null
+++ b/patches/source/dnsmasq/doinst.sh
@@ -0,0 +1,26 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+config etc/dnsmasq.conf.new
+preserve_perms etc/rc.d/rc.dnsmasq.new
+
+# This should be mostly useless...
+rm -f etc/rc.d/rc.dnsmasq.new
diff --git a/patches/source/dnsmasq/rc.dnsmasq b/patches/source/dnsmasq/rc.dnsmasq
new file mode 100644
index 00000000..ce584cbd
--- /dev/null
+++ b/patches/source/dnsmasq/rc.dnsmasq
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Start/stop/restart dnsmasq (a small DNS/DHCP server):
+
+# Start dnsmasq:
+dnsmasq_start() {
+ if [ -x /usr/sbin/dnsmasq ]; then
+ echo "Starting dnsmasq: /usr/sbin/dnsmasq"
+ /usr/sbin/dnsmasq
+ fi
+}
+
+# Stop dnsmasq:
+dnsmasq_stop() {
+ killall dnsmasq
+}
+
+# Restart dnsmasq:
+dnsmasq_restart() {
+ dnsmasq_stop
+ sleep 1
+ dnsmasq_start
+}
+
+case "$1" in
+'start')
+ dnsmasq_start
+ ;;
+'stop')
+ dnsmasq_stop
+ ;;
+'restart')
+ dnsmasq_restart
+ ;;
+*)
+ echo "usage rc.dnsmasq: start|stop|restart"
+esac
diff --git a/patches/source/dnsmasq/slack-desc b/patches/source/dnsmasq/slack-desc
new file mode 100644
index 00000000..3db2c42e
--- /dev/null
+++ b/patches/source/dnsmasq/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------------------------------------------------------|
+dnsmasq: dnsmasq (small DNS and DHCP server)
+dnsmasq:
+dnsmasq: Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
+dnsmasq: server. It is designed to provide DNS (and optionally DHCP) to a
+dnsmasq: small network, and can serve the names of local machines which are not
+dnsmasq: in the global DNS.
+dnsmasq:
+dnsmasq: Dnsmasq was written by Simon Kelley.
+dnsmasq:
+dnsmasq: Homepage: http://www.thekelleys.org.uk/dnsmasq/
+dnsmasq:
diff --git a/patches/source/emacs/doinst.sh b/patches/source/emacs/doinst.sh
new file mode 100644
index 00000000..64a3adff
--- /dev/null
+++ b/patches/source/emacs/doinst.sh
@@ -0,0 +1,10 @@
+# Vim ships a better (IMHO) version of ctags, and we don't want
+# to overwrite it with this one. If you really want emacs' ctags
+# either copy or link it into place yourself, or remove the vim
+# packages and reinstall emacs. Besides, does anyone know/use
+# *both* emacs and vi? I'd think that would bring the universe
+# to an end. ;-)
+if [ ! -e usr/bin/ctags ]; then
+ cp -a usr/bin/ctags-emacs usr/bin/ctags
+ cp -a usr/man/man1/ctags-emacs.1.gz usr/man/man1/ctags.1.gz
+fi
diff --git a/patches/source/emacs/emacs.SlackBuild b/patches/source/emacs/emacs.SlackBuild
new file mode 100755
index 00000000..0a019c6a
--- /dev/null
+++ b/patches/source/emacs/emacs.SlackBuild
@@ -0,0 +1,190 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2015, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Slackware build script for emacs-22
+
+# Written by Dušan Stefanović (stefanovic.dusan@gmail.com)
+# Modified by Robby Workman <rworkman@slackbuilds.org>
+# Modified by Patrick Volkerding <volkerdi@slackware.com>
+
+PKGNAM=emacs
+BUILD=${BUILD:-1_slack14.2}
+# Determine version number the tarball is labeled with:
+TARBALLVER=${TARBALLVER:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+# OK, now what's being used as the source directory version number... account
+# for subversions a, b, c, and d in the $TARBALLVER:
+SRCDIRVER=$(echo $TARBALLVER | tr -d a | tr -d b | tr -d c | tr -d d)
+# I guess this is the main "version"... we don't use this variable anywhere below, but
+# defining it is traditional:
+VERSION=$SRCDIRVER
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -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
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$TARBALLVER
+tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1
+cd $PKGNAM-$SRCDIRVER || 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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --program-prefix="" \
+ --program-suffix="" \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --without-gconf \
+ --without-gsettings \
+ --with-x \
+ --with-x-toolkit=gtk3 \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( cd $PKG/usr/bin
+ rm emacs
+ mv emacs-${SRCDIRVER} emacs-${TARBALLVER}-with-x11
+ ln -sf emacs-${TARBALLVER}-with-x11 emacs
+)
+
+# Also add a version of the binary that is not linked to X11:
+cd $TMP
+rm -rf $PKGNAM-$TARBALLVER
+tar xvf $CWD/$PKGNAM-$TARBALLVER.tar.xz || exit 1
+cd $PKGNAM-$SRCDIRVER || 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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --program-prefix="" \
+ --program-suffix="" \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --without-gconf \
+ --without-gsettings \
+ --with-x=no \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+
+# Install the non-x version:
+cat src/emacs > $PKG/usr/bin/emacs-${TARBALLVER}-no-x11
+chown root:root $PKG/usr/bin/emacs-${TARBALLVER}-no-x11
+chmod 1755 $PKG/usr/bin/emacs-${TARBALLVER}-no-x11
+
+# I don't care for broken permissions.
+chmod 755 $PKG/var/games/emacs
+chown -R root:games $PKG/var/games/emacs
+chmod 664 $PKG/var/games/emacs/*
+
+# This avoids a collision with Exuberant Ctags...
+mv $PKG/usr/bin/ctags $PKG/usr/bin/ctags-emacs
+if [ -r $PKG/usr/man/man1/ctags.1 ]; then
+ mv $PKG/usr/man/man1/ctags.1 $PKG/usr/man/man1/ctags-emacs.1
+elif [ -r $PKG/usr/man/man1/ctags.1.gz ]; then
+ mv $PKG/usr/man/man1/ctags.1.gz $PKG/usr/man/man1/ctags-emacs.1.gz
+fi
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+( 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
+)
+
+( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$TARBALLVER
+cp -a \
+ AUTHORS COPYING* INSTALL README* \
+ $PKG/usr/doc/$PKGNAM-$TARBALLVER
+
+# 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}-$TARBALLVER)
+ 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-$TARBALLVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/emacs/slack-desc b/patches/source/emacs/slack-desc
new file mode 100644
index 00000000..94ba8e13
--- /dev/null
+++ b/patches/source/emacs/slack-desc
@@ -0,0 +1,12 @@
+ |-----handy-ruler------------------------------------------------------|
+emacs: emacs (GNU Emacs)
+emacs:
+emacs: Emacs is the extensible, customizable, self-documenting real-time
+emacs: display editor. If this seems to be a bit of a mouthful, an
+emacs: easier explanation is that Emacs is a text editor and more. At
+emacs: its core is an interpreter for Emacs Lisp, a dialect of the Lisp
+emacs: programming language with extensions to support text editing.
+emacs: This version supports X.
+emacs:
+emacs: http://www.gnu.org/software/emacs/
+emacs:
diff --git a/patches/source/expat/expat.SlackBuild b/patches/source/expat/expat.SlackBuild
new file mode 100755
index 00000000..c75088b4
--- /dev/null
+++ b/patches/source/expat/expat.SlackBuild
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 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.
+
+PKGNAM=expat
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-expat
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf expat-$VERSION
+tar xvf $CWD/expat-$VERSION.tar.?z* || exit 1
+cd expat-$VERSION
+
+chown -R root:root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( 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
+)
+
+mkdir -p $PKG/usr/doc/expat-$VERSION
+cp -a \
+ COPYING* Changes README* doc/reference.html \
+ $PKG/usr/doc/expat-$VERSION
+gzip -9 $PKG/usr/man/man?/*.?
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+makepkg -l y -c n $TMP/expat-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/expat/slack-desc b/patches/source/expat/slack-desc
new file mode 100644
index 00000000..348df3c3
--- /dev/null
+++ b/patches/source/expat/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------------------------------------------------------|
+expat: expat (C library for parsing XML)
+expat:
+expat: This is Expat, a C library for parsing XML, written by James Clark.
+expat: Expat is a stream-oriented XML parser used by Python, GNOME, Xft2,
+expat: and other things.
+expat:
+expat:
+expat:
+expat:
+expat:
+expat:
diff --git a/patches/source/freetype/freetype.CVE-2017-8287.diff b/patches/source/freetype/freetype.CVE-2017-8287.diff
new file mode 100644
index 00000000..4f4b67b1
--- /dev/null
+++ b/patches/source/freetype/freetype.CVE-2017-8287.diff
@@ -0,0 +1,31 @@
+From 3774fc08b502c3e685afca098b6e8a195aded6a0 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Sun, 26 Mar 2017 08:32:09 +0200
+Subject: * src/psaux/psobjs.c (t1_builder_close_contour): Add safety guard.
+
+Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=941
+
+diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
+index d18e821..0baf836 100644
+--- a/src/psaux/psobjs.c
++++ b/src/psaux/psobjs.c
+@@ -1718,6 +1718,14 @@
+ first = outline->n_contours <= 1
+ ? 0 : outline->contours[outline->n_contours - 2] + 1;
+
++ /* in malformed fonts it can happen that a contour was started */
++ /* but no points were added */
++ if ( outline->n_contours && first == outline->n_points )
++ {
++ outline->n_contours--;
++ return;
++ }
++
+ /* We must not include the last point in the path if it */
+ /* is located on the first point. */
+ if ( outline->n_points > 1 )
+--
+cgit v1.0-41-gc330
+
diff --git a/patches/source/freetype/freetype.SlackBuild b/patches/source/freetype/freetype.SlackBuild
new file mode 100755
index 00000000..bb514e22
--- /dev/null
+++ b/patches/source/freetype/freetype.SlackBuild
@@ -0,0 +1,123 @@
+#!/bin/sh
+
+# Copyright 2005-2012 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=freetype
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-freetype
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf freetype-$VERSION
+tar xvf $CWD/freetype-$VERSION.tar.xz || exit 1
+cd freetype-$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 {} \;
+
+# This breaks far too many things. Freetype2 developers will have to get their
+# punishment on someone else's distribution.
+zcat $CWD/freetype.illadvisederror.diff.gz | patch -p1 --verbose || exit 1
+
+# The line below enables code patented by Microsoft, so don't uncomment it
+# unless you have a license to use the code and take all legal responsibility
+# for doing so.
+# Please see this web site for more details:
+# http://www.freetype.org/patents.html
+#zcat $CWD/freetype.subpixel.rendering.diff.gz | patch -p1 --verbose || exit 1
+
+# Security fix:
+zcat $CWD/freetype.CVE-2017-8287.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+CFLAGS="$SLKCFLAGS" make setup CFG="--prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --build=$ARCH-slackware-linux"
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# This shouldn't be needed (apps should pick up -I/usr/include/freetype2 from
+# `freetype-config --cflags` while compiling), but it's so often reported as
+# a bug that I'll give in to the point. Now that Freetype1 is pretty much gone
+# having this link shouldn't hurt anything. Try not to rely on it, though.
+mkdir -p $PKG/usr/include
+( cd $PKG/usr/include
+ rm -rf freetype
+ ln -sf freetype2 freetype
+)
+
+# Can't imagine a lot of use for this:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/usr/share/man $PKG/usr/man
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/usr/doc/freetype-$VERSION
+cp -a \
+ docs \
+ README \
+ $PKG/usr/doc/freetype-$VERSION
+# too much
+rm -rf $PKG/usr/doc/freetype-$VERSION/docs/reference
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/freetype-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/freetype/freetype.illadvisederror.diff b/patches/source/freetype/freetype.illadvisederror.diff
new file mode 100644
index 00000000..fee71076
--- /dev/null
+++ b/patches/source/freetype/freetype.illadvisederror.diff
@@ -0,0 +1,31 @@
+diff -Nur freetype-2.6.1.orig/include/freetype/freetype.h freetype-2.6.1/include/freetype/freetype.h
+--- freetype-2.6.1.orig/include/freetype/freetype.h 2015-10-03 23:54:01.000000000 -0500
++++ freetype-2.6.1/include/freetype/freetype.h 2015-10-04 22:13:40.233912984 -0500
+@@ -20,13 +20,20 @@
+ #define __FREETYPE_H__
+
+
+-#ifndef FT_FREETYPE_H
+-#error "`ft2build.h' hasn't been included yet!"
+-#error "Please always use macros to include FreeType header files."
+-#error "Example:"
+-#error " #include <ft2build.h>"
+-#error " #include FT_FREETYPE_H"
+-#endif
++/***************************************************************************/
++/* */
++/* If you think breaking almost 100% of all source that links with */
++/* freetype (anything using a configure file for sure) is a good idea, */
++/* then feel free to uncomment this block. */
++/* */
++/* #ifndef FT_FREETYPE_H */
++/* #error "`ft2build.h' hasn't been included yet!" */
++/* #error "Please always use macros to include FreeType header files." */
++/* #error "Example:" */
++/* #error " #include <ft2build.h>" */
++/* #error " #include FT_FREETYPE_H" */
++/* #endif */
++/***************************************************************************/
+
+
+ #include <ft2build.h>
diff --git a/patches/source/freetype/freetype.subpixel.rendering.diff b/patches/source/freetype/freetype.subpixel.rendering.diff
new file mode 100644
index 00000000..5ab3b379
--- /dev/null
+++ b/patches/source/freetype/freetype.subpixel.rendering.diff
@@ -0,0 +1,12 @@
+diff -Naur freetype-2.6.1.orig/include/freetype/config/ftoption.h freetype-2.6.1/include/freetype/config/ftoption.h
+--- freetype-2.6.1.orig/include/freetype/config/ftoption.h 2015-09-25 07:58:57.000000000 +0200
++++ freetype-2.6.1/include/freetype/config/ftoption.h 2015-10-31 16:11:42.016958163 +0100
+@@ -92,7 +92,7 @@
+ /* This is done to allow FreeType clients to run unmodified, forcing */
+ /* them to display normal gray-level anti-aliased glyphs. */
+ /* */
+-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
++#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+
+
+ /*************************************************************************/
diff --git a/patches/source/freetype/slack-desc b/patches/source/freetype/slack-desc
new file mode 100644
index 00000000..d70b3e75
--- /dev/null
+++ b/patches/source/freetype/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------------------------------------------------------|
+freetype: freetype (A free, high-quality, and portable font engine)
+freetype:
+freetype: FreeType is a free and portable font rendering engine. It has been
+freetype: developed to provide support for a number of font formats, including
+freetype: TrueType, Type 1, and OpenType, and is designed to be small,
+freetype: efficient, highly customizable, and portable while capable of
+freetype: producing high-quality output.
+freetype:
+freetype: Homepage: http://www.freetype.org
+freetype:
+freetype:
diff --git a/patches/source/gcc/0001-i386-Move-struct-ix86_frame-to-machine_function.diff b/patches/source/gcc/0001-i386-Move-struct-ix86_frame-to-machine_function.diff
new file mode 100644
index 00000000..413d7569
--- /dev/null
+++ b/patches/source/gcc/0001-i386-Move-struct-ix86_frame-to-machine_function.diff
@@ -0,0 +1,239 @@
+From 11a3b9034935080b9996caf07fca6353309006f1 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 15 Jan 2018 11:27:24 +0000
+Subject: [PATCH 1/9] i386: Move struct ix86_frame to machine_function
+
+Make ix86_frame available to i386 code generation. This is needed to
+backport the patch set of -mindirect-branch= to mitigate variant #2 of
+the speculative execution vulnerabilities on x86 processors identified
+by CVE-2017-5715, aka Spectre.
+
+ Backport from mainline
+ * config/i386/i386.c (ix86_frame): Moved to ...
+ * config/i386/i386.h (ix86_frame): Here.
+ (machine_function): Add frame.
+ * config/i386/i386.c (ix86_compute_frame_layout): Repace the
+ frame argument with &cfun->machine->frame.
+ (ix86_can_use_return_insn_p): Don't pass &frame to
+ ix86_compute_frame_layout. Copy frame from cfun->machine->frame.
+ (ix86_can_eliminate): Likewise.
+ (ix86_expand_prologue): Likewise.
+ (ix86_expand_epilogue): Likewise.
+ (ix86_expand_split_stack_prologue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256691 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ src/gcc/config/i386/i386.c | 68 ++++++++-------------------------------------
+ src/gcc/config/i386/i386.h | 53 ++++++++++++++++++++++++++++++++++-
+ 2 files changed, 65 insertions(+), 56 deletions(-)
+
+Index: b/src/gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -2306,53 +2306,6 @@ struct GTY(()) stack_local_entry {
+ struct stack_local_entry *next;
+ };
+
+-/* Structure describing stack frame layout.
+- Stack grows downward:
+-
+- [arguments]
+- <- ARG_POINTER
+- saved pc
+-
+- saved static chain if ix86_static_chain_on_stack
+-
+- saved frame pointer if frame_pointer_needed
+- <- HARD_FRAME_POINTER
+- [saved regs]
+- <- regs_save_offset
+- [padding0]
+-
+- [saved SSE regs]
+- <- sse_regs_save_offset
+- [padding1] |
+- | <- FRAME_POINTER
+- [va_arg registers] |
+- |
+- [frame] |
+- |
+- [padding2] | = to_allocate
+- <- STACK_POINTER
+- */
+-struct ix86_frame
+-{
+- int nsseregs;
+- int nregs;
+- int va_arg_size;
+- int red_zone_size;
+- int outgoing_arguments_size;
+-
+- /* The offsets relative to ARG_POINTER. */
+- HOST_WIDE_INT frame_pointer_offset;
+- HOST_WIDE_INT hard_frame_pointer_offset;
+- HOST_WIDE_INT stack_pointer_offset;
+- HOST_WIDE_INT hfp_save_offset;
+- HOST_WIDE_INT reg_save_offset;
+- HOST_WIDE_INT sse_reg_save_offset;
+-
+- /* When save_regs_using_mov is set, emit prologue using
+- move instead of push instructions. */
+- bool save_regs_using_mov;
+-};
+-
+ /* Which cpu are we scheduling for. */
+ enum attr_cpu ix86_schedule;
+
+@@ -2443,7 +2396,7 @@ static unsigned int ix86_function_arg_bo
+ const_tree);
+ static rtx ix86_static_chain (const_tree, bool);
+ static int ix86_function_regparm (const_tree, const_tree);
+-static void ix86_compute_frame_layout (struct ix86_frame *);
++static void ix86_compute_frame_layout (void);
+ static bool ix86_expand_vector_init_one_nonzero (bool, machine_mode,
+ rtx, rtx, int);
+ static void ix86_add_new_builtins (HOST_WIDE_INT);
+@@ -9664,7 +9617,8 @@ ix86_can_use_return_insn_p (void)
+ if (crtl->args.pops_args && crtl->args.size >= 32768)
+ return 0;
+
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = cfun->machine->frame;
+ return (frame.stack_pointer_offset == UNITS_PER_WORD
+ && (frame.nregs + frame.nsseregs) == 0);
+ }
+@@ -10073,8 +10027,8 @@ ix86_can_eliminate (const int from, cons
+ HOST_WIDE_INT
+ ix86_initial_elimination_offset (int from, int to)
+ {
+- struct ix86_frame frame;
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ struct ix86_frame frame = cfun->machine->frame;
+
+ if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
+ return frame.hard_frame_pointer_offset;
+@@ -10113,8 +10067,9 @@ ix86_builtin_setjmp_frame_value (void)
+ /* Fill structure ix86_frame about frame of currently computed function. */
+
+ static void
+-ix86_compute_frame_layout (struct ix86_frame *frame)
++ix86_compute_frame_layout (void)
+ {
++ struct ix86_frame *frame = &cfun->machine->frame;
+ unsigned HOST_WIDE_INT stack_alignment_needed;
+ HOST_WIDE_INT offset;
+ unsigned HOST_WIDE_INT preferred_alignment;
+@@ -11417,7 +11372,8 @@ ix86_expand_prologue (void)
+ m->fs.sp_offset = INCOMING_FRAME_SP_OFFSET;
+ m->fs.sp_valid = true;
+
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = m->frame;
+
+ if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
+ {
+@@ -12083,7 +12039,8 @@ ix86_expand_epilogue (int style)
+ bool using_drap;
+
+ ix86_finalize_stack_realign_flags ();
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = m->frame;
+
+ m->fs.sp_valid = (!frame_pointer_needed
+ || (crtl->sp_is_unchanging
+@@ -12546,7 +12503,8 @@ ix86_expand_split_stack_prologue (void)
+ gcc_assert (flag_split_stack && reload_completed);
+
+ ix86_finalize_stack_realign_flags ();
+- ix86_compute_frame_layout (&frame);
++ ix86_compute_frame_layout ();
++ frame = cfun->machine->frame;
+ allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
+
+ /* This is the label we will branch to if we have enough stack
+Index: b/src/gcc/config/i386/i386.h
+===================================================================
+--- a/src/gcc/config/i386/i386.h
++++ b/src/gcc/config/i386/i386.h
+@@ -2409,9 +2409,56 @@ enum avx_u128_state
+
+ #define FASTCALL_PREFIX '@'
+
++#ifndef USED_FOR_TARGET
++/* Structure describing stack frame layout.
++ Stack grows downward:
++
++ [arguments]
++ <- ARG_POINTER
++ saved pc
++
++ saved static chain if ix86_static_chain_on_stack
++
++ saved frame pointer if frame_pointer_needed
++ <- HARD_FRAME_POINTER
++ [saved regs]
++ <- regs_save_offset
++ [padding0]
++
++ [saved SSE regs]
++ <- sse_regs_save_offset
++ [padding1] |
++ | <- FRAME_POINTER
++ [va_arg registers] |
++ |
++ [frame] |
++ |
++ [padding2] | = to_allocate
++ <- STACK_POINTER
++ */
++struct GTY(()) ix86_frame
++{
++ int nsseregs;
++ int nregs;
++ int va_arg_size;
++ int red_zone_size;
++ int outgoing_arguments_size;
++
++ /* The offsets relative to ARG_POINTER. */
++ HOST_WIDE_INT frame_pointer_offset;
++ HOST_WIDE_INT hard_frame_pointer_offset;
++ HOST_WIDE_INT stack_pointer_offset;
++ HOST_WIDE_INT hfp_save_offset;
++ HOST_WIDE_INT reg_save_offset;
++ HOST_WIDE_INT sse_reg_save_offset;
++
++ /* When save_regs_using_mov is set, emit prologue using
++ move instead of push instructions. */
++ bool save_regs_using_mov;
++};
++
+ /* Machine specific frame tracking during prologue/epilogue generation. */
+
+-#ifndef USED_FOR_TARGET
+ struct GTY(()) machine_frame_state
+ {
+ /* This pair tracks the currently active CFA as reg+offset. When reg
+@@ -2457,6 +2504,9 @@ struct GTY(()) machine_function {
+ int varargs_fpr_size;
+ int optimize_mode_switching[MAX_386_ENTITIES];
+
++ /* Cached initial frame layout for the current function. */
++ struct ix86_frame frame;
++
+ /* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE
+ has been computed for. */
+ int use_fast_prologue_epilogue_nregs;
+@@ -2524,6 +2574,7 @@ struct GTY(()) machine_function {
+ #define ix86_current_function_calls_tls_descriptor \
+ (ix86_tls_descriptor_calls_expanded_in_cfun && df_regs_ever_live_p (SP_REG))
+ #define ix86_static_chain_on_stack (cfun->machine->static_chain_on_stack)
++#define ix86_red_zone_size (cfun->machine->frame.red_zone_size)
+
+ /* Control behavior of x86_file_start. */
+ #define X86_FILE_START_VERSION_DIRECTIVE false
diff --git a/patches/source/gcc/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff b/patches/source/gcc/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff
new file mode 100644
index 00000000..7b928df7
--- /dev/null
+++ b/patches/source/gcc/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff
@@ -0,0 +1,72 @@
+From 18202ba32cb8de22fc43a5839235a751d0f5c4d9 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 15 Jan 2018 11:28:44 +0000
+Subject: [PATCH 2/9] i386: Use reference of struct ix86_frame to avoid copy
+
+When there is no need to make a copy of ix86_frame, we can use reference
+of struct ix86_frame to avoid copy.
+
+ Backport from mainline
+ * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
+ of struct ix86_frame.
+ (ix86_initial_elimination_offset): Likewise.
+ (ix86_expand_split_stack_prologue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256692 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/i386/i386.c | 9 +++------
+ gcc/testsuite/ChangeLog | 8 ++++++++
+ 2 files changed, 11 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 8133372..397ef7c 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -11843,8 +11843,6 @@ symbolic_reference_mentioned_p (rtx op)
+ bool
+ ix86_can_use_return_insn_p (void)
+ {
+- struct ix86_frame frame;
+-
+ if (! reload_completed || frame_pointer_needed)
+ return 0;
+
+@@ -11857,7 +11855,7 @@ ix86_can_use_return_insn_p (void)
+ return 0;
+
+ ix86_compute_frame_layout ();
+- frame = cfun->machine->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+ return (frame.stack_pointer_offset == UNITS_PER_WORD
+ && (frame.nregs + frame.nsseregs) == 0);
+ }
+@@ -12344,7 +12342,7 @@ HOST_WIDE_INT
+ ix86_initial_elimination_offset (int from, int to)
+ {
+ ix86_compute_frame_layout ();
+- struct ix86_frame frame = cfun->machine->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+
+ if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM)
+ return frame.hard_frame_pointer_offset;
+@@ -14860,7 +14858,6 @@ static GTY(()) rtx split_stack_fn_large;
+ void
+ ix86_expand_split_stack_prologue (void)
+ {
+- struct ix86_frame frame;
+ HOST_WIDE_INT allocate;
+ unsigned HOST_WIDE_INT args_size;
+ rtx_code_label *label;
+@@ -14873,7 +14870,7 @@ ix86_expand_split_stack_prologue (void)
+
+ ix86_finalize_stack_realign_flags ();
+ ix86_compute_frame_layout ();
+- frame = cfun->machine->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+ allocate = frame.stack_pointer_offset - INCOMING_FRAME_SP_OFFSET;
+
+ /* This is the label we will branch to if we have enough stack
+--
+2.7.4
+
diff --git a/patches/source/gcc/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff b/patches/source/gcc/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff
new file mode 100644
index 00000000..f6f30d1d
--- /dev/null
+++ b/patches/source/gcc/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff
@@ -0,0 +1,59 @@
+From 839ca2d69157ef03c8df0ab912dacdb991738694 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 15 Jan 2018 11:33:42 +0000
+Subject: [PATCH 3/9] i386: More use reference of struct ix86_frame to avoid copy
+
+When there is no need to make a copy of ix86_frame, we can use reference
+of struct ix86_frame to avoid copy.
+
+ Backport from mainline
+ * config/i386/i386.c (ix86_expand_prologue): Use reference of
+ struct ix86_frame.
+ (ix86_expand_epilogue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256695 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 7 +++++++
+ gcc/config/i386/i386.c | 6 ++----
+ 2 files changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 397ef7c..986e6d7 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -13667,7 +13667,6 @@ ix86_expand_prologue (void)
+ {
+ struct machine_function *m = cfun->machine;
+ rtx insn, t;
+- struct ix86_frame frame;
+ HOST_WIDE_INT allocate;
+ bool int_registers_saved;
+ bool sse_registers_saved;
+@@ -13691,7 +13690,7 @@ ix86_expand_prologue (void)
+ m->fs.sp_valid = true;
+
+ ix86_compute_frame_layout ();
+- frame = m->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+
+ if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
+ {
+@@ -14354,13 +14353,12 @@ ix86_expand_epilogue (int style)
+ {
+ struct machine_function *m = cfun->machine;
+ struct machine_frame_state frame_state_save = m->fs;
+- struct ix86_frame frame;
+ bool restore_regs_via_mov;
+ bool using_drap;
+
+ ix86_finalize_stack_realign_flags ();
+ ix86_compute_frame_layout ();
+- frame = m->frame;
++ struct ix86_frame &frame = cfun->machine->frame;
+
+ m->fs.sp_valid = (!frame_pointer_needed
+ || (crtl->sp_is_unchanging
+--
+2.7.4
+
diff --git a/patches/source/gcc/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff b/patches/source/gcc/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff
new file mode 100644
index 00000000..7678444c
--- /dev/null
+++ b/patches/source/gcc/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff
@@ -0,0 +1,63 @@
+From c25b81ba01fa9ac0c1baa3aabd64190c47928f03 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 12:49:29 +0000
+Subject: [PATCH 4/9] i386: Don't use reference of struct ix86_frame
+
+Use reference of struct ix86_frame in ix86_expand_prologue and
+ix86_expand_epilogue caused:
+
+raised STORAGE_ERROR : stack overflow or erroneous memory access
+make[5]: *** [/export/gnu/import/git/sources/gcc/gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 1
+
+on trunk when bootstrapping GCC with ada on x86-64.
+
+ * config/i386/i386.c (ix86_expand_prologue): Don't use reference
+ of struct ix86_frame.
+ (ix86_expand_epilogue): Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256742 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 10 ++++++++++
+ gcc/config/i386/i386.c | 6 ++++--
+ 2 files changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index e758387..ba2abc5 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -14061,6 +14061,7 @@ ix86_expand_prologue (void)
+ {
+ struct machine_function *m = cfun->machine;
+ rtx insn, t;
++ struct ix86_frame frame;
+ HOST_WIDE_INT allocate;
+ bool int_registers_saved;
+ bool sse_registers_saved;
+@@ -14084,7 +14085,7 @@ ix86_expand_prologue (void)
+ m->fs.sp_valid = true;
+
+ ix86_compute_frame_layout ();
+- struct ix86_frame &frame = cfun->machine->frame;
++ frame = m->frame;
+
+ if (!TARGET_64BIT && ix86_function_ms_hook_prologue (current_function_decl))
+ {
+@@ -14747,12 +14748,13 @@ ix86_expand_epilogue (int style)
+ {
+ struct machine_function *m = cfun->machine;
+ struct machine_frame_state frame_state_save = m->fs;
++ struct ix86_frame frame;
+ bool restore_regs_via_mov;
+ bool using_drap;
+
+ ix86_finalize_stack_realign_flags ();
+ ix86_compute_frame_layout ();
+- struct ix86_frame &frame = cfun->machine->frame;
++ frame = m->frame;
+
+ m->fs.sp_valid = (!frame_pointer_needed
+ || (crtl->sp_is_unchanging
+--
+2.7.4
+
diff --git a/patches/source/gcc/0005-x86-Add-mindirect-branch-doc.diff b/patches/source/gcc/0005-x86-Add-mindirect-branch-doc.diff
new file mode 100644
index 00000000..bcaf572b
--- /dev/null
+++ b/patches/source/gcc/0005-x86-Add-mindirect-branch-doc.diff
@@ -0,0 +1,279 @@
+From c6b72be421ded17e0c156070ba6e90aa6c335ed6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 10:59:42 +0000
+Subject: [PATCH 5/9] x86: Add -mindirect-branch= (documentation)
+
+Add -mindirect-branch= option to convert indirect call and jump to call
+and return thunks. The default is 'keep', which keeps indirect call and
+jump unmodified. 'thunk' converts indirect call and jump to call and
+return thunk. 'thunk-inline' converts indirect call and jump to inlined
+call and return thunk. 'thunk-extern' converts indirect call and jump to
+external call and return thunk provided in a separate object file. You
+can control this behavior for a specific function by using the function
+attribute indirect_branch.
+
+2 kinds of thunks are geneated. Memory thunk where the function address
+is at the top of the stack:
+
+__x86_indirect_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+Indirect jmp via memory, "jmp mem", is converted to
+
+ push memory
+ jmp __x86_indirect_thunk
+
+Indirect call via memory, "call mem", is converted to
+
+ jmp L2
+L1:
+ push [mem]
+ jmp __x86_indirect_thunk
+L2:
+ call L1
+
+Register thunk where the function address is in a register, reg:
+
+__x86_indirect_thunk_reg:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ movq %reg, (%rsp)|movl %reg, (%esp)
+ ret
+
+where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
+(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
+
+Indirect jmp via register, "jmp reg", is converted to
+
+ jmp __x86_indirect_thunk_reg
+
+Indirect call via register, "call reg", is converted to
+
+ call __x86_indirect_thunk_reg
+
+gcc/
+
+ Backport from mainline
+ * config/i386/i386-opts.h (indirect_branch): New.
+ * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
+ * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
+ with local indirect jump when converting indirect call and jump.
+ (ix86_set_indirect_branch_type): New.
+ (ix86_set_current_function): Call ix86_set_indirect_branch_type.
+ (indirectlabelno): New.
+ (indirect_thunk_needed): Likewise.
+ (indirect_thunk_bnd_needed): Likewise.
+ (indirect_thunks_used): Likewise.
+ (indirect_thunks_bnd_used): Likewise.
+ (INDIRECT_LABEL): Likewise.
+ (indirect_thunk_name): Likewise.
+ (output_indirect_thunk): Likewise.
+ (output_indirect_thunk_function): Likewise.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (ix86_output_indirect_branch): Likewise.
+ (ix86_output_indirect_jmp): Likewise.
+ (ix86_code_end): Call output_indirect_thunk_function if needed.
+ (ix86_output_call_insn): Call ix86_output_indirect_branch if
+ needed.
+ (ix86_handle_fndecl_attribute): Handle indirect_branch.
+ (ix86_attribute_table): Add indirect_branch.
+ * config/i386/i386.h (machine_function): Add indirect_branch_type
+ and has_local_indirect_jump.
+ * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
+ to true.
+ (tablejump): Likewise.
+ (*indirect_jump): Use ix86_output_indirect_jmp.
+ (*tablejump_1): Likewise.
+ (simple_return_indirect_internal): Likewise.
+ * config/i386/i386.opt (mindirect-branch=): New option.
+ (indirect_branch): New.
+ (keep): Likewise.
+ (thunk): Likewise.
+ (thunk-inline): Likewise.
+ (thunk-extern): Likewise.
+ * doc/extend.texi: Document indirect_branch function attribute.
+ * doc/invoke.texi: Document -mindirect-branch= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ * gcc.target/i386/indirect-thunk-1.c: New test.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256732 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[UBUNTU NOTES: Updated for gcc-5.4 to include defines for
+ FIRST_INT_REG, LAST_INT_REG, and LEGACY_INT_REGNO_P as defined in
+ https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222269.
+ Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie, tyhicks]
+---
+ src/gcc/config/i386/i386-opts.h | 13
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 621 +++++++++++-
+ src/gcc/config/i386/i386.h | 12
+ src/gcc/config/i386/i386.md | 26
+ src/gcc/config/i386/i386.opt | 20
+ src/gcc/doc/extend.texi | 10
+ src/gcc/doc/invoke.texi | 14
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 42
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 43
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 44
+ 33 files changed, 1334 insertions(+), 15 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+
+Index: b/src/gcc/doc/extend.texi
+===================================================================
+--- a/src/gcc/doc/extend.texi
++++ b/src/gcc/doc/extend.texi
+@@ -4119,6 +4119,16 @@ Specify which floating-point unit to use
+ @code{target("fpmath=sse,387")} option must be specified as
+ @code{target("fpmath=sse+387")} because the comma would separate
+ different options.
++
++@item indirect_branch("@var{choice}")
++@cindex @code{indirect_branch} function attribute, x86
++On x86 targets, the @code{indirect_branch} attribute causes the compiler
++to convert indirect call and jump with @var{choice}. @samp{keep}
++keeps indirect call and jump unmodified. @samp{thunk} converts indirect
++call and jump to call and return thunk. @samp{thunk-inline} converts
++indirect call and jump to inlined call and return thunk.
++@samp{thunk-extern} converts indirect call and jump to external call
++and return thunk provided in a separate object file.
+ @end table
+
+ On the PowerPC, the following options are allowed:
+Index: b/src/gcc/doc/invoke.texi
+===================================================================
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -1090,7 +1090,8 @@ See RS/6000 and PowerPC Options.
+ -m32 -m64 -mx32 -m16 -mlarge-data-threshold=@var{num} @gol
+ -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
+ -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
+--malign-data=@var{type} -mstack-protector-guard=@var{guard}}
++-malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
++-mindirect-branch=@var{choice}}
+
+ @emph{x86 Windows Options}
+ @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
+@@ -24017,6 +24018,17 @@ The default value of this option is enab
+ of the option is @option{-fno-sync-libcalls}. This option is used in
+ the implementation of the @file{libatomic} runtime library.
+
++@item -mindirect-branch=@var{choice}
++@opindex -mindirect-branch
++Convert indirect call and jump with @var{choice}. The default is
++@samp{keep}, which keeps indirect call and jump unmodified.
++@samp{thunk} converts indirect call and jump to call and return thunk.
++@samp{thunk-inline} converts indirect call and jump to inlined call
++and return thunk. @samp{thunk-extern} converts indirect call and jump
++to external call and return thunk provided in a separate object file.
++You can control this behavior for a specific function by using the
++function attribute @code{indirect_branch}. @xref{Function Attributes}.
++
+ @end table
+
+ @c man end
diff --git a/patches/source/gcc/0005-x86-Add-mindirect-branch.diff b/patches/source/gcc/0005-x86-Add-mindirect-branch.diff
new file mode 100644
index 00000000..db9690cc
--- /dev/null
+++ b/patches/source/gcc/0005-x86-Add-mindirect-branch.diff
@@ -0,0 +1,1870 @@
+From c6b72be421ded17e0c156070ba6e90aa6c335ed6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 10:59:42 +0000
+Subject: [PATCH 5/9] x86: Add -mindirect-branch=
+
+Add -mindirect-branch= option to convert indirect call and jump to call
+and return thunks. The default is 'keep', which keeps indirect call and
+jump unmodified. 'thunk' converts indirect call and jump to call and
+return thunk. 'thunk-inline' converts indirect call and jump to inlined
+call and return thunk. 'thunk-extern' converts indirect call and jump to
+external call and return thunk provided in a separate object file. You
+can control this behavior for a specific function by using the function
+attribute indirect_branch.
+
+2 kinds of thunks are geneated. Memory thunk where the function address
+is at the top of the stack:
+
+__x86_indirect_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+Indirect jmp via memory, "jmp mem", is converted to
+
+ push memory
+ jmp __x86_indirect_thunk
+
+Indirect call via memory, "call mem", is converted to
+
+ jmp L2
+L1:
+ push [mem]
+ jmp __x86_indirect_thunk
+L2:
+ call L1
+
+Register thunk where the function address is in a register, reg:
+
+__x86_indirect_thunk_reg:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ movq %reg, (%rsp)|movl %reg, (%esp)
+ ret
+
+where reg is one of (r|e)ax, (r|e)dx, (r|e)cx, (r|e)bx, (r|e)si, (r|e)di,
+(r|e)bp, r8, r9, r10, r11, r12, r13, r14 and r15.
+
+Indirect jmp via register, "jmp reg", is converted to
+
+ jmp __x86_indirect_thunk_reg
+
+Indirect call via register, "call reg", is converted to
+
+ call __x86_indirect_thunk_reg
+
+gcc/
+
+ Backport from mainline
+ * config/i386/i386-opts.h (indirect_branch): New.
+ * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
+ * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
+ with local indirect jump when converting indirect call and jump.
+ (ix86_set_indirect_branch_type): New.
+ (ix86_set_current_function): Call ix86_set_indirect_branch_type.
+ (indirectlabelno): New.
+ (indirect_thunk_needed): Likewise.
+ (indirect_thunk_bnd_needed): Likewise.
+ (indirect_thunks_used): Likewise.
+ (indirect_thunks_bnd_used): Likewise.
+ (INDIRECT_LABEL): Likewise.
+ (indirect_thunk_name): Likewise.
+ (output_indirect_thunk): Likewise.
+ (output_indirect_thunk_function): Likewise.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (ix86_output_indirect_branch): Likewise.
+ (ix86_output_indirect_jmp): Likewise.
+ (ix86_code_end): Call output_indirect_thunk_function if needed.
+ (ix86_output_call_insn): Call ix86_output_indirect_branch if
+ needed.
+ (ix86_handle_fndecl_attribute): Handle indirect_branch.
+ (ix86_attribute_table): Add indirect_branch.
+ * config/i386/i386.h (machine_function): Add indirect_branch_type
+ and has_local_indirect_jump.
+ * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
+ to true.
+ (tablejump): Likewise.
+ (*indirect_jump): Use ix86_output_indirect_jmp.
+ (*tablejump_1): Likewise.
+ (simple_return_indirect_internal): Likewise.
+ * config/i386/i386.opt (mindirect-branch=): New option.
+ (indirect_branch): New.
+ (keep): Likewise.
+ (thunk): Likewise.
+ (thunk-inline): Likewise.
+ (thunk-extern): Likewise.
+ * doc/extend.texi: Document indirect_branch function attribute.
+ * doc/invoke.texi: Document -mindirect-branch= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ * gcc.target/i386/indirect-thunk-1.c: New test.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256732 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[UBUNTU NOTES: Updated for gcc-5.4 to include defines for
+ FIRST_INT_REG, LAST_INT_REG, and LEGACY_INT_REGNO_P as defined in
+ https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=222269.
+ Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie, tyhicks]
+---
+ src/gcc/config/i386/i386-opts.h | 13
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 621 +++++++++++-
+ src/gcc/config/i386/i386.h | 12
+ src/gcc/config/i386/i386.md | 26
+ src/gcc/config/i386/i386.opt | 20
+ src/gcc/doc/extend.texi | 10
+ src/gcc/doc/invoke.texi | 14
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 23
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 22
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 44
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 42
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 19
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 43
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 20
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 21
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 44
+ 33 files changed, 1334 insertions(+), 15 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+
+Index: b/src/gcc/config/i386/i386-opts.h
+===================================================================
+--- a/src/gcc/config/i386/i386-opts.h
++++ b/src/gcc/config/i386/i386-opts.h
+@@ -99,4 +99,17 @@ enum stack_protector_guard {
+ SSP_GLOBAL /* global canary */
+ };
+
++/* This is used to mitigate variant #2 of the speculative execution
++ vulnerabilities on x86 processors identified by CVE-2017-5715, aka
++ Spectre. They convert indirect branches and function returns to
++ call and return thunks to avoid speculative execution via indirect
++ call, jmp and ret. */
++enum indirect_branch {
++ indirect_branch_unset = 0,
++ indirect_branch_keep,
++ indirect_branch_thunk,
++ indirect_branch_thunk_inline,
++ indirect_branch_thunk_extern
++};
++
+ #endif
+Index: b/src/gcc/config/i386/i386-protos.h
+===================================================================
+--- a/src/gcc/config/i386/i386-protos.h
++++ b/src/gcc/config/i386/i386-protos.h
+@@ -306,6 +306,7 @@ extern enum attr_cpu ix86_schedule;
+ #endif
+
+ extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
++extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
+
+ #ifdef RTX_CODE
+ /* Target data for multipass lookahead scheduling.
+Index: b/src/gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -2554,12 +2554,23 @@ make_pass_insert_vzeroupper (gcc::contex
+ return new pass_insert_vzeroupper (ctxt);
+ }
+
+-/* Return true if a red-zone is in use. */
++/* Return true if a red-zone is in use. We can't use red-zone when
++ there are local indirect jumps, like "indirect_jump" or "tablejump",
++ which jumps to another place in the function, since "call" in the
++ indirect thunk pushes the return address onto stack, destroying
++ red-zone.
++
++ TODO: If we can reserve the first 2 WORDs, for PUSH and, another
++ for CALL, in red-zone, we can allow local indirect jumps with
++ indirect thunk. */
+
+ static inline bool
+ ix86_using_red_zone (void)
+ {
+- return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI;
++ return (TARGET_RED_ZONE
++ && !TARGET_64BIT_MS_ABI
++ && (!cfun->machine->has_local_indirect_jump
++ || cfun->machine->indirect_branch_type == indirect_branch_keep));
+ }
+
+ /* Return a string that documents the current -m options. The caller is
+@@ -5126,6 +5137,37 @@ ix86_reset_previous_fndecl (void)
+ ix86_previous_fndecl = NULL_TREE;
+ }
+
++/* Set the indirect_branch_type field from the function FNDECL. */
++
++static void
++ix86_set_indirect_branch_type (tree fndecl)
++{
++ if (cfun->machine->indirect_branch_type == indirect_branch_unset)
++ {
++ tree attr = lookup_attribute ("indirect_branch",
++ DECL_ATTRIBUTES (fndecl));
++ if (attr != NULL)
++ {
++ tree args = TREE_VALUE (attr);
++ if (args == NULL)
++ gcc_unreachable ();
++ tree cst = TREE_VALUE (args);
++ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_keep;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_thunk;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_thunk_inline;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
++ cfun->machine->indirect_branch_type = indirect_branch_thunk_extern;
++ else
++ gcc_unreachable ();
++ }
++ else
++ cfun->machine->indirect_branch_type = ix86_indirect_branch;
++ }
++}
++
+ /* Establish appropriate back-end context for processing the function
+ FNDECL. The argument might be NULL to indicate processing at top
+ level, outside of any function scope. */
+@@ -5136,7 +5178,11 @@ ix86_set_current_function (tree fndecl)
+ several times in the course of compiling a function, and we don't want to
+ slow things down too much or call target_reinit when it isn't safe. */
+ if (fndecl == ix86_previous_fndecl)
+- return;
++ {
++ if (fndecl != NULL_TREE)
++ ix86_set_indirect_branch_type (fndecl);
++ return;
++ }
+
+ tree old_tree;
+ if (ix86_previous_fndecl == NULL_TREE)
+@@ -5153,6 +5199,8 @@ ix86_set_current_function (tree fndecl)
+ return;
+ }
+
++ ix86_set_indirect_branch_type (fndecl);
++
+ tree new_tree = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
+ if (new_tree == NULL_TREE)
+ new_tree = target_option_default_node;
+@@ -9681,6 +9729,220 @@ ix86_setup_frame_addresses (void)
+ # endif
+ #endif
+
++/* Label count for call and return thunks. It is used to make unique
++ labels in call and return thunks. */
++static int indirectlabelno;
++
++/* True if call and return thunk functions are needed. */
++static bool indirect_thunk_needed = false;
++/* True if call and return thunk functions with the BND prefix are
++ needed. */
++static bool indirect_thunk_bnd_needed = false;
++
++/* Bit masks of integer registers, which contain branch target, used
++ by call and return thunks functions. */
++static int indirect_thunks_used;
++/* Bit masks of integer registers, which contain branch target, used
++ by call and return thunks functions with the BND prefix. */
++static int indirect_thunks_bnd_used;
++
++#ifndef INDIRECT_LABEL
++# define INDIRECT_LABEL "LIND"
++#endif
++
++/* Fills in the label name that should be used for the indirect thunk. */
++
++static void
++indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
++{
++ if (USE_HIDDEN_LINKONCE)
++ {
++ const char *bnd = need_bnd_p ? "_bnd" : "";
++ if (regno >= 0)
++ {
++ const char *reg_prefix;
++ if (LEGACY_INT_REGNO_P (regno))
++ reg_prefix = TARGET_64BIT ? "r" : "e";
++ else
++ reg_prefix = "";
++ sprintf (name, "__x86_indirect_thunk%s_%s%s",
++ bnd, reg_prefix, reg_names[regno]);
++ }
++ else
++ sprintf (name, "__x86_indirect_thunk%s", bnd);
++ }
++ else
++ {
++ if (regno >= 0)
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITBR", regno);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITR", regno);
++ }
++ else
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
++ }
++ }
++}
++
++/* Output a call and return thunk for indirect branch. If BND_P is
++ true, the BND prefix is needed. If REGNO != -1, the function
++ address is in REGNO and the call and return thunk looks like:
++
++ call L2
++ L1:
++ pause
++ jmp L1
++ L2:
++ mov %REG, (%sp)
++ ret
++
++ Otherwise, the function address is on the top of stack and the
++ call and return thunk looks like:
++
++ call L2
++ L1:
++ pause
++ jmp L1
++ L2:
++ lea WORD_SIZE(%sp), %sp
++ ret
++ */
++
++static void
++output_indirect_thunk (bool need_bnd_p, int regno)
++{
++ char indirectlabel1[32];
++ char indirectlabel2[32];
++
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1, INDIRECT_LABEL,
++ indirectlabelno++);
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2, INDIRECT_LABEL,
++ indirectlabelno++);
++
++ /* Call */
++ if (need_bnd_p)
++ fputs ("\tbnd call\t", asm_out_file);
++ else
++ fputs ("\tcall\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel2);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
++
++ /* Pause + lfence. */
++ fprintf (asm_out_file, "\tpause\n\tlfence\n");
++
++ /* Jump. */
++ fputs ("\tjmp\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel1);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
++
++ if (regno >= 0)
++ {
++ /* MOV. */
++ rtx xops[2];
++ xops[0] = gen_rtx_MEM (word_mode, stack_pointer_rtx);
++ xops[1] = gen_rtx_REG (word_mode, regno);
++ output_asm_insn ("mov\t{%1, %0|%0, %1}", xops);
++ }
++ else
++ {
++ /* LEA. */
++ rtx xops[2];
++ xops[0] = stack_pointer_rtx;
++ xops[1] = plus_constant (Pmode, stack_pointer_rtx, UNITS_PER_WORD);
++ output_asm_insn ("lea\t{%E1, %0|%0, %E1}", xops);
++ }
++
++ if (need_bnd_p)
++ fputs ("\tbnd ret\n", asm_out_file);
++ else
++ fputs ("\tret\n", asm_out_file);
++}
++
++/* Output a funtion with a call and return thunk for indirect branch.
++ If BND_P is true, the BND prefix is needed. If REGNO != -1, the
++ function address is in REGNO. Otherwise, the function address is
++ on the top of stack. */
++
++static void
++output_indirect_thunk_function (bool need_bnd_p, int regno)
++{
++ char name[32];
++ tree decl;
++
++ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
++ indirect_thunk_name (name, regno, need_bnd_p);
++ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
++ get_identifier (name),
++ build_function_type_list (void_type_node, NULL_TREE));
++ DECL_RESULT (decl) = build_decl (BUILTINS_LOCATION, RESULT_DECL,
++ NULL_TREE, void_type_node);
++ TREE_PUBLIC (decl) = 1;
++ TREE_STATIC (decl) = 1;
++ DECL_IGNORED_P (decl) = 1;
++
++#if TARGET_MACHO
++ if (TARGET_MACHO)
++ {
++ switch_to_section (darwin_sections[picbase_thunk_section]);
++ fputs ("\t.weak_definition\t", asm_out_file);
++ assemble_name (asm_out_file, name);
++ fputs ("\n\t.private_extern\t", asm_out_file);
++ assemble_name (asm_out_file, name);
++ putc ('\n', asm_out_file);
++ ASM_OUTPUT_LABEL (asm_out_file, name);
++ DECL_WEAK (decl) = 1;
++ }
++ else
++#endif
++ if (USE_HIDDEN_LINKONCE)
++ {
++ cgraph_node::create (decl)->set_comdat_group (DECL_ASSEMBLER_NAME (decl));
++
++ targetm.asm_out.unique_section (decl, 0);
++ switch_to_section (get_named_section (decl, NULL, 0));
++
++ targetm.asm_out.globalize_label (asm_out_file, name);
++ fputs ("\t.hidden\t", asm_out_file);
++ assemble_name (asm_out_file, name);
++ putc ('\n', asm_out_file);
++ ASM_DECLARE_FUNCTION_NAME (asm_out_file, name, decl);
++ }
++ else
++ {
++ switch_to_section (text_section);
++ ASM_OUTPUT_LABEL (asm_out_file, name);
++ }
++
++ DECL_INITIAL (decl) = make_node (BLOCK);
++ current_function_decl = decl;
++ allocate_struct_function (decl, false);
++ init_function_start (decl);
++ /* We're about to hide the function body from callees of final_* by
++ emitting it directly; tell them we're a thunk, if they care. */
++ cfun->is_thunk = true;
++ first_function_block_is_cold = false;
++ /* Make sure unwind info is emitted for the thunk if needed. */
++ final_start_function (emit_barrier (), asm_out_file, 1);
++
++ output_indirect_thunk (need_bnd_p, regno);
++
++ final_end_function ();
++ init_insn_lengths ();
++ free_after_compilation (cfun);
++ set_cfun (NULL);
++ current_function_decl = NULL;
++}
++
+ static int pic_labels_used;
+
+ /* Fills in the label name that should be used for a pc thunk for
+@@ -9707,11 +9969,32 @@ ix86_code_end (void)
+ rtx xops[2];
+ int regno;
+
++ if (indirect_thunk_needed)
++ output_indirect_thunk_function (false, -1);
++ if (indirect_thunk_bnd_needed)
++ output_indirect_thunk_function (true, -1);
++
++ for (regno = FIRST_REX_INT_REG; regno <= LAST_REX_INT_REG; regno++)
++ {
++ int i = regno - FIRST_REX_INT_REG + LAST_INT_REG + 1;
++ if ((indirect_thunks_used & (1 << i)))
++ output_indirect_thunk_function (false, regno);
++
++ if ((indirect_thunks_bnd_used & (1 << i)))
++ output_indirect_thunk_function (true, regno);
++ }
++
+ for (regno = AX_REG; regno <= SP_REG; regno++)
+ {
+ char name[32];
+ tree decl;
+
++ if ((indirect_thunks_used & (1 << regno)))
++ output_indirect_thunk_function (false, regno);
++
++ if ((indirect_thunks_bnd_used & (1 << regno)))
++ output_indirect_thunk_function (true, regno);
++
+ if (!(pic_labels_used & (1 << regno)))
+ continue;
+
+@@ -25805,12 +26088,292 @@ ix86_expand_call (rtx retval, rtx fnaddr
+ return call;
+ }
+
++/* Output indirect branch via a call and return thunk. CALL_OP is a
++ register which contains the branch target. XASM is the assembly
++ template for CALL_OP. Branch is a tail call if SIBCALL_P is true.
++ A normal call is converted to:
++
++ call __x86_indirect_thunk_reg
++
++ and a tail call is converted to:
++
++ jmp __x86_indirect_thunk_reg
++ */
++
++static void
++ix86_output_indirect_branch_via_reg (rtx call_op, bool sibcall_p)
++{
++ char thunk_name_buf[32];
++ char *thunk_name;
++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
++ int regno = REGNO (call_op);
++
++ if (cfun->machine->indirect_branch_type
++ != indirect_branch_thunk_inline)
++ {
++ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
++ {
++ int i = regno;
++ if (i >= FIRST_REX_INT_REG)
++ i -= (FIRST_REX_INT_REG - LAST_INT_REG - 1);
++ if (need_bnd_p)
++ indirect_thunks_bnd_used |= 1 << i;
++ else
++ indirect_thunks_used |= 1 << i;
++ }
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ thunk_name = thunk_name_buf;
++ }
++ else
++ thunk_name = NULL;
++
++ if (sibcall_p)
++ {
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++ }
++ else
++ {
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd call\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tcall\t%s\n", thunk_name);
++ return;
++ }
++
++ char indirectlabel1[32];
++ char indirectlabel2[32];
++
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++
++ /* Jump. */
++ if (need_bnd_p)
++ fputs ("\tbnd jmp\t", asm_out_file);
++ else
++ fputs ("\tjmp\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel2);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
++
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
++
++ /* Call. */
++ if (need_bnd_p)
++ fputs ("\tbnd call\t", asm_out_file);
++ else
++ fputs ("\tcall\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel1);
++ fputc ('\n', asm_out_file);
++ }
++}
++
++/* Output indirect branch via a call and return thunk. CALL_OP is
++ the branch target. XASM is the assembly template for CALL_OP.
++ Branch is a tail call if SIBCALL_P is true. A normal call is
++ converted to:
++
++ jmp L2
++ L1:
++ push CALL_OP
++ jmp __x86_indirect_thunk
++ L2:
++ call L1
++
++ and a tail call is converted to:
++
++ push CALL_OP
++ jmp __x86_indirect_thunk
++ */
++
++static void
++ix86_output_indirect_branch_via_push (rtx call_op, const char *xasm,
++ bool sibcall_p)
++{
++ char thunk_name_buf[32];
++ char *thunk_name;
++ char push_buf[64];
++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
++ int regno = -1;
++
++ if (cfun->machine->indirect_branch_type
++ != indirect_branch_thunk_inline)
++ {
++ if (cfun->machine->indirect_branch_type == indirect_branch_thunk)
++ {
++ if (need_bnd_p)
++ indirect_thunk_bnd_needed = true;
++ else
++ indirect_thunk_needed = true;
++ }
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ thunk_name = thunk_name_buf;
++ }
++ else
++ thunk_name = NULL;
++
++ snprintf (push_buf, sizeof (push_buf), "push{%c}\t%s",
++ TARGET_64BIT ? 'q' : 'l', xasm);
++
++ if (sibcall_p)
++ {
++ output_asm_insn (push_buf, &call_op);
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++ }
++ else
++ {
++ char indirectlabel1[32];
++ char indirectlabel2[32];
++
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel1,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++ ASM_GENERATE_INTERNAL_LABEL (indirectlabel2,
++ INDIRECT_LABEL,
++ indirectlabelno++);
++
++ /* Jump. */
++ if (need_bnd_p)
++ fputs ("\tbnd jmp\t", asm_out_file);
++ else
++ fputs ("\tjmp\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel2);
++ fputc ('\n', asm_out_file);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel1);
++
++ /* An external function may be called via GOT, instead of PLT. */
++ if (MEM_P (call_op))
++ {
++ struct ix86_address parts;
++ rtx addr = XEXP (call_op, 0);
++ if (ix86_decompose_address (addr, &parts)
++ && parts.base == stack_pointer_rtx)
++ {
++ /* Since call will adjust stack by -UNITS_PER_WORD,
++ we must convert "disp(stack, index, scale)" to
++ "disp+UNITS_PER_WORD(stack, index, scale)". */
++ if (parts.index)
++ {
++ addr = gen_rtx_MULT (Pmode, parts.index,
++ GEN_INT (parts.scale));
++ addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx,
++ addr);
++ }
++ else
++ addr = stack_pointer_rtx;
++
++ rtx disp;
++ if (parts.disp != NULL_RTX)
++ disp = plus_constant (Pmode, parts.disp,
++ UNITS_PER_WORD);
++ else
++ disp = GEN_INT (UNITS_PER_WORD);
++
++ addr = gen_rtx_PLUS (Pmode, addr, disp);
++ call_op = gen_rtx_MEM (GET_MODE (call_op), addr);
++ }
++ }
++
++ output_asm_insn (push_buf, &call_op);
++
++ if (thunk_name != NULL)
++ {
++ if (need_bnd_p)
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ else
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ else
++ output_indirect_thunk (need_bnd_p, regno);
++
++ ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, indirectlabel2);
++
++ /* Call. */
++ if (need_bnd_p)
++ fputs ("\tbnd call\t", asm_out_file);
++ else
++ fputs ("\tcall\t", asm_out_file);
++ assemble_name_raw (asm_out_file, indirectlabel1);
++ fputc ('\n', asm_out_file);
++ }
++}
++
++/* Output indirect branch via a call and return thunk. CALL_OP is
++ the branch target. XASM is the assembly template for CALL_OP.
++ Branch is a tail call if SIBCALL_P is true. */
++
++static void
++ix86_output_indirect_branch (rtx call_op, const char *xasm,
++ bool sibcall_p)
++{
++ if (REG_P (call_op))
++ ix86_output_indirect_branch_via_reg (call_op, sibcall_p);
++ else
++ ix86_output_indirect_branch_via_push (call_op, xasm, sibcall_p);
++}
++/* Output indirect jump. CALL_OP is the jump target. Jump is a
++ function return if RET_P is true. */
++
++const char *
++ix86_output_indirect_jmp (rtx call_op, bool ret_p)
++{
++ if (cfun->machine->indirect_branch_type != indirect_branch_keep)
++ {
++ /* We can't have red-zone if this isn't a function return since
++ "call" in the indirect thunk pushes the return address onto
++ stack, destroying red-zone. */
++ if (!ret_p && ix86_red_zone_size != 0)
++ gcc_unreachable ();
++
++ ix86_output_indirect_branch (call_op, "%0", true);
++ return "";
++ }
++ else
++ return "%!jmp\t%A0";
++}
++
+ /* Output the assembly for a call instruction. */
+
+ const char *
+ ix86_output_call_insn (rtx_insn *insn, rtx call_op)
+ {
+ bool direct_p = constant_call_address_operand (call_op, VOIDmode);
++ bool output_indirect_p
++ = (!TARGET_SEH
++ && cfun->machine->indirect_branch_type != indirect_branch_keep);
+ bool seh_nop_p = false;
+ const char *xasm;
+
+@@ -25823,9 +26386,17 @@ ix86_output_call_insn (rtx_insn *insn, r
+ else if (TARGET_SEH)
+ xasm = "%!rex.W jmp %A0";
+ else
+- xasm = "%!jmp\t%A0";
++ {
++ if (output_indirect_p)
++ xasm = "%0";
++ else
++ xasm = "%!jmp\t%A0";
++ }
+
+- output_asm_insn (xasm, &call_op);
++ if (output_indirect_p && !direct_p)
++ ix86_output_indirect_branch (call_op, xasm, true);
++ else
++ output_asm_insn (xasm, &call_op);
+ return "";
+ }
+
+@@ -25862,9 +26433,17 @@ ix86_output_call_insn (rtx_insn *insn, r
+ if (direct_p)
+ xasm = "%!call\t%P0";
+ else
+- xasm = "%!call\t%A0";
++ {
++ if (output_indirect_p)
++ xasm = "%0";
++ else
++ xasm = "%!call\t%A0";
++ }
+
+- output_asm_insn (xasm, &call_op);
++ if (output_indirect_p && !direct_p)
++ ix86_output_indirect_branch (call_op, xasm, false);
++ else
++ output_asm_insn (xasm, &call_op);
+
+ if (seh_nop_p)
+ return "nop";
+@@ -43014,7 +43593,7 @@ ix86_handle_struct_attribute (tree *node
+ }
+
+ static tree
+-ix86_handle_fndecl_attribute (tree *node, tree name, tree, int,
++ix86_handle_fndecl_attribute (tree *node, tree name, tree args, int,
+ bool *no_add_attrs)
+ {
+ if (TREE_CODE (*node) != FUNCTION_DECL)
+@@ -43023,6 +43602,29 @@ ix86_handle_fndecl_attribute (tree *node
+ name);
+ *no_add_attrs = true;
+ }
++
++ if (is_attribute_p ("indirect_branch", name))
++ {
++ tree cst = TREE_VALUE (args);
++ if (TREE_CODE (cst) != STRING_CST)
++ {
++ warning (OPT_Wattributes,
++ "%qE attribute requires a string constant argument",
++ name);
++ *no_add_attrs = true;
++ }
++ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
++ {
++ warning (OPT_Wattributes,
++ "argument to %qE attribute is not "
++ "(keep|thunk|thunk-inline|thunk-extern)", name);
++ *no_add_attrs = true;
++ }
++ }
++
+ return NULL_TREE;
+ }
+
+@@ -46915,6 +47517,9 @@ static const struct attribute_spec ix86_
+ false },
+ { "callee_pop_aggregate_return", 1, 1, false, true, true,
+ ix86_handle_callee_pop_aggregate_return, true },
++ { "indirect_branch", 1, 1, true, false, false,
++ ix86_handle_fndecl_attribute, false },
++
+ /* End element. */
+ { NULL, 0, 0, false, false, false, NULL, false }
+ };
+Index: b/src/gcc/config/i386/i386.h
+===================================================================
+--- a/src/gcc/config/i386/i386.h
++++ b/src/gcc/config/i386/i386.h
+@@ -1229,6 +1229,9 @@ extern const char *host_detect_local_cpu
+ /* Base register for access to local variables of the function. */
+ #define FRAME_POINTER_REGNUM 20
+
++#define FIRST_INT_REG AX_REG
++#define LAST_INT_REG SP_REG
++
+ /* First floating point reg */
+ #define FIRST_FLOAT_REG 8
+
+@@ -1465,6 +1468,8 @@ enum reg_class
+ registers. */
+ #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true
+
++#define LEGACY_INT_REGNO_P(N) (IN_RANGE ((N), FIRST_INT_REG, LAST_INT_REG))
++
+ #define QI_REG_P(X) (REG_P (X) && QI_REGNO_P (REGNO (X)))
+ #define QI_REGNO_P(N) IN_RANGE ((N), AX_REG, BX_REG)
+
+@@ -2550,6 +2555,13 @@ struct GTY(()) machine_function {
+ /* If true, it is safe to not save/restore DRAP register. */
+ BOOL_BITFIELD no_drap_save_restore : 1;
+
++ /* How to generate indirec branch. */
++ ENUM_BITFIELD(indirect_branch) indirect_branch_type : 3;
++
++ /* If true, the current function has local indirect jumps, like
++ "indirect_jump" or "tablejump". */
++ BOOL_BITFIELD has_local_indirect_jump : 1;
++
+ /* During prologue/epilogue generation, the current frame state.
+ Otherwise, the frame state at the end of the prologue. */
+ struct machine_frame_state fs;
+Index: b/src/gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md
++++ b/src/gcc/config/i386/i386.md
+@@ -11556,13 +11556,18 @@
+ {
+ if (TARGET_X32)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
++ cfun->machine->has_local_indirect_jump = true;
+ })
+
+ (define_insn "*indirect_jump"
+ [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))]
+ ""
+- "%!jmp\t%A0"
+- [(set_attr "type" "ibr")
++ "* return ix86_output_indirect_jmp (operands[0], false);"
++ [(set (attr "type")
++ (if_then_else (match_test "(cfun->machine->indirect_branch_type
++ != indirect_branch_keep)")
++ (const_string "multi")
++ (const_string "ibr")))
+ (set_attr "length_immediate" "0")])
+
+ (define_expand "tablejump"
+@@ -11604,14 +11609,19 @@
+
+ if (TARGET_X32)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
++ cfun->machine->has_local_indirect_jump = true;
+ })
+
+ (define_insn "*tablejump_1"
+ [(set (pc) (match_operand:W 0 "indirect_branch_operand" "rBw"))
+ (use (label_ref (match_operand 1)))]
+ ""
+- "%!jmp\t%A0"
+- [(set_attr "type" "ibr")
++ "* return ix86_output_indirect_jmp (operands[0], false);"
++ [(set (attr "type")
++ (if_then_else (match_test "(cfun->machine->indirect_branch_type
++ != indirect_branch_keep)")
++ (const_string "multi")
++ (const_string "ibr")))
+ (set_attr "length_immediate" "0")])
+
+ ;; Convert setcc + movzbl to xor + setcc if operands don't overlap.
+@@ -12198,8 +12208,12 @@
+ [(simple_return)
+ (use (match_operand:SI 0 "register_operand" "r"))]
+ "reload_completed"
+- "%!jmp\t%A0"
+- [(set_attr "type" "ibr")
++ "* return ix86_output_indirect_jmp (operands[0], true);"
++ [(set (attr "type")
++ (if_then_else (match_test "(cfun->machine->indirect_branch_type
++ != indirect_branch_keep)")
++ (const_string "multi")
++ (const_string "ibr")))
+ (set_attr "length_immediate" "0")])
+
+ (define_insn "nop"
+Index: b/src/gcc/config/i386/i386.opt
+===================================================================
+--- a/src/gcc/config/i386/i386.opt
++++ b/src/gcc/config/i386/i386.opt
+@@ -876,3 +876,23 @@ Enum(stack_protector_guard) String(tls)
+
+ EnumValue
+ Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
++
++mindirect-branch=
++Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
++Convert indirect call and jump to call and return thunks.
++
++Enum
++Name(indirect_branch) Type(enum indirect_branch)
++Known indirect branch choices (for use with the -mindirect-branch= option):
++
++EnumValue
++Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
++
++EnumValue
++Enum(indirect_branch) String(thunk) Value(indirect_branch_thunk)
++
++EnumValue
++Enum(indirect_branch) String(thunk-inline) Value(indirect_branch_thunk_inline)
++
++EnumValue
++Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+@@ -0,0 +1,44 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++extern void male_indirect_jump (long)
++ __attribute__ ((indirect_branch("thunk")));
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++__attribute__ ((indirect_branch("thunk")))
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++extern int male_indirect_jump (long)
++ __attribute__ ((indirect_branch("thunk-inline")));
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++__attribute__ ((indirect_branch("thunk-inline")))
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++extern int male_indirect_jump (long)
++ __attribute__ ((indirect_branch("thunk-extern")));
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++__attribute__ ((indirect_branch("thunk-extern")))
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+@@ -0,0 +1,44 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++__attribute__ ((indirect_branch("thunk-extern")))
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+@@ -0,0 +1,42 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++__attribute__ ((indirect_branch("keep")))
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile { target { ! x32 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++
++void (*dispatch) (char *);
++char buf[10];
++
++void
++foo (void)
++{
++ dispatch (buf);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
++/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd ret" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile { target { ! x32 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++
++void (*dispatch) (char *);
++char buf[10];
++
++int
++foo (void)
++{
++ dispatch (buf);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
++/* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
++/* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "bnd ret" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+@@ -0,0 +1,19 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+@@ -0,0 +1,19 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+@@ -0,0 +1,43 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+@@ -0,0 +1,21 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch[256];
++
++int
++male_indirect_jump (long offset)
++{
++ dispatch[offset](offset);
++ return 0;
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+@@ -0,0 +1,44 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++
++void func0 (void);
++void func1 (void);
++void func2 (void);
++void func3 (void);
++void func4 (void);
++void func4 (void);
++void func5 (void);
++
++void
++bar (int i)
++{
++ switch (i)
++ {
++ default:
++ func0 ();
++ break;
++ case 1:
++ func1 ();
++ break;
++ case 2:
++ func2 ();
++ break;
++ case 3:
++ func3 ();
++ break;
++ case 4:
++ func4 ();
++ break;
++ case 5:
++ func5 ();
++ break;
++ }
++}
++
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
diff --git a/patches/source/gcc/0006-x86-Add-mfunction-return-doc.diff b/patches/source/gcc/0006-x86-Add-mfunction-return-doc.diff
new file mode 100644
index 00000000..b40d5248
--- /dev/null
+++ b/patches/source/gcc/0006-x86-Add-mfunction-return-doc.diff
@@ -0,0 +1,300 @@
+From 357311dd400f7f72d2132f2f94161ece39bf08c6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:10:44 +0000
+Subject: [PATCH 6/9] x86: Add -mfunction-return=
+
+Add -mfunction-return= option to convert function return to call and
+return thunks. The default is 'keep', which keeps function return
+unmodified. 'thunk' converts function return to call and return thunk.
+'thunk-inline' converts function return to inlined call and return thunk.
+'thunk-extern' converts function return to external call and return
+thunk provided in a separate object file. You can control this behavior
+for a specific function by using the function attribute function_return.
+
+Function return thunk is the same as memory thunk for -mindirect-branch=
+where the return address is at the top of the stack:
+
+__x86_return_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+and function return becomes
+
+ jmp __x86_return_thunk
+
+-mindirect-branch= tests are updated with -mfunction-return=keep to
+avoid false test failures when -mfunction-return=thunk is added to
+RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386-protos.h (ix86_output_function_return): New.
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Also
+ set function_return_type.
+ (indirect_thunk_name): Add ret_p to indicate thunk for function
+ return.
+ (output_indirect_thunk_function): Pass false to
+ indirect_thunk_name.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (output_indirect_thunk_function): Create alias for function
+ return thunk if regno < 0.
+ (ix86_output_function_return): New function.
+ (ix86_handle_fndecl_attribute): Handle function_return.
+ (ix86_attribute_table): Add function_return.
+ * config/i386/i386.h (machine_function): Add
+ function_return_type.
+ * config/i386/i386.md (simple_return_internal): Use
+ ix86_output_function_return.
+ (simple_return_internal_long): Likewise.
+ * config/i386/i386.opt (mfunction-return=): New option.
+ (indirect_branch): Mention -mfunction-return=.
+ * doc/extend.texi: Document function_return function attribute.
+ * doc/invoke.texi: Document -mfunction-return= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mfunction-return=keep.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-1.c: New test.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-16.c: Likewise.
+ * gcc.target/i386/ret-thunk-2.c: Likewise.
+ * gcc.target/i386/ret-thunk-3.c: Likewise.
+ * gcc.target/i386/ret-thunk-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-5.c: Likewise.
+ * gcc.target/i386/ret-thunk-6.c: Likewise.
+ * gcc.target/i386/ret-thunk-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-8.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+
+i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
+
+ASM_OUTPUT_DEF isn't defined for TARGET_MACHO. Use ASM_OUTPUT_LABEL to
+generate the __x86_return_thunk label, instead of the set directive.
+Update testcase to remove the __x86_return_thunk label check. Since
+-fno-pic is ignored on Darwin, update testcases to sscan or "push"
+only on Linux.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * config/i386/i386.c (output_indirect_thunk_function): Use
+ ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
+ for __x86.return_thunk.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
+ Linux.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Don't check the
+ __x86_return_thunk label.
+ Scan for "push" only for Linux.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256734 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+
+---
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 152 +++++++++++-
+ src/gcc/config/i386/i386.h | 3
+ src/gcc/config/i386/i386.md | 9
+ src/gcc/config/i386/i386.opt | 6
+ src/gcc/doc/extend.texi | 9
+ src/gcc/doc/invoke.texi | 13 -
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c | 18 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c | 15 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 24 +
+ 48 files changed, 507 insertions(+), 66 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+
+Index: b/src/gcc/doc/extend.texi
+===================================================================
+--- a/src/gcc/doc/extend.texi
++++ b/src/gcc/doc/extend.texi
+@@ -4129,6 +4129,15 @@ call and jump to call and return thunk.
+ indirect call and jump to inlined call and return thunk.
+ @samp{thunk-extern} converts indirect call and jump to external call
+ and return thunk provided in a separate object file.
++
++@item function_return("@var{choice}")
++@cindex @code{function_return} function attribute, x86
++On x86 targets, the @code{function_return} attribute causes the compiler
++to convert function return with @var{choice}. @samp{keep} keeps function
++return unmodified. @samp{thunk} converts function return to call and
++return thunk. @samp{thunk-inline} converts function return to inlined
++call and return thunk. @samp{thunk-extern} converts function return to
++external call and return thunk provided in a separate object file.
+ @end table
+
+ On the PowerPC, the following options are allowed:
+Index: b/src/gcc/doc/invoke.texi
+===================================================================
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -1091,7 +1091,7 @@ See RS/6000 and PowerPC Options.
+ -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
+ -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
+ -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
+--mindirect-branch=@var{choice}}
++-mindirect-branch=@var{choice} -mfunction-return=@var{choice}}
+
+ @emph{x86 Windows Options}
+ @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
+@@ -24029,6 +24029,17 @@ to external call and return thunk provid
+ You can control this behavior for a specific function by using the
+ function attribute @code{indirect_branch}. @xref{Function Attributes}.
+
++@item -mfunction-return=@var{choice}
++@opindex -mfunction-return
++Convert function return with @var{choice}. The default is @samp{keep},
++which keeps function return unmodified. @samp{thunk} converts function
++return to call and return thunk. @samp{thunk-inline} converts function
++return to inlined call and return thunk. @samp{thunk-extern} converts
++function return to external call and return thunk provided in a separate
++object file. You can control this behavior for a specific function by
++using the function attribute @code{function_return}.
++@xref{Function Attributes}.
++
+ @end table
+
+ @c man end
diff --git a/patches/source/gcc/0006-x86-Add-mfunction-return.diff b/patches/source/gcc/0006-x86-Add-mfunction-return.diff
new file mode 100644
index 00000000..1883cc6a
--- /dev/null
+++ b/patches/source/gcc/0006-x86-Add-mfunction-return.diff
@@ -0,0 +1,1409 @@
+From 357311dd400f7f72d2132f2f94161ece39bf08c6 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:10:44 +0000
+Subject: [PATCH 6/9] x86: Add -mfunction-return=
+
+Add -mfunction-return= option to convert function return to call and
+return thunks. The default is 'keep', which keeps function return
+unmodified. 'thunk' converts function return to call and return thunk.
+'thunk-inline' converts function return to inlined call and return thunk.
+'thunk-extern' converts function return to external call and return
+thunk provided in a separate object file. You can control this behavior
+for a specific function by using the function attribute function_return.
+
+Function return thunk is the same as memory thunk for -mindirect-branch=
+where the return address is at the top of the stack:
+
+__x86_return_thunk:
+ call L2
+L1:
+ pause
+ lfence
+ jmp L1
+L2:
+ lea 8(%rsp), %rsp|lea 4(%esp), %esp
+ ret
+
+and function return becomes
+
+ jmp __x86_return_thunk
+
+-mindirect-branch= tests are updated with -mfunction-return=keep to
+avoid false test failures when -mfunction-return=thunk is added to
+RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386-protos.h (ix86_output_function_return): New.
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Also
+ set function_return_type.
+ (indirect_thunk_name): Add ret_p to indicate thunk for function
+ return.
+ (output_indirect_thunk_function): Pass false to
+ indirect_thunk_name.
+ (ix86_output_indirect_branch_via_reg): Likewise.
+ (ix86_output_indirect_branch_via_push): Likewise.
+ (output_indirect_thunk_function): Create alias for function
+ return thunk if regno < 0.
+ (ix86_output_function_return): New function.
+ (ix86_handle_fndecl_attribute): Handle function_return.
+ (ix86_attribute_table): Add function_return.
+ * config/i386/i386.h (machine_function): Add
+ function_return_type.
+ * config/i386/i386.md (simple_return_internal): Use
+ ix86_output_function_return.
+ (simple_return_internal_long): Likewise.
+ * config/i386/i386.opt (mfunction-return=): New option.
+ (indirect_branch): Mention -mfunction-return=.
+ * doc/extend.texi: Document function_return function attribute.
+ * doc/invoke.texi: Document -mfunction-return= option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mfunction-return=keep.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-1.c: New test.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-16.c: Likewise.
+ * gcc.target/i386/ret-thunk-2.c: Likewise.
+ * gcc.target/i386/ret-thunk-3.c: Likewise.
+ * gcc.target/i386/ret-thunk-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-5.c: Likewise.
+ * gcc.target/i386/ret-thunk-6.c: Likewise.
+ * gcc.target/i386/ret-thunk-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-8.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+
+i386: Don't use ASM_OUTPUT_DEF for TARGET_MACHO
+
+ASM_OUTPUT_DEF isn't defined for TARGET_MACHO. Use ASM_OUTPUT_LABEL to
+generate the __x86_return_thunk label, instead of the set directive.
+Update testcase to remove the __x86_return_thunk label check. Since
+-fno-pic is ignored on Darwin, update testcases to sscan or "push"
+only on Linux.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * config/i386/i386.c (output_indirect_thunk_function): Use
+ ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
+ for __x86.return_thunk.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/83839
+ * gcc.target/i386/indirect-thunk-1.c: Scan for "push" only on
+ Linux.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-4.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Don't check the
+ __x86_return_thunk label.
+ Scan for "push" only for Linux.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256734 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+
+---
+ src/gcc/config/i386/i386-protos.h | 1
+ src/gcc/config/i386/i386.c | 152 +++++++++++-
+ src/gcc/config/i386/i386.h | 3
+ src/gcc/config/i386/i386.md | 9
+ src/gcc/config/i386/i386.opt | 6
+ src/gcc/doc/extend.texi | 9
+ src/gcc/doc/invoke.texi | 13 -
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 4
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 4
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 23 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 22 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c | 18 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c | 12
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c | 15 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c | 13 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c | 14 +
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 24 +
+ 48 files changed, 507 insertions(+), 66 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+
+Index: b/src/gcc/config/i386/i386-protos.h
+===================================================================
+--- a/src/gcc/config/i386/i386-protos.h
++++ b/src/gcc/config/i386/i386-protos.h
+@@ -307,6 +307,7 @@ extern enum attr_cpu ix86_schedule;
+
+ extern const char * ix86_output_call_insn (rtx_insn *insn, rtx call_op);
+ extern const char * ix86_output_indirect_jmp (rtx call_op, bool ret_p);
++extern const char * ix86_output_function_return (bool long_p);
+
+ #ifdef RTX_CODE
+ /* Target data for multipass lookahead scheduling.
+Index: b/src/gcc/config/i386/i386.c
+===================================================================
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -5166,6 +5166,31 @@ ix86_set_indirect_branch_type (tree fnde
+ else
+ cfun->machine->indirect_branch_type = ix86_indirect_branch;
+ }
++
++ if (cfun->machine->function_return_type == indirect_branch_unset)
++ {
++ tree attr = lookup_attribute ("function_return",
++ DECL_ATTRIBUTES (fndecl));
++ if (attr != NULL)
++ {
++ tree args = TREE_VALUE (attr);
++ if (args == NULL)
++ gcc_unreachable ();
++ tree cst = TREE_VALUE (args);
++ if (strcmp (TREE_STRING_POINTER (cst), "keep") == 0)
++ cfun->machine->function_return_type = indirect_branch_keep;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk") == 0)
++ cfun->machine->function_return_type = indirect_branch_thunk;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-inline") == 0)
++ cfun->machine->function_return_type = indirect_branch_thunk_inline;
++ else if (strcmp (TREE_STRING_POINTER (cst), "thunk-extern") == 0)
++ cfun->machine->function_return_type = indirect_branch_thunk_extern;
++ else
++ gcc_unreachable ();
++ }
++ else
++ cfun->machine->function_return_type = ix86_function_return;
++ }
+ }
+
+ /* Establish appropriate back-end context for processing the function
+@@ -9753,8 +9778,12 @@ static int indirect_thunks_bnd_used;
+ /* Fills in the label name that should be used for the indirect thunk. */
+
+ static void
+-indirect_thunk_name (char name[32], int regno, bool need_bnd_p)
++indirect_thunk_name (char name[32], int regno, bool need_bnd_p,
++ bool ret_p)
+ {
++ if (regno >= 0 && ret_p)
++ gcc_unreachable ();
++
+ if (USE_HIDDEN_LINKONCE)
+ {
+ const char *bnd = need_bnd_p ? "_bnd" : "";
+@@ -9769,7 +9798,10 @@ indirect_thunk_name (char name[32], int
+ bnd, reg_prefix, reg_names[regno]);
+ }
+ else
+- sprintf (name, "__x86_indirect_thunk%s", bnd);
++ {
++ const char *ret = ret_p ? "return" : "indirect";
++ sprintf (name, "__x86_%s_thunk%s", ret, bnd);
++ }
+ }
+ else
+ {
+@@ -9782,10 +9814,20 @@ indirect_thunk_name (char name[32], int
+ }
+ else
+ {
+- if (need_bnd_p)
+- ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
++ if (ret_p)
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LRTB", 0);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LRT", 0);
++ }
+ else
+- ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
++ {
++ if (need_bnd_p)
++ ASM_GENERATE_INTERNAL_LABEL (name, "LITB", 0);
++ else
++ ASM_GENERATE_INTERNAL_LABEL (name, "LIT", 0);
++ }
+ }
+ }
+ }
+@@ -9880,7 +9922,7 @@ output_indirect_thunk_function (bool nee
+ tree decl;
+
+ /* Create __x86_indirect_thunk/__x86_indirect_thunk_bnd. */
+- indirect_thunk_name (name, regno, need_bnd_p);
++ indirect_thunk_name (name, regno, need_bnd_p, false);
+ decl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
+ get_identifier (name),
+ build_function_type_list (void_type_node, NULL_TREE));
+@@ -9923,6 +9965,36 @@ output_indirect_thunk_function (bool nee
+ ASM_OUTPUT_LABEL (asm_out_file, name);
+ }
+
++ if (regno < 0)
++ {
++ /* Create alias for __x86.return_thunk/__x86.return_thunk_bnd. */
++ char alias[32];
++
++ indirect_thunk_name (alias, regno, need_bnd_p, true);
++#if TARGET_MACHO
++ if (TARGET_MACHO)
++ {
++ fputs ("\t.weak_definition\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ fputs ("\n\t.private_extern\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ putc ('\n', asm_out_file);
++ ASM_OUTPUT_LABEL (asm_out_file, alias);
++ }
++#else
++ ASM_OUTPUT_DEF (asm_out_file, alias, name);
++ if (USE_HIDDEN_LINKONCE)
++ {
++ fputs ("\t.globl\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ putc ('\n', asm_out_file);
++ fputs ("\t.hidden\t", asm_out_file);
++ assemble_name (asm_out_file, alias);
++ putc ('\n', asm_out_file);
++ }
++#endif
++ }
++
+ DECL_INITIAL (decl) = make_node (BLOCK);
+ current_function_decl = decl;
+ allocate_struct_function (decl, false);
+@@ -26121,7 +26193,7 @@ ix86_output_indirect_branch_via_reg (rtx
+ else
+ indirect_thunks_used |= 1 << i;
+ }
+- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
+ thunk_name = thunk_name_buf;
+ }
+ else
+@@ -26230,7 +26302,7 @@ ix86_output_indirect_branch_via_push (rt
+ else
+ indirect_thunk_needed = true;
+ }
+- indirect_thunk_name (thunk_name_buf, regno, need_bnd_p);
++ indirect_thunk_name (thunk_name_buf, regno, need_bnd_p, false);
+ thunk_name = thunk_name_buf;
+ }
+ else
+@@ -26365,6 +26437,46 @@ ix86_output_indirect_jmp (rtx call_op, b
+ return "%!jmp\t%A0";
+ }
+
++/* Output function return. CALL_OP is the jump target. Add a REP
++ prefix to RET if LONG_P is true and function return is kept. */
++
++const char *
++ix86_output_function_return (bool long_p)
++{
++ if (cfun->machine->function_return_type != indirect_branch_keep)
++ {
++ char thunk_name[32];
++ bool need_bnd_p = ix86_bnd_prefixed_insn_p (current_output_insn);
++
++ if (cfun->machine->function_return_type
++ != indirect_branch_thunk_inline)
++ {
++ bool need_thunk = (cfun->machine->function_return_type
++ == indirect_branch_thunk);
++ indirect_thunk_name (thunk_name, -1, need_bnd_p, true);
++ if (need_bnd_p)
++ {
++ indirect_thunk_bnd_needed |= need_thunk;
++ fprintf (asm_out_file, "\tbnd jmp\t%s\n", thunk_name);
++ }
++ else
++ {
++ indirect_thunk_needed |= need_thunk;
++ fprintf (asm_out_file, "\tjmp\t%s\n", thunk_name);
++ }
++ }
++ else
++ output_indirect_thunk (need_bnd_p, -1);
++
++ return "";
++ }
++
++ if (!long_p || ix86_bnd_prefixed_insn_p (current_output_insn))
++ return "%!ret";
++
++ return "rep%; ret";
++}
++
+ /* Output the assembly for a call instruction. */
+
+ const char *
+@@ -43625,6 +43737,28 @@ ix86_handle_fndecl_attribute (tree *node
+ }
+ }
+
++ if (is_attribute_p ("function_return", name))
++ {
++ tree cst = TREE_VALUE (args);
++ if (TREE_CODE (cst) != STRING_CST)
++ {
++ warning (OPT_Wattributes,
++ "%qE attribute requires a string constant argument",
++ name);
++ *no_add_attrs = true;
++ }
++ else if (strcmp (TREE_STRING_POINTER (cst), "keep") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-inline") != 0
++ && strcmp (TREE_STRING_POINTER (cst), "thunk-extern") != 0)
++ {
++ warning (OPT_Wattributes,
++ "argument to %qE attribute is not "
++ "(keep|thunk|thunk-inline|thunk-extern)", name);
++ *no_add_attrs = true;
++ }
++ }
++
+ return NULL_TREE;
+ }
+
+@@ -47519,6 +47653,8 @@ static const struct attribute_spec ix86_
+ ix86_handle_callee_pop_aggregate_return, true },
+ { "indirect_branch", 1, 1, true, false, false,
+ ix86_handle_fndecl_attribute, false },
++ { "function_return", 1, 1, true, false, false,
++ ix86_handle_fndecl_attribute, false },
+
+ /* End element. */
+ { NULL, 0, 0, false, false, false, NULL, false }
+Index: b/src/gcc/config/i386/i386.h
+===================================================================
+--- a/src/gcc/config/i386/i386.h
++++ b/src/gcc/config/i386/i386.h
+@@ -2562,6 +2562,9 @@ struct GTY(()) machine_function {
+ "indirect_jump" or "tablejump". */
+ BOOL_BITFIELD has_local_indirect_jump : 1;
+
++ /* How to generate function return. */
++ ENUM_BITFIELD(indirect_branch) function_return_type : 3;
++
+ /* During prologue/epilogue generation, the current frame state.
+ Otherwise, the frame state at the end of the prologue. */
+ struct machine_frame_state fs;
+Index: b/src/gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md
++++ b/src/gcc/config/i386/i386.md
+@@ -12169,7 +12169,7 @@
+ (define_insn "simple_return_internal"
+ [(simple_return)]
+ "reload_completed"
+- "%!ret"
++ "* return ix86_output_function_return (false);"
+ [(set_attr "length_nobnd" "1")
+ (set_attr "atom_unit" "jeu")
+ (set_attr "length_immediate" "0")
+@@ -12182,12 +12182,7 @@
+ [(simple_return)
+ (unspec [(const_int 0)] UNSPEC_REP)]
+ "reload_completed"
+-{
+- if (ix86_bnd_prefixed_insn_p (insn))
+- return "%!ret";
+-
+- return "rep%; ret";
+-}
++ "* return ix86_output_function_return (true);"
+ [(set_attr "length" "2")
+ (set_attr "atom_unit" "jeu")
+ (set_attr "length_immediate" "0")
+Index: b/src/gcc/config/i386/i386.opt
+===================================================================
+--- a/src/gcc/config/i386/i386.opt
++++ b/src/gcc/config/i386/i386.opt
+@@ -881,9 +881,13 @@ mindirect-branch=
+ Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_indirect_branch) Init(indirect_branch_keep)
+ Convert indirect call and jump to call and return thunks.
+
++mfunction-return=
++Target Report RejectNegative Joined Enum(indirect_branch) Var(ix86_function_return) Init(indirect_branch_keep)
++Convert function return to call and return thunk.
++
+ Enum
+ Name(indirect_branch) Type(enum indirect_branch)
+-Known indirect branch choices (for use with the -mindirect-branch= option):
++Known indirect branch choices (for use with the -mindirect-branch=/-mfunction-return= options):
+
+ EnumValue
+ Enum(indirect_branch) String(keep) Value(indirect_branch_keep)
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -35,7 +35,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -14,7 +14,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -13,7 +13,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -36,7 +36,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-8.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+@@ -10,7 +10,7 @@ foo (void)
+ dispatch (buf);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
+ /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+@@ -11,7 +11,7 @@ foo (void)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "pushq\[ \t\]%rax" { target x32 } } } */
+ /* { dg-final { scan-assembler "bnd jmp\[ \t\]*__x86_indirect_thunk_bnd" } } */
+ /* { dg-final { scan-assembler "bnd jmp\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 1 { target { ! x32 } } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -35,7 +35,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
+ /* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch(offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -11,7 +11,7 @@ male_indirect_jump (long offset)
+ dispatch[offset](offset);
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler {\tpause} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times {\tpause} 1 } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+@@ -12,7 +12,7 @@ male_indirect_jump (long offset)
+ return 0;
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?dispatch" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 2 } } */
+ /* { dg-final { scan-assembler-times {\tpause} 1 } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+@@ -35,7 +35,7 @@ bar (int i)
+ }
+ }
+
+-/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*\.L\[0-9\]+\\(,%" { target { { ! x32 } && *-*-linux* } } } } */
+ /* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+ /* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
+ /* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-1.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 2 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+@@ -0,0 +1,23 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk_(r|e)ax:" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++
++extern void (*bar) (void);
++extern int foo (void) __attribute__ ((function_return("thunk")));
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-times {\tpause} 2 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 2 } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler-times "jmp\[ \t\]*\.LIND" 3 } } */
++/* { dg-final { scan-assembler-times "call\[ \t\]*\.LIND" 3 } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++
++extern void (*bar) (void);
++
++__attribute__ ((function_return("thunk-inline")))
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
++
++extern void (*bar) (void);
++
++__attribute__ ((function_return("thunk-extern"), indirect_branch("thunk")))
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target x32 } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-16.c
+@@ -0,0 +1,18 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk-extern -fno-pic" } */
++
++extern void (*bar) (void);
++
++__attribute__ ((function_return("keep"), indirect_branch("keep")))
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
++/* { dg-final { scan-assembler-not "__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-2.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-3.c
+@@ -0,0 +1,12 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-extern" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-4.c
+@@ -0,0 +1,12 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-5.c
+@@ -0,0 +1,15 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++extern void foo (void) __attribute__ ((function_return("thunk")));
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-6.c
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++__attribute__ ((function_return("thunk-inline")))
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler {\tlfence} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-7.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=keep" } */
++
++__attribute__ ((function_return("thunk-extern")))
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-8.c
+@@ -0,0 +1,14 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk-inline" } */
++
++extern void foo (void) __attribute__ ((function_return("keep")));
++
++void
++foo (void)
++{
++}
++
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler-not {\t(lfence|pause)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+@@ -0,0 +1,24 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
++
++extern void (*bar) (void);
++
++int
++foo (void)
++{
++ bar ();
++ return 0;
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_return_thunk" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "__x86_indirect_thunk:" } } */
++/* { dg-final { scan-assembler-times {\tpause} 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times {\tlfence} 1 { target { ! x32 } } } } */
++/* { dg-final { scan-assembler "push(?:l|q)\[ \t\]*_?bar" { target { { ! x32 } && *-*-linux* } } } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk" { target { ! x32 } } } } */
++/* { dg-final { scan-assembler-times {\tpause} 2 { target { x32 } } } } */
++/* { dg-final { scan-assembler-times {\tlfence} 2 { target { x32 } } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_(r|e)ax" { target { x32 } } } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" { target x32 } } } */
diff --git a/patches/source/gcc/0007-x86-Add-mindirect-branch-register-doc.diff b/patches/source/gcc/0007-x86-Add-mindirect-branch-register-doc.diff
new file mode 100644
index 00000000..9780bfc9
--- /dev/null
+++ b/patches/source/gcc/0007-x86-Add-mindirect-branch-register-doc.diff
@@ -0,0 +1,231 @@
+From 86118fbdbafe6af54b2da467e1073c49e1742116 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:17:49 +0000
+Subject: [PATCH 7/9] x86: Add -mindirect-branch-register (documentation)
+
+Add -mindirect-branch-register to force indirect branch via register.
+This is implemented by disabling patterns of indirect branch via memory,
+similar to TARGET_X32.
+
+-mindirect-branch= and -mfunction-return= tests are updated with
+-mno-indirect-branch-register to avoid false test failures when
+-mindirect-branch-register is added to RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Disallow memory operand for
+ -mindirect-branch-register.
+ (Bw): Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+ * config/i386/i386.md (indirect_jump): Call convert_memory_address
+ for -mindirect-branch-register.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Disallow peepholes of indirect call and jump via memory for
+ -mindirect-branch-register.
+ (*call_pop): Replace m with Bw.
+ (*call_value_pop): Likewise.
+ (*sibcall_pop_memory): Replace m with Bs.
+ * config/i386/i386.opt (mindirect-branch-register): New option.
+ * doc/invoke.texi: Document -mindirect-branch-register option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mno-indirect-branch-register.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: New test.
+ * gcc.target/i386/indirect-thunk-register-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+
+i386: Rename to ix86_indirect_branch_register
+
+Rename the variable for -mindirect-branch-register to
+ix86_indirect_branch_register to match the command-line option name.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Replace
+ ix86_indirect_branch_thunk_register with
+ ix86_indirect_branch_register.
+ (Bw): Likewise.
+ * config/i386/i386.md (indirect_jump): Likewise.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Peepholes of indirect call and jump via memory: Likewise.
+ * config/i386/i386.opt: Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+
+x86: Rewrite ix86_indirect_branch_register logic
+
+Rewrite ix86_indirect_branch_register logic with
+
+(and (not (match_test "ix86_indirect_branch_register"))
+ (original condition before r256662))
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (constant_call_address_operand):
+ Rewrite ix86_indirect_branch_register logic.
+ (sibcall_insn_operand): Likewise.
+
+Don't check ix86_indirect_branch_register for GOT operand
+
+Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
+matches, don't check ix86_indirect_branch_register here. If needed,
+-mindirect-branch= will convert indirect branch via GOT slot to a call
+and return thunk.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Update
+ ix86_indirect_branch_register check. Don't check
+ ix86_indirect_branch_register with GOT_memory_operand.
+ (Bw): Likewise.
+ * config/i386/predicates.md (GOT_memory_operand): Don't check
+ ix86_indirect_branch_register here.
+ (GOT32_symbol_operand): Likewise.
+
+i386: Rewrite indirect_branch_operand logic
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (indirect_branch_operand): Rewrite
+ ix86_indirect_branch_register logic.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256735 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+---
+ src/gcc/config/i386/constraints.md | 6 +
+ src/gcc/config/i386/i386.md | 34 ++++++----
+ src/gcc/config/i386/i386.opt | 4 +
+ src/gcc/config/i386/predicates.md | 9 +-
+ src/gcc/doc/invoke.texi | 7 +-
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c | 22 ++++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c | 20 +++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c | 19 +++++
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2
+ 39 files changed, 134 insertions(+), 49 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+
+Index: b/src/gcc/doc/invoke.texi
+===================================================================
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -1091,7 +1091,8 @@ See RS/6000 and PowerPC Options.
+ -msse2avx -mfentry -mrecord-mcount -mnop-mcount -m8bit-idiv @gol
+ -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol
+ -malign-data=@var{type} -mstack-protector-guard=@var{guard} @gol
+--mindirect-branch=@var{choice} -mfunction-return=@var{choice}}
++-mindirect-branch=@var{choice} -mfunction-return=@var{choice} @gol
++-mindirect-branch-register}
+
+ @emph{x86 Windows Options}
+ @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol
+@@ -24040,6 +24041,10 @@ object file. You can control this behav
+ using the function attribute @code{function_return}.
+ @xref{Function Attributes}.
+
++@item -mindirect-branch-register
++@opindex -mindirect-branch-register
++Force indirect call and jump via register.
++
+ @end table
+
+ @c man end
diff --git a/patches/source/gcc/0007-x86-Add-mindirect-branch-register.diff b/patches/source/gcc/0007-x86-Add-mindirect-branch-register.diff
new file mode 100644
index 00000000..21136899
--- /dev/null
+++ b/patches/source/gcc/0007-x86-Add-mindirect-branch-register.diff
@@ -0,0 +1,812 @@
+From 86118fbdbafe6af54b2da467e1073c49e1742116 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:17:49 +0000
+Subject: [PATCH 7/9] x86: Add -mindirect-branch-register
+
+Add -mindirect-branch-register to force indirect branch via register.
+This is implemented by disabling patterns of indirect branch via memory,
+similar to TARGET_X32.
+
+-mindirect-branch= and -mfunction-return= tests are updated with
+-mno-indirect-branch-register to avoid false test failures when
+-mindirect-branch-register is added to RUNTESTFLAGS for "make check".
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Disallow memory operand for
+ -mindirect-branch-register.
+ (Bw): Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+ * config/i386/i386.md (indirect_jump): Call convert_memory_address
+ for -mindirect-branch-register.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Disallow peepholes of indirect call and jump via memory for
+ -mindirect-branch-register.
+ (*call_pop): Replace m with Bw.
+ (*call_value_pop): Likewise.
+ (*sibcall_pop_memory): Replace m with Bs.
+ * config/i386/i386.opt (mindirect-branch-register): New option.
+ * doc/invoke.texi: Document -mindirect-branch-register option.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-1.c (dg-options): Add
+ -mno-indirect-branch-register.
+ * gcc.target/i386/indirect-thunk-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-extern-7.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-1.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-3.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-4.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-5.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-6.c: Likewise.
+ * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+ * gcc.target/i386/ret-thunk-10.c: Likewise.
+ * gcc.target/i386/ret-thunk-11.c: Likewise.
+ * gcc.target/i386/ret-thunk-12.c: Likewise.
+ * gcc.target/i386/ret-thunk-13.c: Likewise.
+ * gcc.target/i386/ret-thunk-14.c: Likewise.
+ * gcc.target/i386/ret-thunk-15.c: Likewise.
+ * gcc.target/i386/ret-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-1.c: New test.
+ * gcc.target/i386/indirect-thunk-register-2.c: Likewise.
+ * gcc.target/i386/indirect-thunk-register-3.c: Likewise.
+
+i386: Rename to ix86_indirect_branch_register
+
+Rename the variable for -mindirect-branch-register to
+ix86_indirect_branch_register to match the command-line option name.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Replace
+ ix86_indirect_branch_thunk_register with
+ ix86_indirect_branch_register.
+ (Bw): Likewise.
+ * config/i386/i386.md (indirect_jump): Likewise.
+ (tablejump): Likewise.
+ (*sibcall_memory): Likewise.
+ (*sibcall_value_memory): Likewise.
+ Peepholes of indirect call and jump via memory: Likewise.
+ * config/i386/i386.opt: Likewise.
+ * config/i386/predicates.md (indirect_branch_operand): Likewise.
+ (GOT_memory_operand): Likewise.
+ (call_insn_operand): Likewise.
+ (sibcall_insn_operand): Likewise.
+ (GOT32_symbol_operand): Likewise.
+
+x86: Rewrite ix86_indirect_branch_register logic
+
+Rewrite ix86_indirect_branch_register logic with
+
+(and (not (match_test "ix86_indirect_branch_register"))
+ (original condition before r256662))
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (constant_call_address_operand):
+ Rewrite ix86_indirect_branch_register logic.
+ (sibcall_insn_operand): Likewise.
+
+Don't check ix86_indirect_branch_register for GOT operand
+
+Since GOT_memory_operand and GOT32_symbol_operand are simple pattern
+matches, don't check ix86_indirect_branch_register here. If needed,
+-mindirect-branch= will convert indirect branch via GOT slot to a call
+and return thunk.
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/constraints.md (Bs): Update
+ ix86_indirect_branch_register check. Don't check
+ ix86_indirect_branch_register with GOT_memory_operand.
+ (Bw): Likewise.
+ * config/i386/predicates.md (GOT_memory_operand): Don't check
+ ix86_indirect_branch_register here.
+ (GOT32_symbol_operand): Likewise.
+
+i386: Rewrite indirect_branch_operand logic
+
+ Backport from mainline
+ 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/predicates.md (indirect_branch_operand): Rewrite
+ ix86_indirect_branch_register logic.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256735 138bc75d-0d04-0410-961f-82ee72b054a4
+
+[Ubuntu note: Dropped indirect-thunk-5.c, indirect-thunk-6.c,
+ indirect-thunk-bnd-3.c, indirect-thunk-bnd-4.c,
+ indirect-thunk-extern-5.c, indirect-thunk-extern-6.c,
+ indirect-thunk-inline-5.c, and indirect-thunk-inline-6.c tests due
+ to gcc 5.4 and earlier not supporting the -fno-plt option.
+ --sbeattie,]
+---
+ src/gcc/config/i386/constraints.md | 6 +
+ src/gcc/config/i386/i386.md | 34 ++++++----
+ src/gcc/config/i386/i386.opt | 4 +
+ src/gcc/config/i386/predicates.md | 9 +-
+ src/gcc/doc/invoke.texi | 7 +-
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c | 2
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c | 22 ++++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c | 20 +++++
+ src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c | 19 +++++
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c | 2
+ src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c | 2
+ 39 files changed, 134 insertions(+), 49 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+
+Index: b/src/gcc/config/i386/constraints.md
+===================================================================
+--- a/src/gcc/config/i386/constraints.md
++++ b/src/gcc/config/i386/constraints.md
+@@ -157,12 +157,14 @@
+
+ (define_constraint "Bs"
+ "@internal Sibcall memory operand."
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "sibcall_memory_operand")))
+
+ (define_constraint "Bw"
+ "@internal Call memory operand."
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "memory_operand")))
+
+ (define_constraint "Bz"
+Index: b/src/gcc/config/i386/i386.md
+===================================================================
+--- a/src/gcc/config/i386/i386.md
++++ b/src/gcc/config/i386/i386.md
+@@ -11554,7 +11554,7 @@
+ [(set (pc) (match_operand 0 "indirect_branch_operand"))]
+ ""
+ {
+- if (TARGET_X32)
++ if (TARGET_X32 || ix86_indirect_branch_register)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
+ cfun->machine->has_local_indirect_jump = true;
+ })
+@@ -11607,7 +11607,7 @@
+ OPTAB_DIRECT);
+ }
+
+- if (TARGET_X32)
++ if (TARGET_X32 || ix86_indirect_branch_register)
+ operands[0] = convert_memory_address (word_mode, operands[0]);
+ cfun->machine->has_local_indirect_jump = true;
+ })
+@@ -11764,7 +11764,7 @@
+ [(call (mem:QI (match_operand:W 0 "memory_operand" "m"))
+ (match_operand 1))
+ (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
+- "!TARGET_X32"
++ "!TARGET_X32 && !ix86_indirect_branch_register"
+ "* return ix86_output_call_insn (insn, operands[0]);"
+ [(set_attr "type" "call")])
+
+@@ -11773,7 +11773,9 @@
+ (match_operand:W 1 "memory_operand"))
+ (call (mem:QI (match_dup 0))
+ (match_operand 3))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (1))
+ && peep2_reg_dead_p (2, operands[0])"
+ [(parallel [(call (mem:QI (match_dup 1))
+ (match_dup 3))
+@@ -11785,7 +11787,9 @@
+ (unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
+ (call (mem:QI (match_dup 0))
+ (match_operand 3))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (2))
+ && peep2_reg_dead_p (3, operands[0])"
+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
+ (parallel [(call (mem:QI (match_dup 1))
+@@ -11806,7 +11810,7 @@
+ })
+
+ (define_insn "*call_pop"
+- [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lmBz"))
++ [(call (mem:QI (match_operand:SI 0 "call_insn_operand" "lBwBz"))
+ (match_operand 1))
+ (set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG)
+@@ -11826,7 +11830,7 @@
+ [(set_attr "type" "call")])
+
+ (define_insn "*sibcall_pop_memory"
+- [(call (mem:QI (match_operand:SI 0 "memory_operand" "m"))
++ [(call (mem:QI (match_operand:SI 0 "memory_operand" "Bs"))
+ (match_operand 1))
+ (set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG)
+@@ -11878,7 +11882,9 @@
+ [(set (match_operand:W 0 "register_operand")
+ (match_operand:W 1 "memory_operand"))
+ (set (pc) (match_dup 0))]
+- "!TARGET_X32 && peep2_reg_dead_p (2, operands[0])"
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && peep2_reg_dead_p (2, operands[0])"
+ [(set (pc) (match_dup 1))])
+
+ ;; Call subroutine, returning value in operand 0
+@@ -11928,7 +11934,7 @@
+ (call (mem:QI (match_operand:W 1 "memory_operand" "m"))
+ (match_operand 2)))
+ (unspec [(const_int 0)] UNSPEC_PEEPSIB)]
+- "!TARGET_X32"
++ "!TARGET_X32 && !ix86_indirect_branch_register"
+ "* return ix86_output_call_insn (insn, operands[1]);"
+ [(set_attr "type" "callv")])
+
+@@ -11938,7 +11944,9 @@
+ (set (match_operand 2)
+ (call (mem:QI (match_dup 0))
+ (match_operand 3)))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (1))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (1))
+ && peep2_reg_dead_p (2, operands[0])"
+ [(parallel [(set (match_dup 2)
+ (call (mem:QI (match_dup 1))
+@@ -11952,7 +11960,9 @@
+ (set (match_operand 2)
+ (call (mem:QI (match_dup 0))
+ (match_operand 3)))]
+- "!TARGET_X32 && SIBLING_CALL_P (peep2_next_insn (2))
++ "!TARGET_X32
++ && !ix86_indirect_branch_register
++ && SIBLING_CALL_P (peep2_next_insn (2))
+ && peep2_reg_dead_p (3, operands[0])"
+ [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
+ (parallel [(set (match_dup 2)
+@@ -11976,7 +11986,7 @@
+
+ (define_insn "*call_value_pop"
+ [(set (match_operand 0)
+- (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lmBz"))
++ (call (mem:QI (match_operand:SI 1 "call_insn_operand" "lBwBz"))
+ (match_operand 2)))
+ (set (reg:SI SP_REG)
+ (plus:SI (reg:SI SP_REG)
+Index: b/src/gcc/config/i386/i386.opt
+===================================================================
+--- a/src/gcc/config/i386/i386.opt
++++ b/src/gcc/config/i386/i386.opt
+@@ -900,3 +900,7 @@ Enum(indirect_branch) String(thunk-inlin
+
+ EnumValue
+ Enum(indirect_branch) String(thunk-extern) Value(indirect_branch_thunk_extern)
++
++mindirect-branch-register
++Target Report Var(ix86_indirect_branch_register) Init(0)
++Force indirect call and jump via register.
+Index: b/src/gcc/config/i386/predicates.md
+===================================================================
+--- a/src/gcc/config/i386/predicates.md
++++ b/src/gcc/config/i386/predicates.md
+@@ -607,7 +607,8 @@
+ ;; Test for a valid operand for indirect branch.
+ (define_predicate "indirect_branch_operand"
+ (ior (match_operand 0 "register_operand")
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "memory_operand"))))
+
+ ;; Test for a valid operand for a call instruction.
+@@ -616,7 +617,8 @@
+ (ior (match_test "constant_call_address_operand
+ (op, mode == VOIDmode ? mode : Pmode)")
+ (match_operand 0 "call_register_no_elim_operand")
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "memory_operand"))))
+
+ ;; Similarly, but for tail calls, in which we cannot allow memory references.
+@@ -624,7 +626,8 @@
+ (ior (match_test "constant_call_address_operand
+ (op, mode == VOIDmode ? mode : Pmode)")
+ (match_operand 0 "register_no_elim_operand")
+- (and (not (match_test "TARGET_X32"))
++ (and (not (match_test "ix86_indirect_branch_register"))
++ (not (match_test "TARGET_X32"))
+ (match_operand 0 "sibcall_memory_operand"))))
+
+ ;; Match exactly zero.
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-5.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-6.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-bnd-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile { target { ! x32 } } } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fcheck-pointer-bounds -mmpx -fno-pic" } */
+
+ void (*dispatch) (char *);
+ char buf[10];
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-extern-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-1.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-2.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-3.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-4.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ typedef void (*dispatch_t)(long offset);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ void func0 (void);
+ void func1 (void);
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-1.c
+@@ -0,0 +1,22 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk -mindirect-branch-register -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk\n" } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk_bnd\n" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-2.c
+@@ -0,0 +1,20 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -mindirect-branch-register -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "call\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler "mov\[ \t\](%eax|%rax), \\((%esp|%rsp)\\)" } } */
++/* { dg-final { scan-assembler {\tpause} } } */
++/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
++/* { dg-final { scan-assembler-not "__x86_indirect_thunk" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+===================================================================
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-3.c
+@@ -0,0 +1,19 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -mindirect-branch-register -fno-pic" } */
++
++typedef void (*dispatch_t)(long offset);
++
++dispatch_t dispatch;
++
++void
++male_indirect_jump (long offset)
++{
++ dispatch(offset);
++}
++
++/* { dg-final { scan-assembler "jmp\[ \t\]*__x86_indirect_thunk_(r|e)ax" } } */
++/* { dg-final { scan-assembler-not "push(?:l|q)\[ \t\]*_?dispatch" } } */
++/* { dg-final { scan-assembler-not "pushq\[ \t\]%rax" } } */
++/* { dg-final { scan-assembler-not {\t(pause|pause|nop)} } } */
++/* { dg-final { scan-assembler-not "jmp\[ \t\]*\.LIND" } } */
++/* { dg-final { scan-assembler-not "call\[ \t\]*\.LIND" } } */
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-10.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-inline -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-11.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk-extern -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-12.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-13.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-inline -fno-pic" } */
+
+ extern void (*bar) (void);
+ extern int foo (void) __attribute__ ((function_return("thunk")));
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-14.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=thunk-extern -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-15.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=keep -mindirect-branch=keep -fno-pic" } */
+
+ extern void (*bar) (void);
+
+Index: b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+===================================================================
+--- a/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-9.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mno-indirect-branch-register -mfunction-return=thunk -mindirect-branch=thunk -fno-pic" } */
+
+ extern void (*bar) (void);
+
diff --git a/patches/source/gcc/0008-x86-Add-V-register-operand-modifier-doc.diff b/patches/source/gcc/0008-x86-Add-V-register-operand-modifier-doc.diff
new file mode 100644
index 00000000..b3bd93a2
--- /dev/null
+++ b/patches/source/gcc/0008-x86-Add-V-register-operand-modifier-doc.diff
@@ -0,0 +1,65 @@
+From 8a47615dd04a02fdae9691f5ad73fd5a5530c156 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:19:51 +0000
+Subject: [PATCH 8/9] x86: Add 'V' register operand modifier (documentation)
+
+Add 'V', a special modifier which prints the name of the full integer
+register without '%'. For
+
+extern void (*func_p) (void);
+
+void
+foo (void)
+{
+ asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
+}
+
+it generates:
+
+foo:
+ movq func_p(%rip), %rax
+ call __x86_indirect_thunk_rax
+ ret
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (print_reg): Print the name of the full
+ integer register without '%'.
+ (ix86_print_operand): Handle 'V'.
+ * doc/extend.texi: Document 'V' modifier.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-register-4.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256736 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 10 ++++++++++
+ gcc/config/i386/i386.c | 13 ++++++++++++-
+ gcc/doc/extend.texi | 3 +++
+ gcc/testsuite/ChangeLog | 7 +++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
+ 5 files changed, 45 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+
+diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
+index 46e0a36..9db9e0e 100644
+--- a/src/gcc/doc/extend.texi
++++ b/src/gcc/doc/extend.texi
+@@ -8778,6 +8778,9 @@ The table below shows the list of supported modifiers and their effects.
+ @tab @code{2}
+ @end multitable
+
++@code{V} is a special modifier which prints the name of the full integer
++register without @code{%}.
++
+ @anchor{x86floatingpointasmoperands}
+ @subsubsection x86 Floating-Point @code{asm} Operands
+
diff --git a/patches/source/gcc/0008-x86-Add-V-register-operand-modifier.diff b/patches/source/gcc/0008-x86-Add-V-register-operand-modifier.diff
new file mode 100644
index 00000000..fb1ccd98
--- /dev/null
+++ b/patches/source/gcc/0008-x86-Add-V-register-operand-modifier.diff
@@ -0,0 +1,125 @@
+From 8a47615dd04a02fdae9691f5ad73fd5a5530c156 Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:19:51 +0000
+Subject: [PATCH 8/9] x86: Add 'V' register operand modifier
+
+Add 'V', a special modifier which prints the name of the full integer
+register without '%'. For
+
+extern void (*func_p) (void);
+
+void
+foo (void)
+{
+ asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p));
+}
+
+it generates:
+
+foo:
+ movq func_p(%rip), %rax
+ call __x86_indirect_thunk_rax
+ ret
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (print_reg): Print the name of the full
+ integer register without '%'.
+ (ix86_print_operand): Handle 'V'.
+ * doc/extend.texi: Document 'V' modifier.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-register-4.c: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256736 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 10 ++++++++++
+ gcc/config/i386/i386.c | 13 ++++++++++++-
+ gcc/doc/extend.texi | 3 +++
+ gcc/testsuite/ChangeLog | 7 +++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c | 13 +++++++++++++
+ 5 files changed, 45 insertions(+), 1 deletion(-)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 8fb8902..1bbdd0c 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -17941,6 +17941,7 @@ put_condition_code (enum rtx_code code, machine_mode mode, bool reverse,
+ If CODE is 'h', pretend the reg is the 'high' byte register.
+ If CODE is 'y', print "st(0)" instead of "st", if the reg is stack op.
+ If CODE is 'd', duplicate the operand for AVX instruction.
++ If CODE is 'V', print naked full integer register name without %.
+ */
+
+ void
+@@ -17951,7 +17952,7 @@ print_reg (rtx x, int code, FILE *file)
+ unsigned int regno;
+ bool duplicated = code == 'd' && TARGET_AVX;
+
+- if (ASSEMBLER_DIALECT == ASM_ATT)
++ if (ASSEMBLER_DIALECT == ASM_ATT && code != 'V')
+ putc ('%', file);
+
+ if (x == pc_rtx)
+@@ -17999,6 +18000,14 @@ print_reg (rtx x, int code, FILE *file)
+ else
+ code = GET_MODE_SIZE (GET_MODE (x));
+
++ if (code == 'V')
++ {
++ if (GENERAL_REGNO_P (regno))
++ code = GET_MODE_SIZE (word_mode);
++ else
++ error ("'V' modifier on non-integer register");
++ }
++
+ /* Irritatingly, AMD extended registers use different naming convention
+ from the normal registers: "r%d[bwd]" */
+ if (REX_INT_REGNO_P (regno))
+@@ -18118,6 +18127,7 @@ print_reg (rtx x, int code, FILE *file)
+ & -- print some in-use local-dynamic symbol name.
+ H -- print a memory address offset by 8; used for sse high-parts
+ Y -- print condition for XOP pcom* instruction.
++ V -- print naked full integer register name without %.
+ + -- print a branch hint as 'cs' or 'ds' prefix
+ ; -- print a semicolon (after prefixes due to bug in older gas).
+ ~ -- print "i" if TARGET_AVX2, "f" otherwise.
+@@ -18342,6 +18352,7 @@ ix86_print_operand (FILE *file, rtx x, int code)
+ case 'X':
+ case 'P':
+ case 'p':
++ case 'V':
+ break;
+
+ case 's':
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+new file mode 100644
+index 0000000..f0cd9b7
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-register-4.c
+@@ -0,0 +1,13 @@
++/* { dg-do compile } */
++/* { dg-options "-O2 -mindirect-branch=keep -fno-pic" } */
++
++extern void (*func_p) (void);
++
++void
++foo (void)
++{
++ asm("call __x86_indirect_thunk_%V0" : : "a" (func_p));
++}
++
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_eax" { target ia32 } } } */
++/* { dg-final { scan-assembler "call\[ \t\]*__x86_indirect_thunk_rax" { target { ! ia32 } } } } */
+--
+2.7.4
+
diff --git a/patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff b/patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff
new file mode 100644
index 00000000..fdaab625
--- /dev/null
+++ b/patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff
@@ -0,0 +1,275 @@
+From 5d1c53c6fd593de2360c1a2ae44ebf5fa3c5263b Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:22:01 +0000
+Subject: [PATCH 9/9] x86: Disallow -mindirect-branch=/-mfunction-return= with
+ -mcmodel=large
+
+Since the thunk function may not be reachable in large code model,
+-mcmodel=large is incompatible with -mindirect-branch=thunk,
+-mindirect-branch=thunk-extern, -mfunction-return=thunk and
+-mfunction-return=thunk-extern. Issue an error when they are used with
+-mcmodel=large.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
+ -mcmodel=large with -mindirect-branch=thunk,
+ -mindirect-branch=thunk-extern, -mfunction-return=thunk and
+ -mfunction-return=thunk-extern.
+ * doc/invoke.texi: Document -mcmodel=large is incompatible with
+ -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
+ -mfunction-return=thunk and -mfunction-return=thunk-extern.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-10.c: New test.
+ * gcc.target/i386/indirect-thunk-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
+ * gcc.target/i386/ret-thunk-17.c: Likewise.
+ * gcc.target/i386/ret-thunk-18.c: Likewise.
+ * gcc.target/i386/ret-thunk-19.c: Likewise.
+ * gcc.target/i386/ret-thunk-20.c: Likewise.
+ * gcc.target/i386/ret-thunk-21.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256737 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 13 +++++++++++
+ gcc/config/i386/i386.c | 26 ++++++++++++++++++++++
+ gcc/doc/invoke.texi | 11 +++++++++
+ gcc/testsuite/ChangeLog | 17 ++++++++++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-10.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-8.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-9.c | 7 ++++++
+ .../gcc.target/i386/indirect-thunk-attr-10.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-11.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-9.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-17.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-18.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-19.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-20.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-21.c | 9 ++++++++
+ 15 files changed, 156 insertions(+)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+
+diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
+index 1bbdd0c..e758387 100644
+--- a/src/gcc/config/i386/i386.c
++++ b/src/gcc/config/i386/i386.c
+@@ -7187,6 +7187,19 @@ ix86_set_indirect_branch_type (tree fndecl)
+ }
+ else
+ cfun->machine->indirect_branch_type = ix86_indirect_branch;
++
++ /* -mcmodel=large is not compatible with -mindirect-branch=thunk
++ nor -mindirect-branch=thunk-extern. */
++ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
++ && ((cfun->machine->indirect_branch_type
++ == indirect_branch_thunk_extern)
++ || (cfun->machine->indirect_branch_type
++ == indirect_branch_thunk)))
++ error ("%<-mindirect-branch=%s%> and %<-mcmodel=large%> are not "
++ "compatible",
++ ((cfun->machine->indirect_branch_type
++ == indirect_branch_thunk_extern)
++ ? "thunk-extern" : "thunk"));
+ }
+
+ if (cfun->machine->function_return_type == indirect_branch_unset)
+@@ -7212,6 +7225,19 @@ ix86_set_indirect_branch_type (tree fndecl)
+ }
+ else
+ cfun->machine->function_return_type = ix86_function_return;
++
++ /* -mcmodel=large is not compatible with -mfunction-return=thunk
++ nor -mfunction-return=thunk-extern. */
++ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
++ && ((cfun->machine->function_return_type
++ == indirect_branch_thunk_extern)
++ || (cfun->machine->function_return_type
++ == indirect_branch_thunk)))
++ error ("%<-mfunction-return=%s%> and %<-mcmodel=large%> are not "
++ "compatible",
++ ((cfun->machine->function_return_type
++ == indirect_branch_thunk_extern)
++ ? "thunk-extern" : "thunk"));
+ }
+ }
+
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+new file mode 100644
+index 0000000..a0674bd
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk-inline -mfunction-return=keep -mcmodel=large" } */
++
++void
++bar (void)
++{
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+new file mode 100644
+index 0000000..7a80a89
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk -mfunction-return=keep -mcmodel=large" } */
++
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+new file mode 100644
+index 0000000..d4d45c5
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=thunk-extern -mfunction-return=keep -mcmodel=large" } */
++
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+new file mode 100644
+index 0000000..3a2aead
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((indirect_branch("thunk-extern")))
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+new file mode 100644
+index 0000000..8e52f03
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((indirect_branch("thunk-inline")))
++void
++bar (void)
++{
++}
+diff --git a/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c b/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+new file mode 100644
+index 0000000..bdaa4f6
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mindirect-branch=keep -mfunction-return=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((indirect_branch("thunk")))
++void
++bar (void)
++{ /* { dg-error "'-mindirect-branch=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-17.c b/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+new file mode 100644
+index 0000000..0605e2c
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+@@ -0,0 +1,7 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=thunk -mindirect-branch=keep -mcmodel=large" } */
++
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-18.c b/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+new file mode 100644
+index 0000000..307019d
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+@@ -0,0 +1,8 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=thunk-extern -mindirect-branch=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-19.c b/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+new file mode 100644
+index 0000000..772617f
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+@@ -0,0 +1,8 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
++
++__attribute__ ((function_return("thunk")))
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-20.c b/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+new file mode 100644
+index 0000000..1e9f9bd
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((function_return("thunk-extern")))
++void
++bar (void)
++{ /* { dg-error "'-mfunction-return=thunk-extern' and '-mcmodel=large' are not compatible" } */
++}
+diff --git a/gcc/testsuite/gcc.target/i386/ret-thunk-21.c b/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+new file mode 100644
+index 0000000..eea07f7
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile { target { lp64 } } } */
++/* { dg-options "-O2 -mfunction-return=keep -mindirect-branch=keep -mcmodel=large" } */
++/* { dg-additional-options "-fPIC" { target fpic } } */
++
++__attribute__ ((function_return("thunk-inline")))
++void
++bar (void)
++{
++}
+--
+2.7.4
+
diff --git a/patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff b/patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff
new file mode 100644
index 00000000..c1079005
--- /dev/null
+++ b/patches/source/gcc/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff
@@ -0,0 +1,102 @@
+From 5d1c53c6fd593de2360c1a2ae44ebf5fa3c5263b Mon Sep 17 00:00:00 2001
+From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Jan 2018 11:22:01 +0000
+Subject: [PATCH 9/9] x86: Disallow -mindirect-branch=/-mfunction-return= with
+ -mcmodel=large
+
+Since the thunk function may not be reachable in large code model,
+-mcmodel=large is incompatible with -mindirect-branch=thunk,
+-mindirect-branch=thunk-extern, -mfunction-return=thunk and
+-mfunction-return=thunk-extern. Issue an error when they are used with
+-mcmodel=large.
+
+gcc/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
+ -mcmodel=large with -mindirect-branch=thunk,
+ -mindirect-branch=thunk-extern, -mfunction-return=thunk and
+ -mfunction-return=thunk-extern.
+ * doc/invoke.texi: Document -mcmodel=large is incompatible with
+ -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
+ -mfunction-return=thunk and -mfunction-return=thunk-extern.
+
+gcc/testsuite/
+
+ Backport from mainline
+ 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/indirect-thunk-10.c: New test.
+ * gcc.target/i386/indirect-thunk-8.c: Likewise.
+ * gcc.target/i386/indirect-thunk-9.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-10.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-11.c: Likewise.
+ * gcc.target/i386/indirect-thunk-attr-9.c: Likewise.
+ * gcc.target/i386/ret-thunk-17.c: Likewise.
+ * gcc.target/i386/ret-thunk-18.c: Likewise.
+ * gcc.target/i386/ret-thunk-19.c: Likewise.
+ * gcc.target/i386/ret-thunk-20.c: Likewise.
+ * gcc.target/i386/ret-thunk-21.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@256737 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/ChangeLog | 13 +++++++++++
+ gcc/config/i386/i386.c | 26 ++++++++++++++++++++++
+ gcc/doc/invoke.texi | 11 +++++++++
+ gcc/testsuite/ChangeLog | 17 ++++++++++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-10.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-8.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/indirect-thunk-9.c | 7 ++++++
+ .../gcc.target/i386/indirect-thunk-attr-10.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-11.c | 9 ++++++++
+ .../gcc.target/i386/indirect-thunk-attr-9.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-17.c | 7 ++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-18.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-19.c | 8 +++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-20.c | 9 ++++++++
+ gcc/testsuite/gcc.target/i386/ret-thunk-21.c | 9 ++++++++
+ 15 files changed, 156 insertions(+)
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-8.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-10.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-11.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/indirect-thunk-attr-9.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-17.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-18.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-19.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-20.c
+ create mode 100644 gcc/testsuite/gcc.target/i386/ret-thunk-21.c
+
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 1e572b1..6f3c344 100644
+--- a/src/gcc/doc/invoke.texi
++++ b/src/gcc/doc/invoke.texi
+@@ -25699,6 +25699,11 @@ to external call and return thunk provided in a separate object file.
+ You can control this behavior for a specific function by using the
+ function attribute @code{indirect_branch}. @xref{Function Attributes}.
+
++Note that @option{-mcmodel=large} is incompatible with
++@option{-mindirect-branch=thunk} nor
++@option{-mindirect-branch=thunk-extern} since the thunk function may
++not be reachable in large code model.
++
+ @item -mfunction-return=@var{choice}
+ @opindex -mfunction-return
+ Convert function return with @var{choice}. The default is @samp{keep},
+@@ -25710,6 +25715,12 @@ object file. You can control this behavior for a specific function by
+ using the function attribute @code{function_return}.
+ @xref{Function Attributes}.
+
++Note that @option{-mcmodel=large} is incompatible with
++@option{-mfunction-return=thunk} nor
++@option{-mfunction-return=thunk-extern} since the thunk function may
++not be reachable in large code model.
++
++
+ @item -mindirect-branch-register
+ @opindex -mindirect-branch-register
+ Force indirect call and jump via register.
diff --git a/patches/source/gcc/antlr-runtime-3.4.jar b/patches/source/gcc/antlr-runtime-3.4.jar
new file mode 100644
index 00000000..865a537b
--- /dev/null
+++ b/patches/source/gcc/antlr-runtime-3.4.jar
Binary files differ
diff --git a/patches/source/gcc/c89.sh b/patches/source/gcc/c89.sh
new file mode 100644
index 00000000..35486ea8
--- /dev/null
+++ b/patches/source/gcc/c89.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c89"
+for opt; do
+ case "$opt" in
+ -ansi|-std=c89|-std=iso9899:1990) fl="";;
+ -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/patches/source/gcc/c99.sh b/patches/source/gcc/c99.sh
new file mode 100644
index 00000000..88dd8064
--- /dev/null
+++ b/patches/source/gcc/c99.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+fl="-std=c99"
+for opt; do
+ case "$opt" in
+ -std=c99|-std=iso9899:1999) fl="";;
+ -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
+ exit 1;;
+ esac
+done
+exec gcc $fl ${1+"$@"}
diff --git a/patches/source/gcc/create_gcj_jvm.sh b/patches/source/gcc/create_gcj_jvm.sh
new file mode 100644
index 00000000..d1011860
--- /dev/null
+++ b/patches/source/gcc/create_gcj_jvm.sh
@@ -0,0 +1,93 @@
+# ---------------------------------------------------------------------------
+# This script creates a directory structure below /usr/lib/jvm and populates
+# it with symlinks to GCC binaries.
+# This will work as a compatibility layer to emulate an Oracle JDK/JRE.
+# This emulation is required in order to compile OpenJDK using GNU java.
+#
+# The same can automatically be achieved in Slackware's gcc packages if
+# the 'configure' command is called with the following additional parameters:
+# --enable-java-home \
+# --with-java-home=/usr/lib$LIBDIRSUFFIX/jvm/jre \
+# --with-jvm-root-dir=/usr/lib$LIBDIRSUFFIX/jvm \
+# --with-jvm-jar-dir=/usr/lib$LIBDIRSUFFIX/jvm/jvm-exports \
+# --with-arch-directory=$LIB_ARCH \
+#
+# Author: Eric Hameleers <alien@slackware.com> December 2011
+# ---------------------------------------------------------------------------
+
+# 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=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ LIB_ARCH=amd64
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+fi
+
+# Where does the OpenJDK SlackBuild expect the GNU java compatibility symlinks:
+JVM=${1:-/usr/lib${LIBDIRSUFFIX}/jvm}
+BINDIR=/usr/bin
+
+# What version of GCC do we have installed:
+GCJVER=$(gcj -dumpversion)
+
+# First, remove the old set of symlinks if they should exist:
+rm -fr $JVM
+
+# Create a JDK compatible directory structure for GNU java:
+mkdir -p $JVM
+mkdir -p $JVM/bin
+mkdir -p $JVM/jre/bin
+mkdir -p $JVM/jre/lib/${LIB_ARCH}/client
+mkdir -p $JVM/jre/lib/${LIB_ARCH}/server
+mkdir -p $JVM/lib
+
+ln -sf $BINDIR/gjar $JVM/bin/jar
+ln -sf $BINDIR/grmic $JVM/bin/rmic
+ln -sf $BINDIR/gjavah $JVM/bin/javah
+ln -sf $BINDIR/jcf-dump $JVM/bin/javap
+ln -sf $BINDIR/gappletviewer $JVM/bin/appletviewer
+ln -sf $BINDIR/grmiregistry $JVM/bin/rmiregistry
+ln -sf $BINDIR/grmiregistry $JVM/jre/bin/rmiregistry
+ln -sf $BINDIR/gkeytool $JVM/bin/keytool
+ln -sf $BINDIR/gkeytool $JVM/jre/bin/keytool
+ln -sf $BINDIR/gij $JVM/bin/java
+ln -sf $BINDIR/ecj $JVM/bin/javac
+ln -sf /usr/lib/gcj-${GCJVER}-11/libjvm.so $JVM/jre/lib/${LIB_ARCH}/client/libjvm.so
+ln -sf /usr/lib/gcj-${GCJVER}-11/libjvm.so $JVM/jre/lib/${LIB_ARCH}/server/libjvm.so
+ln -sf /usr/lib/gcj-${GCJVER}-11/libjawt.so $JVM/jre/lib/${LIB_ARCH}/libjawt.so
+ln -sf /usr/share/java/libgcj-${GCJVER}.jar $JVM/jre/lib/rt.jar
+ln -sf /usr/share/java/libgcj-tools-${GCJVER}.jar $JVM/lib/tools.jar
+ln -sf /usr/include/c++/${GCJVER}/gnu/java $JVM/include
+
+# Add a Eclipse Java Compiler wrapper which is required
+# for bootstrapping OpenJDK using GNU java:
+cat <<EOT > /usr/bin/ecj
+#!/bin/sh
+
+CLASSPATH=/usr/share/java/ecj.jar\${CLASSPATH:+:}\$CLASSPATH \
+ java org.eclipse.jdt.internal.compiler.batch.Main "\$@"
+
+EOT
+chmod 755 /usr/bin/ecj
+
+
diff --git a/patches/source/gcc/ecj-4.9.jar b/patches/source/gcc/ecj-4.9.jar
new file mode 100644
index 00000000..29dc442f
--- /dev/null
+++ b/patches/source/gcc/ecj-4.9.jar
Binary files differ
diff --git a/patches/source/gcc/ecj.sh b/patches/source/gcc/ecj.sh
new file mode 100644
index 00000000..1d8b7979
--- /dev/null
+++ b/patches/source/gcc/ecj.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+CLASSPATH=@JAVADIR@/ecj.jar${CLASSPATH:+:}$CLASSPATH \
+ java org.eclipse.jdt.internal.compiler.batch.Main "$@"
+
diff --git a/patches/source/gcc/ecj.url b/patches/source/gcc/ecj.url
new file mode 100644
index 00000000..9a28b2ce
--- /dev/null
+++ b/patches/source/gcc/ecj.url
@@ -0,0 +1 @@
+ftp://sourceware.org/pub/java/ecj-4.9.jar
diff --git a/patches/source/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch b/patches/source/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch
new file mode 100644
index 00000000..ab626240
--- /dev/null
+++ b/patches/source/gcc/fastjar-patches/1000-fastjar-0.97-segfault.patch
@@ -0,0 +1,29 @@
+2009-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ * jartool.c (make_manifest): Initialize current_time before
+ calling unix2dostime on it.
+
+--- fastjar-0.97/jartool.c.jj 2008-10-15 18:35:37.000000000 +0200
++++ fastjar-0.97/jartool.c 2009-01-14 15:40:50.000000000 +0100
+@@ -820,6 +820,10 @@ int make_manifest(int jfd, const char *m
+ int mod_time; /* file modification time */
+ struct zipentry *ze;
+
++ current_time = time(NULL);
++ if(current_time == (time_t)-1)
++ exit_on_error("time");
++
+ mod_time = unix2dostime(&current_time);
+
+ /* If we are creating a new manifest, create a META-INF directory entry */
+@@ -828,10 +832,6 @@ int make_manifest(int jfd, const char *m
+
+ memset((file_header + 12), '\0', 16); /*clear mod time, crc, size fields*/
+
+- current_time = time(NULL);
+- if(current_time == (time_t)-1)
+- exit_on_error("time");
+-
+ PACK_UB2(file_header, LOC_EXTRA, 0);
+ PACK_UB2(file_header, LOC_COMP, 0);
+ PACK_UB2(file_header, LOC_FNLEN, nlen);
diff --git a/patches/source/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch b/patches/source/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch
new file mode 100644
index 00000000..722351d3
--- /dev/null
+++ b/patches/source/gcc/fastjar-patches/1001-fastjar-0.97-len1.patch
@@ -0,0 +1,16 @@
+2009-12-21 Chris Ball <cjb@laptop.org>
+
+ * jartool.c (add_file_to_jar): Test write return value against -1
+ instead of 1.
+
+--- fastjar-0.97/jartool.c.jj 2008-10-15 12:35:37.000000000 -0400
++++ fastjar-0.97/jartool.c 2009-12-22 06:48:09.309530000 -0500
+@@ -1257,7 +1257,7 @@ int add_file_to_jar(int jfd, int ffd, co
+ exit_on_error("write");
+
+ /* write the file name to the zip file */
+- if (1 == write(jfd, fname, file_name_length))
++ if (-1 == write(jfd, fname, file_name_length))
+ exit_on_error("write");
+
+ if(verbose){
diff --git a/patches/source/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch b/patches/source/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch
new file mode 100644
index 00000000..34a02a74
--- /dev/null
+++ b/patches/source/gcc/fastjar-patches/1002-fastjar-0.97-filename0.patch
@@ -0,0 +1,14 @@
+2010-03-01 Richard Guenther <rguenther@suse.de>
+
+ * jartool.c (read_entries): Properly zero-terminate filename.
+
+--- fastjar-0.97/jartool.c 6 Sep 2009 22:16:00 -0000 1.59
++++ fastjar-0.97/jartool.c 1 Mar 2010 15:38:43 -0000 1.60
+@@ -790,6 +790,7 @@ int read_entries (int fd)
+ progname, jarfile);
+ return 1;
+ }
++ ze->filename[len] = '\0';
+ len = UNPACK_UB4(header, CEN_EFLEN);
+ len += UNPACK_UB4(header, CEN_COMLEN);
+ if (lseek (fd, len, SEEK_CUR) == -1)
diff --git a/patches/source/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch b/patches/source/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch
new file mode 100644
index 00000000..2c6e23c7
--- /dev/null
+++ b/patches/source/gcc/fastjar-patches/1003-fastjar-CVE-2010-0831.patch
@@ -0,0 +1,102 @@
+2010-06-10 Jakub Jelinek <jakub@redhat.com>
+ Dan Rosenberg <dan.j.rosenberg@gmail.com>
+
+ * jartool.c (extract_jar): Fix up checks for traversal to parent
+ directories, disallow absolute paths, make the code slightly more
+ efficient.
+
+--- fastjar-0.97/jartool.c.jj 2009-09-07 00:10:47.000000000 +0200
++++ fastjar-0.97/jartool.c 2010-06-08 20:00:29.000000000 +0200
+@@ -1730,7 +1730,17 @@ int extract_jar(int fd, const char **fil
+ struct stat sbuf;
+ int depth = 0;
+
+- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename));
++ if(*filename == '/'){
++ fprintf(stderr, "Absolute path names are not allowed.\n");
++ exit(EXIT_FAILURE);
++ }
++
++ tmp_buff = malloc(strlen((const char *)filename));
++
++ if(tmp_buff == NULL) {
++ fprintf(stderr, "Out of memory.\n");
++ exit(EXIT_FAILURE);
++ }
+
+ for(;;){
+ const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/');
+@@ -1738,25 +1748,28 @@ int extract_jar(int fd, const char **fil
+ if(idx == NULL)
+ break;
+ else if(idx == start){
++ tmp_buff[idx - filename] = '/';
+ start++;
+ continue;
+ }
+- start = idx + 1;
+
+- strncpy(tmp_buff, (const char *)filename, (idx - filename));
+- tmp_buff[(idx - filename)] = '\0';
++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start));
++ tmp_buff[idx - filename] = '\0';
+
+ #ifdef DEBUG
+ printf("checking the existance of %s\n", tmp_buff);
+ #endif
+- if(strcmp(tmp_buff, "..") == 0){
++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){
+ --depth;
+ if (depth < 0){
+ fprintf(stderr, "Traversal to parent directories during unpacking!\n");
+ exit(EXIT_FAILURE);
+ }
+- } else if (strcmp(tmp_buff, ".") != 0)
++ } else if (idx - start != 1 || *start != '.')
+ ++depth;
++
++ start = idx + 1;
++
+ if(stat(tmp_buff, &sbuf) < 0){
+ if(errno != ENOENT)
+ exit_on_error("stat");
+@@ -1765,6 +1778,7 @@ int extract_jar(int fd, const char **fil
+ #ifdef DEBUG
+ printf("Directory exists\n");
+ #endif
++ tmp_buff[idx - filename] = '/';
+ continue;
+ }else {
+ fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n",
+@@ -1781,10 +1795,11 @@ int extract_jar(int fd, const char **fil
+ if(verbose && handle)
+ printf("%10s: %s/\n", "created", tmp_buff);
+
++ tmp_buff[idx - filename] = '/';
+ }
+
+ /* only a directory */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ dir = TRUE;
+
+ #ifdef DEBUG
+@@ -1792,7 +1807,7 @@ int extract_jar(int fd, const char **fil
+ #endif
+
+ /* If the entry was just a directory, don't write to file, etc */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ f_fd = -1;
+
+ free(tmp_buff);
+@@ -1876,7 +1891,8 @@ int extract_jar(int fd, const char **fil
+ exit(EXIT_FAILURE);
+ }
+
+- close(f_fd);
++ if (f_fd != -1)
++ close(f_fd);
+
+ if(verbose && dir == FALSE && handle)
+ printf("%10s: %s\n",
diff --git a/patches/source/gcc/fastjar-patches/1004-fastjar-man.patch b/patches/source/gcc/fastjar-patches/1004-fastjar-man.patch
new file mode 100644
index 00000000..34bf704d
--- /dev/null
+++ b/patches/source/gcc/fastjar-patches/1004-fastjar-man.patch
@@ -0,0 +1,27 @@
+2010-03-24 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * Makefile.am (POD2MAN): Provide --date from ChangeLog.
+ * Makefile.in: Regenerate.
+
+--- fastjar-0.97/Makefile.am.jj 2008-10-16 04:24:55.000000000 -0400
++++ fastjar-0.97/Makefile.am 2010-06-21 09:29:41.021398000 -0400
+@@ -39,7 +39,7 @@ EXTRA_DIST = \
+ texi2pod.pl
+
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+-POD2MAN = pod2man --center="GNU" --release=@VERSION@
++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog)
+
+ .pod.1:
+ -($(POD2MAN) --section=1 $< > $(@).T$$$$ && \
+--- fastjar-0.97/Makefile.in.jj 2008-10-16 04:15:16.000000000 -0400
++++ fastjar-0.97/Makefile.in 2010-06-21 09:30:15.882810000 -0400
+@@ -515,7 +515,7 @@ EXTRA_DIST = \
+ texi2pod.pl
+
+ TEXI2POD = perl $(srcdir)/texi2pod.pl
+-POD2MAN = pod2man --center="GNU" --release=@VERSION@
++POD2MAN = pod2man --center="GNU" --release=@VERSION@ --date=$(shell sed -n '1s/ .*//p' <$(srcdir)/ChangeLog)
+
+ #SPLINT_FLAGS=-I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H +posixlib +weak
+ SPLINT_FLAGS = -I . -I $(srcdir)/lib -I $(srcdir) -DHAVE_CONFIG_H -DPRIx32= -warnposix +weak
diff --git a/patches/source/gcc/gcc-no_fixincludes.diff b/patches/source/gcc/gcc-no_fixincludes.diff
new file mode 100644
index 00000000..52b66161
--- /dev/null
+++ b/patches/source/gcc/gcc-no_fixincludes.diff
@@ -0,0 +1,27 @@
+--- ./gcc/Makefile.in.orig 2010-04-02 02:49:06.000000000 -0500
++++ ./gcc/Makefile.in 2010-08-01 16:55:30.088318841 -0500
+@@ -3864,9 +3864,9 @@
+ chmod a+r $${fix_dir}/limits.h; \
+ done
+ # Install the README
+- rm -f include-fixed/README
+- cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
+- chmod a+r include-fixed/README
++# rm -f include-fixed/README
++# cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
++# chmod a+r include-fixed/README
+ $(STAMP) $@
+
+ .PHONY: install-gcc-tooldir
+@@ -3947,10 +3947,7 @@
+ (TARGET_MACHINE='$(target)'; srcdir=`cd $(srcdir); ${PWD_COMMAND}`; \
+ SHELL='$(SHELL)'; MACRO_LIST=`${PWD_COMMAND}`/macro_list ; \
+ gcc_dir=`${PWD_COMMAND}` ; \
+- export TARGET_MACHINE srcdir SHELL MACRO_LIST && \
+- cd $(build_objdir)/fixincludes && \
+- $(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
+- $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
++ export TARGET_MACHINE srcdir SHELL MACRO_LIST ); \
+ rm -f $${fix_dir}/syslimits.h; \
+ if [ -f $${fix_dir}/limits.h ]; then \
+ mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \
diff --git a/patches/source/gcc/gcc.SlackBuild b/patches/source/gcc/gcc.SlackBuild
new file mode 100755
index 00000000..73f2363c
--- /dev/null
+++ b/patches/source/gcc/gcc.SlackBuild
@@ -0,0 +1,827 @@
+#!/bin/sh
+# GCC package build script (written by volkerdi@slackware.com)
+#
+# Copyright 2003, 2004 Slackware Linux, Inc., Concord, California, USA
+# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 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.
+#
+
+# Modified 2011 by Eric Hameleers <alien at slackware.com> for OpenJDK.
+
+# Some notes, Fri May 16 12:31:32 PDT 2003:
+#
+# Why i486 and not i386? Because the shared C++ libraries in gcc-3.2.x will
+# require 486 opcodes even when a 386 target is used (so we already weren't
+# compatible with the i386 for Slackware 9.0, didn't notice, and nobody
+# complained :-). gcc-3.3 fixes this issue and allows you to build a 386
+# compiler, but the fix is done in a way that produces binaries that are not
+# compatible with gcc-3.2.x compiled binaries. To retain compatibility with
+# Slackware 9.0, we'll have to use i486 (or better) as the compiler target
+# for gcc-3.3.
+#
+# It's time to say goodbye to i386 support in Slackware. I've surveyed 386
+# usage online, and the most common thing I see people say when someone asks
+# about running Linux on a 386 is to "run Slackware", but then they also
+# usually go on to say "be sure to get an OLD version, like 4.0, before glibc,
+# because it'll be more efficient." Now, if that's the general advice, then
+# I see no reason to continue 386 support in the latest Slackware (and indeed
+# it's no longer easily possible).
+
+# Some more notes, Mon Aug 3 19:49:51 UTC 2015:
+#
+# Changing to -march=i586 for 32-bit x86 as several things (Mesa being one of
+# them) no longer work if constrained to -march=i486. We're not going to use
+# -march=i686 since the only additional opcode is CMOV, which is actually less
+# efficient on modern CPUs running in 32-bit mode than the alternate i586
+# instructions. No need to throw i586 CPUs under the bus (yet).
+
+PKGNAM=gcc
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# How many jobs to run in parallel:
+NUMJOBS=" -j 7 "
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=i386
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=s390
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ LIB_ARCH=amd64
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=armv7hl
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ LIB_ARCH=$ARCH
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+# Temporary build location. This should *NOT* be a directory
+# path a non-root user could create later...
+TMP=${TMP:-"/gcc-$(mcookie)"}
+
+# This is the main DESTDIR target:
+PKG1=$TMP/package-gcc
+# These are the directories to build other packages in:
+PKG2=$TMP/package-gcc-g++
+PKG3=$TMP/package-gcc-gfortran
+PKG4=$TMP/package-gcc-gnat
+PKG5=$TMP/package-gcc-java
+PKG6=$TMP/package-gcc-objc
+PKG7=$TMP/package-gcc-g++-gch
+PKG8=$TMP/package-gcc-go
+
+# Clear the build locations:
+if [ -d $TMP ]; then
+ rm -rf $TMP
+fi
+mkdir -p $PKG{1,2,3,4,5,6,7,8}/usr/doc/gcc-$VERSION
+
+# Insert package descriptions:
+mkdir -p $PKG{1,2,3,4,5,6,7,8}/install
+cat $CWD/slack-desc.gcc > $PKG1/install/slack-desc
+cat $CWD/slack-desc.gcc-g++ > $PKG2/install/slack-desc
+cat $CWD/slack-desc.gcc-gfortran > $PKG3/install/slack-desc
+cat $CWD/slack-desc.gcc-gnat > $PKG4/install/slack-desc
+cat $CWD/slack-desc.gcc-java > $PKG5/install/slack-desc
+cat $CWD/slack-desc.gcc-objc > $PKG6/install/slack-desc
+# cat $CWD/slack-desc.gcc-g++-gch > $PKG7/install/slack-desc
+cat $CWD/slack-desc.gcc-go > $PKG8/install/slack-desc
+
+cd $TMP
+tar xvf $CWD/gcc-$VERSION.tar.?z || exit 1
+
+# Patches based inside the gcc directory go here:
+#( cd gcc-$VERSION/gcc
+# #zcat $CWD/gcc.66782.diff.gz | patch -p0 --verbose || exit 1
+#) || exit 1
+
+# Copy ecj.jar into the TLD of the source. Needed for java compiler.
+# This can be retrieved from ftp://sourceware.org/pub/java
+cp $CWD/ecj-4.9.jar gcc-$VERSION/ecj.jar
+
+# Use an antlr runtime to compile javadoc.
+# The runtime can be obtained from:
+#https://oss.sonatype.org/content/repositories/releases/org/antlr/antlr-runtime/
+ANTLJAR=$(echo $CWD/antlr-*.jar | tail -1)
+
+# install docs
+( cd gcc-$VERSION
+ # Smite the fixincludes:
+ zcat $CWD/gcc-no_fixincludes.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+ # Add retpoline support:
+ zcat $CWD/0001-i386-Move-struct-ix86_frame-to-machine_function.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0003-i386-More-use-reference-of-struct-ix86_frame-to-avoi.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0004-i386-Don-t-use-reference-of-struct-ix86_frame.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0005-x86-Add-mindirect-branch-doc.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0005-x86-Add-mindirect-branch.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0006-x86-Add-mfunction-return-doc.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0006-x86-Add-mfunction-return.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0007-x86-Add-mindirect-branch-register-doc.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0007-x86-Add-mindirect-branch-register.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0008-x86-Add-V-register-operand-modifier-doc.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0008-x86-Add-V-register-operand-modifier.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0009-x86-Disallow-mindirect-branch-mfunction-return-with-.diff.gz | patch -p2 --verbose || exit 1
+ zcat $CWD/0009-x86-Disallow-mindirect-branch-mfunction-return-with-doc.diff.gz | patch -p2 --verbose || exit 1
+
+ # Fix perms/owners
+ chown -R root:root .
+ find . -perm 777 -exec chmod 755 {} \;
+ find . -perm 775 -exec chmod 755 {} \;
+ find . -perm 754 -exec chmod 755 {} \;
+ find . -perm 664 -exec chmod 644 {} \;
+ mkdir -p $PKG1/usr/doc/gcc-$VERSION
+ cp -a \
+ COPYING* ChangeLog* FAQ INSTALL \
+ LAST_UPDATED MAINTAINERS NEWS \
+ README* *.html \
+ $PKG1/usr/doc/gcc-$VERSION
+
+ # We will keep part of these, but they are really big...
+ if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/gcc-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+ if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG1/usr/doc/gcc-$VERSION)
+ cat NEWS | head -n 1000 > $DOCSDIR/NEWS
+ touch -r NEWS $DOCSDIR/NEWS
+ fi
+
+ mkdir -p $PKG1/usr/doc/gcc-${VERSION}/gcc
+ ( cd gcc
+ cp -a \
+ ABOUT* COPYING* DATESTAMP DEV-PHASE LANG* ONEWS README* SERVICE \
+ $PKG1/usr/doc/gcc-$VERSION/gcc
+
+ mkdir -p $PKG3/usr/doc/gcc-${VERSION}/gcc/fortran
+ ( cd fortran
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG3/usr/doc/gcc-$VERSION/gcc/fortran/ChangeLog
+ touch -r ChangeLog $PKG3/usr/doc/gcc-$VERSION/gcc/fortran/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG4/usr/doc/gcc-${VERSION}/gcc/ada
+ ( cd ada
+ cp -a \
+ ChangeLog.tree-ssa \
+ $PKG4/usr/doc/gcc-$VERSION/gcc/ada
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG4/usr/doc/gcc-$VERSION/gcc/ada/ChangeLog
+ touch -r ChangeLog $PKG4/usr/doc/gcc-$VERSION/gcc/ada/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG5/usr/doc/gcc-${VERSION}/gcc/java
+ ( cd java
+ cp -a \
+ ChangeLog.tree-ssa \
+ $PKG5/usr/doc/gcc-${VERSION}/gcc/java
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG5/usr/doc/gcc-${VERSION}/gcc/java/ChangeLog
+ touch -r ChangeLog $PKG5/usr/doc/gcc-${VERSION}/gcc/java/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG6/usr/doc/gcc-${VERSION}/gcc/objc
+ ( cd objc
+ cp -a \
+ README* \
+ $PKG6/usr/doc/gcc-${VERSION}/gcc/objc
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG6/usr/doc/gcc-${VERSION}/gcc/objc/ChangeLog
+ touch -r ChangeLog $PKG6/usr/doc/gcc-${VERSION}/gcc/objc/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG8/usr/doc/gcc-${VERSION}/gcc/go
+ ( cd go
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG8/usr/doc/gcc-${VERSION}/gcc/go/ChangeLog
+ touch -r ChangeLog $PKG8/usr/doc/gcc-${VERSION}/gcc/go/ChangeLog
+ fi
+ cp -a \
+ README* THREADS* \
+ gofrontend/{LICENSE,PATENTS,README} \
+ $PKG8/usr/doc/gcc-${VERSION}/gcc/go
+ )
+
+ ) || exit 1
+
+ mkdir -p $PKG3/usr/doc/gcc-${VERSION}/libgfortran
+ ( cd libgfortran
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG3/usr/doc/gcc-${VERSION}/libgfortran/ChangeLog
+ touch -r ChangeLog $PKG3/usr/doc/gcc-${VERSION}/libgfortran/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG4/usr/doc/gcc-${VERSION}/libada
+ ( cd libada
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG4/usr/doc/gcc-${VERSION}/libada/ChangeLog
+ touch -r ChangeLog $PKG4/usr/doc/gcc-${VERSION}/libada/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG5/usr/doc/gcc-${VERSION}/libffi
+ ( cd libffi
+ cp -a \
+ ChangeLog.libgcj ChangeLog.v1 \
+ LICENSE* README* \
+ $PKG5/usr/doc/gcc-${VERSION}/libffi
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG5/usr/doc/gcc-${VERSION}/libffi/ChangeLog
+ touch -r ChangeLog $PKG5/usr/doc/gcc-${VERSION}/libffi/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG5/usr/doc/gcc-${VERSION}/libjava
+ ( cd libjava
+ cp -a \
+ COPYING* HACKING LIBGCJ_LICENSE \
+ NEWS README* THANKS \
+ $PKG5/usr/doc/gcc-${VERSION}/libjava
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG5/usr/doc/gcc-${VERSION}/libjava/ChangeLog
+ touch -r ChangeLog $PKG5/usr/doc/gcc-${VERSION}/libjava/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG1/usr/doc/gcc-${VERSION}/libmudflap
+ ( cd libmudflap
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG1/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog
+ touch -r ChangeLog $PKG1/usr/doc/gcc-${VERSION}/libmudflap/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG1/usr/doc/gcc-${VERSION}/libgomp
+ ( cd libgomp
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG1/usr/doc/gcc-${VERSION}/libgomp/ChangeLog
+ touch -r ChangeLog $PKG1/usr/doc/gcc-${VERSION}/libgomp/ChangeLog
+ fi
+ )
+
+ mkdir -p $PKG6/usr/doc/gcc-${VERSION}/libobjc
+ ( cd libobjc
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG6/usr/doc/gcc-${VERSION}/libobjc/ChangeLog
+ touch -r ChangeLog $PKG6/usr/doc/gcc-${VERSION}/libobjc/ChangeLog
+ fi
+ cp -a \
+ README* THREADS* \
+ $PKG6/usr/doc/gcc-${VERSION}/libobjc
+ )
+
+ mkdir -p $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3
+ ( cd libstdc++-v3
+ cp -a \
+ README* \
+ doc/html/faq.html \
+ $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3
+ if [ -r ChangeLog ]; then
+ cat ChangeLog | head -n 1000 > $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog
+ touch -r ChangeLog $PKG2/usr/doc/gcc-${VERSION}/libstdc++-v3/ChangeLog
+ fi
+ )
+
+)
+
+# Add fastjar to the gcc-java package:
+( cd $TMP
+ FASTJARVER=$(echo $CWD/fastjar-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+ echo
+ echo "Building fastjar-$FASTJARVER first"
+ echo
+ rm -rf fastjar-$FASTJARVER
+ tar xvf $CWD/fastjar-$FASTJARVER.tar.xz || exit 1
+ cd fastjar-$FASTJARVER || 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 {} \;
+ for patch in $CWD/fastjar-patches/*.gz ; do
+ zcat $patch | patch -p1 --verbose || exit 1
+ done
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --build=$TARGET
+ make $NUMJOBS || exit 1
+ make install DESTDIR=$PKG5 || exit 1
+ mkdir -p $PKG5/usr/doc/fastjar-$FASTJARVER
+ cp -a \
+ AUTHORS CHANGES COPYING* INSTALL NEWS README* TODO \
+ $PKG5/usr/doc/fastjar-$FASTJARVER
+ # 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 $PKG5/usr/doc/fastjar-$FASTJARVER)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+ find $PKG5 | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ # Compress and if needed symlink the man pages:
+ if [ -d $PKG5/usr/man ]; then
+ ( cd $PKG5/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+ fi
+ # Compress info files, if any:
+ if [ -d $PKG5/usr/info ]; then
+ ( cd $PKG5/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+ echo
+) || exit 1
+
+# build gcc
+( mkdir gcc.build.lnx;
+ cd gcc.build.lnx;
+
+ # If enough people need "treelang" support for it may be considered.
+ # --enable-languages=ada,c,c++,fortran,java,objc,treelang
+ # I think it's incorrect to include this option (as it'll end up set
+ # to i586 on x86 platforms), and we want to tune the binary structure
+ # for i686, as that's where almost all of the optimization speedups
+ # are to be found.
+ # Correct me if my take on this is wrong.
+ # --with-cpu=$ARCH
+
+ if [ "$ARCH" != "x86_64" ]; then
+ GCC_ARCHOPTS="--with-arch=$ARCH"
+ else
+ GCC_ARCHOPTS="--disable-multilib"
+ fi
+
+ # NOTE: For Slackware 15.0, look into removing --with-default-libstdcxx-abi=gcc4-compatible,
+ # which will then require rebuilding all C++ libraries. That is, if there's any benefit.
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ../gcc-$VERSION/configure --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --enable-shared \
+ --enable-bootstrap \
+ --enable-languages=ada,c,c++,fortran,go,java,lto,objc \
+ --enable-threads=posix \
+ --enable-checking=release \
+ --enable-objc-gc \
+ --with-system-zlib \
+ --with-python-dir=/lib$LIBDIRSUFFIX/python2.7/site-packages \
+ --enable-libstdcxx-dual-abi \
+ --with-default-libstdcxx-abi=gcc4-compatible \
+ --disable-libunwind-exceptions \
+ --enable-__cxa_atexit \
+ --enable-libssp \
+ --enable-lto \
+ --disable-install-libiberty \
+ --with-gnu-ld \
+ --verbose \
+ --enable-java-home \
+ --with-java-home=/usr/lib$LIBDIRSUFFIX/jvm/jre \
+ --with-jvm-root-dir=/usr/lib$LIBDIRSUFFIX/jvm \
+ --with-jvm-jar-dir=/usr/lib$LIBDIRSUFFIX/jvm/jvm-exports \
+ --with-arch-directory=$LIB_ARCH \
+ --with-antlr-jar=$ANTLJAR \
+ --enable-java-awt=gtk \
+ --disable-gtktest \
+ $GCC_ARCHOPTS \
+ --target=${TARGET} \
+ --build=${TARGET} \
+ --host=${TARGET} || exit 1
+
+ # Start the build:
+
+ # Include all debugging info (for now):
+ make $NUMJOBS bootstrap;
+
+ ( cd gcc
+ make $NUMJOBS gnatlib GNATLIBCFLAGS="$SLKCFLAGS"
+ # This wants a shared -ladd2line?
+ #make gnatlib-shared
+
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ make $NUMJOBS gnattools
+ )
+ make info
+
+ # Set GCCCHECK=something to run the tests
+ if [ ! -z $GCCCHECK ]; then
+ make $NUMJOBS check
+ fi
+
+ make install DESTDIR=$PKG1
+
+# KLUDGE ALERT
+# These *gdb.py files are causing ldconfig to complain, so they are going
+# to be REMOVED for now... at some point, they might be moved somewhere
+# else, in which case things should Just Work(tm). Keep an eye on it.
+rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/*gdb.py
+
+# Be sure the "specs" file is installed.
+if [ ! -r $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs ]; then
+ cat stage1-gcc/specs > $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
+fi
+
+# Make our 64bit gcc look for 32bit gcc binaries in ./32 subdirectory:
+if [ "$ARCH" = "x86_64" ]; then
+ sed -i 's#;.\(:../lib !m64 m32;\)$#;32\1#' \
+ $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/${TARGET}/${VERSION}/specs
+fi
+
+# make ada.install-common DESTDIR=$PKG1
+# make install-gnatlib DESTDIR=$PKG1
+make -i install-info DESTDIR=$PKG1
+
+chmod 755 $PKG1/usr/lib${LIBDIRSUFFIX}/libgcc_s.so.1
+
+# The (huge) static GNU java libraries are not packaged. In nearly all
+# cases one or more dependencies will not be available as static anyway.
+rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj.a
+rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj-tools.a
+
+# Fix stuff up:
+( cd $PKG1/usr/info ; rm dir ; gzip -9 * )
+( cd $PKG1
+ # *not* ${LIBDIRSUFFIX}
+ mkdir -p lib
+ cd lib
+ ln -sf /usr/bin/cpp .
+)
+
+( cd $PKG1/usr/bin
+ mv g++ g++-gcc-$VERSION
+ mv gcc gcc-$VERSION
+ mv ${TARGET}-gfortran gfortran-gcc-$VERSION
+ ln -sf g++-gcc-$VERSION g++
+ ln -sf gcc-$VERSION gcc
+ ln -sf g++ c++
+ ln -sf gcc cc
+ ln -sf gcc-$VERSION ${TARGET}-gcc
+ ln -sf gcc-$VERSION ${TARGET}-gcc-$VERSION
+ ln -sf gcc-ar ${TARGET}-gcc-ar
+ ln -sf gcc-nm ${TARGET}-gcc-nm
+ ln -sf gcc-ranlib ${TARGET}-gcc-ranlib
+ ln -sf gcj ${TARGET}-gcj
+ ln -sf gcjh ${TARGET}-gcjh
+ ln -sf g++-gcc-$VERSION ${TARGET}-c++
+ ln -sf g++-gcc-$VERSION ${TARGET}-g++
+ ln -sf gfortran-gcc-$VERSION gfortran
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-gfortran-$VERSION
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-g95
+ ln -sf gfortran g95
+ ln -sf gfortran f95
+ ln -sf gfortran-gcc-$VERSION ${TARGET}-g77
+ ln -sf gfortran g77
+ ln -sf gfortran f77
+ cat $CWD/c89.sh > c89
+ cat $CWD/c99.sh > c99
+ chmod 755 c89 c99
+)
+
+( cd $PKG1/usr/man
+ gzip -9 */*
+ cd man1
+ ln -sf g++.1.gz c++.1.gz
+ ln -sf gcc.1.gz cc.1.gz
+)
+
+## build the txz package
+#(
+# cd $PKG1;
+# makepkg -l y -c n $TMP/gcc-$VERSION-$ARCH-$BUILD.txz
+#)
+# keep a log
+) 2>&1 | tee $TMP/gcc.build.log
+
+# OK, time to split the big package where needed:
+
+# gcc-g++:
+( cd $PKG2
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/*++* usr/bin
+ mkdir -p usr/include
+ mv $PKG1/usr/include/c++ usr/include
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/*++* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/cc1plus usr/libexec/gcc/$TARGET/$VERSION/cc1plus
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/*++* usr/man/man1
+)
+
+# gcc-gfortran:
+( cd $PKG3
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/*gfortran* usr/bin
+ mv $PKG1/usr/bin/*95* usr/bin
+ mv $PKG1/usr/bin/*77* usr/bin
+ # Doesn't this seem like a logical idea?
+ ( cd usr/bin ; ln -sf gfortran-gcc-${VERSION} fortran )
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gfortran* usr/info
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgfortran* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/finclude usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/libgfortran* usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/f951 usr/libexec/gcc/$TARGET/$VERSION/f951
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/libgfortran* usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/gfortran* usr/man/man1
+)
+
+# gcc-gnat:
+# First, relocate usr/bin/gnative2ascii to the gcc-java package so it
+# isn't matched and accidentally put in gcc-gnat:
+mkdir -p $PKG5/usr/bin
+mv $PKG1/usr/bin/gnative2ascii $PKG5/usr/bin
+# Now make the gcc-gnat package tree:
+( cd $PKG4
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/gnat* usr/bin
+ mv $PKG1/usr/bin/gpr* usr/bin
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gnat* usr/info
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/gnat1 usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/adainclude usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/adalib usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION
+)
+
+# gcc-java:
+( cd $PKG5
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/aot-compile usr/bin
+ mv $PKG1/usr/bin/addr2name.awk usr/bin
+ # mv $PKG1/usr/bin/fastjar usr/bin
+ mv $PKG1/usr/bin/gappletviewer usr/bin
+ mv $PKG1/usr/bin/gc-analyze usr/bin
+ mv $PKG1/usr/bin/*gcj* usr/bin
+ mv $PKG1/usr/bin/gij usr/bin
+ mv $PKG1/usr/bin/gjar usr/bin
+ mv $PKG1/usr/bin/gjarsigner usr/bin
+ mv $PKG1/usr/bin/gjdoc usr/bin
+ mv $PKG1/usr/bin/gkeytool usr/bin
+ mv $PKG1/usr/bin/grepjar usr/bin
+ mv $PKG1/usr/bin/grmid usr/bin
+ mv $PKG1/usr/bin/grmic usr/bin
+ mv $PKG1/usr/bin/grmiregistry usr/bin
+ mv $PKG1/usr/bin/gserialver usr/bin
+ mv $PKG1/usr/bin/gtnameserv usr/bin
+ mv $PKG1/usr/bin/gjavah usr/bin
+ mv $PKG1/usr/bin/gorbd usr/bin
+ mv $PKG1/usr/bin/jar usr/bin
+ mv $PKG1/usr/bin/jcf-dump usr/bin
+ mv $PKG1/usr/bin/jv-* usr/bin
+ mv $PKG1/usr/bin/rmi* usr/bin
+ mkdir -p usr/include/c++/$VERSION
+ # Move some Java only C++ headers from the C++ package:
+ mv $PKG2/usr/include/c++/$VERSION/{gcj,gnu,java,javax,org,sun} usr/include/c++/$VERSION
+ mv $PKG1/usr/include/ffi.h usr/include
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/jawt.h usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/ffi.h usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/ffitarget.h usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/jawt_md.h usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/jni.h usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/jni_md.h usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/jvmpi.h usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/libffi usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ # aot-compile Python plugins:
+ if [ ! -d $PKG1/usr/lib${LIBDIRSUFFIX}/python2.7 ]; then
+ echo "NO $PKG1/usr/lib${LIBDIRSUFFIX}/python2.7 !"
+ exit 1
+ fi
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/python2.7 usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gcj.* usr/info
+ # mv $PKG1/usr/info/fastjar.* usr/info
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libffi* usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/logging.properties usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcj* usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgcj* usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgij* usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/lib-org* usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/security usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/lib${LIBDIRSUFFIX}/pkgconfig
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/pkgconfig/libgcj*.pc usr/lib${LIBDIRSUFFIX}/pkgconfig
+ rmdir $PKG1/usr/lib${LIBDIRSUFFIX}/pkgconfig 2> /dev/null
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/jc1 usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/ecj1 usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/jvgenmain usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/gcj usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/aot-compile.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gappletviewer.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gc-analyze.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gcj.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gcjh.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gcj-dbtool.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gij.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gjar.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gjarsigner.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gjavah.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gjdoc.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gjnih.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gkeytool.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gnative2ascii.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gorbd.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/grmic.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/grmid.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/grmiregistry.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gserialver.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gtnameserv.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/jcf-dump.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/jv-convert.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/jv-scan.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/rebuild-gcj-db.1.gz usr/man/man1
+ mkdir -p usr/man/man3
+ mv $PKG1/usr/man/man3/ffi* usr/man/man3
+ mkdir -p usr/share
+ mv $PKG1/usr/share/java usr/share
+ # The ecj wrapper script:
+ cat $CWD/ecj.sh | sed -e "s,@JAVADIR@,/usr/share/java," > usr/bin/ecj
+ chmod 755 usr/bin/ecj
+ # The JAVA_HOME compatibility links.
+ # Caution: non-multilib arch-independent stuff! No lib64 here.
+ mkdir -p usr/lib$LIBDIRSUFFIX
+ mv $PKG1/usr/lib$LIBDIRSUFFIX/jvm* usr/lib$LIBDIRSUFFIX
+ # And add the missing javac symlink:
+ ln -s ../../../bin/ecj usr/lib$LIBDIRSUFFIX/jvm/bin/javac
+ # Don't package libffi stuff anymore. GCC will link the internal version
+ # statically, and we'll need a newer one elsewhere.
+ find . -name "ffi*.h" | xargs rm
+ find . -name "libffi*" | xargs rm
+ rm -f usr/man/man3/ffi*
+ rm -f usr/info/libffi*
+)
+
+# gcc-objc:
+( cd $PKG6
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libobjc* usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/cc1obj usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include/objc usr/lib${LIBDIRSUFFIX}/gcc/$TARGET/$VERSION/include
+)
+
+## NOTE: Thought about this, because the precompiled headers are so large.
+## Probably easier to keep everything together, though.
+## gcc-g++-gch (precompiled c++ headers)
+#( cd $PKG7
+# mkdir -p usr/include/c++/$VERSION/$TARGET/bits
+# mv $PKG2/usr/include/c++/$VERSION/$TARGET/bits/stdc++.h.gch usr/include/c++/$VERSION/$TARGET/bits
+#)
+
+# gcc-go:
+( cd $PKG8
+ mkdir -p usr/bin
+ mv $PKG1/usr/bin/*gccgo* usr/bin
+ mv $PKG1/usr/bin/go{,fmt} usr/bin
+ mkdir -p usr/libexec/gcc/$TARGET/$VERSION
+ mv $PKG1/usr/libexec/gcc/$TARGET/$VERSION/{cgo,go1} usr/libexec/gcc/$TARGET/$VERSION
+ mkdir -p usr/info
+ mv $PKG1/usr/info/gccgo.info.gz usr/info
+ mkdir -p usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/go usr/lib${LIBDIRSUFFIX}
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/{libgo.la,libgo.so*,libgobegin.a,libgolibbegin.a,libnetgo.a} usr/lib${LIBDIRSUFFIX} || exit 1
+ # Ordinarily Slackware doesn't package static libraries, but in this case
+ # it is useful for deploying compiled binaries on machines that do not yet
+ # have libgo.so.0.0.0.
+ mv $PKG1/usr/lib${LIBDIRSUFFIX}/libgo.a usr/lib${LIBDIRSUFFIX}
+ mkdir -p usr/man/man1
+ mv $PKG1/usr/man/man1/gccgo.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/go.1.gz usr/man/man1
+ mv $PKG1/usr/man/man1/gofmt.1.gz usr/man/man1
+) || exit 1
+
+# Filter all .la files (thanks much to Mark Post for the sed script):
+( cd $TMP
+ for file in $(find . -type f -name "*.la") ; do
+ cat $file | sed -e 's%-L/gcc-[[:graph:]]* % %g' > $TMP/tmp-la-file
+ cat $TMP/tmp-la-file > $file
+ done
+ rm $TMP/tmp-la-file
+)
+
+## Strip bloated binaries and libraries:
+for dir in $PKG{1,2,3,4,5,6,8}; do
+ ( cd $dir
+ find . -name "lib*so*" -exec strip --strip-unneeded "{}" \;
+ find . -name "lib*a" -exec strip -g "{}" \;
+ strip --strip-unneeded usr/bin/* 2> /dev/null
+ 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
+ )
+done
+
+( cd $PKG1
+ makepkg -l y -c n $TMP/gcc-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG2
+ makepkg -l y -c n $TMP/gcc-g++-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG3
+ makepkg -l y -c n $TMP/gcc-gfortran-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG4
+ makepkg -l y -c n $TMP/gcc-gnat-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG5
+ makepkg -l y -c n $TMP/gcc-java-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG6
+ makepkg -l y -c n $TMP/gcc-objc-$VERSION-$ARCH-$BUILD.txz )
+#( cd $PKG7
+# makepkg -l y -c n $TMP/gcc-g++-gch-$VERSION-$ARCH-$BUILD.txz )
+( cd $PKG8
+ makepkg -l y -c n $TMP/gcc-go-$VERSION-$ARCH-$BUILD.txz )
+
+echo
+echo "Slackware GCC package build complete!"
+echo
+
diff --git a/patches/source/gcc/slack-desc.gcc b/patches/source/gcc/slack-desc.gcc
new file mode 100644
index 00000000..72e33b46
--- /dev/null
+++ b/patches/source/gcc/slack-desc.gcc
@@ -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------------------------------------------------------|
+gcc: gcc (Base GCC package with C support)
+gcc:
+gcc: GCC is the GNU Compiler Collection.
+gcc:
+gcc: This package contains those parts of the compiler collection needed to
+gcc: compile C code. Other packages add Ada, C++, Fortran, Go,
+gcc: Objective-C, and Java support to the compiler core.
+gcc:
+gcc:
+gcc:
+gcc:
diff --git a/patches/source/gcc/slack-desc.gcc-g++ b/patches/source/gcc/slack-desc.gcc-g++
new file mode 100644
index 00000000..3cbabac1
--- /dev/null
+++ b/patches/source/gcc/slack-desc.gcc-g++
@@ -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------------------------------------------------------|
+gcc-g++: gcc-g++ (C++ for GCC)
+gcc-g++:
+gcc-g++: C++ support for the GNU Compiler Collection.
+gcc-g++:
+gcc-g++: This package contains those parts of the compiler collection needed to
+gcc-g++: compile C++ code. The base gcc package is also required.
+gcc-g++:
+gcc-g++:
+gcc-g++:
+gcc-g++:
+gcc-g++:
diff --git a/patches/source/gcc/slack-desc.gcc-gfortran b/patches/source/gcc/slack-desc.gcc-gfortran
new file mode 100644
index 00000000..5141cb02
--- /dev/null
+++ b/patches/source/gcc/slack-desc.gcc-gfortran
@@ -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------------------------------------------------------|
+gcc-gfortran: gcc-gfortran (Fortran support for GCC)
+gcc-gfortran:
+gcc-gfortran: The GNU Fortran compiler is fully compliant with the Fortran 95
+gcc-gfortran: Standard and includes legacy F77 support. In addition, a significant
+gcc-gfortran: number of Fortran 2003 and Fortran 2008 features are implemented.
+gcc-gfortran: GNU Fortran also contains many standard and extensions and can be
+gcc-gfortran: used to run real-world programs.
+gcc-gfortran:
+gcc-gfortran: This package contains those parts of the compiler collection
+gcc-gfortran: needed to compile Fortran code. The gcc package is also required.
+gcc-gfortran:
diff --git a/patches/source/gcc/slack-desc.gcc-gnat b/patches/source/gcc/slack-desc.gcc-gnat
new file mode 100644
index 00000000..9aa4b3c4
--- /dev/null
+++ b/patches/source/gcc/slack-desc.gcc-gnat
@@ -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------------------------------------------------------|
+gcc-gnat: gcc-gnat (Ada support for GCC)
+gcc-gnat:
+gcc-gnat: Ada support for the GNU Compiler Collection.
+gcc-gnat:
+gcc-gnat: This package contains those parts of the compiler collection needed to
+gcc-gnat: compile Ada code. GNAT implements Ada 95, Ada 2005 and Ada 2012, and
+gcc-gnat: it may also be invoked in Ada 83 compatibility mode. By default, GNAT
+gcc-gnat: assumes Ada 2012. The base gcc package is also required.
+gcc-gnat:
+gcc-gnat:
+gcc-gnat:
diff --git a/patches/source/gcc/slack-desc.gcc-go b/patches/source/gcc/slack-desc.gcc-go
new file mode 100644
index 00000000..cdd859bc
--- /dev/null
+++ b/patches/source/gcc/slack-desc.gcc-go
@@ -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------------------------------------------------------|
+gcc-go: gcc-go (Go support for GCC)
+gcc-go:
+gcc-go: Go is a compiled, garbage-collected, concurrent programming language
+gcc-go: developed by Google Inc. The initial design of Go was started in
+gcc-go: September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
+gcc-go: Rob Pike has stated that Go is being used "for real stuff" at Google.
+gcc-go: Go's "gc" compiler targets the Linux, Mac OS X, FreeBSD, OpenBSD and
+gcc-go: Microsoft Windows operating systems, and the i386, amd64, and ARM
+gcc-go: processor architectures.
+gcc-go:
+gcc-go: Homepage: http://golang.org
diff --git a/patches/source/gcc/slack-desc.gcc-java b/patches/source/gcc/slack-desc.gcc-java
new file mode 100644
index 00000000..b65ca555
--- /dev/null
+++ b/patches/source/gcc/slack-desc.gcc-java
@@ -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------------------------------------------------------|
+gcc-java: gcc-java (Java support for GCC)
+gcc-java:
+gcc-java: Java support for the GNU Compiler Collection.
+gcc-java:
+gcc-java: This package contains those parts of the compiler collection needed to
+gcc-java: compile programs written in the Java programming language. The base
+gcc-java: gcc package is also required.
+gcc-java:
+gcc-java:
+gcc-java:
+gcc-java:
diff --git a/patches/source/gcc/slack-desc.gcc-objc b/patches/source/gcc/slack-desc.gcc-objc
new file mode 100644
index 00000000..c01b79e3
--- /dev/null
+++ b/patches/source/gcc/slack-desc.gcc-objc
@@ -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------------------------------------------------------|
+gcc-objc: gcc-objc (Objective-C support for GCC)
+gcc-objc:
+gcc-objc: Objective-C support for the GNU Compiler Collection.
+gcc-objc:
+gcc-objc: This package contains those parts of the compiler collection needed to
+gcc-objc: compile code written in Objective-C. Objective-C was originally
+gcc-objc: developed to add object-oriented extensions to the C language, and is
+gcc-objc: best known as the native language of the NeXT computer.
+gcc-objc:
+gcc-objc: The base gcc package is also required.
+gcc-objc:
diff --git a/patches/source/gd/gd.SlackBuild b/patches/source/gd/gd.SlackBuild
new file mode 100755
index 00000000..bc827a0d
--- /dev/null
+++ b/patches/source/gd/gd.SlackBuild
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 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=gd
+VERSION=${VERSION:-$(echo libgd-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf libgd-${VERSION}
+tar xvf $CWD/libgd-$VERSION.tar.xz || exit 1
+cd libgd-$VERSION || exit 1
+
+# 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 {} \;
+
+./bootstrap.sh
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --disable-static \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# 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 *.?
+ )
+ done
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ COPYING INSTALL README-JPEG.TXT README.TXT index.html \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+# Fix stupid permissions:
+chmod 644 $PKG/usr/doc/${PKGNAM}-$VERSION/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $TMP/package-${PKGNAM}
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gd/slack-desc b/patches/source/gd/slack-desc
new file mode 100644
index 00000000..adaab7a0
--- /dev/null
+++ b/patches/source/gd/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------------------------------------------------------|
+gd: gd (a graphics library)
+gd:
+gd: gd is a graphics library. It allows your code to quickly draw images
+gd: complete with lines, arcs, text, multiple colors, cut and paste from
+gd: other images, and flood fills, and write out the result as a PNG or
+gd: JPEG file. This is particularly useful in web applications, where
+gd: PNG and JPEG are two of the formats accepted for inline images by
+gd: most browsers. The gd library was written by Thomas Boutell.
+gd:
+gd: Homepage: https://www.libgd.org
+gd:
diff --git a/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch b/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch
new file mode 100644
index 00000000..53d7328e
--- /dev/null
+++ b/patches/source/gegl/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch
@@ -0,0 +1,68 @@
+From 012b0b019ede3cfa7df20bf60c7915a771ecff78 Mon Sep 17 00:00:00 2001
+From: Kalev Lember <kalevlember@gmail.com>
+Date: Thu, 4 Dec 2014 11:22:04 +0100
+Subject: [PATCH] matting-levin: Fix the build with recent suitesparse versions
+
+Stop using the UF_long define that was deprecated previously and has
+completely disappeared in suitesparse 4.3.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=741105
+---
+ operations/external/matting-levin.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/operations/external/matting-levin.c b/operations/external/matting-levin.c
+index 63e85d1..cf84699 100644
+--- a/operations/external/matting-levin.c
++++ b/operations/external/matting-levin.c
+@@ -850,8 +850,8 @@ matting_sparse_new (guint cols, guint rows, guint elems)
+ sparse_t *s = g_new (sparse_t, 1);
+ s->columns = cols;
+ s->rows = rows;
+- s->col_idx = g_new (UF_long, cols + 1);
+- s->row_idx = g_new (UF_long, elems);
++ s->col_idx = g_new (SuiteSparse_long, cols + 1);
++ s->row_idx = g_new (SuiteSparse_long, elems);
+ s->values = g_new0 (gdouble, elems);
+
+ return s;
+@@ -964,8 +964,8 @@ matting_get_laplacian (const gdouble *restrict image,
+ image_elems = roi->width * roi->height,
+ i, j, k, x, y,
+ status;
+- UF_long *trip_col,
+- *trip_row;
++ SuiteSparse_long *trip_col,
++ *trip_row;
+ glong trip_nz = 0,
+ trip_cursor = 0,
+ trip_masked = 0;
+@@ -995,8 +995,8 @@ matting_get_laplacian (const gdouble *restrict image,
+ trip_nz = trip_masked * window_elems * window_elems;
+ trip_nz += image_elems; // Sparse diagonal and row summing at conclusion
+
+- trip_col = g_new (UF_long, trip_nz);
+- trip_row = g_new (UF_long, trip_nz);
++ trip_col = g_new (SuiteSparse_long, trip_nz);
++ trip_row = g_new (SuiteSparse_long, trip_nz);
+ trip_val = g_new0 (gdouble, trip_nz);
+
+ /* Compute the contribution of each pixel in the image to the laplacian */
+@@ -1082,10 +1082,10 @@ matting_get_laplacian (const gdouble *restrict image,
+ for (y = 0; y < window_elems; ++y)
+ for (x = 0; x < window_elems; ++x)
+ {
+- UF_long yx = y % diameter,
+- yy = y / diameter,
+- xx = x % diameter,
+- xy = x / diameter;
++ SuiteSparse_long yx = y % diameter,
++ yy = y / diameter,
++ xx = x % diameter,
++ xy = x / diameter;
+
+ g_return_val_if_fail (trip_cursor < trip_nz, FALSE);
+ trip_col[trip_cursor] = (i - radius + yx) + (j - radius + yy) * roi->width,
+--
+2.1.0
+
diff --git a/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch b/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch
new file mode 100644
index 00000000..965c6fc2
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-CVE-2012-4433.patch
@@ -0,0 +1,159 @@
+From ffa77a246652c7e706d690682fe659f50fbe5656 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 12:03:51 +0200
+Subject: [PATCH] patch: CVE-2012-4433
+
+Squashed commit of the following:
+
+commit 2a9071e2dc4cfe1aaa7a726805985281936f9874
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:57:37 2012 +0200
+
+ ppm-load: bring comment in line with reality
+
+ (cherry picked from commit 6975a9cfeaf0698b42ac81b1c2f00d13c8755453)
+
+commit 8bb88ebf78e54837322d3be74688f98800e9f33a
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:56:40 2012 +0200
+
+ ppm-load: CVE-2012-4433: add plausibility checks for header fields
+
+ Refuse values that are non-decimal, negative or overflow the target
+ type.
+
+ (cherry picked from commit 4757cdf73d3675478d645a3ec8250ba02168a230)
+
+commit 2b099886969bf055a8635d06a4d89f20fed1ee42
+Author: Nils Philippsen <nils@redhat.com>
+Date: Tue Oct 16 16:58:27 2012 +0200
+
+ ppm-load: CVE-2012-4433: don't overflow memory allocation
+
+ Carefully selected width/height values could cause the size of a later
+ allocation to overflow, resulting in a buffer much too small to store
+ the data which would then written beyond its end.
+
+ (cherry picked from commit 1e92e5235ded0415d555aa86066b8e4041ee5a53)
+---
+ operations/external/ppm-load.c | 64 +++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 54 insertions(+), 10 deletions(-)
+
+diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
+index efe6d56..e22521c 100644
+--- a/operations/external/ppm-load.c
++++ b/operations/external/ppm-load.c
+@@ -36,6 +36,7 @@ gegl_chant_file_path (path, _("File"), "", _("Path of file to load."))
+ #include "gegl-chant.h"
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <errno.h>
+
+ typedef enum {
+ PIXMAP_ASCII = 51,
+@@ -44,8 +45,8 @@ typedef enum {
+
+ typedef struct {
+ map_type type;
+- gint width;
+- gint height;
++ glong width;
++ glong height;
+ gsize numsamples; /* width * height * channels */
+ gsize bpc; /* bytes per channel */
+ guchar *data;
+@@ -61,7 +62,7 @@ ppm_load_read_header(FILE *fp,
+ gchar header[MAX_CHARS_IN_ROW];
+ gint maxval;
+
+- /* Check the PPM file Type P2 or P5 */
++ /* Check the PPM file Type P3 or P6 */
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+
+ if (header[0] != ASCII_P ||
+@@ -82,12 +83,33 @@ ppm_load_read_header(FILE *fp,
+ }
+
+ /* Get Width and Height */
+- img->width = strtol (header,&ptr,0);
+- img->height = atoi (ptr);
+- img->numsamples = img->width * img->height * CHANNEL_COUNT;
++ errno = 0;
++ img->width = strtol (header,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading width: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: width is negative");
++ return FALSE;
++ }
++
++ img->height = strtol (ptr,&ptr,10);
++ if (errno)
++ {
++ g_warning ("Error reading height: %s", strerror(errno));
++ return FALSE;
++ }
++ else if (img->width < 0)
++ {
++ g_warning ("Error: height is negative");
++ return FALSE;
++ }
+
+ fgets (header,MAX_CHARS_IN_ROW,fp);
+- maxval = strtol (header,&ptr,0);
++ maxval = strtol (header,&ptr,10);
+
+ if ((maxval != 255) && (maxval != 65535))
+ {
+@@ -109,6 +131,16 @@ ppm_load_read_header(FILE *fp,
+ g_warning ("%s: Programmer stupidity error", G_STRLOC);
+ }
+
++ /* Later on, img->numsamples is multiplied with img->bpc to allocate
++ * memory. Ensure it doesn't overflow. */
++ if (!img->width || !img->height ||
++ G_MAXSIZE / img->width / img->height / CHANNEL_COUNT < img->bpc)
++ {
++ g_warning ("Illegal width/height: %ld/%ld", img->width, img->height);
++ return FALSE;
++ }
++ img->numsamples = img->width * img->height * CHANNEL_COUNT;
++
+ return TRUE;
+ }
+
+@@ -229,12 +261,24 @@ process (GeglOperation *operation,
+ if (!ppm_load_read_header (fp, &img))
+ goto out;
+
+- rect.height = img.height;
+- rect.width = img.width;
+-
+ /* Allocating Array Size */
++
++ /* Should use g_try_malloc(), but this causes crashes elsewhere because the
++ * error signalled by returning FALSE isn't properly acted upon. Therefore
++ * g_malloc() is used here which aborts if the requested memory size can't be
++ * allocated causing a controlled crash. */
+ img.data = (guchar*) g_malloc (img.numsamples * img.bpc);
+
++ /* No-op without g_try_malloc(), see above. */
++ if (! img.data)
++ {
++ g_warning ("Couldn't allocate %" G_GSIZE_FORMAT " bytes, giving up.", ((gsize)img.numsamples * img.bpc));
++ goto out;
++ }
++
++ rect.height = img.height;
++ rect.width = img.width;
++
+ switch (img.bpc)
+ {
+ case 1:
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl-0.2.0-libopenraw.patch b/patches/source/gegl/gegl-0.2.0-libopenraw.patch
new file mode 100644
index 00000000..c5738d6c
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-libopenraw.patch
@@ -0,0 +1,71 @@
+diff -up gegl-0.2.0/configure.ac.libopenraw gegl-0.2.0/configure.ac
+--- gegl-0.2.0/configure.ac.libopenraw 2016-12-03 08:11:31.968387802 +0100
++++ gegl-0.2.0/configure.ac 2016-12-03 08:12:19.398987931 +0100
+@@ -790,7 +790,7 @@ AC_ARG_WITH(libopenraw, [ --without-lib
+
+ have_libopenraw="no"
+ if test "x$with_libopenraw" != "xno"; then
+- PKG_CHECK_MODULES(OPENRAW, libopenraw-1.0 >= openraw_required_version,
++ PKG_CHECK_MODULES(OPENRAW, libopenraw-0.1 >= openraw_required_version,
+ have_libopenraw="yes",
+ have_libopenraw="no (openraw library not found)")
+ fi
+diff -up gegl-0.2.0/configure.libopenraw gegl-0.2.0/configure
+--- gegl-0.2.0/configure.libopenraw 2016-12-03 08:11:33.954412931 +0100
++++ gegl-0.2.0/configure 2016-12-03 08:12:15.506938686 +0100
+@@ -20760,12 +20760,12 @@ if test -n "$OPENRAW_CFLAGS"; then
+ pkg_cv_OPENRAW_CFLAGS="$OPENRAW_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-1.0 >= 0.0.5\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "libopenraw-1.0 >= 0.0.5") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-0.1 >= 0.0.5\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "libopenraw-0.1 >= 0.0.5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_OPENRAW_CFLAGS=`$PKG_CONFIG --cflags "libopenraw-1.0 >= 0.0.5" 2>/dev/null`
++ pkg_cv_OPENRAW_CFLAGS=`$PKG_CONFIG --cflags "libopenraw-0.1 >= 0.0.5" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+@@ -20777,12 +20777,12 @@ if test -n "$OPENRAW_LIBS"; then
+ pkg_cv_OPENRAW_LIBS="$OPENRAW_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-1.0 >= 0.0.5\""; } >&5
+- ($PKG_CONFIG --exists --print-errors "libopenraw-1.0 >= 0.0.5") 2>&5
++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenraw-0.1 >= 0.0.5\""; } >&5
++ ($PKG_CONFIG --exists --print-errors "libopenraw-0.1 >= 0.0.5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+- pkg_cv_OPENRAW_LIBS=`$PKG_CONFIG --libs "libopenraw-1.0 >= 0.0.5" 2>/dev/null`
++ pkg_cv_OPENRAW_LIBS=`$PKG_CONFIG --libs "libopenraw-0.1 >= 0.0.5" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+ else
+ pkg_failed=yes
+@@ -20803,9 +20803,9 @@ else
+ _pkg_short_errors_supported=no
+ fi
+ if test $_pkg_short_errors_supported = yes; then
+- OPENRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenraw-1.0 >= 0.0.5" 2>&1`
++ OPENRAW_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenraw-0.1 >= 0.0.5" 2>&1`
+ else
+- OPENRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenraw-1.0 >= 0.0.5" 2>&1`
++ OPENRAW_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenraw-0.1 >= 0.0.5" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$OPENRAW_PKG_ERRORS" >&5
+diff -up gegl-0.2.0/operations/external/openraw.c.libopenraw gegl-0.2.0/operations/external/openraw.c
+--- gegl-0.2.0/operations/external/openraw.c.libopenraw 2016-12-03 08:28:14.284333843 +0100
++++ gegl-0.2.0/operations/external/openraw.c 2016-12-03 08:29:01.495751180 +0100
+@@ -116,7 +116,7 @@ load_buffer (GeglOperation *operation)
+ goto clean_file;
+ }
+
+- if(or_rawdata_format (rawdata) != OR_DATA_TYPE_CFA)
++ if(or_rawdata_format (rawdata) != OR_DATA_TYPE_RAW)
+ {
+ goto clean_file;
+ }
diff --git a/patches/source/gegl/gegl-0.2.0-linker-flags.patch b/patches/source/gegl/gegl-0.2.0-linker-flags.patch
new file mode 100644
index 00000000..0006ba24
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-linker-flags.patch
@@ -0,0 +1,36 @@
+diff -urNp gegl-0.2.0.orig/bin/Makefile.in gegl-0.2.0/bin/Makefile.in
+--- gegl-0.2.0.orig/bin/Makefile.in 2015-05-07 15:06:23.716649233 +0200
++++ gegl-0.2.0/bin/Makefile.in 2015-05-07 15:08:38.104260506 +0200
+@@ -363,7 +363,7 @@ AM_CFLAGS = \
+
+ AM_LDFLAGS = \
+ $(no_undefined) ../gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO)
++ $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO) -lm
+
+ gegl_SOURCES = gegl.c gegl-options.c gegl-options.h gegl-path-smooth.c \
+ gegl-path-smooth.h $(am__append_1)
+diff -urNp gegl-0.2.0.orig/examples/Makefile.in gegl-0.2.0/examples/Makefile.in
+--- gegl-0.2.0.orig/examples/Makefile.in 2015-05-07 15:06:23.674649046 +0200
++++ gegl-0.2.0/examples/Makefile.in 2015-05-07 16:13:36.057203261 +0200
+@@ -376,7 +376,7 @@ AM_CPPFLAGS = \
+ AM_CFLAGS = $(DEP_CFLAGS) $(GTK_CFLAGS) $(BABL_CFLAGS) $(PNG_CFLAGS)
+ AM_LDFLAGS = \
+ $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS)
++ $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS) -lm
+
+ all: all-recursive
+
+diff -urNp gegl-0.2.0.orig/tools/Makefile.in gegl-0.2.0/tools/Makefile.in
+--- gegl-0.2.0.orig/tools/Makefile.in 2015-05-07 15:06:23.716649233 +0200
++++ gegl-0.2.0/tools/Makefile.in 2015-05-07 15:31:43.643298848 +0200
+@@ -394,7 +394,7 @@ AM_CPPFLAGS = \
+ AM_CFLAGS = $(DEP_CFLAGS) $(BABL_CFLAGS)
+ AM_LDFLAGS = \
+ $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
+- $(DEP_LIBS) $(BABL_LIBS)
++ $(DEP_LIBS) $(BABL_LIBS) -lm
+
+ @HAVE_EXIV2_TRUE@exp_combine_SOURCES = exp_combine.cpp
+ @HAVE_EXIV2_TRUE@exp_combine_LDADD = $(EXIV2_LIBS)
diff --git a/patches/source/gegl/gegl-0.2.0-lua-5.2.patch b/patches/source/gegl/gegl-0.2.0-lua-5.2.patch
new file mode 100644
index 00000000..e5a60bb9
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-lua-5.2.patch
@@ -0,0 +1,53 @@
+From 1e12a153d9a82a771c3bfd95c0265b810a424b3c Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 14:41:33 +0200
+Subject: [PATCH] patch: lua-5.2
+
+Squashed commit of the following:
+
+commit 96f65d260c6e40940f2818b721c19565c1b40607
+Author: Vincent Untz <vuntz@gnome.org>
+Date: Wed Jan 11 09:52:25 2012 +0100
+
+ Fix build with lua 5.2 by not using API deprecated in 5.1 already
+
+ https://bugzilla.gnome.org/show_bug.cgi?id=667675
+ (cherry picked from commit a14a29c39352c60f003a65b721c9af8a1d8d20df)
+---
+ operations/workshop/external/gluas.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/operations/workshop/external/gluas.c b/operations/workshop/external/gluas.c
+index 8ba1101..63e82a2 100644
+--- a/operations/workshop/external/gluas.c
++++ b/operations/workshop/external/gluas.c
+@@ -97,7 +97,7 @@ static int l_progress (lua_State * lua);
+ static int l_flush (lua_State * lua);
+ static int l_print (lua_State * lua);
+
+-static const luaL_reg gluas_functions[] =
++static const luaL_Reg gluas_functions[] =
+ {
+ {"set_rgba", l_set_rgba},
+ {"get_rgba", l_get_rgba},
+@@ -122,7 +122,7 @@ static const luaL_reg gluas_functions[] =
+ };
+ static void
+ register_functions (lua_State *L,
+- const luaL_reg *l)
++ const luaL_Reg *l)
+ {
+ for (;l->name; l++)
+ lua_register (L, l->name, l->func);
+@@ -146,7 +146,7 @@ drawable_lua_process (GeglOperation *op,
+ lua_State *L;
+ Priv p;
+
+- L = lua_open ();
++ L = luaL_newstate ();
+ luaL_openlibs (L);
+
+ register_functions (L, gluas_functions);
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch b/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch
new file mode 100644
index 00000000..a823580f
--- /dev/null
+++ b/patches/source/gegl/gegl-0.2.0-remove-src-over-op.patch
@@ -0,0 +1,195 @@
+From 72168aba34445e4cd99aaed32d8e6a80e89ce729 Mon Sep 17 00:00:00 2001
+From: Nils Philippsen <nils@redhat.com>
+Date: Mon, 1 Jul 2013 13:53:18 +0200
+Subject: [PATCH] patch: remove-src-over-op
+
+Squashed commit of the following:
+
+commit b766094d951bf1515a75408ee85d4e1af432e6bd
+Author: Daniel Sabo <DanielSabo@gmail.com>
+Date: Tue Jun 4 20:57:03 2013 -0700
+
+ Remove auto-generated svg:src-over
+
+ It was already shadowed by gegl:over, which declares
+ svg:src-over as a compat-name.
+
+ (cherry picked from commit c1caf2401271e8a17fd1937bf84279c250bd8e2a)
+
+ Conflicts:
+ po/POTFILES.in
+---
+ operations/generated/src-over.c | 122 -----------------------------
+ operations/generated/svg-12-porter-duff.rb | 5 +-
+ po/POTFILES.in | 3 +-
+ 3 files changed, 4 insertions(+), 126 deletions(-)
+ delete mode 100644 operations/generated/src-over.c
+
+diff --git a/operations/generated/src-over.c b/operations/generated/src-over.c
+deleted file mode 100644
+index e586087..0000000
+--- a/operations/generated/src-over.c
++++ /dev/null
+@@ -1,122 +0,0 @@
+-
+-/* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
+- *
+- * This file is an image processing operation for GEGL
+- *
+- * GEGL is free software; you can redistribute it and/or
+- * modify it under the terms of the GNU Lesser General Public
+- * License as published by the Free Software Foundation; either
+- * version 3 of the License, or (at your option) any later version.
+- *
+- * GEGL is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
+- *
+- * Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
+- * 2007 John Marshall
+- *
+- * SVG rendering modes; see:
+- * http://www.w3.org/TR/SVG12/rendering.html
+- * http://www.w3.org/TR/2004/WD-SVG12-20041027/rendering.html#comp-op-prop
+- *
+- * aA = aux(src) alpha aB = in(dst) alpha aD = out alpha
+- * cA = aux(src) colour cB = in(dst) colour cD = out colour
+- *
+- * !!!! AUTOGENERATED FILE !!!!!
+- */
+-#include "config.h"
+-#include <glib/gi18n-lib.h>
+-
+-
+-#ifdef GEGL_CHANT_PROPERTIES
+-
+-/* no properties */
+-
+-#else
+-
+-#define GEGL_CHANT_TYPE_POINT_COMPOSER
+-#define GEGL_CHANT_C_FILE "src-over.c"
+-
+-#include "gegl-chant.h"
+-
+-static void prepare (GeglOperation *operation)
+-{
+- const Babl *format = babl_format ("RaGaBaA float");
+-
+- gegl_operation_set_format (operation, "input", format);
+- gegl_operation_set_format (operation, "aux", format);
+- gegl_operation_set_format (operation, "output", format);
+-}
+-
+-static gboolean
+-process (GeglOperation *op,
+- void *in_buf,
+- void *aux_buf,
+- void *out_buf,
+- glong n_pixels,
+- const GeglRectangle *roi,
+- gint level)
+-{
+- gint i;
+- gfloat * GEGL_ALIGNED in = in_buf;
+- gfloat * GEGL_ALIGNED aux = aux_buf;
+- gfloat * GEGL_ALIGNED out = out_buf;
+-
+- if (aux==NULL)
+- return TRUE;
+-
+- for (i = 0; i < n_pixels; i++)
+- {
+- gint j;
+- gfloat aA G_GNUC_UNUSED, aB G_GNUC_UNUSED, aD G_GNUC_UNUSED;
+-
+- aB = in[3];
+- aA = aux[3];
+- aD = aA + aB - aA * aB;
+-
+- for (j = 0; j < 3; j++)
+- {
+- gfloat cA G_GNUC_UNUSED, cB G_GNUC_UNUSED;
+-
+- cB = in[j];
+- cA = aux[j];
+- out[j] = cA + cB * (1.0f - aA);
+- }
+- out[3] = aD;
+- in += 4;
+- aux += 4;
+- out += 4;
+- }
+- return TRUE;
+-}
+-
+-
+-static void
+-gegl_chant_class_init (GeglChantClass *klass)
+-{
+- GeglOperationClass *operation_class;
+- GeglOperationPointComposerClass *point_composer_class;
+-
+- operation_class = GEGL_OPERATION_CLASS (klass);
+- point_composer_class = GEGL_OPERATION_POINT_COMPOSER_CLASS (klass);
+-
+- point_composer_class->process = process;
+- operation_class->prepare = prepare;
+-
+-
+- operation_class->compat_name = "gegl:src-over";
+- gegl_operation_class_set_keys (operation_class,
+- "name" , "svg:src-over",
+- "categories", "compositors:porter-duff",
+- "description",
+- _("Porter Duff operation src-over (d = cA + cB * (1.0f - aA))"),
+- NULL);
+-
+-
+-}
+-
+-#endif
+diff --git a/operations/generated/svg-12-porter-duff.rb b/operations/generated/svg-12-porter-duff.rb
+index 5516802..dab5d2f 100755
+--- a/operations/generated/svg-12-porter-duff.rb
++++ b/operations/generated/svg-12-porter-duff.rb
+@@ -1,4 +1,5 @@
+ #!/usr/bin/env ruby
++# encoding: utf-8
+
+ copyright = '
+ /* !!!! AUTOGENERATED FILE generated by svg-12-porter-duff.rb !!!!!
+@@ -38,8 +39,8 @@ a = [
+ 'aA'],
+ ['dst', 'cB',
+ 'aB'],
+- ['src_over', 'cA + cB * (1.0f - aA)',
+- 'aA + aB - aA * aB'],
++# ['src_over', 'cA + cB * (1.0f - aA)',
++# 'aA + aB - aA * aB'],
+ ['dst_over', 'cB + cA * (1.0f - aB)',
+ 'aA + aB - aA * aB'],
+ ['dst_in', 'cB * aA', # <- XXX: typo?
+diff --git a/po/POTFILES.in b/po/POTFILES.in
+index e309594..d36cbc2 100644
+--- a/po/POTFILES.in
++++ b/po/POTFILES.in
+@@ -115,10 +115,9 @@ operations/generated/plus.c
+ operations/generated/screen.c
+ operations/generated/soft-light.c
+ operations/generated/src-atop.c
++operations/generated/src.c
+ operations/generated/src-in.c
+ operations/generated/src-out.c
+-operations/generated/src-over.c
+-operations/generated/src.c
+ operations/generated/subtract.c
+ operations/generated/svg-multiply.c
+ operations/generated/xor.c
+--
+1.8.3.1
+
diff --git a/patches/source/gegl/gegl.SlackBuild b/patches/source/gegl/gegl.SlackBuild
new file mode 100755
index 00000000..61674ae3
--- /dev/null
+++ b/patches/source/gegl/gegl.SlackBuild
@@ -0,0 +1,116 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009 Robby Workman, Northport, Alabama, 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 gegl-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-4_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gegl
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf gegl-$VERSION
+tar xvf $CWD/gegl-$VERSION.tar.?z* || exit 1
+cd gegl-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/gegl-0.2.0-lua-5.2.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-CVE-2012-4433.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-remove-src-over-op.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0001-matting-levin-Fix-the-build-with-recent-suitesparse-.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-linker-flags.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gegl-0.2.0-libopenraw.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/gegl-$VERSION \
+ --enable-gtk-doc \
+ --disable-docs \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Trust defaults:
+# --enable-mmx \
+# --disable-sse \
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/gegl-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/gegl-$VERSION
+#( cd $PKG/usr/doc/gegl-$VERSION ; ln -s /usr/share/gtk-doc/html/gegl/ html )
+
+# 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
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gegl-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gegl/slack-desc b/patches/source/gegl/slack-desc
new file mode 100644
index 00000000..75eea8ad
--- /dev/null
+++ b/patches/source/gegl/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--------------------------------------------------------|
+gegl: GEGL (Generic Graphics Library)
+gegl:
+gegl: GEGL (Generic Graphics Library) is a graph based image processing
+gegl: framework.
+gegl:
+gegl: GEGL provides infrastructure to do demand based cached non destructive
+gegl: image editing on larger than RAM buffers. Through babl it provides
+gegl: support for a wide range of color models and pixel storage formats for
+gegl: input and output.
+gegl:
+gegl:
diff --git a/patches/source/getmail/getmail.SlackBuild b/patches/source/getmail/getmail.SlackBuild
new file mode 100755
index 00000000..a3082681
--- /dev/null
+++ b/patches/source/getmail/getmail.SlackBuild
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2017 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.
+
+VERSION=${VERSION:-$(echo getmail-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-getmail
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf getmail-$VERSION
+tar xvf $CWD/getmail-$VERSION.tar.xz || exit 1
+chown -R root:root getmail-$VERSION
+cd getmail-$VERSION
+python setup.py build || exit 1
+python setup.py install --root=$PKG || exit 1
+
+( cd $PKG/usr/share
+ mv man ..
+ mv doc ..
+ cd ..
+ rmdir share
+)
+
+gzip -9 $PKG/usr/man/man1/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/getmail-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/getmail/slack-desc b/patches/source/getmail/slack-desc
new file mode 100644
index 00000000..6c91db1c
--- /dev/null
+++ b/patches/source/getmail/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------------------------------------------------------|
+getmail: getmail (POP3 mail retriever)
+getmail:
+getmail: getmail is a POP3 mail retriever, with support for both ordinary and
+getmail: domain (or multidrop) POP3 mailboxes. It is written in Python, and
+getmail: licensed under the GNU General Public License version 2.
+getmail:
+getmail: getmail was written by Charles Cazabon.
+getmail:
+getmail:
+getmail:
+getmail:
diff --git a/patches/source/gimp/gimp.SlackBuild b/patches/source/gimp/gimp.SlackBuild
new file mode 100755
index 00000000..c6a0ebae
--- /dev/null
+++ b/patches/source/gimp/gimp.SlackBuild
@@ -0,0 +1,136 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 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=gimp
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gimp
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf gimp-$VERSION
+tar xvf $CWD/gimp-$VERSION.tar.?z* || exit 1
+cd gimp-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/gimp-$VERSION \
+ --disable-static \
+ --with-libcurl \
+ --with-lcms=lcms2 \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+mkdir -p $PKG/usr/share/applications $PKG/usr/share/application-registry
+make install DESTDIR=$PKG || exit 1
+
+# Add a manpage symlink for POLA-compliance
+( cd $PKG/usr/man/man1 ; ln -sf gimptool-2.?.1 gimptool.1 )
+
+# 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
+
+mkdir -p $PKG/usr/doc/gimp-$VERSION
+cp -a \
+ AUTHORS COPYING* HACKING INSTALL LICENSE NEWS README* docs/Wilber* \
+ $PKG/usr/doc/gimp-$VERSION
+( cd $PKG/usr/doc/gimp-$VERSION
+ for i in \
+ libgimp libgimpbase libgimpcolor libgimpconfig libgimpmath \
+ libgimpmodule libgimpthumb libgimpwidgets ; do \
+ ln -s /usr/share/gtk-doc/html/$i $i-html ;
+ done
+)
+
+# 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
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gimp-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gimp/slack-desc b/patches/source/gimp/slack-desc
new file mode 100644
index 00000000..9f9aca38
--- /dev/null
+++ b/patches/source/gimp/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------------------------------------------------------|
+gimp: gimp (The GNU Image Manipulation Program)
+gimp:
+gimp: The GIMP is a powerful tool for the preparation and manipulation of
+gimp: digital images. The GIMP provides the user with a wide variety of
+gimp: image manipulation, painting, processing, and rendering tools. The
+gimp: GIMP's open design and extensible architecture make for a very
+gimp: powerful end product for photo and image retouching, web graphics
+gimp: design, or digital illustration.
+gimp:
+gimp:
+gimp:
diff --git a/patches/source/git/git-2.14.1.tar.sign b/patches/source/git/git-2.14.1.tar.sign
new file mode 100644
index 00000000..2dffd4d3
--- /dev/null
+++ b/patches/source/git/git-2.14.1.tar.sign
Binary files differ
diff --git a/patches/source/git/git.SlackBuild b/patches/source/git/git.SlackBuild
new file mode 100755
index 00000000..722ea302
--- /dev/null
+++ b/patches/source/git/git.SlackBuild
@@ -0,0 +1,170 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2016 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.
+
+BUILD=${BUILD:-1_slack14.2}
+
+PKGNAM=git
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+eval $(perl '-V:installvendorlib')
+PERLDIR=$installvendorlib/$ARCH-linux-thread-multi/auto
+
+if ls /var/log/packages/git-* 1> /dev/null 2> /dev/null ; then
+ echo "The git package needs to be removed before building to ensure that"
+ echo "the perl modules are included in the new package."
+ echo
+ echo "Removing the git package in 15 seconds, and then continuing with the build."
+ sleep 15
+ removepkg git
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-git
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf git-$VERSION
+tar xvf $CWD/git-$VERSION.tar.?z* || exit 1
+cd git-$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 {} \;
+
+mkdir -p $PKG/usr/doc/git-$VERSION
+cp -a \
+ COPYING* INSTALL README \
+ Documentation \
+ contrib \
+ $PKG/usr/doc/git-$VERSION
+( cd $PKG/usr/doc/git-$VERSION/Documentation ; rm *.1 *.3 *.7 )
+( cd $PKG/usr/doc/git-$VERSION && find . -name ".git*" -exec rm -r "{}" \; )
+
+make $NUMJOBS \
+ prefix=/usr \
+ mandir=/usr/man \
+ CFLAGS="$SLKCFLAGS" \
+ INSTALLDIRS=vendor \
+ ASCIIDOC8=YesPlease \
+ all doc || exit 1
+
+make \
+ prefix=/usr \
+ mandir=/usr/man \
+ "CFLAGS=$SLKCFLAGS" \
+ INSTALLDIRS=vendor \
+ ASCIIDOC8=YesPlease \
+ install \
+ install-doc \
+ DESTDIR=$PKG || exit 1
+
+mv $PKG/usr/share/man/man3 $PKG/usr/man
+rmdir $PKG/usr/share/man
+
+# Don't stomp on perl's file:
+rm -f $PKG/usr/lib*/perl5/perllocal.pod
+
+# 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
+
+# Since Stuart Winter hates hard links. ;-)
+#
+# Switch a hard link with a soft link:
+( cd $PKG/usr/bin
+ find . -links +1 -not -name git | while read gitfile ; do
+ if [ git -ef $gitfile ]; then
+ rm -vf $gitfile
+ ln -vfs git $gitfile
+ fi
+ done
+)
+
+# This removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%/share/man%/man%g" \
+ -e "s%$PKG%%g" \
+ -e "s%\.1$%\.1\.gz%g" \
+ -e "s%\.2$%\.2\.gz%g" \
+ -e "s%\.3$%\.3\.gz%g" \
+ -e "s%\.3pm$%\.3pm\.gz%g" \
+ -e "s%\.4$%\.4\.gz%g" \
+ -e "s%\.5$%\.5\.gz%g" \
+ -e "s%\.6$%\.6\.gz%g" \
+ -e "s%\.7$%\.7\.gz%g" \
+ -e "s%\.8$%\.8\.gz%g" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+# This is junk:
+eval $(perl '-V:privlib')
+( cd $PKG$(dirname $privlib) && rm -rf 5.* )
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/git-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/git/git.url b/patches/source/git/git.url
new file mode 100644
index 00000000..a4c15db3
--- /dev/null
+++ b/patches/source/git/git.url
@@ -0,0 +1 @@
+https://www.kernel.org/pub/software/scm/git/
diff --git a/patches/source/git/slack-desc b/patches/source/git/slack-desc
new file mode 100644
index 00000000..271b863a
--- /dev/null
+++ b/patches/source/git/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------------------------------------------------------|
+git: git (the stupid content tracker)
+git:
+git: Git is a fast, scalable, distributed revision control system with an
+git: unusually rich command set that provides both high-level operations
+git: and full access to internals.
+git:
+git: "git" can mean anything, depending on your mood.
+git:
+git: Git was originally written by Linus Torvalds and is currently
+git: maintained by Junio C. Hamano.
+git:
diff --git a/patches/source/gkrellm/gkrellm.SlackBuild b/patches/source/gkrellm/gkrellm.SlackBuild
new file mode 100755
index 00000000..b8183fb6
--- /dev/null
+++ b/patches/source/gkrellm/gkrellm.SlackBuild
@@ -0,0 +1,149 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2016, 2017 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=gkrellm
+VERSION=${VERSION:-$(echo $PKGNAM-2*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+PKGVER=$VERSION
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gkrellm
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf gkrellm-$VERSION
+tar xvf $CWD/gkrellm-$VERSION.tar.?z* || exit 1
+cd gkrellm-$VERSION || exit 1
+# Fix library paths (works for all ARCHs):
+sed -i -e "s#lib/gkrellm2#lib${LIBDIRSUFFIX}/gkrellm2#g" $(grep -lr 'lib/gkrellm2' *)
+# Increase the default width slightly, and don't use the text
+# shadow effect by default (this seems better with Pango font
+# rendering):
+zcat $CWD/gkrellm.theme.defaults.diff.gz | patch -p1 --verbose || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+make \
+ INSTALLROOT=/usr \
+ INSTALLDIR=/usr/bin \
+ INCLUDEDIR=/usr/include \
+ MANDIR=/usr/man/man1 \
+ LOCALEDIR=/usr/share/locale \
+ PKGCONFIGDIR=/usr/lib${LIBDIRSUFFIX}/pkgconfig || exit 1
+
+# We will need this installed to build plugins, so...
+make install \
+ INSTALLROOT=/usr \
+ INSTALLDIR=/usr/bin \
+ INCLUDEDIR=/usr/include \
+ MANDIR=/usr/man/man1 \
+ LOCALEDIR=/usr/share/locale \
+ PKGCONFIGDIR=/usr/lib${LIBDIRSUFFIX}/pkgconfig || exit 1
+
+# Install to the $PKG dir:
+make install \
+ INSTALLROOT=$PKG/usr \
+ INSTALLDIR=$PKG/usr/bin \
+ INCLUDEDIR=$PKG/usr/include \
+ MANDIR=$PKG/usr/man/man1 \
+ LOCALEDIR=$PKG/usr/share/locale \
+ PKGCONFIGDIR=$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig || exit 1
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/gkrellm2/plugins
+
+mkdir -p $PKG/usr/doc/gkrellm-$VERSION
+cp -a \
+ COPYRIGHT CREDITS INSTALL README* Themes.html \
+ $PKG/usr/doc/gkrellm-$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/gkrellm-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Add optional plugin(s):
+# The countdown plugin is needed to track X-Day. ;-)
+COUNTDOWN=0.1.1
+cd $TMP
+rm -rf gkrellm-countdown
+tar xf $CWD/gkrellm-countdown-$COUNTDOWN.tar.gz || exit 1
+cd gkrellm-countdown || 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 {} \;
+make || exit 1
+cp gkrellm-countdown.so $PKG/usr/lib${LIBDIRSUFFIX}/gkrellm2/plugins
+
+mkdir -p $PKG/usr/doc/gkrellm-countdown-$COUNTDOWN
+cp -a \
+ COPYING README \
+ $PKG/usr/doc/gkrellm-countdown-$COUNTDOWN
+
+# 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/gkrellm-countdown-$COUNTDOWN)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gkrellm-$PKGVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gkrellm/gkrellm.theme.defaults.diff b/patches/source/gkrellm/gkrellm.theme.defaults.diff
new file mode 100644
index 00000000..aff6a9fb
--- /dev/null
+++ b/patches/source/gkrellm/gkrellm.theme.defaults.diff
@@ -0,0 +1,11 @@
+--- ./src/config.c.orig 2008-10-03 19:33:37.000000000 -0500
++++ ./src/config.c 2008-10-25 20:33:56.000000000 -0500
+@@ -1883,7 +1883,7 @@
+
+ _GK.chart_height_min = 5;
+ _GK.chart_height_max = 200;
+- _GK.chart_width_ref = 60;
++ _GK.chart_width_ref = 75;
+ _GK.chart_text_no_fill = FALSE;
+ _GK.bg_separator_height = 2;
+ _GK.allow_scaling = FALSE;
diff --git a/patches/source/gkrellm/slack-desc b/patches/source/gkrellm/slack-desc
new file mode 100644
index 00000000..3540eb6a
--- /dev/null
+++ b/patches/source/gkrellm/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------------------------------------------------------|
+gkrellm: gkrellm (GNU Krell Monitors)
+gkrellm:
+gkrellm: GKrellM charts SMP CPU, load, Disk, and all active net interfaces
+gkrellm: automatically. An on/off button and online timer for the PPP interface
+gkrellm: is provided. Monitors for memory and swap usage, file system, internet
+gkrellm: connections, APM laptop battery, mbox style mailboxes, and cpu temps.
+gkrellm: Also includes an uptime monitor, hostname label, and clock/calendar.
+gkrellm:
+gkrellm: Bill Wilson is the author of GKrellM.
+gkrellm:
+gkrellm:
diff --git a/patches/source/glib2/0001-GDBusProxy-Fix-a-memory-leak-during-initialization.patch b/patches/source/glib2/0001-GDBusProxy-Fix-a-memory-leak-during-initialization.patch
new file mode 100644
index 00000000..a315a01b
--- /dev/null
+++ b/patches/source/glib2/0001-GDBusProxy-Fix-a-memory-leak-during-initialization.patch
@@ -0,0 +1,25 @@
+From db641e32920ee8b553ab6f2d318aafa156e4390c Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos@foutrelis.com>
+Date: Wed, 25 Nov 2015 23:29:18 +0200
+Subject: [PATCH] GDBusProxy: Fix a memory leak during initialization
+
+https://bugzilla.gnome.org/show_bug.cgi?id=758641
+---
+ gio/gdbusproxy.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c
+index 52a22fb..7b1140f 100644
+--- a/gio/gdbusproxy.c
++++ b/gio/gdbusproxy.c
+@@ -1720,6 +1720,7 @@ async_initable_init_second_finish (GAsyncInitable *initable,
+ if (result != NULL)
+ {
+ process_get_all_reply (proxy, result);
++ g_variant_unref (result);
+ }
+
+ proxy->priv->initialized = TRUE;
+--
+2.6.3
+
diff --git a/patches/source/glib2/doinst.sh b/patches/source/glib2/doinst.sh
new file mode 100644
index 00000000..a14f9606
--- /dev/null
+++ b/patches/source/glib2/doinst.sh
@@ -0,0 +1,32 @@
+# 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
+}
+
+# Prepare the new configuration files
+for file in etc/profile.d/libglib2.csh.new etc/profile.d/libglib2.sh.new ; do
+ if test -e $(dirname $file)/$(basename $file .new) ; then
+ if [ ! -x $(dirname $file)/$(basename $file .new) ]; then
+ chmod 644 $file
+ else
+ chmod 755 $file
+ fi
+ fi
+ config $file
+done
+
+# Try to run these. If they fail, no biggie.
+chroot . /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/ 1> /dev/null 2> /dev/null
+chroot . /usr/bin/gio-querymodules @LIBDIR@/gio/modules/ 1> /dev/null 2> /dev/null
+
diff --git a/patches/source/glib2/glib.bug.758823.diff b/patches/source/glib2/glib.bug.758823.diff
new file mode 100644
index 00000000..e92c0368
--- /dev/null
+++ b/patches/source/glib2/glib.bug.758823.diff
@@ -0,0 +1,40 @@
+From 30359e740953b596d6c3d980dba36dd131681a1f Mon Sep 17 00:00:00 2001
+From: Allison Ryan Lortie <desrt@desrt.ca>
+Date: Mon, 30 Nov 2015 10:13:46 -0500
+Subject: file monitors: reorder some code to avoid segfault
+
+We must initialise '->source' before we use fields inside of it.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=758823
+---
+ gio/glocalfilemonitor.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gio/glocalfilemonitor.c b/gio/glocalfilemonitor.c
+index dbd62ec..49a4dd2 100644
+--- a/gio/glocalfilemonitor.c
++++ b/gio/glocalfilemonitor.c
+@@ -748,6 +748,9 @@ g_local_file_monitor_start (GLocalFileMonitor *local_monitor,
+
+ g_assert (!local_monitor->source);
+
++ source = g_file_monitor_source_new (local_monitor, filename, is_directory, flags);
++ local_monitor->source = source; /* owns the ref */
++
+ if (is_directory && !class->mount_notify && (flags & G_FILE_MONITOR_WATCH_MOUNTS))
+ {
+ #ifdef G_OS_WIN32
+@@ -771,9 +774,6 @@ g_local_file_monitor_start (GLocalFileMonitor *local_monitor,
+ #endif
+ }
+
+- source = g_file_monitor_source_new (local_monitor, filename, is_directory, flags);
+- local_monitor->source = source; /* owns the ref */
+-
+ G_LOCAL_FILE_MONITOR_GET_CLASS (local_monitor)->start (local_monitor,
+ source->dirname, source->basename, source->filename,
+ source);
+--
+cgit v0.12
+
+
diff --git a/patches/source/glib2/glib2.SlackBuild b/patches/source/glib2/glib2.SlackBuild
new file mode 100755
index 00000000..0b39949a
--- /dev/null
+++ b/patches/source/glib2/glib2.SlackBuild
@@ -0,0 +1,145 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 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.
+
+
+VERSION=${VERSION:-$(echo glib-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-glib2
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr
+cd $TMP
+rm -rf glib-$VERSION
+tar xvf $CWD/glib-$VERSION.tar.?z* || exit 1
+cd glib-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Silly upstream, using the bleeding edge. Reconf:
+#autoreconf --force --install
+
+cat $CWD/0001-GDBusProxy-Fix-a-memory-leak-during-initialization.patch | patch -p1 --verbose || exit 1
+
+# Patch from upsteam, fixes use-before-allocate bug:
+cat $CWD/glib.bug.758823.diff | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --disable-libelf \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Install profile scripts:
+mkdir -p $PKG/etc/profile.d/
+cp -a $CWD/libglib2.{csh,sh} $PKG/etc/profile.d/
+chown root:root $PKG/etc/profile.d/*
+chmod 755 $PKG/etc/profile.d/*
+mv $PKG/etc/profile.d/libglib2.csh $PKG/etc/profile.d/libglib2.csh.new
+mv $PKG/etc/profile.d/libglib2.sh $PKG/etc/profile.d/libglib2.sh.new
+
+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 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/glib-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* \
+ $PKG/usr/doc/glib-$VERSION
+ rm -f $PKG/usr/doc/glib-$VERSION/README.{in,win32}
+( cd $PKG/usr/doc/glib-$VERSION ; ln -s /usr/share/gtk-doc/html/gobject html )
+
+# 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
+
+# Trim down bloated 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
+zcat $CWD/doinst.sh.gz | sed "s,@LIBDIR@,/usr/lib${LIBDIRSUFFIX}," > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n --prepend $TMP/glib2-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/glib2/libglib2.csh b/patches/source/glib2/libglib2.csh
new file mode 100644
index 00000000..a1b67561
--- /dev/null
+++ b/patches/source/glib2/libglib2.csh
@@ -0,0 +1,27 @@
+#!/bin/csh
+#
+# Description: This script sets the environment variables G_FILENAME_ENCODING
+# and G_BROKEN_FILENAMES for the glib-2.0 library.
+#
+# G_FILENAME_ENCODING
+# This environment variable can be set to a comma-separated list of
+# character set names. GLib assumes that filenames are encoded in the
+# first character set from that list rather than in UTF-8. The special
+# token "@locale" can be used to specify the character set for the
+# current locale.
+#
+# G_BROKEN_FILENAMES
+# If this environment variable is set, GLib assumes that filenames are
+# in the locale encoding rather than in UTF-8.
+
+# If the LANG you have set contains any form of "UTF", we will guess you are
+# using a UTF-8 locale. Hopefully we're correct.
+echo $LANG | grep -iq UTF
+if ($status == 0) then
+ setenv G_FILENAME_ENCODING "@locale"
+endif
+
+# It doesn't hurt to export this since G_FILENAME_ENCODING takes priority
+# over G_BROKEN_FILENAMES:
+setenv G_BROKEN_FILENAMES 1
+
diff --git a/patches/source/glib2/libglib2.sh b/patches/source/glib2/libglib2.sh
new file mode 100644
index 00000000..9b9fdc69
--- /dev/null
+++ b/patches/source/glib2/libglib2.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Description: This script sets the environment variables G_FILENAME_ENCODING
+# and G_BROKEN_FILENAMES for the glib-2.0 library.
+#
+# G_FILENAME_ENCODING
+# This environment variable can be set to a comma-separated list of
+# character set names. GLib assumes that filenames are encoded in the
+# first character set from that list rather than in UTF-8. The special
+# token "@locale" can be used to specify the character set for the
+# current locale.
+#
+# G_BROKEN_FILENAMES
+# If this environment variable is set, GLib assumes that filenames are
+# in the locale encoding rather than in UTF-8.
+
+# If the LANG you have set contains any form of "UTF", we will guess you are
+# using a UTF-8 locale. Hopefully we're correct.
+if echo $LANG | grep -iq UTF ; then
+ export G_FILENAME_ENCODING="@locale"
+fi
+
+# It doesn't hurt to export this since G_FILENAME_ENCODING takes priority
+# over G_BROKEN_FILENAMES:
+export G_BROKEN_FILENAMES=1
+
diff --git a/patches/source/glib2/slack-desc b/patches/source/glib2/slack-desc
new file mode 100644
index 00000000..1633f2f7
--- /dev/null
+++ b/patches/source/glib2/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------------------------------------------------------|
+glib2: glib2 (library of C routines)
+glib2:
+glib2: GLib is a library which includes support routines for C such as lists,
+glib2: trees, hashes, memory allocation, and many other things.
+glib2:
+glib2:
+glib2:
+glib2:
+glib2:
+glib2:
+glib2:
diff --git a/patches/source/glibc-zoneinfo/doinst.sh b/patches/source/glibc-zoneinfo/doinst.sh
new file mode 100644
index 00000000..3c86f65e
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/doinst.sh
@@ -0,0 +1,57 @@
+# In order to properly handle time before /usr is mounted (in
+# the event that /usr is a separate partition, which for a number
+# of reasons isn't really a great idea), the /etc/localtime file
+# should be a copy of the desired zoneinfo file and not a symlink
+# to a file in /usr/share/zoneinfo. But if we find a symlink here
+# we should defer to the admin's wishes and leave it alone.
+#
+# Note that setting the timezone with timeconfig will wipe both
+# /etc/localtime and /etc/localtime-copied from.
+# /etc/localtime-copied-from will be a symlink to a file under
+# /usr/share/zoneinfo, and /etc/localtime will be a copy of that file.
+
+# In a special case, we will handle the removal of the US/Pacific-New
+# timezone. A bit of background information on this:
+#
+# "US/Pacific-New' stands for 'Pacific Presidential Election Time',
+# which was passed by the House in April 1989 but never signed into law.
+# In presidential election years, this rule would have delayed the
+# PDT-to-PST switchover until after the election, to lessen the effect
+# of broadcast news election projections on last-minute west-coast
+# voters. "
+#
+# In nearly all cases, a machine that uses the US/Pacific-New timezone
+# has chosen it by mistake. In 2016, having this as the system timezone
+# actually led to clock errors, and after that it was decided that the
+# timezone (only of historical interest anyway) should be removed from
+# the timezone database.
+#
+# If we see that the machine's localtime-copied-from symlink is pointing
+# to US/Pacific-New, change it to point to US/Pacific instead.
+if [ "$(/bin/ls -l etc/localtime-copied-from | rev | cut -f 1,2 -d / | rev)" = "US/Pacific-New" ]; then
+ ( cd etc ; rm -rf localtime-copied-from )
+ ( cd etc ; ln -sf /usr/share/zoneinfo/US/Pacific localtime-copied-from )
+fi
+
+# If we have no /etc/localtime, but we do have a localtime-copied-from
+# symlink to locate what we would want there, then add a copy now:
+if [ ! -r etc/localtime -a -L etc/localtime-copied-from ]; then
+ chroot . /bin/cp etc/localtime-copied-from etc/localtime
+fi
+
+# Add the default timezone in /etc, if none exists:
+if [ ! -r etc/localtime -a ! -L etc/localtime-copied-from ]; then
+ ( cd etc ; rm -rf localtime localtime-copied-from )
+ ( cd etc ; ln -sf /usr/share/zoneinfo/Factory localtime-copied-from )
+fi
+
+# Make sure /etc/localtime is updated, unless it is a symlink (in which
+# case leave it alone):
+if [ ! -L etc/localtime ]; then
+ chroot . /bin/cp etc/localtime-copied-from etc/localtime
+fi
+
+# Add a link to the timeconfig script in /usr/share/zoneinfo:
+( cd usr/share/zoneinfo ; rm -rf timeconfig )
+( cd usr/share/zoneinfo ; ln -sf /usr/sbin/timeconfig timeconfig )
+### Make the rest of the symbolic links in the zoneinfo database:
diff --git a/patches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild b/patches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild
new file mode 100755
index 00000000..b294b01a
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/glibc-zoneinfo.SlackBuild
@@ -0,0 +1,147 @@
+#!/bin/sh
+
+# Copyright 2015, 2016, 2018 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=glibc-zoneinfo
+ZONE_VERSIONS="$(echo tzdata* | cut -f1 -d . | cut -b7-11)"
+BUILD=${BUILD:-2_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-DHAVE_SNPRINTF=1 -O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/etc
+
+# Build and install the zoneinfo database:
+cd $TMP
+rm -rf tzcodedata-build
+mkdir tzcodedata-build
+cd tzcodedata-build
+tar xzf $CWD/tzdata?????.tar.gz
+tar xzf $CWD/tzcode?????.tar.gz
+
+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 {} \;
+
+sed -i "s,/usr/local,$(pwd),g" Makefile
+sed -i "s,/etc/zoneinfo,/zoneinfo,g" Makefile
+sed -i "s,^CFLAGS=,CFLAGS= $SLKCFLAGS,g" Makefile
+make
+make install DESTDIR=$PKG/stage
+
+# Install the primary zone files:
+mkdir -p $PKG/usr/share
+mv $PKG/stage/usr/share/zoneinfo $PKG/usr/share
+
+# These are all identical to the normal zoneinfo files, so let's hard link
+# them to save space:
+cp -al $PKG/usr/share/zoneinfo $PKG/usr/share/posix
+mv $PKG/usr/share/posix $PKG/usr/share/zoneinfo
+
+# Install the "right" files:
+mkdir -p $PKG/usr/share/zoneinfo/right
+cp -a $PKG/stage/usr/share/zoneinfo-leaps/* $PKG/usr/share/zoneinfo/right
+
+# Clean up staged file residue:
+rm -rf $PKG/stage
+
+# Remove $PKG/usr/share/zoneinfo/localtime -- the install script will
+# create it as a link to /etc/localtime.
+rm -f $PKG/usr/share/zoneinfo/localtime
+
+# Install some scripts to help select a timezone:
+mkdir -p $PKG/var/log/setup
+cp -a $CWD/timezone-scripts/setup.timeconfig $PKG/var/log/setup
+chown root:root $PKG/var/log/setup/setup.timeconfig
+chmod 755 $PKG/var/log/setup/setup.timeconfig
+mkdir -p $PKG/usr/sbin
+cp -a $CWD/timezone-scripts/timeconfig $PKG/usr/sbin
+chown root:root $PKG/usr/sbin/timeconfig
+chmod 755 $PKG/usr/sbin/timeconfig
+( cd $CWD/timezone-scripts
+ # Try to rebuild this:
+ sh output-updated-timeconfig.sh $PKG/usr/share/zoneinfo > $PKG/usr/sbin/timeconfig 2> /dev/null
+)
+# Note in timeconfig which zoneinfo database was used:
+sed -i "s/# ChangeLog:/# ChangeLog:\n# $(date '+%Y-%m-%d'): Updated timezones from tzdata${ZONE_VERSIONS}./g" $PKG/usr/sbin/timeconfig
+
+# Don't forget to add the /usr/share/zoneinfo/localtime -> /etc/localtime symlink! :)
+if [ ! -r $PKG/usr/share/zoneinfo/localtime ]; then
+ ( cd $PKG/usr/share/zoneinfo ; ln -sf /etc/localtime . )
+fi
+
+mkdir -p $PKG/usr/doc/glibc-zoneinfo-$ZONE_VERSIONS
+cp -a \
+ CONTRIBUTING NEWS README Theory \
+ $PKG/usr/doc/glibc-zoneinfo-$ZONE_VERSIONS
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+makepkg -l y -c n $TMP/glibc-zoneinfo-$ZONE_VERSIONS-noarch-$BUILD.txz
+
diff --git a/patches/source/glibc-zoneinfo/slack-desc b/patches/source/glibc-zoneinfo/slack-desc
new file mode 100644
index 00000000..69420f78
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/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------------------------------------------------------|
+glibc-zoneinfo: glibc-zoneinfo (timezone database)
+glibc-zoneinfo:
+glibc-zoneinfo: This package allows you to configure your time zone.
+glibc-zoneinfo:
+glibc-zoneinfo: This timezone database comes from the tzdata and tzcode packages by
+glibc-zoneinfo: Arthur David Olson et.al. The latest version and more information
+glibc-zoneinfo: may be found at: http://www.iana.org/time-zones
+glibc-zoneinfo:
+glibc-zoneinfo: Use the timeconfig utility to set your local time zone.
+glibc-zoneinfo:
+glibc-zoneinfo:
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh b/patches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh
new file mode 100755
index 00000000..268e4c6c
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/output-updated-timeconfig.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+# Copyright 2000, 2001, 2006, 2007, 2008, 2012 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.
+#
+
+if [ ! "$(basename "$1")" = "zoneinfo" -o ! -d "$1" ]; then
+ echo " Usage: output-updated-timeconfig.sh <zoneinfo directory>"
+ exit 1
+fi
+
+CWD=$(pwd)
+cat $CWD/parts/00
+# Sorry, I'd rather not be US-centric but some people here have a hard
+# time finding things. ;-)
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep "^US/" | while read zone ; do
+ echo "\"${zone}\" \" \" \\"
+ done
+)
+# Don't list right/ and posix/ zones, as these are wrong choices for most
+# people. posix/ is just a duplicate of the normal zones, while right/ do
+# not include leap seconds. Anyone actually needing something from one of
+# those trees will have no problem selecting it by manually adjusting
+# /etc/localtime.
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep -v "^US/" | grep -v "^posix/" | grep -v "^right/" | while read zone ; do
+ echo "\"${zone}\" \" \" \\"
+ done
+)
+cat $CWD/parts/02
+# US/ first:
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep "^US/" | while read zone ; do
+ echo "${zone}"
+ done
+)
+# Don't list right/ and posix/ zones:
+( cd $1
+ find . -type f | xargs file | grep "timezone data" | cut -f 1 -d : | cut -f 2- -d / | sort | grep -v "^US/" | grep -v "^posix/" | grep -v "^right/" | while read zone ; do
+ echo "${zone}"
+ done
+)
+cat $CWD/parts/04
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/00 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/00
new file mode 100644
index 00000000..678094e1
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/00
@@ -0,0 +1,132 @@
+#!/bin/sh
+#
+# timeconfig Slackware Linux timezone configuration utility.
+#
+# Author: Patrick Volkerding <volkerdi@slackware.com>
+# Modified by: David Cantrell <david@slackware.com>, 06-Oct-2000
+#
+# ChangeLog:
+# 2014-10-22: Updated timezones from tzdata2014i. <pjv>
+# 2012-12-12: Updated timezones from tzdata2012j. <pjv>
+# 2008-03-10: Updated timezones from tzdata2008a. <pjv>
+# 2007-12-21: Updated timezones from tzdata2007j. <pjv>
+# 2006-12-03: Updated timezones from tzdata2006p. <pjv>
+# 2006-09-14: Updated timezones from tzdata2006k. <pjv>
+# 2006-08-22: Updated timezones from tzdata2006j.
+# 2006-08-13: Updated timezones from tzdata2006g.
+# 2006-03-13: Updated timezones from tzdata2006c.
+# 19-Feb-2001 Add new timezones from glibc-2.2.2.
+# 06-Oct-2000 Fixed a problem with selecting UTC time. It was writing
+# the hardwareclock file to the root disk and not your dest
+# partition. Changed the HWCLOCK_CONF variable to be
+# $T_PX/etc/hardwareclock to fix this. Thanks to David L.
+# Dickman <softbear@optonline.net> for finding this and
+# submitting a patch.
+#
+# 15-Mar-2000 Added the writeconf function to write out the
+# /etc/hardwareclock file which tells what the hardware clock
+# is set to (UTC or localtime).
+#
+# 03-Mar-2000 Reorganized script. Made one timezone set block, added
+# stage that asks the user if the hardware clock is set to
+# UTC.
+
+# setup our temp locations and variables
+TMP=/var/log/setup/tmp
+if [ -r $TMP/SeTT_PX ]; then
+ T_PX="`cat $TMP/SeTT_PX`"
+elif [ ! "$!" = "" ]; then
+ T_PX=$1
+else
+ T_PX=/
+fi
+
+# the hardware clock configuration file
+HWCLOCK_CONF=$T_PX/etc/hardwareclock
+
+# setzone( $TIMEZONE )
+#
+# This function accepts a time zone as the only parameter and sets it as
+# the default system time zone.
+setzone()
+{
+ TZ=$1
+
+ cd $T_PX/etc
+ if [ -r $T_PX/usr/share/zoneinfo/$TZ -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TZ -o \
+ -L $T_PX/usr/share/zoneinfo/$TZ -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TZ ]; then
+ rm -f localtime-copied-from
+ ln -sf /usr/share/zoneinfo/$TZ localtime-copied-from
+ rm -f localtime
+ cd ..
+ chroot . cp etc/localtime-copied-from etc/localtime
+ fi
+}
+
+# writeconf( $CLOCK_SET_TO )
+#
+# Writes out $HWCLOCK_CONF that tells rc.S how the hardware clock
+# value is stored.
+writeconf()
+{
+ echo "# /etc/hardwareclock" > $HWCLOCK_CONF
+ echo "#" >> $HWCLOCK_CONF
+ echo "# Tells how the hardware clock time is stored." >> $HWCLOCK_CONF
+ echo "# You should run timeconfig to edit this file." >> $HWCLOCK_CONF
+ echo >> $HWCLOCK_CONF
+ echo $1 >> $HWCLOCK_CONF
+}
+
+# ask the user if the hardware clock is set for UTC/GMT
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "HARDWARE CLOCK SET TO UTC?" --menu "Is the hardware clock set \
+to Coordinated Universal Time (UTC/GMT)? If it is, select YES here. If the \
+hardware clock is set to the current local time (this is how most PCs are set \
+up), then say NO here. If you are not sure what this is, you should answer NO \
+here." 13 60 2 \
+ "NO" "Hardware clock is set to local time" \
+ "YES" "Hardware clock is set to UTC" \
+ 2> $TMP/utc
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/utc
+ exit
+ fi
+ if [ "`cat $TMP/utc`" = "YES" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else # must be NO
+ writeconf "localtime"
+ fi
+ rm -f $TMP/utc
+else
+ ###
+ ### use text prompts
+ ###
+ echo "Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?"
+ echo "If it is, select 'y' here. If the hardware clock is set to the"
+ echo "current local time (this is how most PCs are set up), then say 'n'"
+ echo "here. If you are not sure what this is, you should answer 'n' here."
+ echo
+ echo -n "Is your hardware clock set to UTC ([y]es, [n]o)? "
+ read HEJAZ
+
+ if [ "$HEJAZ" = "y" -o "$HEJAZ" = "Y" -o "$HEJAZ" = "YES" -o "$HEJAZ" = "yes" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else
+ # default to localtime
+ writeconf "localtime"
+ fi
+fi
+
+# Now set the correct timezone link:
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "TIMEZONE CONFIGURATION" --menu "Please select one of the following timezones for your machine:" 21 50 13 \
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/01 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/01
new file mode 100644
index 00000000..999f67d7
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/01
@@ -0,0 +1,585 @@
+"US/Alaska" " " \
+"US/Aleutian" " " \
+"US/Arizona" " " \
+"US/Central" " " \
+"US/East-Indiana" " " \
+"US/Eastern" " " \
+"US/Hawaii" " " \
+"US/Indiana-Starke" " " \
+"US/Michigan" " " \
+"US/Mountain" " " \
+"US/Pacific" " " \
+"US/Pacific-New" " " \
+"US/Samoa" " " \
+"Africa/Abidjan" " " \
+"Africa/Accra" " " \
+"Africa/Addis_Ababa" " " \
+"Africa/Algiers" " " \
+"Africa/Asmara" " " \
+"Africa/Asmera" " " \
+"Africa/Bamako" " " \
+"Africa/Bangui" " " \
+"Africa/Banjul" " " \
+"Africa/Bissau" " " \
+"Africa/Blantyre" " " \
+"Africa/Brazzaville" " " \
+"Africa/Bujumbura" " " \
+"Africa/Cairo" " " \
+"Africa/Casablanca" " " \
+"Africa/Ceuta" " " \
+"Africa/Conakry" " " \
+"Africa/Dakar" " " \
+"Africa/Dar_es_Salaam" " " \
+"Africa/Djibouti" " " \
+"Africa/Douala" " " \
+"Africa/El_Aaiun" " " \
+"Africa/Freetown" " " \
+"Africa/Gaborone" " " \
+"Africa/Harare" " " \
+"Africa/Johannesburg" " " \
+"Africa/Juba" " " \
+"Africa/Kampala" " " \
+"Africa/Khartoum" " " \
+"Africa/Kigali" " " \
+"Africa/Kinshasa" " " \
+"Africa/Lagos" " " \
+"Africa/Libreville" " " \
+"Africa/Lome" " " \
+"Africa/Luanda" " " \
+"Africa/Lubumbashi" " " \
+"Africa/Lusaka" " " \
+"Africa/Malabo" " " \
+"Africa/Maputo" " " \
+"Africa/Maseru" " " \
+"Africa/Mbabane" " " \
+"Africa/Mogadishu" " " \
+"Africa/Monrovia" " " \
+"Africa/Nairobi" " " \
+"Africa/Ndjamena" " " \
+"Africa/Niamey" " " \
+"Africa/Nouakchott" " " \
+"Africa/Ouagadougou" " " \
+"Africa/Porto-Novo" " " \
+"Africa/Sao_Tome" " " \
+"Africa/Timbuktu" " " \
+"Africa/Tripoli" " " \
+"Africa/Tunis" " " \
+"Africa/Windhoek" " " \
+"America/Adak" " " \
+"America/Anchorage" " " \
+"America/Anguilla" " " \
+"America/Antigua" " " \
+"America/Araguaina" " " \
+"America/Argentina/Buenos_Aires" " " \
+"America/Argentina/Catamarca" " " \
+"America/Argentina/ComodRivadavia" " " \
+"America/Argentina/Cordoba" " " \
+"America/Argentina/Jujuy" " " \
+"America/Argentina/La_Rioja" " " \
+"America/Argentina/Mendoza" " " \
+"America/Argentina/Rio_Gallegos" " " \
+"America/Argentina/Salta" " " \
+"America/Argentina/San_Juan" " " \
+"America/Argentina/San_Luis" " " \
+"America/Argentina/Tucuman" " " \
+"America/Argentina/Ushuaia" " " \
+"America/Aruba" " " \
+"America/Asuncion" " " \
+"America/Atikokan" " " \
+"America/Atka" " " \
+"America/Bahia" " " \
+"America/Bahia_Banderas" " " \
+"America/Barbados" " " \
+"America/Belem" " " \
+"America/Belize" " " \
+"America/Blanc-Sablon" " " \
+"America/Boa_Vista" " " \
+"America/Bogota" " " \
+"America/Boise" " " \
+"America/Buenos_Aires" " " \
+"America/Cambridge_Bay" " " \
+"America/Campo_Grande" " " \
+"America/Cancun" " " \
+"America/Caracas" " " \
+"America/Catamarca" " " \
+"America/Cayenne" " " \
+"America/Cayman" " " \
+"America/Chicago" " " \
+"America/Chihuahua" " " \
+"America/Coral_Harbour" " " \
+"America/Cordoba" " " \
+"America/Costa_Rica" " " \
+"America/Creston" " " \
+"America/Cuiaba" " " \
+"America/Curacao" " " \
+"America/Danmarkshavn" " " \
+"America/Dawson" " " \
+"America/Dawson_Creek" " " \
+"America/Denver" " " \
+"America/Detroit" " " \
+"America/Dominica" " " \
+"America/Edmonton" " " \
+"America/Eirunepe" " " \
+"America/El_Salvador" " " \
+"America/Ensenada" " " \
+"America/Fort_Nelson" " " \
+"America/Fort_Wayne" " " \
+"America/Fortaleza" " " \
+"America/Glace_Bay" " " \
+"America/Godthab" " " \
+"America/Goose_Bay" " " \
+"America/Grand_Turk" " " \
+"America/Grenada" " " \
+"America/Guadeloupe" " " \
+"America/Guatemala" " " \
+"America/Guayaquil" " " \
+"America/Guyana" " " \
+"America/Halifax" " " \
+"America/Havana" " " \
+"America/Hermosillo" " " \
+"America/Indiana/Indianapolis" " " \
+"America/Indiana/Knox" " " \
+"America/Indiana/Marengo" " " \
+"America/Indiana/Petersburg" " " \
+"America/Indiana/Tell_City" " " \
+"America/Indiana/Vevay" " " \
+"America/Indiana/Vincennes" " " \
+"America/Indiana/Winamac" " " \
+"America/Indianapolis" " " \
+"America/Inuvik" " " \
+"America/Iqaluit" " " \
+"America/Jamaica" " " \
+"America/Jujuy" " " \
+"America/Juneau" " " \
+"America/Kentucky/Louisville" " " \
+"America/Kentucky/Monticello" " " \
+"America/Knox_IN" " " \
+"America/Kralendijk" " " \
+"America/La_Paz" " " \
+"America/Lima" " " \
+"America/Los_Angeles" " " \
+"America/Louisville" " " \
+"America/Lower_Princes" " " \
+"America/Maceio" " " \
+"America/Managua" " " \
+"America/Manaus" " " \
+"America/Marigot" " " \
+"America/Martinique" " " \
+"America/Matamoros" " " \
+"America/Mazatlan" " " \
+"America/Mendoza" " " \
+"America/Menominee" " " \
+"America/Merida" " " \
+"America/Metlakatla" " " \
+"America/Mexico_City" " " \
+"America/Miquelon" " " \
+"America/Moncton" " " \
+"America/Monterrey" " " \
+"America/Montevideo" " " \
+"America/Montreal" " " \
+"America/Montserrat" " " \
+"America/Nassau" " " \
+"America/New_York" " " \
+"America/Nipigon" " " \
+"America/Nome" " " \
+"America/Noronha" " " \
+"America/North_Dakota/Beulah" " " \
+"America/North_Dakota/Center" " " \
+"America/North_Dakota/New_Salem" " " \
+"America/Ojinaga" " " \
+"America/Panama" " " \
+"America/Pangnirtung" " " \
+"America/Paramaribo" " " \
+"America/Phoenix" " " \
+"America/Port-au-Prince" " " \
+"America/Port_of_Spain" " " \
+"America/Porto_Acre" " " \
+"America/Porto_Velho" " " \
+"America/Puerto_Rico" " " \
+"America/Rainy_River" " " \
+"America/Rankin_Inlet" " " \
+"America/Recife" " " \
+"America/Regina" " " \
+"America/Resolute" " " \
+"America/Rio_Branco" " " \
+"America/Rosario" " " \
+"America/Santa_Isabel" " " \
+"America/Santarem" " " \
+"America/Santiago" " " \
+"America/Santo_Domingo" " " \
+"America/Sao_Paulo" " " \
+"America/Scoresbysund" " " \
+"America/Shiprock" " " \
+"America/Sitka" " " \
+"America/St_Barthelemy" " " \
+"America/St_Johns" " " \
+"America/St_Kitts" " " \
+"America/St_Lucia" " " \
+"America/St_Thomas" " " \
+"America/St_Vincent" " " \
+"America/Swift_Current" " " \
+"America/Tegucigalpa" " " \
+"America/Thule" " " \
+"America/Thunder_Bay" " " \
+"America/Tijuana" " " \
+"America/Toronto" " " \
+"America/Tortola" " " \
+"America/Vancouver" " " \
+"America/Virgin" " " \
+"America/Whitehorse" " " \
+"America/Winnipeg" " " \
+"America/Yakutat" " " \
+"America/Yellowknife" " " \
+"Antarctica/Casey" " " \
+"Antarctica/Davis" " " \
+"Antarctica/DumontDUrville" " " \
+"Antarctica/Macquarie" " " \
+"Antarctica/Mawson" " " \
+"Antarctica/McMurdo" " " \
+"Antarctica/Palmer" " " \
+"Antarctica/Rothera" " " \
+"Antarctica/South_Pole" " " \
+"Antarctica/Syowa" " " \
+"Antarctica/Troll" " " \
+"Antarctica/Vostok" " " \
+"Arctic/Longyearbyen" " " \
+"Asia/Aden" " " \
+"Asia/Almaty" " " \
+"Asia/Amman" " " \
+"Asia/Anadyr" " " \
+"Asia/Aqtau" " " \
+"Asia/Aqtobe" " " \
+"Asia/Ashgabat" " " \
+"Asia/Ashkhabad" " " \
+"Asia/Baghdad" " " \
+"Asia/Bahrain" " " \
+"Asia/Baku" " " \
+"Asia/Bangkok" " " \
+"Asia/Beirut" " " \
+"Asia/Bishkek" " " \
+"Asia/Brunei" " " \
+"Asia/Calcutta" " " \
+"Asia/Chita" " " \
+"Asia/Choibalsan" " " \
+"Asia/Chongqing" " " \
+"Asia/Chungking" " " \
+"Asia/Colombo" " " \
+"Asia/Dacca" " " \
+"Asia/Damascus" " " \
+"Asia/Dhaka" " " \
+"Asia/Dili" " " \
+"Asia/Dubai" " " \
+"Asia/Dushanbe" " " \
+"Asia/Gaza" " " \
+"Asia/Harbin" " " \
+"Asia/Hebron" " " \
+"Asia/Ho_Chi_Minh" " " \
+"Asia/Hong_Kong" " " \
+"Asia/Hovd" " " \
+"Asia/Irkutsk" " " \
+"Asia/Istanbul" " " \
+"Asia/Jakarta" " " \
+"Asia/Jayapura" " " \
+"Asia/Jerusalem" " " \
+"Asia/Kabul" " " \
+"Asia/Kamchatka" " " \
+"Asia/Karachi" " " \
+"Asia/Kashgar" " " \
+"Asia/Kathmandu" " " \
+"Asia/Katmandu" " " \
+"Asia/Khandyga" " " \
+"Asia/Kolkata" " " \
+"Asia/Krasnoyarsk" " " \
+"Asia/Kuala_Lumpur" " " \
+"Asia/Kuching" " " \
+"Asia/Kuwait" " " \
+"Asia/Macao" " " \
+"Asia/Macau" " " \
+"Asia/Magadan" " " \
+"Asia/Makassar" " " \
+"Asia/Manila" " " \
+"Asia/Muscat" " " \
+"Asia/Nicosia" " " \
+"Asia/Novokuznetsk" " " \
+"Asia/Novosibirsk" " " \
+"Asia/Omsk" " " \
+"Asia/Oral" " " \
+"Asia/Phnom_Penh" " " \
+"Asia/Pontianak" " " \
+"Asia/Pyongyang" " " \
+"Asia/Qatar" " " \
+"Asia/Qyzylorda" " " \
+"Asia/Rangoon" " " \
+"Asia/Riyadh" " " \
+"Asia/Saigon" " " \
+"Asia/Sakhalin" " " \
+"Asia/Samarkand" " " \
+"Asia/Seoul" " " \
+"Asia/Shanghai" " " \
+"Asia/Singapore" " " \
+"Asia/Srednekolymsk" " " \
+"Asia/Taipei" " " \
+"Asia/Tashkent" " " \
+"Asia/Tbilisi" " " \
+"Asia/Tehran" " " \
+"Asia/Tel_Aviv" " " \
+"Asia/Thimbu" " " \
+"Asia/Thimphu" " " \
+"Asia/Tokyo" " " \
+"Asia/Ujung_Pandang" " " \
+"Asia/Ulaanbaatar" " " \
+"Asia/Ulan_Bator" " " \
+"Asia/Urumqi" " " \
+"Asia/Ust-Nera" " " \
+"Asia/Vientiane" " " \
+"Asia/Vladivostok" " " \
+"Asia/Yakutsk" " " \
+"Asia/Yekaterinburg" " " \
+"Asia/Yerevan" " " \
+"Atlantic/Azores" " " \
+"Atlantic/Bermuda" " " \
+"Atlantic/Canary" " " \
+"Atlantic/Cape_Verde" " " \
+"Atlantic/Faeroe" " " \
+"Atlantic/Faroe" " " \
+"Atlantic/Jan_Mayen" " " \
+"Atlantic/Madeira" " " \
+"Atlantic/Reykjavik" " " \
+"Atlantic/South_Georgia" " " \
+"Atlantic/St_Helena" " " \
+"Atlantic/Stanley" " " \
+"Australia/ACT" " " \
+"Australia/Adelaide" " " \
+"Australia/Brisbane" " " \
+"Australia/Broken_Hill" " " \
+"Australia/Canberra" " " \
+"Australia/Currie" " " \
+"Australia/Darwin" " " \
+"Australia/Eucla" " " \
+"Australia/Hobart" " " \
+"Australia/LHI" " " \
+"Australia/Lindeman" " " \
+"Australia/Lord_Howe" " " \
+"Australia/Melbourne" " " \
+"Australia/NSW" " " \
+"Australia/North" " " \
+"Australia/Perth" " " \
+"Australia/Queensland" " " \
+"Australia/South" " " \
+"Australia/Sydney" " " \
+"Australia/Tasmania" " " \
+"Australia/Victoria" " " \
+"Australia/West" " " \
+"Australia/Yancowinna" " " \
+"Brazil/Acre" " " \
+"Brazil/DeNoronha" " " \
+"Brazil/East" " " \
+"Brazil/West" " " \
+"CET" " " \
+"CST6CDT" " " \
+"Canada/Atlantic" " " \
+"Canada/Central" " " \
+"Canada/East-Saskatchewan" " " \
+"Canada/Eastern" " " \
+"Canada/Mountain" " " \
+"Canada/Newfoundland" " " \
+"Canada/Pacific" " " \
+"Canada/Saskatchewan" " " \
+"Canada/Yukon" " " \
+"Chile/Continental" " " \
+"Chile/EasterIsland" " " \
+"Cuba" " " \
+"EET" " " \
+"EST" " " \
+"EST5EDT" " " \
+"Egypt" " " \
+"Eire" " " \
+"Etc/GMT" " " \
+"Etc/GMT+0" " " \
+"Etc/GMT+1" " " \
+"Etc/GMT+10" " " \
+"Etc/GMT+11" " " \
+"Etc/GMT+12" " " \
+"Etc/GMT+2" " " \
+"Etc/GMT+3" " " \
+"Etc/GMT+4" " " \
+"Etc/GMT+5" " " \
+"Etc/GMT+6" " " \
+"Etc/GMT+7" " " \
+"Etc/GMT+8" " " \
+"Etc/GMT+9" " " \
+"Etc/GMT-0" " " \
+"Etc/GMT-1" " " \
+"Etc/GMT-10" " " \
+"Etc/GMT-11" " " \
+"Etc/GMT-12" " " \
+"Etc/GMT-13" " " \
+"Etc/GMT-14" " " \
+"Etc/GMT-2" " " \
+"Etc/GMT-3" " " \
+"Etc/GMT-4" " " \
+"Etc/GMT-5" " " \
+"Etc/GMT-6" " " \
+"Etc/GMT-7" " " \
+"Etc/GMT-8" " " \
+"Etc/GMT-9" " " \
+"Etc/GMT0" " " \
+"Etc/Greenwich" " " \
+"Etc/UCT" " " \
+"Etc/UTC" " " \
+"Etc/Universal" " " \
+"Etc/Zulu" " " \
+"Europe/Amsterdam" " " \
+"Europe/Andorra" " " \
+"Europe/Athens" " " \
+"Europe/Belfast" " " \
+"Europe/Belgrade" " " \
+"Europe/Berlin" " " \
+"Europe/Bratislava" " " \
+"Europe/Brussels" " " \
+"Europe/Bucharest" " " \
+"Europe/Budapest" " " \
+"Europe/Busingen" " " \
+"Europe/Chisinau" " " \
+"Europe/Copenhagen" " " \
+"Europe/Dublin" " " \
+"Europe/Gibraltar" " " \
+"Europe/Guernsey" " " \
+"Europe/Helsinki" " " \
+"Europe/Isle_of_Man" " " \
+"Europe/Istanbul" " " \
+"Europe/Jersey" " " \
+"Europe/Kaliningrad" " " \
+"Europe/Kiev" " " \
+"Europe/Lisbon" " " \
+"Europe/Ljubljana" " " \
+"Europe/London" " " \
+"Europe/Luxembourg" " " \
+"Europe/Madrid" " " \
+"Europe/Malta" " " \
+"Europe/Mariehamn" " " \
+"Europe/Minsk" " " \
+"Europe/Monaco" " " \
+"Europe/Moscow" " " \
+"Europe/Nicosia" " " \
+"Europe/Oslo" " " \
+"Europe/Paris" " " \
+"Europe/Podgorica" " " \
+"Europe/Prague" " " \
+"Europe/Riga" " " \
+"Europe/Rome" " " \
+"Europe/Samara" " " \
+"Europe/San_Marino" " " \
+"Europe/Sarajevo" " " \
+"Europe/Simferopol" " " \
+"Europe/Skopje" " " \
+"Europe/Sofia" " " \
+"Europe/Stockholm" " " \
+"Europe/Tallinn" " " \
+"Europe/Tirane" " " \
+"Europe/Tiraspol" " " \
+"Europe/Uzhgorod" " " \
+"Europe/Vaduz" " " \
+"Europe/Vatican" " " \
+"Europe/Vienna" " " \
+"Europe/Vilnius" " " \
+"Europe/Volgograd" " " \
+"Europe/Warsaw" " " \
+"Europe/Zagreb" " " \
+"Europe/Zaporozhye" " " \
+"Europe/Zurich" " " \
+"Factory" " " \
+"GB" " " \
+"GB-Eire" " " \
+"GMT" " " \
+"GMT+0" " " \
+"GMT-0" " " \
+"GMT0" " " \
+"Greenwich" " " \
+"HST" " " \
+"Hongkong" " " \
+"Iceland" " " \
+"Indian/Antananarivo" " " \
+"Indian/Chagos" " " \
+"Indian/Christmas" " " \
+"Indian/Cocos" " " \
+"Indian/Comoro" " " \
+"Indian/Kerguelen" " " \
+"Indian/Mahe" " " \
+"Indian/Maldives" " " \
+"Indian/Mauritius" " " \
+"Indian/Mayotte" " " \
+"Indian/Reunion" " " \
+"Iran" " " \
+"Israel" " " \
+"Jamaica" " " \
+"Japan" " " \
+"Kwajalein" " " \
+"Libya" " " \
+"MET" " " \
+"MST" " " \
+"MST7MDT" " " \
+"Mexico/BajaNorte" " " \
+"Mexico/BajaSur" " " \
+"Mexico/General" " " \
+"NZ" " " \
+"NZ-CHAT" " " \
+"Navajo" " " \
+"PRC" " " \
+"PST8PDT" " " \
+"Pacific/Apia" " " \
+"Pacific/Auckland" " " \
+"Pacific/Bougainville" " " \
+"Pacific/Chatham" " " \
+"Pacific/Chuuk" " " \
+"Pacific/Easter" " " \
+"Pacific/Efate" " " \
+"Pacific/Enderbury" " " \
+"Pacific/Fakaofo" " " \
+"Pacific/Fiji" " " \
+"Pacific/Funafuti" " " \
+"Pacific/Galapagos" " " \
+"Pacific/Gambier" " " \
+"Pacific/Guadalcanal" " " \
+"Pacific/Guam" " " \
+"Pacific/Honolulu" " " \
+"Pacific/Johnston" " " \
+"Pacific/Kiritimati" " " \
+"Pacific/Kosrae" " " \
+"Pacific/Kwajalein" " " \
+"Pacific/Majuro" " " \
+"Pacific/Marquesas" " " \
+"Pacific/Midway" " " \
+"Pacific/Nauru" " " \
+"Pacific/Niue" " " \
+"Pacific/Norfolk" " " \
+"Pacific/Noumea" " " \
+"Pacific/Pago_Pago" " " \
+"Pacific/Palau" " " \
+"Pacific/Pitcairn" " " \
+"Pacific/Pohnpei" " " \
+"Pacific/Ponape" " " \
+"Pacific/Port_Moresby" " " \
+"Pacific/Rarotonga" " " \
+"Pacific/Saipan" " " \
+"Pacific/Samoa" " " \
+"Pacific/Tahiti" " " \
+"Pacific/Tarawa" " " \
+"Pacific/Tongatapu" " " \
+"Pacific/Truk" " " \
+"Pacific/Wake" " " \
+"Pacific/Wallis" " " \
+"Pacific/Yap" " " \
+"Poland" " " \
+"Portugal" " " \
+"ROC" " " \
+"ROK" " " \
+"Singapore" " " \
+"Turkey" " " \
+"UCT" " " \
+"UTC" " " \
+"Universal" " " \
+"W-SU" " " \
+"WET" " " \
+"Zulu" " " \
+"posixrules" " " \
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/02 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/02
new file mode 100644
index 00000000..bd5a50bb
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/02
@@ -0,0 +1,28 @@
+ 2> $TMP/tz
+
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/tz
+ exit
+ fi
+
+ TIMEZONE="`cat $TMP/tz`"
+ rm -f $TMP/tz
+
+ setzone $TIMEZONE
+ exit
+else
+ ###
+ ### use text prompts
+ ###
+ while [ 0 ]; do
+ echo -n "Would you like to configure your timezone ([y]es, [n]o)? "
+ read TIMECONF;
+ echo
+
+ if [ "$TIMECONF" = "n" ]; then
+ break
+ fi
+
+ cat << EOF
+Select one of these timezones:
+
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/03 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/03
new file mode 100644
index 00000000..f595dfab
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/03
@@ -0,0 +1,585 @@
+US/Alaska
+US/Aleutian
+US/Arizona
+US/Central
+US/East-Indiana
+US/Eastern
+US/Hawaii
+US/Indiana-Starke
+US/Michigan
+US/Mountain
+US/Pacific
+US/Pacific-New
+US/Samoa
+Africa/Abidjan
+Africa/Accra
+Africa/Addis_Ababa
+Africa/Algiers
+Africa/Asmara
+Africa/Asmera
+Africa/Bamako
+Africa/Bangui
+Africa/Banjul
+Africa/Bissau
+Africa/Blantyre
+Africa/Brazzaville
+Africa/Bujumbura
+Africa/Cairo
+Africa/Casablanca
+Africa/Ceuta
+Africa/Conakry
+Africa/Dakar
+Africa/Dar_es_Salaam
+Africa/Djibouti
+Africa/Douala
+Africa/El_Aaiun
+Africa/Freetown
+Africa/Gaborone
+Africa/Harare
+Africa/Johannesburg
+Africa/Juba
+Africa/Kampala
+Africa/Khartoum
+Africa/Kigali
+Africa/Kinshasa
+Africa/Lagos
+Africa/Libreville
+Africa/Lome
+Africa/Luanda
+Africa/Lubumbashi
+Africa/Lusaka
+Africa/Malabo
+Africa/Maputo
+Africa/Maseru
+Africa/Mbabane
+Africa/Mogadishu
+Africa/Monrovia
+Africa/Nairobi
+Africa/Ndjamena
+Africa/Niamey
+Africa/Nouakchott
+Africa/Ouagadougou
+Africa/Porto-Novo
+Africa/Sao_Tome
+Africa/Timbuktu
+Africa/Tripoli
+Africa/Tunis
+Africa/Windhoek
+America/Adak
+America/Anchorage
+America/Anguilla
+America/Antigua
+America/Araguaina
+America/Argentina/Buenos_Aires
+America/Argentina/Catamarca
+America/Argentina/ComodRivadavia
+America/Argentina/Cordoba
+America/Argentina/Jujuy
+America/Argentina/La_Rioja
+America/Argentina/Mendoza
+America/Argentina/Rio_Gallegos
+America/Argentina/Salta
+America/Argentina/San_Juan
+America/Argentina/San_Luis
+America/Argentina/Tucuman
+America/Argentina/Ushuaia
+America/Aruba
+America/Asuncion
+America/Atikokan
+America/Atka
+America/Bahia
+America/Bahia_Banderas
+America/Barbados
+America/Belem
+America/Belize
+America/Blanc-Sablon
+America/Boa_Vista
+America/Bogota
+America/Boise
+America/Buenos_Aires
+America/Cambridge_Bay
+America/Campo_Grande
+America/Cancun
+America/Caracas
+America/Catamarca
+America/Cayenne
+America/Cayman
+America/Chicago
+America/Chihuahua
+America/Coral_Harbour
+America/Cordoba
+America/Costa_Rica
+America/Creston
+America/Cuiaba
+America/Curacao
+America/Danmarkshavn
+America/Dawson
+America/Dawson_Creek
+America/Denver
+America/Detroit
+America/Dominica
+America/Edmonton
+America/Eirunepe
+America/El_Salvador
+America/Ensenada
+America/Fort_Nelson
+America/Fort_Wayne
+America/Fortaleza
+America/Glace_Bay
+America/Godthab
+America/Goose_Bay
+America/Grand_Turk
+America/Grenada
+America/Guadeloupe
+America/Guatemala
+America/Guayaquil
+America/Guyana
+America/Halifax
+America/Havana
+America/Hermosillo
+America/Indiana/Indianapolis
+America/Indiana/Knox
+America/Indiana/Marengo
+America/Indiana/Petersburg
+America/Indiana/Tell_City
+America/Indiana/Vevay
+America/Indiana/Vincennes
+America/Indiana/Winamac
+America/Indianapolis
+America/Inuvik
+America/Iqaluit
+America/Jamaica
+America/Jujuy
+America/Juneau
+America/Kentucky/Louisville
+America/Kentucky/Monticello
+America/Knox_IN
+America/Kralendijk
+America/La_Paz
+America/Lima
+America/Los_Angeles
+America/Louisville
+America/Lower_Princes
+America/Maceio
+America/Managua
+America/Manaus
+America/Marigot
+America/Martinique
+America/Matamoros
+America/Mazatlan
+America/Mendoza
+America/Menominee
+America/Merida
+America/Metlakatla
+America/Mexico_City
+America/Miquelon
+America/Moncton
+America/Monterrey
+America/Montevideo
+America/Montreal
+America/Montserrat
+America/Nassau
+America/New_York
+America/Nipigon
+America/Nome
+America/Noronha
+America/North_Dakota/Beulah
+America/North_Dakota/Center
+America/North_Dakota/New_Salem
+America/Ojinaga
+America/Panama
+America/Pangnirtung
+America/Paramaribo
+America/Phoenix
+America/Port-au-Prince
+America/Port_of_Spain
+America/Porto_Acre
+America/Porto_Velho
+America/Puerto_Rico
+America/Rainy_River
+America/Rankin_Inlet
+America/Recife
+America/Regina
+America/Resolute
+America/Rio_Branco
+America/Rosario
+America/Santa_Isabel
+America/Santarem
+America/Santiago
+America/Santo_Domingo
+America/Sao_Paulo
+America/Scoresbysund
+America/Shiprock
+America/Sitka
+America/St_Barthelemy
+America/St_Johns
+America/St_Kitts
+America/St_Lucia
+America/St_Thomas
+America/St_Vincent
+America/Swift_Current
+America/Tegucigalpa
+America/Thule
+America/Thunder_Bay
+America/Tijuana
+America/Toronto
+America/Tortola
+America/Vancouver
+America/Virgin
+America/Whitehorse
+America/Winnipeg
+America/Yakutat
+America/Yellowknife
+Antarctica/Casey
+Antarctica/Davis
+Antarctica/DumontDUrville
+Antarctica/Macquarie
+Antarctica/Mawson
+Antarctica/McMurdo
+Antarctica/Palmer
+Antarctica/Rothera
+Antarctica/South_Pole
+Antarctica/Syowa
+Antarctica/Troll
+Antarctica/Vostok
+Arctic/Longyearbyen
+Asia/Aden
+Asia/Almaty
+Asia/Amman
+Asia/Anadyr
+Asia/Aqtau
+Asia/Aqtobe
+Asia/Ashgabat
+Asia/Ashkhabad
+Asia/Baghdad
+Asia/Bahrain
+Asia/Baku
+Asia/Bangkok
+Asia/Beirut
+Asia/Bishkek
+Asia/Brunei
+Asia/Calcutta
+Asia/Chita
+Asia/Choibalsan
+Asia/Chongqing
+Asia/Chungking
+Asia/Colombo
+Asia/Dacca
+Asia/Damascus
+Asia/Dhaka
+Asia/Dili
+Asia/Dubai
+Asia/Dushanbe
+Asia/Gaza
+Asia/Harbin
+Asia/Hebron
+Asia/Ho_Chi_Minh
+Asia/Hong_Kong
+Asia/Hovd
+Asia/Irkutsk
+Asia/Istanbul
+Asia/Jakarta
+Asia/Jayapura
+Asia/Jerusalem
+Asia/Kabul
+Asia/Kamchatka
+Asia/Karachi
+Asia/Kashgar
+Asia/Kathmandu
+Asia/Katmandu
+Asia/Khandyga
+Asia/Kolkata
+Asia/Krasnoyarsk
+Asia/Kuala_Lumpur
+Asia/Kuching
+Asia/Kuwait
+Asia/Macao
+Asia/Macau
+Asia/Magadan
+Asia/Makassar
+Asia/Manila
+Asia/Muscat
+Asia/Nicosia
+Asia/Novokuznetsk
+Asia/Novosibirsk
+Asia/Omsk
+Asia/Oral
+Asia/Phnom_Penh
+Asia/Pontianak
+Asia/Pyongyang
+Asia/Qatar
+Asia/Qyzylorda
+Asia/Rangoon
+Asia/Riyadh
+Asia/Saigon
+Asia/Sakhalin
+Asia/Samarkand
+Asia/Seoul
+Asia/Shanghai
+Asia/Singapore
+Asia/Srednekolymsk
+Asia/Taipei
+Asia/Tashkent
+Asia/Tbilisi
+Asia/Tehran
+Asia/Tel_Aviv
+Asia/Thimbu
+Asia/Thimphu
+Asia/Tokyo
+Asia/Ujung_Pandang
+Asia/Ulaanbaatar
+Asia/Ulan_Bator
+Asia/Urumqi
+Asia/Ust-Nera
+Asia/Vientiane
+Asia/Vladivostok
+Asia/Yakutsk
+Asia/Yekaterinburg
+Asia/Yerevan
+Atlantic/Azores
+Atlantic/Bermuda
+Atlantic/Canary
+Atlantic/Cape_Verde
+Atlantic/Faeroe
+Atlantic/Faroe
+Atlantic/Jan_Mayen
+Atlantic/Madeira
+Atlantic/Reykjavik
+Atlantic/South_Georgia
+Atlantic/St_Helena
+Atlantic/Stanley
+Australia/ACT
+Australia/Adelaide
+Australia/Brisbane
+Australia/Broken_Hill
+Australia/Canberra
+Australia/Currie
+Australia/Darwin
+Australia/Eucla
+Australia/Hobart
+Australia/LHI
+Australia/Lindeman
+Australia/Lord_Howe
+Australia/Melbourne
+Australia/NSW
+Australia/North
+Australia/Perth
+Australia/Queensland
+Australia/South
+Australia/Sydney
+Australia/Tasmania
+Australia/Victoria
+Australia/West
+Australia/Yancowinna
+Brazil/Acre
+Brazil/DeNoronha
+Brazil/East
+Brazil/West
+CET
+CST6CDT
+Canada/Atlantic
+Canada/Central
+Canada/East-Saskatchewan
+Canada/Eastern
+Canada/Mountain
+Canada/Newfoundland
+Canada/Pacific
+Canada/Saskatchewan
+Canada/Yukon
+Chile/Continental
+Chile/EasterIsland
+Cuba
+EET
+EST
+EST5EDT
+Egypt
+Eire
+Etc/GMT
+Etc/GMT+0
+Etc/GMT+1
+Etc/GMT+10
+Etc/GMT+11
+Etc/GMT+12
+Etc/GMT+2
+Etc/GMT+3
+Etc/GMT+4
+Etc/GMT+5
+Etc/GMT+6
+Etc/GMT+7
+Etc/GMT+8
+Etc/GMT+9
+Etc/GMT-0
+Etc/GMT-1
+Etc/GMT-10
+Etc/GMT-11
+Etc/GMT-12
+Etc/GMT-13
+Etc/GMT-14
+Etc/GMT-2
+Etc/GMT-3
+Etc/GMT-4
+Etc/GMT-5
+Etc/GMT-6
+Etc/GMT-7
+Etc/GMT-8
+Etc/GMT-9
+Etc/GMT0
+Etc/Greenwich
+Etc/UCT
+Etc/UTC
+Etc/Universal
+Etc/Zulu
+Europe/Amsterdam
+Europe/Andorra
+Europe/Athens
+Europe/Belfast
+Europe/Belgrade
+Europe/Berlin
+Europe/Bratislava
+Europe/Brussels
+Europe/Bucharest
+Europe/Budapest
+Europe/Busingen
+Europe/Chisinau
+Europe/Copenhagen
+Europe/Dublin
+Europe/Gibraltar
+Europe/Guernsey
+Europe/Helsinki
+Europe/Isle_of_Man
+Europe/Istanbul
+Europe/Jersey
+Europe/Kaliningrad
+Europe/Kiev
+Europe/Lisbon
+Europe/Ljubljana
+Europe/London
+Europe/Luxembourg
+Europe/Madrid
+Europe/Malta
+Europe/Mariehamn
+Europe/Minsk
+Europe/Monaco
+Europe/Moscow
+Europe/Nicosia
+Europe/Oslo
+Europe/Paris
+Europe/Podgorica
+Europe/Prague
+Europe/Riga
+Europe/Rome
+Europe/Samara
+Europe/San_Marino
+Europe/Sarajevo
+Europe/Simferopol
+Europe/Skopje
+Europe/Sofia
+Europe/Stockholm
+Europe/Tallinn
+Europe/Tirane
+Europe/Tiraspol
+Europe/Uzhgorod
+Europe/Vaduz
+Europe/Vatican
+Europe/Vienna
+Europe/Vilnius
+Europe/Volgograd
+Europe/Warsaw
+Europe/Zagreb
+Europe/Zaporozhye
+Europe/Zurich
+Factory
+GB
+GB-Eire
+GMT
+GMT+0
+GMT-0
+GMT0
+Greenwich
+HST
+Hongkong
+Iceland
+Indian/Antananarivo
+Indian/Chagos
+Indian/Christmas
+Indian/Cocos
+Indian/Comoro
+Indian/Kerguelen
+Indian/Mahe
+Indian/Maldives
+Indian/Mauritius
+Indian/Mayotte
+Indian/Reunion
+Iran
+Israel
+Jamaica
+Japan
+Kwajalein
+Libya
+MET
+MST
+MST7MDT
+Mexico/BajaNorte
+Mexico/BajaSur
+Mexico/General
+NZ
+NZ-CHAT
+Navajo
+PRC
+PST8PDT
+Pacific/Apia
+Pacific/Auckland
+Pacific/Bougainville
+Pacific/Chatham
+Pacific/Chuuk
+Pacific/Easter
+Pacific/Efate
+Pacific/Enderbury
+Pacific/Fakaofo
+Pacific/Fiji
+Pacific/Funafuti
+Pacific/Galapagos
+Pacific/Gambier
+Pacific/Guadalcanal
+Pacific/Guam
+Pacific/Honolulu
+Pacific/Johnston
+Pacific/Kiritimati
+Pacific/Kosrae
+Pacific/Kwajalein
+Pacific/Majuro
+Pacific/Marquesas
+Pacific/Midway
+Pacific/Nauru
+Pacific/Niue
+Pacific/Norfolk
+Pacific/Noumea
+Pacific/Pago_Pago
+Pacific/Palau
+Pacific/Pitcairn
+Pacific/Pohnpei
+Pacific/Ponape
+Pacific/Port_Moresby
+Pacific/Rarotonga
+Pacific/Saipan
+Pacific/Samoa
+Pacific/Tahiti
+Pacific/Tarawa
+Pacific/Tongatapu
+Pacific/Truk
+Pacific/Wake
+Pacific/Wallis
+Pacific/Yap
+Poland
+Portugal
+ROC
+ROK
+Singapore
+Turkey
+UCT
+UTC
+Universal
+W-SU
+WET
+Zulu
+posixrules
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/04 b/patches/source/glibc-zoneinfo/timezone-scripts/parts/04
new file mode 100644
index 00000000..5b0da0e8
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/04
@@ -0,0 +1,33 @@
+
+Type it at the prompt below exactly as it appears above. (NOTE: If you don't
+see your timezone, use "timeconfig" again after booting for the verbose list)
+
+EOF
+ echo -n "Timezone? "
+ read TIMEZONE;
+ echo
+
+ if [ -n "$TIMEZONE" -a \
+ -r $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TIMEZONE -o \
+ -L $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TIMEZONE ]; then
+ echo "Creating link from $TIMEZONE to localtime in /etc..."
+ echo
+ setzone $TIMEZONE
+ exit
+ else
+ cat << EOF
+
+Timezone $TIMEZONE could not be found. You may try again if you wish.
+Make sure you type the name exactly as it appears - this configuration script
+is case sensitive.
+
+Press [enter] to continue.
+
+EOF
+ read JUNK;
+ fi
+ done
+fi
+
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/parts/README b/patches/source/glibc-zoneinfo/timezone-scripts/parts/README
new file mode 100644
index 00000000..80d5cf5b
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/parts/README
@@ -0,0 +1,2 @@
+Files 01 and 03 are samples, showing the format, and are
+not necessarily up to date...
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig b/patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig
new file mode 100644
index 00000000..81ff7055
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/setup.timeconfig
@@ -0,0 +1,3 @@
+#!/bin/sh
+#BLURB="Select your timezone"
+sh usr/sbin/timeconfig $*
diff --git a/patches/source/glibc-zoneinfo/timezone-scripts/timeconfig b/patches/source/glibc-zoneinfo/timezone-scripts/timeconfig
new file mode 100644
index 00000000..0fa59ac0
--- /dev/null
+++ b/patches/source/glibc-zoneinfo/timezone-scripts/timeconfig
@@ -0,0 +1,1363 @@
+#!/bin/sh
+#
+# timeconfig Slackware Linux timezone configuration utility.
+#
+# Author: Patrick Volkerding <volkerdi@slackware.com>
+# Modified by: David Cantrell <david@slackware.com>, 06-Oct-2000
+#
+# ChangeLog:
+# 2014-10-22: Updated timezones from tzdata2014i. <pjv>
+# 2012-12-12: Updated timezones from tzdata2012j. <pjv>
+# 2008-03-10: Updated timezones from tzdata2008a. <pjv>
+# 2007-12-21: Updated timezones from tzdata2007j. <pjv>
+# 2006-12-03: Updated timezones from tzdata2006p. <pjv>
+# 2006-09-14: Updated timezones from tzdata2006k. <pjv>
+# 2006-08-22: Updated timezones from tzdata2006j.
+# 2006-08-13: Updated timezones from tzdata2006g.
+# 2006-03-13: Updated timezones from tzdata2006c.
+# 19-Feb-2001 Add new timezones from glibc-2.2.2.
+# 06-Oct-2000 Fixed a problem with selecting UTC time. It was writing
+# the hardwareclock file to the root disk and not your dest
+# partition. Changed the HWCLOCK_CONF variable to be
+# $T_PX/etc/hardwareclock to fix this. Thanks to David L.
+# Dickman <softbear@optonline.net> for finding this and
+# submitting a patch.
+#
+# 15-Mar-2000 Added the writeconf function to write out the
+# /etc/hardwareclock file which tells what the hardware clock
+# is set to (UTC or localtime).
+#
+# 03-Mar-2000 Reorganized script. Made one timezone set block, added
+# stage that asks the user if the hardware clock is set to
+# UTC.
+
+# setup our temp locations and variables
+TMP=/var/log/setup/tmp
+if [ -r $TMP/SeTT_PX ]; then
+ T_PX="`cat $TMP/SeTT_PX`"
+elif [ ! "$!" = "" ]; then
+ T_PX=$1
+else
+ T_PX=/
+fi
+
+# the hardware clock configuration file
+HWCLOCK_CONF=$T_PX/etc/hardwareclock
+
+# setzone( $TIMEZONE )
+#
+# This function accepts a time zone as the only parameter and sets it as
+# the default system time zone.
+setzone()
+{
+ TZ=$1
+
+ cd $T_PX/etc
+ if [ -r $T_PX/usr/share/zoneinfo/$TZ -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TZ -o \
+ -L $T_PX/usr/share/zoneinfo/$TZ -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TZ ]; then
+ rm -f localtime-copied-from
+ ln -sf /usr/share/zoneinfo/$TZ localtime-copied-from
+ rm -f localtime
+ cd ..
+ chroot . cp etc/localtime-copied-from etc/localtime
+ fi
+}
+
+# writeconf( $CLOCK_SET_TO )
+#
+# Writes out $HWCLOCK_CONF that tells rc.S how the hardware clock
+# value is stored.
+writeconf()
+{
+ echo "# /etc/hardwareclock" > $HWCLOCK_CONF
+ echo "#" >> $HWCLOCK_CONF
+ echo "# Tells how the hardware clock time is stored." >> $HWCLOCK_CONF
+ echo "# You should run timeconfig to edit this file." >> $HWCLOCK_CONF
+ echo >> $HWCLOCK_CONF
+ echo $1 >> $HWCLOCK_CONF
+}
+
+# ask the user if the hardware clock is set for UTC/GMT
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "HARDWARE CLOCK SET TO UTC?" --menu "Is the hardware clock set \
+to Coordinated Universal Time (UTC/GMT)? If it is, select YES here. If the \
+hardware clock is set to the current local time (this is how most PCs are set \
+up), then say NO here. If you are not sure what this is, you should answer NO \
+here." 13 60 2 \
+ "NO" "Hardware clock is set to local time" \
+ "YES" "Hardware clock is set to UTC" \
+ 2> $TMP/utc
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/utc
+ exit
+ fi
+ if [ "`cat $TMP/utc`" = "YES" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else # must be NO
+ writeconf "localtime"
+ fi
+ rm -f $TMP/utc
+else
+ ###
+ ### use text prompts
+ ###
+ echo "Is the hardware clock set to Coordinated Universal Time (UTC/GMT)?"
+ echo "If it is, select 'y' here. If the hardware clock is set to the"
+ echo "current local time (this is how most PCs are set up), then say 'n'"
+ echo "here. If you are not sure what this is, you should answer 'n' here."
+ echo
+ echo -n "Is your hardware clock set to UTC ([y]es, [n]o)? "
+ read HEJAZ
+
+ if [ "$HEJAZ" = "y" -o "$HEJAZ" = "Y" -o "$HEJAZ" = "YES" -o "$HEJAZ" = "yes" ]; then
+ # yes, the hardware clock is UTC
+ writeconf "UTC"
+ else
+ # default to localtime
+ writeconf "localtime"
+ fi
+fi
+
+# Now set the correct timezone link:
+if [ "$COLOR" = "on" -o -r $TMP/SeTcolor -o "$T_PX" = "/" ]; then
+ ###
+ ### use color menus here
+ ###
+ dialog --title "TIMEZONE CONFIGURATION" --menu "Please select one of the following timezones for your machine:" 21 50 13 \
+"US/Alaska" " " \
+"US/Aleutian" " " \
+"US/Arizona" " " \
+"US/Central" " " \
+"US/East-Indiana" " " \
+"US/Eastern" " " \
+"US/Hawaii" " " \
+"US/Indiana-Starke" " " \
+"US/Michigan" " " \
+"US/Mountain" " " \
+"US/Pacific" " " \
+"US/Pacific-New" " " \
+"US/Samoa" " " \
+"Africa/Abidjan" " " \
+"Africa/Accra" " " \
+"Africa/Addis_Ababa" " " \
+"Africa/Algiers" " " \
+"Africa/Asmara" " " \
+"Africa/Asmera" " " \
+"Africa/Bamako" " " \
+"Africa/Bangui" " " \
+"Africa/Banjul" " " \
+"Africa/Bissau" " " \
+"Africa/Blantyre" " " \
+"Africa/Brazzaville" " " \
+"Africa/Bujumbura" " " \
+"Africa/Cairo" " " \
+"Africa/Casablanca" " " \
+"Africa/Ceuta" " " \
+"Africa/Conakry" " " \
+"Africa/Dakar" " " \
+"Africa/Dar_es_Salaam" " " \
+"Africa/Djibouti" " " \
+"Africa/Douala" " " \
+"Africa/El_Aaiun" " " \
+"Africa/Freetown" " " \
+"Africa/Gaborone" " " \
+"Africa/Harare" " " \
+"Africa/Johannesburg" " " \
+"Africa/Juba" " " \
+"Africa/Kampala" " " \
+"Africa/Khartoum" " " \
+"Africa/Kigali" " " \
+"Africa/Kinshasa" " " \
+"Africa/Lagos" " " \
+"Africa/Libreville" " " \
+"Africa/Lome" " " \
+"Africa/Luanda" " " \
+"Africa/Lubumbashi" " " \
+"Africa/Lusaka" " " \
+"Africa/Malabo" " " \
+"Africa/Maputo" " " \
+"Africa/Maseru" " " \
+"Africa/Mbabane" " " \
+"Africa/Mogadishu" " " \
+"Africa/Monrovia" " " \
+"Africa/Nairobi" " " \
+"Africa/Ndjamena" " " \
+"Africa/Niamey" " " \
+"Africa/Nouakchott" " " \
+"Africa/Ouagadougou" " " \
+"Africa/Porto-Novo" " " \
+"Africa/Sao_Tome" " " \
+"Africa/Timbuktu" " " \
+"Africa/Tripoli" " " \
+"Africa/Tunis" " " \
+"Africa/Windhoek" " " \
+"America/Adak" " " \
+"America/Anchorage" " " \
+"America/Anguilla" " " \
+"America/Antigua" " " \
+"America/Araguaina" " " \
+"America/Argentina/Buenos_Aires" " " \
+"America/Argentina/Catamarca" " " \
+"America/Argentina/ComodRivadavia" " " \
+"America/Argentina/Cordoba" " " \
+"America/Argentina/Jujuy" " " \
+"America/Argentina/La_Rioja" " " \
+"America/Argentina/Mendoza" " " \
+"America/Argentina/Rio_Gallegos" " " \
+"America/Argentina/Salta" " " \
+"America/Argentina/San_Juan" " " \
+"America/Argentina/San_Luis" " " \
+"America/Argentina/Tucuman" " " \
+"America/Argentina/Ushuaia" " " \
+"America/Aruba" " " \
+"America/Asuncion" " " \
+"America/Atikokan" " " \
+"America/Atka" " " \
+"America/Bahia" " " \
+"America/Bahia_Banderas" " " \
+"America/Barbados" " " \
+"America/Belem" " " \
+"America/Belize" " " \
+"America/Blanc-Sablon" " " \
+"America/Boa_Vista" " " \
+"America/Bogota" " " \
+"America/Boise" " " \
+"America/Buenos_Aires" " " \
+"America/Cambridge_Bay" " " \
+"America/Campo_Grande" " " \
+"America/Cancun" " " \
+"America/Caracas" " " \
+"America/Catamarca" " " \
+"America/Cayenne" " " \
+"America/Cayman" " " \
+"America/Chicago" " " \
+"America/Chihuahua" " " \
+"America/Coral_Harbour" " " \
+"America/Cordoba" " " \
+"America/Costa_Rica" " " \
+"America/Creston" " " \
+"America/Cuiaba" " " \
+"America/Curacao" " " \
+"America/Danmarkshavn" " " \
+"America/Dawson" " " \
+"America/Dawson_Creek" " " \
+"America/Denver" " " \
+"America/Detroit" " " \
+"America/Dominica" " " \
+"America/Edmonton" " " \
+"America/Eirunepe" " " \
+"America/El_Salvador" " " \
+"America/Ensenada" " " \
+"America/Fort_Nelson" " " \
+"America/Fort_Wayne" " " \
+"America/Fortaleza" " " \
+"America/Glace_Bay" " " \
+"America/Godthab" " " \
+"America/Goose_Bay" " " \
+"America/Grand_Turk" " " \
+"America/Grenada" " " \
+"America/Guadeloupe" " " \
+"America/Guatemala" " " \
+"America/Guayaquil" " " \
+"America/Guyana" " " \
+"America/Halifax" " " \
+"America/Havana" " " \
+"America/Hermosillo" " " \
+"America/Indiana/Indianapolis" " " \
+"America/Indiana/Knox" " " \
+"America/Indiana/Marengo" " " \
+"America/Indiana/Petersburg" " " \
+"America/Indiana/Tell_City" " " \
+"America/Indiana/Vevay" " " \
+"America/Indiana/Vincennes" " " \
+"America/Indiana/Winamac" " " \
+"America/Indianapolis" " " \
+"America/Inuvik" " " \
+"America/Iqaluit" " " \
+"America/Jamaica" " " \
+"America/Jujuy" " " \
+"America/Juneau" " " \
+"America/Kentucky/Louisville" " " \
+"America/Kentucky/Monticello" " " \
+"America/Knox_IN" " " \
+"America/Kralendijk" " " \
+"America/La_Paz" " " \
+"America/Lima" " " \
+"America/Los_Angeles" " " \
+"America/Louisville" " " \
+"America/Lower_Princes" " " \
+"America/Maceio" " " \
+"America/Managua" " " \
+"America/Manaus" " " \
+"America/Marigot" " " \
+"America/Martinique" " " \
+"America/Matamoros" " " \
+"America/Mazatlan" " " \
+"America/Mendoza" " " \
+"America/Menominee" " " \
+"America/Merida" " " \
+"America/Metlakatla" " " \
+"America/Mexico_City" " " \
+"America/Miquelon" " " \
+"America/Moncton" " " \
+"America/Monterrey" " " \
+"America/Montevideo" " " \
+"America/Montreal" " " \
+"America/Montserrat" " " \
+"America/Nassau" " " \
+"America/New_York" " " \
+"America/Nipigon" " " \
+"America/Nome" " " \
+"America/Noronha" " " \
+"America/North_Dakota/Beulah" " " \
+"America/North_Dakota/Center" " " \
+"America/North_Dakota/New_Salem" " " \
+"America/Ojinaga" " " \
+"America/Panama" " " \
+"America/Pangnirtung" " " \
+"America/Paramaribo" " " \
+"America/Phoenix" " " \
+"America/Port-au-Prince" " " \
+"America/Port_of_Spain" " " \
+"America/Porto_Acre" " " \
+"America/Porto_Velho" " " \
+"America/Puerto_Rico" " " \
+"America/Rainy_River" " " \
+"America/Rankin_Inlet" " " \
+"America/Recife" " " \
+"America/Regina" " " \
+"America/Resolute" " " \
+"America/Rio_Branco" " " \
+"America/Rosario" " " \
+"America/Santa_Isabel" " " \
+"America/Santarem" " " \
+"America/Santiago" " " \
+"America/Santo_Domingo" " " \
+"America/Sao_Paulo" " " \
+"America/Scoresbysund" " " \
+"America/Shiprock" " " \
+"America/Sitka" " " \
+"America/St_Barthelemy" " " \
+"America/St_Johns" " " \
+"America/St_Kitts" " " \
+"America/St_Lucia" " " \
+"America/St_Thomas" " " \
+"America/St_Vincent" " " \
+"America/Swift_Current" " " \
+"America/Tegucigalpa" " " \
+"America/Thule" " " \
+"America/Thunder_Bay" " " \
+"America/Tijuana" " " \
+"America/Toronto" " " \
+"America/Tortola" " " \
+"America/Vancouver" " " \
+"America/Virgin" " " \
+"America/Whitehorse" " " \
+"America/Winnipeg" " " \
+"America/Yakutat" " " \
+"America/Yellowknife" " " \
+"Antarctica/Casey" " " \
+"Antarctica/Davis" " " \
+"Antarctica/DumontDUrville" " " \
+"Antarctica/Macquarie" " " \
+"Antarctica/Mawson" " " \
+"Antarctica/McMurdo" " " \
+"Antarctica/Palmer" " " \
+"Antarctica/Rothera" " " \
+"Antarctica/South_Pole" " " \
+"Antarctica/Syowa" " " \
+"Antarctica/Troll" " " \
+"Antarctica/Vostok" " " \
+"Arctic/Longyearbyen" " " \
+"Asia/Aden" " " \
+"Asia/Almaty" " " \
+"Asia/Amman" " " \
+"Asia/Anadyr" " " \
+"Asia/Aqtau" " " \
+"Asia/Aqtobe" " " \
+"Asia/Ashgabat" " " \
+"Asia/Ashkhabad" " " \
+"Asia/Baghdad" " " \
+"Asia/Bahrain" " " \
+"Asia/Baku" " " \
+"Asia/Bangkok" " " \
+"Asia/Beirut" " " \
+"Asia/Bishkek" " " \
+"Asia/Brunei" " " \
+"Asia/Calcutta" " " \
+"Asia/Chita" " " \
+"Asia/Choibalsan" " " \
+"Asia/Chongqing" " " \
+"Asia/Chungking" " " \
+"Asia/Colombo" " " \
+"Asia/Dacca" " " \
+"Asia/Damascus" " " \
+"Asia/Dhaka" " " \
+"Asia/Dili" " " \
+"Asia/Dubai" " " \
+"Asia/Dushanbe" " " \
+"Asia/Gaza" " " \
+"Asia/Harbin" " " \
+"Asia/Hebron" " " \
+"Asia/Ho_Chi_Minh" " " \
+"Asia/Hong_Kong" " " \
+"Asia/Hovd" " " \
+"Asia/Irkutsk" " " \
+"Asia/Istanbul" " " \
+"Asia/Jakarta" " " \
+"Asia/Jayapura" " " \
+"Asia/Jerusalem" " " \
+"Asia/Kabul" " " \
+"Asia/Kamchatka" " " \
+"Asia/Karachi" " " \
+"Asia/Kashgar" " " \
+"Asia/Kathmandu" " " \
+"Asia/Katmandu" " " \
+"Asia/Khandyga" " " \
+"Asia/Kolkata" " " \
+"Asia/Krasnoyarsk" " " \
+"Asia/Kuala_Lumpur" " " \
+"Asia/Kuching" " " \
+"Asia/Kuwait" " " \
+"Asia/Macao" " " \
+"Asia/Macau" " " \
+"Asia/Magadan" " " \
+"Asia/Makassar" " " \
+"Asia/Manila" " " \
+"Asia/Muscat" " " \
+"Asia/Nicosia" " " \
+"Asia/Novokuznetsk" " " \
+"Asia/Novosibirsk" " " \
+"Asia/Omsk" " " \
+"Asia/Oral" " " \
+"Asia/Phnom_Penh" " " \
+"Asia/Pontianak" " " \
+"Asia/Pyongyang" " " \
+"Asia/Qatar" " " \
+"Asia/Qyzylorda" " " \
+"Asia/Rangoon" " " \
+"Asia/Riyadh" " " \
+"Asia/Saigon" " " \
+"Asia/Sakhalin" " " \
+"Asia/Samarkand" " " \
+"Asia/Seoul" " " \
+"Asia/Shanghai" " " \
+"Asia/Singapore" " " \
+"Asia/Srednekolymsk" " " \
+"Asia/Taipei" " " \
+"Asia/Tashkent" " " \
+"Asia/Tbilisi" " " \
+"Asia/Tehran" " " \
+"Asia/Tel_Aviv" " " \
+"Asia/Thimbu" " " \
+"Asia/Thimphu" " " \
+"Asia/Tokyo" " " \
+"Asia/Ujung_Pandang" " " \
+"Asia/Ulaanbaatar" " " \
+"Asia/Ulan_Bator" " " \
+"Asia/Urumqi" " " \
+"Asia/Ust-Nera" " " \
+"Asia/Vientiane" " " \
+"Asia/Vladivostok" " " \
+"Asia/Yakutsk" " " \
+"Asia/Yekaterinburg" " " \
+"Asia/Yerevan" " " \
+"Atlantic/Azores" " " \
+"Atlantic/Bermuda" " " \
+"Atlantic/Canary" " " \
+"Atlantic/Cape_Verde" " " \
+"Atlantic/Faeroe" " " \
+"Atlantic/Faroe" " " \
+"Atlantic/Jan_Mayen" " " \
+"Atlantic/Madeira" " " \
+"Atlantic/Reykjavik" " " \
+"Atlantic/South_Georgia" " " \
+"Atlantic/St_Helena" " " \
+"Atlantic/Stanley" " " \
+"Australia/ACT" " " \
+"Australia/Adelaide" " " \
+"Australia/Brisbane" " " \
+"Australia/Broken_Hill" " " \
+"Australia/Canberra" " " \
+"Australia/Currie" " " \
+"Australia/Darwin" " " \
+"Australia/Eucla" " " \
+"Australia/Hobart" " " \
+"Australia/LHI" " " \
+"Australia/Lindeman" " " \
+"Australia/Lord_Howe" " " \
+"Australia/Melbourne" " " \
+"Australia/NSW" " " \
+"Australia/North" " " \
+"Australia/Perth" " " \
+"Australia/Queensland" " " \
+"Australia/South" " " \
+"Australia/Sydney" " " \
+"Australia/Tasmania" " " \
+"Australia/Victoria" " " \
+"Australia/West" " " \
+"Australia/Yancowinna" " " \
+"Brazil/Acre" " " \
+"Brazil/DeNoronha" " " \
+"Brazil/East" " " \
+"Brazil/West" " " \
+"CET" " " \
+"CST6CDT" " " \
+"Canada/Atlantic" " " \
+"Canada/Central" " " \
+"Canada/East-Saskatchewan" " " \
+"Canada/Eastern" " " \
+"Canada/Mountain" " " \
+"Canada/Newfoundland" " " \
+"Canada/Pacific" " " \
+"Canada/Saskatchewan" " " \
+"Canada/Yukon" " " \
+"Chile/Continental" " " \
+"Chile/EasterIsland" " " \
+"Cuba" " " \
+"EET" " " \
+"EST" " " \
+"EST5EDT" " " \
+"Egypt" " " \
+"Eire" " " \
+"Etc/GMT" " " \
+"Etc/GMT+0" " " \
+"Etc/GMT+1" " " \
+"Etc/GMT+10" " " \
+"Etc/GMT+11" " " \
+"Etc/GMT+12" " " \
+"Etc/GMT+2" " " \
+"Etc/GMT+3" " " \
+"Etc/GMT+4" " " \
+"Etc/GMT+5" " " \
+"Etc/GMT+6" " " \
+"Etc/GMT+7" " " \
+"Etc/GMT+8" " " \
+"Etc/GMT+9" " " \
+"Etc/GMT-0" " " \
+"Etc/GMT-1" " " \
+"Etc/GMT-10" " " \
+"Etc/GMT-11" " " \
+"Etc/GMT-12" " " \
+"Etc/GMT-13" " " \
+"Etc/GMT-14" " " \
+"Etc/GMT-2" " " \
+"Etc/GMT-3" " " \
+"Etc/GMT-4" " " \
+"Etc/GMT-5" " " \
+"Etc/GMT-6" " " \
+"Etc/GMT-7" " " \
+"Etc/GMT-8" " " \
+"Etc/GMT-9" " " \
+"Etc/GMT0" " " \
+"Etc/Greenwich" " " \
+"Etc/UCT" " " \
+"Etc/UTC" " " \
+"Etc/Universal" " " \
+"Etc/Zulu" " " \
+"Europe/Amsterdam" " " \
+"Europe/Andorra" " " \
+"Europe/Athens" " " \
+"Europe/Belfast" " " \
+"Europe/Belgrade" " " \
+"Europe/Berlin" " " \
+"Europe/Bratislava" " " \
+"Europe/Brussels" " " \
+"Europe/Bucharest" " " \
+"Europe/Budapest" " " \
+"Europe/Busingen" " " \
+"Europe/Chisinau" " " \
+"Europe/Copenhagen" " " \
+"Europe/Dublin" " " \
+"Europe/Gibraltar" " " \
+"Europe/Guernsey" " " \
+"Europe/Helsinki" " " \
+"Europe/Isle_of_Man" " " \
+"Europe/Istanbul" " " \
+"Europe/Jersey" " " \
+"Europe/Kaliningrad" " " \
+"Europe/Kiev" " " \
+"Europe/Lisbon" " " \
+"Europe/Ljubljana" " " \
+"Europe/London" " " \
+"Europe/Luxembourg" " " \
+"Europe/Madrid" " " \
+"Europe/Malta" " " \
+"Europe/Mariehamn" " " \
+"Europe/Minsk" " " \
+"Europe/Monaco" " " \
+"Europe/Moscow" " " \
+"Europe/Nicosia" " " \
+"Europe/Oslo" " " \
+"Europe/Paris" " " \
+"Europe/Podgorica" " " \
+"Europe/Prague" " " \
+"Europe/Riga" " " \
+"Europe/Rome" " " \
+"Europe/Samara" " " \
+"Europe/San_Marino" " " \
+"Europe/Sarajevo" " " \
+"Europe/Simferopol" " " \
+"Europe/Skopje" " " \
+"Europe/Sofia" " " \
+"Europe/Stockholm" " " \
+"Europe/Tallinn" " " \
+"Europe/Tirane" " " \
+"Europe/Tiraspol" " " \
+"Europe/Uzhgorod" " " \
+"Europe/Vaduz" " " \
+"Europe/Vatican" " " \
+"Europe/Vienna" " " \
+"Europe/Vilnius" " " \
+"Europe/Volgograd" " " \
+"Europe/Warsaw" " " \
+"Europe/Zagreb" " " \
+"Europe/Zaporozhye" " " \
+"Europe/Zurich" " " \
+"Factory" " " \
+"GB" " " \
+"GB-Eire" " " \
+"GMT" " " \
+"GMT+0" " " \
+"GMT-0" " " \
+"GMT0" " " \
+"Greenwich" " " \
+"HST" " " \
+"Hongkong" " " \
+"Iceland" " " \
+"Indian/Antananarivo" " " \
+"Indian/Chagos" " " \
+"Indian/Christmas" " " \
+"Indian/Cocos" " " \
+"Indian/Comoro" " " \
+"Indian/Kerguelen" " " \
+"Indian/Mahe" " " \
+"Indian/Maldives" " " \
+"Indian/Mauritius" " " \
+"Indian/Mayotte" " " \
+"Indian/Reunion" " " \
+"Iran" " " \
+"Israel" " " \
+"Jamaica" " " \
+"Japan" " " \
+"Kwajalein" " " \
+"Libya" " " \
+"MET" " " \
+"MST" " " \
+"MST7MDT" " " \
+"Mexico/BajaNorte" " " \
+"Mexico/BajaSur" " " \
+"Mexico/General" " " \
+"NZ" " " \
+"NZ-CHAT" " " \
+"Navajo" " " \
+"PRC" " " \
+"PST8PDT" " " \
+"Pacific/Apia" " " \
+"Pacific/Auckland" " " \
+"Pacific/Bougainville" " " \
+"Pacific/Chatham" " " \
+"Pacific/Chuuk" " " \
+"Pacific/Easter" " " \
+"Pacific/Efate" " " \
+"Pacific/Enderbury" " " \
+"Pacific/Fakaofo" " " \
+"Pacific/Fiji" " " \
+"Pacific/Funafuti" " " \
+"Pacific/Galapagos" " " \
+"Pacific/Gambier" " " \
+"Pacific/Guadalcanal" " " \
+"Pacific/Guam" " " \
+"Pacific/Honolulu" " " \
+"Pacific/Johnston" " " \
+"Pacific/Kiritimati" " " \
+"Pacific/Kosrae" " " \
+"Pacific/Kwajalein" " " \
+"Pacific/Majuro" " " \
+"Pacific/Marquesas" " " \
+"Pacific/Midway" " " \
+"Pacific/Nauru" " " \
+"Pacific/Niue" " " \
+"Pacific/Norfolk" " " \
+"Pacific/Noumea" " " \
+"Pacific/Pago_Pago" " " \
+"Pacific/Palau" " " \
+"Pacific/Pitcairn" " " \
+"Pacific/Pohnpei" " " \
+"Pacific/Ponape" " " \
+"Pacific/Port_Moresby" " " \
+"Pacific/Rarotonga" " " \
+"Pacific/Saipan" " " \
+"Pacific/Samoa" " " \
+"Pacific/Tahiti" " " \
+"Pacific/Tarawa" " " \
+"Pacific/Tongatapu" " " \
+"Pacific/Truk" " " \
+"Pacific/Wake" " " \
+"Pacific/Wallis" " " \
+"Pacific/Yap" " " \
+"Poland" " " \
+"Portugal" " " \
+"ROC" " " \
+"ROK" " " \
+"Singapore" " " \
+"Turkey" " " \
+"UCT" " " \
+"UTC" " " \
+"Universal" " " \
+"W-SU" " " \
+"WET" " " \
+"Zulu" " " \
+"posixrules" " " \
+ 2> $TMP/tz
+
+ if [ $? = 1 -o $? = 255 ]; then
+ rm -f $TMP/tz
+ exit
+ fi
+
+ TIMEZONE="`cat $TMP/tz`"
+ rm -f $TMP/tz
+
+ setzone $TIMEZONE
+ exit
+else
+ ###
+ ### use text prompts
+ ###
+ while [ 0 ]; do
+ echo -n "Would you like to configure your timezone ([y]es, [n]o)? "
+ read TIMECONF;
+ echo
+
+ if [ "$TIMECONF" = "n" ]; then
+ break
+ fi
+
+ cat << EOF
+Select one of these timezones:
+
+US/Alaska
+US/Aleutian
+US/Arizona
+US/Central
+US/East-Indiana
+US/Eastern
+US/Hawaii
+US/Indiana-Starke
+US/Michigan
+US/Mountain
+US/Pacific
+US/Pacific-New
+US/Samoa
+Africa/Abidjan
+Africa/Accra
+Africa/Addis_Ababa
+Africa/Algiers
+Africa/Asmara
+Africa/Asmera
+Africa/Bamako
+Africa/Bangui
+Africa/Banjul
+Africa/Bissau
+Africa/Blantyre
+Africa/Brazzaville
+Africa/Bujumbura
+Africa/Cairo
+Africa/Casablanca
+Africa/Ceuta
+Africa/Conakry
+Africa/Dakar
+Africa/Dar_es_Salaam
+Africa/Djibouti
+Africa/Douala
+Africa/El_Aaiun
+Africa/Freetown
+Africa/Gaborone
+Africa/Harare
+Africa/Johannesburg
+Africa/Juba
+Africa/Kampala
+Africa/Khartoum
+Africa/Kigali
+Africa/Kinshasa
+Africa/Lagos
+Africa/Libreville
+Africa/Lome
+Africa/Luanda
+Africa/Lubumbashi
+Africa/Lusaka
+Africa/Malabo
+Africa/Maputo
+Africa/Maseru
+Africa/Mbabane
+Africa/Mogadishu
+Africa/Monrovia
+Africa/Nairobi
+Africa/Ndjamena
+Africa/Niamey
+Africa/Nouakchott
+Africa/Ouagadougou
+Africa/Porto-Novo
+Africa/Sao_Tome
+Africa/Timbuktu
+Africa/Tripoli
+Africa/Tunis
+Africa/Windhoek
+America/Adak
+America/Anchorage
+America/Anguilla
+America/Antigua
+America/Araguaina
+America/Argentina/Buenos_Aires
+America/Argentina/Catamarca
+America/Argentina/ComodRivadavia
+America/Argentina/Cordoba
+America/Argentina/Jujuy
+America/Argentina/La_Rioja
+America/Argentina/Mendoza
+America/Argentina/Rio_Gallegos
+America/Argentina/Salta
+America/Argentina/San_Juan
+America/Argentina/San_Luis
+America/Argentina/Tucuman
+America/Argentina/Ushuaia
+America/Aruba
+America/Asuncion
+America/Atikokan
+America/Atka
+America/Bahia
+America/Bahia_Banderas
+America/Barbados
+America/Belem
+America/Belize
+America/Blanc-Sablon
+America/Boa_Vista
+America/Bogota
+America/Boise
+America/Buenos_Aires
+America/Cambridge_Bay
+America/Campo_Grande
+America/Cancun
+America/Caracas
+America/Catamarca
+America/Cayenne
+America/Cayman
+America/Chicago
+America/Chihuahua
+America/Coral_Harbour
+America/Cordoba
+America/Costa_Rica
+America/Creston
+America/Cuiaba
+America/Curacao
+America/Danmarkshavn
+America/Dawson
+America/Dawson_Creek
+America/Denver
+America/Detroit
+America/Dominica
+America/Edmonton
+America/Eirunepe
+America/El_Salvador
+America/Ensenada
+America/Fort_Nelson
+America/Fort_Wayne
+America/Fortaleza
+America/Glace_Bay
+America/Godthab
+America/Goose_Bay
+America/Grand_Turk
+America/Grenada
+America/Guadeloupe
+America/Guatemala
+America/Guayaquil
+America/Guyana
+America/Halifax
+America/Havana
+America/Hermosillo
+America/Indiana/Indianapolis
+America/Indiana/Knox
+America/Indiana/Marengo
+America/Indiana/Petersburg
+America/Indiana/Tell_City
+America/Indiana/Vevay
+America/Indiana/Vincennes
+America/Indiana/Winamac
+America/Indianapolis
+America/Inuvik
+America/Iqaluit
+America/Jamaica
+America/Jujuy
+America/Juneau
+America/Kentucky/Louisville
+America/Kentucky/Monticello
+America/Knox_IN
+America/Kralendijk
+America/La_Paz
+America/Lima
+America/Los_Angeles
+America/Louisville
+America/Lower_Princes
+America/Maceio
+America/Managua
+America/Manaus
+America/Marigot
+America/Martinique
+America/Matamoros
+America/Mazatlan
+America/Mendoza
+America/Menominee
+America/Merida
+America/Metlakatla
+America/Mexico_City
+America/Miquelon
+America/Moncton
+America/Monterrey
+America/Montevideo
+America/Montreal
+America/Montserrat
+America/Nassau
+America/New_York
+America/Nipigon
+America/Nome
+America/Noronha
+America/North_Dakota/Beulah
+America/North_Dakota/Center
+America/North_Dakota/New_Salem
+America/Ojinaga
+America/Panama
+America/Pangnirtung
+America/Paramaribo
+America/Phoenix
+America/Port-au-Prince
+America/Port_of_Spain
+America/Porto_Acre
+America/Porto_Velho
+America/Puerto_Rico
+America/Rainy_River
+America/Rankin_Inlet
+America/Recife
+America/Regina
+America/Resolute
+America/Rio_Branco
+America/Rosario
+America/Santa_Isabel
+America/Santarem
+America/Santiago
+America/Santo_Domingo
+America/Sao_Paulo
+America/Scoresbysund
+America/Shiprock
+America/Sitka
+America/St_Barthelemy
+America/St_Johns
+America/St_Kitts
+America/St_Lucia
+America/St_Thomas
+America/St_Vincent
+America/Swift_Current
+America/Tegucigalpa
+America/Thule
+America/Thunder_Bay
+America/Tijuana
+America/Toronto
+America/Tortola
+America/Vancouver
+America/Virgin
+America/Whitehorse
+America/Winnipeg
+America/Yakutat
+America/Yellowknife
+Antarctica/Casey
+Antarctica/Davis
+Antarctica/DumontDUrville
+Antarctica/Macquarie
+Antarctica/Mawson
+Antarctica/McMurdo
+Antarctica/Palmer
+Antarctica/Rothera
+Antarctica/South_Pole
+Antarctica/Syowa
+Antarctica/Troll
+Antarctica/Vostok
+Arctic/Longyearbyen
+Asia/Aden
+Asia/Almaty
+Asia/Amman
+Asia/Anadyr
+Asia/Aqtau
+Asia/Aqtobe
+Asia/Ashgabat
+Asia/Ashkhabad
+Asia/Baghdad
+Asia/Bahrain
+Asia/Baku
+Asia/Bangkok
+Asia/Beirut
+Asia/Bishkek
+Asia/Brunei
+Asia/Calcutta
+Asia/Chita
+Asia/Choibalsan
+Asia/Chongqing
+Asia/Chungking
+Asia/Colombo
+Asia/Dacca
+Asia/Damascus
+Asia/Dhaka
+Asia/Dili
+Asia/Dubai
+Asia/Dushanbe
+Asia/Gaza
+Asia/Harbin
+Asia/Hebron
+Asia/Ho_Chi_Minh
+Asia/Hong_Kong
+Asia/Hovd
+Asia/Irkutsk
+Asia/Istanbul
+Asia/Jakarta
+Asia/Jayapura
+Asia/Jerusalem
+Asia/Kabul
+Asia/Kamchatka
+Asia/Karachi
+Asia/Kashgar
+Asia/Kathmandu
+Asia/Katmandu
+Asia/Khandyga
+Asia/Kolkata
+Asia/Krasnoyarsk
+Asia/Kuala_Lumpur
+Asia/Kuching
+Asia/Kuwait
+Asia/Macao
+Asia/Macau
+Asia/Magadan
+Asia/Makassar
+Asia/Manila
+Asia/Muscat
+Asia/Nicosia
+Asia/Novokuznetsk
+Asia/Novosibirsk
+Asia/Omsk
+Asia/Oral
+Asia/Phnom_Penh
+Asia/Pontianak
+Asia/Pyongyang
+Asia/Qatar
+Asia/Qyzylorda
+Asia/Rangoon
+Asia/Riyadh
+Asia/Saigon
+Asia/Sakhalin
+Asia/Samarkand
+Asia/Seoul
+Asia/Shanghai
+Asia/Singapore
+Asia/Srednekolymsk
+Asia/Taipei
+Asia/Tashkent
+Asia/Tbilisi
+Asia/Tehran
+Asia/Tel_Aviv
+Asia/Thimbu
+Asia/Thimphu
+Asia/Tokyo
+Asia/Ujung_Pandang
+Asia/Ulaanbaatar
+Asia/Ulan_Bator
+Asia/Urumqi
+Asia/Ust-Nera
+Asia/Vientiane
+Asia/Vladivostok
+Asia/Yakutsk
+Asia/Yekaterinburg
+Asia/Yerevan
+Atlantic/Azores
+Atlantic/Bermuda
+Atlantic/Canary
+Atlantic/Cape_Verde
+Atlantic/Faeroe
+Atlantic/Faroe
+Atlantic/Jan_Mayen
+Atlantic/Madeira
+Atlantic/Reykjavik
+Atlantic/South_Georgia
+Atlantic/St_Helena
+Atlantic/Stanley
+Australia/ACT
+Australia/Adelaide
+Australia/Brisbane
+Australia/Broken_Hill
+Australia/Canberra
+Australia/Currie
+Australia/Darwin
+Australia/Eucla
+Australia/Hobart
+Australia/LHI
+Australia/Lindeman
+Australia/Lord_Howe
+Australia/Melbourne
+Australia/NSW
+Australia/North
+Australia/Perth
+Australia/Queensland
+Australia/South
+Australia/Sydney
+Australia/Tasmania
+Australia/Victoria
+Australia/West
+Australia/Yancowinna
+Brazil/Acre
+Brazil/DeNoronha
+Brazil/East
+Brazil/West
+CET
+CST6CDT
+Canada/Atlantic
+Canada/Central
+Canada/East-Saskatchewan
+Canada/Eastern
+Canada/Mountain
+Canada/Newfoundland
+Canada/Pacific
+Canada/Saskatchewan
+Canada/Yukon
+Chile/Continental
+Chile/EasterIsland
+Cuba
+EET
+EST
+EST5EDT
+Egypt
+Eire
+Etc/GMT
+Etc/GMT+0
+Etc/GMT+1
+Etc/GMT+10
+Etc/GMT+11
+Etc/GMT+12
+Etc/GMT+2
+Etc/GMT+3
+Etc/GMT+4
+Etc/GMT+5
+Etc/GMT+6
+Etc/GMT+7
+Etc/GMT+8
+Etc/GMT+9
+Etc/GMT-0
+Etc/GMT-1
+Etc/GMT-10
+Etc/GMT-11
+Etc/GMT-12
+Etc/GMT-13
+Etc/GMT-14
+Etc/GMT-2
+Etc/GMT-3
+Etc/GMT-4
+Etc/GMT-5
+Etc/GMT-6
+Etc/GMT-7
+Etc/GMT-8
+Etc/GMT-9
+Etc/GMT0
+Etc/Greenwich
+Etc/UCT
+Etc/UTC
+Etc/Universal
+Etc/Zulu
+Europe/Amsterdam
+Europe/Andorra
+Europe/Athens
+Europe/Belfast
+Europe/Belgrade
+Europe/Berlin
+Europe/Bratislava
+Europe/Brussels
+Europe/Bucharest
+Europe/Budapest
+Europe/Busingen
+Europe/Chisinau
+Europe/Copenhagen
+Europe/Dublin
+Europe/Gibraltar
+Europe/Guernsey
+Europe/Helsinki
+Europe/Isle_of_Man
+Europe/Istanbul
+Europe/Jersey
+Europe/Kaliningrad
+Europe/Kiev
+Europe/Lisbon
+Europe/Ljubljana
+Europe/London
+Europe/Luxembourg
+Europe/Madrid
+Europe/Malta
+Europe/Mariehamn
+Europe/Minsk
+Europe/Monaco
+Europe/Moscow
+Europe/Nicosia
+Europe/Oslo
+Europe/Paris
+Europe/Podgorica
+Europe/Prague
+Europe/Riga
+Europe/Rome
+Europe/Samara
+Europe/San_Marino
+Europe/Sarajevo
+Europe/Simferopol
+Europe/Skopje
+Europe/Sofia
+Europe/Stockholm
+Europe/Tallinn
+Europe/Tirane
+Europe/Tiraspol
+Europe/Uzhgorod
+Europe/Vaduz
+Europe/Vatican
+Europe/Vienna
+Europe/Vilnius
+Europe/Volgograd
+Europe/Warsaw
+Europe/Zagreb
+Europe/Zaporozhye
+Europe/Zurich
+Factory
+GB
+GB-Eire
+GMT
+GMT+0
+GMT-0
+GMT0
+Greenwich
+HST
+Hongkong
+Iceland
+Indian/Antananarivo
+Indian/Chagos
+Indian/Christmas
+Indian/Cocos
+Indian/Comoro
+Indian/Kerguelen
+Indian/Mahe
+Indian/Maldives
+Indian/Mauritius
+Indian/Mayotte
+Indian/Reunion
+Iran
+Israel
+Jamaica
+Japan
+Kwajalein
+Libya
+MET
+MST
+MST7MDT
+Mexico/BajaNorte
+Mexico/BajaSur
+Mexico/General
+NZ
+NZ-CHAT
+Navajo
+PRC
+PST8PDT
+Pacific/Apia
+Pacific/Auckland
+Pacific/Bougainville
+Pacific/Chatham
+Pacific/Chuuk
+Pacific/Easter
+Pacific/Efate
+Pacific/Enderbury
+Pacific/Fakaofo
+Pacific/Fiji
+Pacific/Funafuti
+Pacific/Galapagos
+Pacific/Gambier
+Pacific/Guadalcanal
+Pacific/Guam
+Pacific/Honolulu
+Pacific/Johnston
+Pacific/Kiritimati
+Pacific/Kosrae
+Pacific/Kwajalein
+Pacific/Majuro
+Pacific/Marquesas
+Pacific/Midway
+Pacific/Nauru
+Pacific/Niue
+Pacific/Norfolk
+Pacific/Noumea
+Pacific/Pago_Pago
+Pacific/Palau
+Pacific/Pitcairn
+Pacific/Pohnpei
+Pacific/Ponape
+Pacific/Port_Moresby
+Pacific/Rarotonga
+Pacific/Saipan
+Pacific/Samoa
+Pacific/Tahiti
+Pacific/Tarawa
+Pacific/Tongatapu
+Pacific/Truk
+Pacific/Wake
+Pacific/Wallis
+Pacific/Yap
+Poland
+Portugal
+ROC
+ROK
+Singapore
+Turkey
+UCT
+UTC
+Universal
+W-SU
+WET
+Zulu
+posixrules
+
+Type it at the prompt below exactly as it appears above. (NOTE: If you don't
+see your timezone, use "timeconfig" again after booting for the verbose list)
+
+EOF
+ echo -n "Timezone? "
+ read TIMEZONE;
+ echo
+
+ if [ -n "$TIMEZONE" -a \
+ -r $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -r /var/log/mount/usr/share/zoneinfo/$TIMEZONE -o \
+ -L $T_PX/usr/share/zoneinfo/$TIMEZONE -o \
+ -L /var/log/mount/usr/share/zoneinfo/$TIMEZONE ]; then
+ echo "Creating link from $TIMEZONE to localtime in /etc..."
+ echo
+ setzone $TIMEZONE
+ exit
+ else
+ cat << EOF
+
+Timezone $TIMEZONE could not be found. You may try again if you wish.
+Make sure you type the name exactly as it appears - this configuration script
+is case sensitive.
+
+Press [enter] to continue.
+
+EOF
+ read JUNK;
+ fi
+ done
+fi
+
diff --git a/patches/source/glibc/doinst.sh-glibc b/patches/source/glibc/doinst.sh-glibc
new file mode 100644
index 00000000..fc947587
--- /dev/null
+++ b/patches/source/glibc/doinst.sh-glibc
@@ -0,0 +1,179 @@
+#!/bin/sh
+# Copyright (C) 2002, 2005 Slackware Linux, Inc.
+# Copyright 2005, 2006, 2007, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Swap glibc on the fly.
+#
+# If we're on a running system we have to handle this _very_ carefully. :-)
+# The tricks involved here get trickier every time...
+
+# OK, now we have to be sure of a few things. First, you do have a 2.6
+# kernel running, right?
+
+if [ -r /proc/ksyms ]; then
+ echo "FATAL: you need to be running a 2.6.x kernel in order to upgrade"
+ echo "to this version of glibc."
+ echo
+ sleep 999
+ exit 1
+fi
+
+# Next, stop using the /lib/ntpl libraries. These are now obsolete and
+# will break the installation if present:
+if [ -d lib/tls ]; then
+ mkdir -p lib/obsolete
+ mv lib/tls lib/obsolete
+fi
+if [ -x sbin/ldconfig ]; then
+ sbin/ldconfig -r .
+fi
+
+# Install NPTL glibc libraries:
+if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
+ # First create copies of the incoming libraries:
+ ( cd lib/incoming
+ for file in * ; do
+ if [ ! -r ../${file}.incoming ]; then
+ cp -a $file ../${file}.incoming
+ fi
+ done
+ )
+ # Then switch to them all at once:
+ /sbin/ldconfig -l lib/*.incoming 2> /dev/null
+ # Finally, rename them and clean up:
+ ( cd lib
+ for file in *.incoming ; do
+ rm -f `basename $file .incoming`
+ cp -a $file `basename $file .incoming`
+ /sbin/ldconfig -l `basename $file .incoming`
+ rm -f $file
+ done
+ )
+else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
+ ( cd lib/incoming
+ for file in * ; do
+ cp -a $file ..
+ done
+ )
+fi
+# Now, get rid of the temporary directory:
+rm -rf lib/incoming
+# Done installing NPTL glibc libraries.
+
+# Handle config files:
+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/nscd.conf.new
+config etc/profile.d/glibc.csh.new
+config etc/profile.d/glibc.sh.new
+# Clearly you already decided this issue. :-)
+rm -f etc/profile.d/glibc.csh.new
+rm -f etc/profile.d/glibc.sh.new
+
+# In case there's no ldconfig, make the links manually:
+if [ ! -x /sbin/ldconfig ]; then
+( cd lib ; rm -rf libnss_nis.so.2 )
+( cd lib ; ln -sf libnss_nis-@@VERSION@@.so libnss_nis.so.2 )
+( cd lib ; rm -rf libm.so.6 )
+( cd lib ; ln -sf libm-@@VERSION@@.so libm.so.6 )
+( cd lib ; rm -rf libnss_files.so.2 )
+( cd lib ; ln -sf libnss_files-@@VERSION@@.so libnss_files.so.2 )
+( cd lib ; rm -rf libresolv.so.2 )
+( cd lib ; ln -sf libresolv-@@VERSION@@.so libresolv.so.2 )
+( cd lib ; rm -rf libnsl.so.1 )
+( cd lib ; ln -sf libnsl-@@VERSION@@.so libnsl.so.1 )
+( cd lib ; rm -rf libutil.so.1 )
+( cd lib ; ln -sf libutil-@@VERSION@@.so libutil.so.1 )
+( cd lib ; rm -rf libnss_compat.so.2 )
+( cd lib ; ln -sf libnss_compat-@@VERSION@@.so libnss_compat.so.2 )
+( cd lib ; rm -rf libthread_db.so.1 )
+( cd lib ; ln -sf libthread_db-1.0.so libthread_db.so.1 )
+( cd lib ; rm -rf libnss_hesiod.so.2 )
+( cd lib ; ln -sf libnss_hesiod-@@VERSION@@.so libnss_hesiod.so.2 )
+( cd lib ; rm -rf libanl.so.1 )
+( cd lib ; ln -sf libanl-@@VERSION@@.so libanl.so.1 )
+( cd lib ; rm -rf libcrypt.so.1 )
+( cd lib ; ln -sf libcrypt-@@VERSION@@.so libcrypt.so.1 )
+( cd lib ; rm -rf libBrokenLocale.so.1 )
+( cd lib ; ln -sf libBrokenLocale-@@VERSION@@.so libBrokenLocale.so.1 )
+( cd lib ; rm -rf ld-linux.so.2 )
+( cd lib ; ln -sf ld-@@VERSION@@.so ld-linux.so.2 )
+( cd lib ; rm -rf libdl.so.2 )
+( cd lib ; ln -sf libdl-@@VERSION@@.so libdl.so.2 )
+( cd lib ; rm -rf libnss_dns.so.2 )
+( cd lib ; ln -sf libnss_dns-@@VERSION@@.so libnss_dns.so.2 )
+( cd lib ; rm -rf libpthread.so.0 )
+( cd lib ; ln -sf libpthread-@@VERSION@@.so libpthread.so.0 )
+( cd lib ; rm -rf libnss_nisplus.so.2 )
+( cd lib ; ln -sf libnss_nisplus-@@VERSION@@.so libnss_nisplus.so.2 )
+( cd lib ; rm -rf libc.so.6 )
+( cd lib ; ln -sf libc-@@VERSION@@.so libc.so.6 )
+( cd lib ; rm -rf librt.so.1 )
+( cd lib ; ln -sf librt-@@VERSION@@.so librt.so.1 )
+fi
+
+# More links:
+( cd usr/lib ; rm -rf libnss_nisplus.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_nisplus.so.2 libnss_nisplus.so )
+# This is now a linker script:
+#( cd usr/lib ; rm -rf libpthread.so )
+#( cd usr/lib ; ln -sf ../../lib/libpthread.so.0 libpthread.so )
+( cd usr/lib ; rm -rf libresolv.so )
+( cd usr/lib ; ln -sf ../../lib/libresolv.so.2 libresolv.so )
+( cd usr/lib ; rm -rf libnsl.so )
+( cd usr/lib ; ln -sf ../../lib/libnsl.so.1 libnsl.so )
+( cd usr/lib ; rm -rf libnss_hesiod.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_hesiod.so.2 libnss_hesiod.so )
+( cd usr/lib ; rm -rf libnss_files.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_files.so.2 libnss_files.so )
+# This is now a linker script:
+#( cd usr/lib ; rm -rf libm.so )
+#( cd usr/lib ; ln -sf ../../lib/libm.so.6 libm.so )
+( cd usr/lib ; rm -rf libutil.so )
+( cd usr/lib ; ln -sf ../../lib/libutil.so.1 libutil.so )
+( cd usr/lib ; rm -rf libnss_compat.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_compat.so.2 libnss_compat.so )
+( cd usr/lib ; rm -rf libthread_db.so )
+( cd usr/lib ; ln -sf ../../lib/libthread_db.so.1 libthread_db.so )
+( cd usr/lib ; rm -rf libcrypt.so )
+( cd usr/lib ; ln -sf ../../lib/libcrypt.so.1 libcrypt.so )
+( cd usr/lib ; rm -rf libBrokenLocale.so )
+( cd usr/lib ; ln -sf ../../lib/libBrokenLocale.so.1 libBrokenLocale.so )
+( cd usr/lib ; rm -rf libdl.so )
+( cd usr/lib ; ln -sf ../../lib/libdl.so.2 libdl.so )
+( cd usr/lib ; rm -rf libnss_dns.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_dns.so.2 libnss_dns.so )
+( cd usr/lib ; rm -rf librt.so )
+( cd usr/lib ; ln -sf ../../lib/librt.so.1 librt.so )
+( cd usr/lib ; rm -rf libanl.so )
+( cd usr/lib ; ln -sf ../../lib/libanl.so.1 libanl.so )
+( cd usr/lib ; rm -rf libnss_nis.so )
+( cd usr/lib ; ln -sf ../../lib/libnss_nis.so.2 libnss_nis.so )
+( cd usr/share/zoneinfo ; rm -rf localtime )
+( cd usr/share/zoneinfo ; ln -sf /etc/localtime localtime )
+( cd bin ; rm -rf sln )
+( cd bin ; ln -sf /sbin/sln sln )
+
+# Reload to prevent init from holding a stale handle to glibc on shutdown:
+if [ -x /sbin/telinit ]; then
+ /sbin/telinit u
+fi
diff --git a/patches/source/glibc/doinst.sh-glibc-solibs b/patches/source/glibc/doinst.sh-glibc-solibs
new file mode 100644
index 00000000..a11c36a5
--- /dev/null
+++ b/patches/source/glibc/doinst.sh-glibc-solibs
@@ -0,0 +1,137 @@
+#!/bin/sh
+# Copyright (C) 2002, 2005 Slackware Linux, Inc.
+# Copyright 2005, 2006, 2011, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Swap glibc on the fly.
+#
+# If we're on a running system we have to handle this _very_ carefully. :-)
+# The tricks involved here get trickier every time...
+
+# OK, now we have to be sure of a few things. First, you do have a 2.6
+# kernel running, right?
+
+if [ -r /proc/ksyms ]; then
+ echo "FATAL: you need to be running a 2.6.x kernel in order to upgrade"
+ echo "to this version of glibc."
+ echo
+ sleep 999
+ exit 1
+fi
+
+# Next, stop using the /lib/ntpl libraries. These are now obsolete and
+# will break the installation if present:
+if [ -d lib/tls ]; then
+ mkdir -p lib/obsolete
+ mv lib/tls lib/obsolete
+fi
+if [ -x sbin/ldconfig ]; then
+ sbin/ldconfig -r .
+fi
+
+# Install NPTL glibc libraries:
+if [ -x /sbin/ldconfig -a -d lib/incoming ]; then # swap on the fly
+ # First create copies of the incoming libraries:
+ ( cd lib/incoming
+ for file in * ; do
+ if [ ! -r ../${file}.incoming ]; then
+ cp -a $file ../${file}.incoming
+ fi
+ done
+ )
+ # Then switch to them all at once:
+ /sbin/ldconfig -l lib/*.incoming 2> /dev/null
+ # Finally, rename them and clean up:
+ ( cd lib
+ for file in *.incoming ; do
+ rm -f `basename $file .incoming`
+ cp -a $file `basename $file .incoming`
+ /sbin/ldconfig -l `basename $file .incoming`
+ rm -f $file
+ done
+ )
+else # no ldconfig? Good, it's safe to just jam it on home (and make links below):
+ ( cd lib/incoming
+ for file in * ; do
+ cp -a $file ..
+ done
+ )
+fi
+# Now, get rid of the temporary directory:
+rm -rf lib/incoming
+# Done installing NPTL glibc libraries.
+
+# Handle config files:
+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/profile.d/glibc.csh.new
+config etc/profile.d/glibc.sh.new
+# Clearly you already decided this issue. :-)
+rm -f etc/profile.d/glibc.csh.new
+rm -f etc/profile.d/glibc.sh.new
+
+# In case there's no ldconfig, make the links manually:
+if [ ! -x /sbin/ldconfig ]; then
+( cd lib ; rm -rf libnss_nis.so.2 )
+( cd lib ; ln -sf libnss_nis-@@VERSION@@.so libnss_nis.so.2 )
+( cd lib ; rm -rf libm.so.6 )
+( cd lib ; ln -sf libm-@@VERSION@@.so libm.so.6 )
+( cd lib ; rm -rf libnss_files.so.2 )
+( cd lib ; ln -sf libnss_files-@@VERSION@@.so libnss_files.so.2 )
+( cd lib ; rm -rf libresolv.so.2 )
+( cd lib ; ln -sf libresolv-@@VERSION@@.so libresolv.so.2 )
+( cd lib ; rm -rf libnsl.so.1 )
+( cd lib ; ln -sf libnsl-@@VERSION@@.so libnsl.so.1 )
+( cd lib ; rm -rf libutil.so.1 )
+( cd lib ; ln -sf libutil-@@VERSION@@.so libutil.so.1 )
+( cd lib ; rm -rf libnss_compat.so.2 )
+( cd lib ; ln -sf libnss_compat-@@VERSION@@.so libnss_compat.so.2 )
+( cd lib ; rm -rf libthread_db.so.1 )
+( cd lib ; ln -sf libthread_db-1.0.so libthread_db.so.1 )
+( cd lib ; rm -rf libnss_hesiod.so.2 )
+( cd lib ; ln -sf libnss_hesiod-@@VERSION@@.so libnss_hesiod.so.2 )
+( cd lib ; rm -rf libanl.so.1 )
+( cd lib ; ln -sf libanl-@@VERSION@@.so libanl.so.1 )
+( cd lib ; rm -rf libcrypt.so.1 )
+( cd lib ; ln -sf libcrypt-@@VERSION@@.so libcrypt.so.1 )
+( cd lib ; rm -rf libBrokenLocale.so.1 )
+( cd lib ; ln -sf libBrokenLocale-@@VERSION@@.so libBrokenLocale.so.1 )
+( cd lib ; rm -rf ld-linux.so.2 )
+( cd lib ; ln -sf ld-@@VERSION@@.so ld-linux.so.2 )
+( cd lib ; rm -rf libdl.so.2 )
+( cd lib ; ln -sf libdl-@@VERSION@@.so libdl.so.2 )
+( cd lib ; rm -rf libnss_dns.so.2 )
+( cd lib ; ln -sf libnss_dns-@@VERSION@@.so libnss_dns.so.2 )
+( cd lib ; rm -rf libpthread.so.0 )
+( cd lib ; ln -sf libpthread-@@VERSION@@.so libpthread.so.0 )
+( cd lib ; rm -rf libnss_nisplus.so.2 )
+( cd lib ; ln -sf libnss_nisplus-@@VERSION@@.so libnss_nisplus.so.2 )
+( cd lib ; rm -rf libc.so.6 )
+( cd lib ; ln -sf libc-@@VERSION@@.so libc.so.6 )
+( cd lib ; rm -rf librt.so.1 )
+( cd lib ; ln -sf librt-@@VERSION@@.so librt.so.1 )
+fi
+
+# Reload to prevent init from holding a stale handle to glibc on shutdown:
+if [ -x /sbin/telinit ]; then
+ /sbin/telinit u
+fi
+
diff --git a/patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff b/patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff
new file mode 100644
index 00000000..3fa365af
--- /dev/null
+++ b/patches/source/glibc/glibc-2.10-dns-no-gethostbyname4.diff
@@ -0,0 +1,26 @@
+The gethostbyname4() lookup method is problematic since it fires out both
+the A and AAAA DNS queries in parallel and over the same socket. This
+should work in theory, but it turns out that many cheap DSL modems and
+similar devices have buggy DNS servers - if the AAAA query arrives too
+quickly after the A query, the server will generate only a single reply
+with the A query id but returning an error for the AAAA query; we get
+stuck waiting for the second reply.
+
+For gethostbyname4() users affected, disabling IPv6 in the system might
+work around the issue, unfortunately it only helps with applications
+using AI_ADDRCONFIG (e.g. Firefox); some (notably e.g. Pidgin) neglect
+to do that.
+
+Real fix should be using separate ports for the A and AAAA queries.
+
+--- resolv/Versions 2008-08-02 10:26:09.000000000 +0200
++++ resolv/Versions 2008-12-08 12:51:53.000000000 +0100
+@@ -102,7 +102,7 @@ libnss_dns {
+ _nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r;
+ _nss_dns_getnetbyname_r; _nss_dns_getcanonname_r;
+ _nss_dns_gethostbyaddr2_r;
+- _nss_dns_gethostbyname4_r;
++# _nss_dns_gethostbyname4_r;
+ }
+ }
+
diff --git a/patches/source/glibc/glibc-c-utf8-locale.patch b/patches/source/glibc/glibc-c-utf8-locale.patch
new file mode 100644
index 00000000..70c92a98
--- /dev/null
+++ b/patches/source/glibc/glibc-c-utf8-locale.patch
@@ -0,0 +1,251 @@
+--- ./localedata/SUPPORTED.orig 2015-08-05 01:42:21.000000000 -0500
++++ ./localedata/SUPPORTED 2015-12-17 17:07:08.053200616 -0600
+@@ -1,6 +1,7 @@
+ # This file names the currently supported and somewhat tested locales.
+ # If you have any additions please file a glibc bug report.
+ SUPPORTED-LOCALES=\
++C.UTF-8/UTF-8 \
+ aa_DJ.UTF-8/UTF-8 \
+ aa_DJ/ISO-8859-1 \
+ aa_ER/UTF-8 \
+--- ./localedata/locales/C.orig 2015-12-17 17:07:08.053200616 -0600
++++ ./localedata/locales/C 2015-12-17 17:07:08.053200616 -0600
+@@ -0,0 +1,238 @@
++escape_char /
++comment_char %
++% Locale for C locale in UTF-8
++
++LC_IDENTIFICATION
++title "C locale"
++source ""
++address ""
++contact ""
++email ""
++tel ""
++fax ""
++language "C"
++territory ""
++revision "1.0"
++date "2015-08-10"
++%
++category "C:2015";LC_IDENTIFICATION
++category "C:2015";LC_CTYPE
++category "C:2015";LC_COLLATE
++category "C:2015";LC_TIME
++category "C:2015";LC_NUMERIC
++category "C:2015";LC_MONETARY
++category "C:2015";LC_MESSAGES
++category "C:2015";LC_PAPER
++category "C:2015";LC_NAME
++category "C:2015";LC_ADDRESS
++category "C:2015";LC_TELEPHONE
++category "C:2015";LC_MEASUREMENT
++END LC_IDENTIFICATION
++
++LC_CTYPE
++copy "i18n"
++
++translit_start
++include "translit_combining";""
++translit_end
++
++END LC_CTYPE
++
++LC_COLLATE
++order_start forward
++<U0000>
++..
++<UFFFF>
++<U10000>
++..
++<U1FFFF>
++<U20000>
++..
++<U2FFFF>
++<UE0000>
++..
++<UEFFFF>
++<UF0000>
++..
++<UFFFFF>
++<U100000>
++..
++<U10FFFF>
++UNDEFINED
++order_end
++END LC_COLLATE
++
++LC_MONETARY
++% This is the 14652 i18n fdcc-set definition for
++% the LC_MONETARY category
++% (except for the int_curr_symbol and currency_symbol, they are empty in
++% the 14652 i18n fdcc-set definition and also empty in
++% glibc/locale/C-monetary.c. But localedef complains in that case).
++%
++% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
++% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
++int_curr_symbol "<U0055><U0053><U0044><U0020>"
++% Using "$" for currency_symbol. But maybe <U00A4> would be better?
++% U+00A4 is the "generic currency symbol"
++% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
++currency_symbol "<U0024>"
++mon_decimal_point "<U002E>"
++mon_thousands_sep ""
++mon_grouping -1
++positive_sign ""
++negative_sign "<U002D>"
++int_frac_digits -1
++frac_digits -1
++p_cs_precedes -1
++int_p_sep_by_space -1
++p_sep_by_space -1
++n_cs_precedes -1
++int_n_sep_by_space -1
++n_sep_by_space -1
++p_sign_posn -1
++n_sign_posn -1
++%
++END LC_MONETARY
++
++LC_NUMERIC
++% This is the POSIX Locale definition for
++% the LC_NUMERIC category.
++%
++decimal_point "<U002E>"
++thousands_sep ""
++grouping -1
++END LC_NUMERIC
++
++LC_TIME
++% This is the POSIX Locale definition for
++% the LC_TIME category.
++%
++% Abbreviated weekday names (%a)
++abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
++ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
++ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
++ "<U0053><U0061><U0074>"
++
++% Full weekday names (%A)
++day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
++ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
++ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
++ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
++ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
++ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
++ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
++
++% Abbreviated month names (%b)
++abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
++ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
++ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
++ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
++ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
++ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
++
++% Full month names (%B)
++mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
++ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
++ "<U004D><U0061><U0072><U0063><U0068>";/
++ "<U0041><U0070><U0072><U0069><U006C>";/
++ "<U004D><U0061><U0079>";/
++ "<U004A><U0075><U006E><U0065>";/
++ "<U004A><U0075><U006C><U0079>";/
++ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
++ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
++ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
++ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
++ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
++
++% Week description, consists of three fields:
++% 1. Number of days in a week.
++% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
++% 3. The weekday number to be contained in the first week of the year.
++%
++% ISO 8601 conforming applications should use the values 7, 19971201 (a
++% Monday), and 4 (Thursday), respectively.
++week 7;19971201;4
++first_weekday 1
++first_workday 1
++
++% Appropriate date and time representation (%c)
++% "%a %b %e %H:%M:%S %Y"
++d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
++
++% Appropriate date representation (%x)
++% "%m/%d/%y"
++d_fmt "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
++
++% Appropriate time representation (%X)
++% "%H:%M:%S"
++t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
++
++% Appropriate AM/PM time representation (%r)
++% "%I:%M:%S %p"
++t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
++
++% Equivalent of AM/PM (%p) "AM"/"PM"
++%
++am_pm "<U0041><U004D>";"<U0050><U004D>"
++
++% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
++date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
++END LC_TIME
++
++LC_MESSAGES
++% This is the POSIX Locale definition for
++% the LC_NUMERIC category.
++%
++yesexpr "<U005E><U005B><U0079><U0059><U005D>"
++noexpr "<U005E><U005B><U006E><U004E><U005D>"
++yesstr "<U0059><U0065><U0073>"
++nostr "<U004E><U006F>"
++END LC_MESSAGES
++
++LC_PAPER
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_PAPER category.
++% (A4 paper, this is also used in the built in C/POSIX
++% locale in glibc/locale/C-paper.c)
++height 297
++width 210
++END LC_PAPER
++
++LC_NAME
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_NAME category.
++% "%p%t%g%t%m%t%f"
++% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
++name_fmt "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
++<U0025><U006D><U0025><U0074><U0025><U0066>"
++END LC_NAME
++
++LC_ADDRESS
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_ADDRESS category.
++% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
++% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
++postal_fmt "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
++<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
++<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
++<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
++<U004E><U0025><U0063><U0025><U004E>"
++END LC_ADDRESS
++
++LC_TELEPHONE
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_TELEPHONE category.
++% "+%c %a %l"
++tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
++<U006C>"
++% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
++END LC_TELEPHONE
++
++LC_MEASUREMENT
++% This is the ISO/IEC 14652 "i18n" definition for
++% the LC_MEASUREMENT category.
++% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
++%metric
++measurement 1
++END LC_MEASUREMENT
++
diff --git a/patches/source/glibc/glibc-cvs-checkout.sh b/patches/source/glibc/glibc-cvs-checkout.sh
new file mode 100755
index 00000000..022d0117
--- /dev/null
+++ b/patches/source/glibc/glibc-cvs-checkout.sh
@@ -0,0 +1,3 @@
+echo "The password below is \"anoncvs\":"
+cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc login
+cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc co libc
diff --git a/patches/source/glibc/glibc.3776f38f.diff b/patches/source/glibc/glibc.3776f38f.diff
new file mode 100644
index 00000000..d2b787a4
--- /dev/null
+++ b/patches/source/glibc/glibc.3776f38f.diff
@@ -0,0 +1,52 @@
+From 3776f38fcd267c127ba5eb222e2c614c191744aa Mon Sep 17 00:00:00 2001
+From: Siddhesh Poyarekar <siddhesh@sourceware.org>
+Date: Tue, 20 Jun 2017 05:59:17 +0200
+Subject: [PATCH] Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug
+ #21209)
+
+The LD_HWCAP_MASK environment variable may alter the selection of
+function variants for some architectures. For AT_SECURE process it
+means that if an outdated routine has a bug that would otherwise not
+affect newer platforms by default, LD_HWCAP_MASK will allow that bug
+to be exploited.
+
+To be on the safe side, ignore and disable LD_HWCAP_MASK for setuid
+binaries.
+
+ [BZ #21209]
+ * elf/rtld.c (process_envvars): Ignore LD_HWCAP_MASK for
+ AT_SECURE processes.
+ * sysdeps/generic/unsecvars.h: Add LD_HWCAP_MASK.
+
+(cherry picked from commit 1c1243b6fc33c029488add276e56570a07803bfd)
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 369724b..9362a21 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -2534,7 +2534,8 @@ process_envvars (enum mode *modep)
+
+ case 10:
+ /* Mask for the important hardware capabilities. */
+- if (memcmp (envline, "HWCAP_MASK", 10) == 0)
++ if (!__libc_enable_secure
++ && memcmp (envline, "HWCAP_MASK", 10) == 0)
+ GLRO(dl_hwcap_mask) = __strtoul_internal (&envline[11], NULL,
+ 0, 0);
+ break;
+diff --git a/sysdeps/generic/unsecvars.h b/sysdeps/generic/unsecvars.h
+index a740837..5ea8a4a 100644
+--- a/sysdeps/generic/unsecvars.h
++++ b/sysdeps/generic/unsecvars.h
+@@ -16,6 +16,7 @@
+ "LD_DEBUG\0" \
+ "LD_DEBUG_OUTPUT\0" \
+ "LD_DYNAMIC_WEAK\0" \
++ "LD_HWCAP_MASK\0" \
+ "LD_LIBRARY_PATH\0" \
+ "LD_ORIGIN_PATH\0" \
+ "LD_PRELOAD\0" \
+--
+2.9.3
+
+
diff --git a/patches/source/glibc/glibc.46703a39.diff b/patches/source/glibc/glibc.46703a39.diff
new file mode 100644
index 00000000..c21200be
--- /dev/null
+++ b/patches/source/glibc/glibc.46703a39.diff
@@ -0,0 +1,119 @@
+From 46703a3995aa3ca2b816814aa4ad05ed524194dd Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 19 Jun 2017 22:31:04 +0200
+Subject: [PATCH] ld.so: Reject overly long LD_PRELOAD path elements
+
+(cherry picked from commit 6d0ba622891bed9d8394eef1935add53003b12e8)
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 2fc33a6..4badcf6 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -99,6 +99,35 @@ uintptr_t __pointer_chk_guard_local
+ strong_alias (__pointer_chk_guard_local, __pointer_chk_guard)
+ #endif
+
++/* Length limits for names and paths, to protect the dynamic linker,
++ particularly when __libc_enable_secure is active. */
++#ifdef NAME_MAX
++# define SECURE_NAME_LIMIT NAME_MAX
++#else
++# define SECURE_NAME_LIMIT 255
++#endif
++#ifdef PATH_MAX
++# define SECURE_PATH_LIMIT PATH_MAX
++#else
++# define SECURE_PATH_LIMIT 1024
++#endif
++
++/* Check that AT_SECURE=0, or that the passed name does not contain
++ directories and is not overly long. Reject empty names
++ unconditionally. */
++static bool
++dso_name_valid_for_suid (const char *p)
++{
++ if (__glibc_unlikely (__libc_enable_secure))
++ {
++ /* Ignore pathnames with directories for AT_SECURE=1
++ programs, and also skip overlong names. */
++ size_t len = strlen (p);
++ if (len >= SECURE_NAME_LIMIT || memchr (p, '/', len) != NULL)
++ return false;
++ }
++ return *p != '\0';
++}
+
+ /* List of auditing DSOs. */
+ static struct audit_list
+@@ -716,6 +745,42 @@ static const char *preloadlist attribute_relro;
+ /* Nonzero if information about versions has to be printed. */
+ static int version_info attribute_relro;
+
++/* The LD_PRELOAD environment variable gives list of libraries
++ separated by white space or colons that are loaded before the
++ executable's dependencies and prepended to the global scope list.
++ (If the binary is running setuid all elements containing a '/' are
++ ignored since it is insecure.) Return the number of preloads
++ performed. */
++unsigned int
++handle_ld_preload (const char *preloadlist, struct link_map *main_map)
++{
++ unsigned int npreloads = 0;
++ const char *p = preloadlist;
++ char fname[SECURE_PATH_LIMIT];
++
++ while (*p != '\0')
++ {
++ /* Split preload list at space/colon. */
++ size_t len = strcspn (p, " :");
++ if (len > 0 && len < sizeof (fname))
++ {
++ memcpy (fname, p, len);
++ fname[len] = '\0';
++ }
++ else
++ fname[0] = '\0';
++
++ /* Skip over the substring and the following delimiter. */
++ p += len;
++ if (*p != '\0')
++ ++p;
++
++ if (dso_name_valid_for_suid (fname))
++ npreloads += do_preload (fname, main_map, "LD_PRELOAD");
++ }
++ return npreloads;
++}
++
+ static void
+ dl_main (const ElfW(Phdr) *phdr,
+ ElfW(Word) phnum,
+@@ -1462,23 +1527,8 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+
+ if (__glibc_unlikely (preloadlist != NULL))
+ {
+- /* The LD_PRELOAD environment variable gives list of libraries
+- separated by white space or colons that are loaded before the
+- executable's dependencies and prepended to the global scope
+- list. If the binary is running setuid all elements
+- containing a '/' are ignored since it is insecure. */
+- char *list = strdupa (preloadlist);
+- char *p;
+-
+ HP_TIMING_NOW (start);
+-
+- /* Prevent optimizing strsep. Speed is not important here. */
+- while ((p = (strsep) (&list, " :")) != NULL)
+- if (p[0] != '\0'
+- && (__builtin_expect (! __libc_enable_secure, 1)
+- || strchr (p, '/') == NULL))
+- npreloads += do_preload (p, main_map, "LD_PRELOAD");
+-
++ npreloads += handle_ld_preload (preloadlist, main_map);
+ HP_TIMING_NOW (stop);
+ HP_TIMING_DIFF (diff, start, stop);
+ HP_TIMING_ACCUM_NT (load_time, diff);
+--
+2.9.3
+
+
diff --git a/patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff b/patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff
new file mode 100644
index 00000000..a3d1b147
--- /dev/null
+++ b/patches/source/glibc/glibc.6a824767.dont.assert.on.older.intel.cpus.diff
@@ -0,0 +1,32 @@
+From 6a824767d8948faf10d8d3a602eb4f2a59431601 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Wed, 12 Oct 2016 08:22:52 -0700
+Subject: [PATCH] X86: Don't assert on older Intel CPUs [BZ #20647]
+
+Since the maximum CPUID level of older Intel CPUs is 1, change
+handle_intel to return -1, instead of assert, when the maximum
+CPUID level is less than 2.
+
+ [BZ #20647]
+ * sysdeps/x86_64/cacheinfo.c (handle_intel): Return -1 if the
+ maximum CPUID level is less than 2.
+
+diff --git a/sysdeps/x86_64/cacheinfo.c b/sysdeps/x86_64/cacheinfo.c
+index cf4f64b..35268e8 100644
+--- a/sysdeps/x86_64/cacheinfo.c
++++ b/sysdeps/x86_64/cacheinfo.c
+@@ -259,7 +259,9 @@ intel_check_word (int name, unsigned int value, bool *has_level_2,
+ static long int __attribute__ ((noinline))
+ handle_intel (int name, unsigned int maxidx)
+ {
+- assert (maxidx >= 2);
++ /* Return -1 for older CPUs. */
++ if (maxidx < 2)
++ return -1;
+
+ /* OK, we can use the CPUID instruction to get all info about the
+ caches. */
+--
+2.9.3
+
+
diff --git a/patches/source/glibc/glibc.CVE-2017-1000366.3c7cd212.diff b/patches/source/glibc/glibc.CVE-2017-1000366.3c7cd212.diff
new file mode 100644
index 00000000..ee2870bc
--- /dev/null
+++ b/patches/source/glibc/glibc.CVE-2017-1000366.3c7cd212.diff
@@ -0,0 +1,32 @@
+From 3c7cd21290cabdadd72984fb69bc51e64ff1002d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 19 Jun 2017 18:31:27 +0200
+Subject: [PATCH] CVE-2017-1000366: Ignore LD_LIBRARY_PATH for AT_SECURE=1
+ programs [BZ #21624]
+
+LD_LIBRARY_PATH can only be used to reorder system search paths, which
+is not useful functionality.
+
+This makes an exploitable unbounded alloca in _dl_init_paths unreachable
+for AT_SECURE=1 programs.
+
+(cherry picked from commit f6110a8fee2ca36f8e2d2abecf3cba9fa7b8ea7d)
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index a036ece..2fc33a6 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -2418,7 +2418,8 @@ process_envvars (enum mode *modep)
+
+ case 12:
+ /* The library search path. */
+- if (memcmp (envline, "LIBRARY_PATH", 12) == 0)
++ if (!__libc_enable_secure
++ && memcmp (envline, "LIBRARY_PATH", 12) == 0)
+ {
+ library_path = &envline[13];
+ break;
+--
+2.9.3
+
+
diff --git a/patches/source/glibc/glibc.SlackBuild b/patches/source/glibc/glibc.SlackBuild
new file mode 100755
index 00000000..a1dd9a90
--- /dev/null
+++ b/patches/source/glibc/glibc.SlackBuild
@@ -0,0 +1,440 @@
+#!/bin/sh
+
+# Copyright 2006, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 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.
+
+## build glibc-$VERSION for Slackware
+
+VERSION=${VERSION:-$(echo glibc-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+CHECKOUT=${CHECKOUT:-""}
+BUILD=${BUILD:-4_slack14.2}
+
+# I was considering disabling NSCD, but MoZes talked me out of it. :)
+#DISABLE_NSCD=" --disable-nscd "
+
+# $ARCH may be preset, otherwise i586 compatibility with i686 binary
+# structuring is the Slackware default.
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# I'll break this out as an option for fun :-)
+case $ARCH in
+ i386)
+ OPTIMIZ="-O3 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ i486)
+ OPTIMIZ="-O3 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ i586)
+ OPTIMIZ="-O3 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ i686)
+ OPTIMIZ="-O3 -march=i686"
+ LIBDIRSUFFIX=""
+ ;;
+ athlon)
+ OPTIMIZ="-O3 -march=athlon"
+ LIBDIRSUFFIX=""
+ ;;
+ s390)
+ OPTIMIZ="-O3"
+ LIBDIRSUFFIX=""
+ ;;
+ x86_64)
+ OPTIMIZ="-O3 -fPIC"
+ LIBDIRSUFFIX="64"
+ ;;
+ *)
+ OPTIMIZ="-O3"
+ LIBDIRSUFFIX=""
+ ;;
+esac
+
+case $ARCH in
+ x86_64)
+ TARGET=${TARGET:-x86_64}
+ ;;
+ i586)
+ # This should be i586 for all 32-bit x86 arch:
+ TARGET=${TARGET:-i586}
+ ;;
+esac
+
+# Hand off the $ARCH variable to $SLACKWARE_ARCH to avoid confusing glibc:
+SLACKWARE_ARCH=$ARCH
+unset ARCH
+
+CVSVER=${VERSION}${CHECKOUT}
+
+# NOTE!!! glibc needs to be built against the sanitized kernel headers,
+# which will be installed under /usr/include by the kernel-headers package.
+# Be sure the correct version of the headers package is installed BEFORE
+# building glibc!
+
+CWD=$(pwd)
+# Temporary build location. This should not be a directory
+# path a non-root user could create later...
+TMP=${TMP:-/glibc-tmp-$(mcookie)}
+mkdir -p $TMP
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# This function fixes a doinst.sh file for x86_64.
+# With thanks to Fred Emmott.
+fix_doinst() {
+ if [ "x$LIBDIRSUFFIX" = "x" ]; then
+ return;
+ fi;
+ # Fix "( cd usr/lib ;" occurrences
+ sed -i "s#lib ;#lib${LIBDIRSUFFIX} ;#" install/doinst.sh
+ # Fix "lib/" occurrences
+ sed -i "s#lib/#lib${LIBDIRSUFFIX}/#g" install/doinst.sh
+ # Fix "( cd lib" occurrences
+ sed -i "s#( cd lib\$#( cd lib${LIBDIRSUFFIX}#" install/doinst.sh
+
+ if [ "$SLACKWARE_ARCH" = "x86_64" ]; then
+ sed -i 's#ld-linux.so.2#ld-linux-x86-64.so.2#' install/doinst.sh
+ fi
+}
+
+# This is a patch function to put all glibc patches in the build script
+# up near the top.
+apply_patches() {
+ # Use old-style locale directories rather than a single (and strangely
+ # formatted) /usr/lib/locale/locale-archive file:
+ zcat $CWD/glibc.locale.no-archive.diff.gz | patch -p1 --verbose || exit 1
+ # The is_IS locale is causing a strange error about the "echn" command
+ # not existing. This patch reverts is_IS to the version shipped in
+ # glibc-2.5:
+ zcat $CWD/is_IS.diff.gz | patch -p1 --verbose || exit 1
+ # Support ru_RU.CP1251 locale:
+ zcat $CWD/glibc.ru_RU.CP1251.diff.gz | patch -p1 --verbose || exit 1
+ # Fix resolver problem with glibc-2.9:
+ zcat $CWD/glibc-2.10-dns-no-gethostbyname4.diff.gz | patch -p0 --verbose || exit 1
+ # This reverts a patch that was made to glibc to fix "namespace leakage",
+ # which seems to cause some build failures (e.g. with conntrack):
+ zcat $CWD/glibc.revert.to.fix.build.breakages.diff.gz | patch -p1 -l --verbose || exit 1
+ # Make it harder for people to trick ldd into running code:
+ zcat $CWD/glibc.ldd.trace.through.dynamic.linker.diff.gz | patch -p1 --verbose || exit 1
+ # Add a C.UTF-8 locale:
+ zcat $CWD/glibc-c-utf8-locale.patch.gz | patch -p1 --verbose || exit 1
+ # Upstream git patches for security hardening (CVE-2017-1000366):
+ zcat $CWD/glibc.3776f38f.diff.gz | patch -p1 --verbose || exit 1
+ zcat $CWD/glibc.46703a39.diff.gz | patch -p1 --verbose || exit 1
+ zcat $CWD/glibc.CVE-2017-1000366.3c7cd212.diff.gz | patch -p1 --verbose || exit 1
+ zcat $CWD/glibc.adc7e06f.diff.gz | patch -p1 --verbose || exit 1
+ zcat $CWD/glibc.c69d4a0f.diff.gz | patch -p1 --verbose || exit 1
+ # Don't assert on older Intel CPUs.
+ # This fixes an ldconfig failure on Pentium MMX.
+ zcat $CWD/glibc.6a824767.dont.assert.on.older.intel.cpus.diff.gz | patch -p1 --verbose || exit 1
+}
+
+# This is going to be the initial $DESTDIR:
+export PKG=$TMP/package-glibc-incoming-tree
+PGLIBC=$TMP/package-glibc
+PSOLIBS=$TMP/package-glibc-solibs
+PI18N=$TMP/package-glibc-i18n
+PPROFILE=$TMP/package-glibc-profile
+PDEBUG=$TMP/package-glibc-debug
+
+# Empty these locations first:
+for dir in $PKG $PGLIBC $PSOLIBS $PZONE $PI18N $PPROFILE $PDEBUG ; do
+ if [ -d $dir ]; then
+ rm -rf $dir
+ fi
+ mkdir -p $dir
+done
+if [ -d $TMP/glibc-$VERSION ]; then
+ rm -rf $TMP/glibc-$VERSION
+fi
+
+# Create an incoming directory structure for glibc to be built into:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+mkdir -p $PKG/sbin
+mkdir -p $PKG/usr/bin
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+mkdir -p $PKG/usr/sbin
+mkdir -p $PKG/usr/include
+mkdir -p $PKG/usr/doc
+mkdir -p $PKG/usr/man
+mkdir -p $PKG/usr/share
+mkdir -p $PKG/var/db/nscd
+mkdir -p $PKG/var/run/nscd
+
+# Begin extract/compile:
+cd $TMP
+rm -rf glibc-$CVSVER
+tar xvf $CWD/glibc-$CVSVER.tar.xz \
+ || tar xvf $CWD/glibc-$CVSVER.tar.bz2 \
+ || tar xvf $CWD/glibc-$CVSVER.tar.gz
+cd glibc-$CVSVER
+
+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 {} \;
+
+# Clean up leftover CVS directories:
+find . -type d -name CVS -exec rm -r {} \; 2> /dev/null
+
+# Apply patches; exit if any fail.
+apply_patches
+if [ ! $? = 0 ]; then
+ exit 1
+fi
+
+# Make build directory:
+mkdir build-glibc-$VERSION
+cd build-glibc-$VERSION || exit 1
+
+echo "BUILDING DAS NPTL GLIBC"
+CFLAGS="-g $OPTIMIZ" \
+../configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-kernel=2.6.32 \
+ --with-headers=/usr/include \
+ --enable-add-ons \
+ --enable-obsolete-rpc \
+ --enable-profile \
+ $DISABLE_NSCD \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --with-tls \
+ --with-__thread \
+ --without-cvs \
+ $TARGET-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install install_root=$PKG || exit 1
+make localedata/install-locales install_root=$PKG || exit 1
+
+# The prevailing standard seems to be putting unstripped libraries in
+# /usr/lib/debug/ and stripping the debugging symbols from all the other
+# libraries.
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/debug
+cp -a $PKG/lib${LIBDIRSUFFIX}/l*.so* $PKG/usr/lib${LIBDIRSUFFIX}/debug
+cp -a $PKG/usr/lib${LIBDIRSUFFIX}/*.a $PKG/usr/lib${LIBDIRSUFFIX}/debug
+# Don't need debug+profile:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/debug ; rm -f *_p.* )
+# NOTE: Is there really a reason for the glibc-debug package?
+# If you're debugging glibc, you can also compile it, right?
+
+## COMMENTED OUT: There's no reason for profile libs to include -g information.
+## Put back unstripped profiling libraries:
+#mv $PKG/usr/lib${LIBDIRSUFFIX}/debug/*_p.a $PKG/usr/lib${LIBDIRSUFFIX}
+# It might be best to put the unstripped and profiling libraries in glibc-debug and glibc-profile.
+
+# I don't think "strip -g" causes the pthread problems. It's --strip-unneeded that does.
+strip -g $PKG/lib${LIBDIRSUFFIX}/l*.so*
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/l*.so*
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
+
+# Remove the rquota.x and rquota.h include files, as they are provided by
+# the quota package:
+rm -f $PKG/usr/include/rpcsvc/rquota.{h,x}
+
+# Back to the sources dir to add some files/docs:
+cd $TMP/glibc-$CVSVER
+
+# We'll automatically install the config file for the Name Server Cache Daemon.
+# Perhaps this should also have some commented-out startup code in rc.inet2...
+mkdir -p $PKG/etc
+cat nscd/nscd.conf > $PKG/etc/nscd.conf.new
+
+# Install docs:
+( mkdir -p $PKG/usr/doc/glibc-$VERSION
+ cp -a \
+ BUGS CONFORMANCE COPYING* FAQ INSTALL LICENSES NAMESPACE \
+ NEWS NOTES PROJECTS README* \
+ $PKG/usr/doc/glibc-$VERSION
+)
+
+# Trim the NEWS file to omit ancient history:
+if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/glibc-$VERSION)
+ cat NEWS | head -n 1000 > $DOCSDIR/NEWS
+ touch -r NEWS $DOCSDIR/NEWS
+fi
+
+# OK, there are some very old Linux standards that say that any binaries in a /bin or
+# /sbin directory (and the directories themselves) should be group bin rather than
+# group root, unless a specific group is really needed for some reason.
+#
+# I can't find any mention of this in more recent standards docs, and always thought
+# that it was pretty cosmetic anyway (hey, if there's a reason -- fill me in!), so
+# it's possible that this ownership change won't be followed in the near future
+# (it's a PITA, and causes many bug reports when the perms change is occasionally
+# forgotten).
+#
+# But, it's hard to get me to break old habits, so we'll continue the tradition here:
+#
+# No, no we won't. You know how we love to break traditions.
+
+# Strip most binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+)
+
+# Fix info dir:
+rm $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+# This is junk
+rm $PKG/etc/ld.so.cache
+( cd $PKG
+ find . -name "*.orig" -exec rm {} \;
+)
+
+##################################
+# OK, time to make some packages #
+##################################
+
+# glibc-profile:
+cd $PPROFILE
+mkdir -p usr/lib${LIBDIRSUFFIX}
+# Might as well just grab these with 'mv' to simplify things later:
+mv $PKG/usr/lib${LIBDIRSUFFIX}/lib*_p.a usr/lib${LIBDIRSUFFIX}
+# Profile libs should be stripped. Use the debug libs to debug...
+( cd usr/lib${LIBDIRSUFFIX} ; strip -g *.a )
+mkdir install
+cp -a $CWD/slack-desc.glibc-profile install/slack-desc
+makepkg -l y -c n $TMP/glibc-profile-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# THIS IS NO LONGER PACKAGED (or is it? might be better to let it be made, and then ship it or not...)
+# glibc-debug:
+cd $PDEBUG
+mkdir -p usr/lib${LIBDIRSUFFIX}
+# Might as well just grab these with 'mv' to simplify things later:
+mv $PKG/usr/lib${LIBDIRSUFFIX}/debug usr/lib${LIBDIRSUFFIX}
+mkdir install
+cp -a $CWD/slack-desc.glibc-debug install/slack-desc
+# Don't package this.
+#makepkg -l y -c n $TMP/glibc-debug-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+## INSTEAD, NUKE THESE LIBS
+#rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/debug
+
+# glibc-i18n:
+cd $PI18N
+mkdir -p usr/lib${LIBDIRSUFFIX}/locale
+mv $PKG/usr/lib${LIBDIRSUFFIX}/locale/* usr/lib${LIBDIRSUFFIX}/locale
+mkdir -p usr/share/{i18n,locale}
+mv $PKG/usr/share/i18n/* usr/share/i18n
+mv $PKG/usr/share/locale/* usr/share/locale
+# Leave copies of the C, POSIX, and en_US locales in the main glibc package:
+cp -a usr/lib${LIBDIRSUFFIX}/locale/{C,en_US}* $PKG/usr/lib${LIBDIRSUFFIX}/locale
+mkdir -p $PKG/usr/share/i18n/locales
+cp -a usr/share/i18n/locales/{C,POSIX,en_US} $PKG/usr/share/i18n/locales
+mkdir install
+cp -a $CWD/slack-desc.glibc-i18n install/slack-desc
+makepkg -l y -c n $TMP/glibc-i18n-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# glibc-solibs:
+cd $PSOLIBS
+mkdir -p etc/profile.d
+cp -a $CWD/profile.d/* etc/profile.d
+chown -R root:root etc
+chmod 755 etc/profile.d/*
+mkdir -p lib${LIBDIRSUFFIX}
+cp -a $PKG/lib${LIBDIRSUFFIX}/* lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIX}
+ mkdir incoming
+ mv *so* incoming
+ mv incoming/libSegFault.so .
+)
+mkdir -p usr
+cp -a $PKG/usr/bin usr
+mv usr/bin/ldd .
+rm usr/bin/*
+mv ldd usr/bin
+mkdir -p usr/lib${LIBDIRSUFFIX}
+# The gconv directory has a lot of stuff, but including it here will save some problems.
+# Seems standard elsewhere.
+cp -a $PKG/usr/lib${LIBDIRSUFFIX}/gconv usr/lib${LIBDIRSUFFIX}
+# Another manpage abandoned by GNU...
+#mkdir -p usr/man/man1
+#cp -a $PKG/usr/man/man1/ldd.1.gz usr/man/man1
+mkdir -p usr/libexec
+cp -a $PKG/usr/libexec/pt_chown usr/libexec
+# Same usr.bin deal:
+cp -a $PKG/sbin .
+mv sbin/ldconfig .
+rm sbin/*
+mv ldconfig sbin
+mkdir install
+cp -a $CWD/slack-desc.glibc-solibs install/slack-desc
+cp -a $CWD/doinst.sh-glibc-solibs install/doinst.sh
+fix_doinst
+sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
+# Ditch links:
+find . -type l -exec rm {} \;
+# libm.so is *not* a linker script on all $ARCH.
+# If it's missing now, replace the symlink:
+if [ ! -r usr/lib${LIBDIRSUFFIX}/libm.so ]; then
+ ( cd usr/lib${LIBDIRSUFFIX} ; ln -sf ../../lib${LIBDIRSUFFIX}/libm.so.6 libm.so )
+fi
+# Build the package:
+makepkg -l y -c n $TMP/glibc-solibs-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# And finally, the complete "all-in-one" glibc package is created
+# from whatever was leftover:
+cd $PGLIBC
+mv $PKG/* .
+mkdir -p etc/profile.d
+cp -a $CWD/profile.d/* etc/profile.d
+chown -R root:root etc
+chmod 755 etc/profile.d/*
+# Ditch links (these are in doinst.sh-glibc):
+find . -type l -exec rm {} \;
+mkdir install
+cp -a $CWD/slack-desc.glibc install/slack-desc
+cp -a $CWD/doinst.sh-glibc install/doinst.sh
+fix_doinst
+sed -i "s/@@VERSION@@/$VERSION/g" install/doinst.sh
+( cd lib${LIBDIRSUFFIX}
+ mkdir incoming
+ mv *so* incoming
+ mv incoming/libSegFault.so .
+)
+# Build the package:
+/sbin/makepkg -l y -c n $TMP/glibc-$VERSION-$SLACKWARE_ARCH-$BUILD.txz
+
+# Done!
+echo
+echo "glibc packages built in $TMP!"
+
diff --git a/patches/source/glibc/glibc.adc7e06f.diff b/patches/source/glibc/glibc.adc7e06f.diff
new file mode 100644
index 00000000..ca5eac55
--- /dev/null
+++ b/patches/source/glibc/glibc.adc7e06f.diff
@@ -0,0 +1,38 @@
+From adc7e06fb412a2a1ee52f8cb788caf436335b9f3 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Wed, 14 Jun 2017 08:11:22 +0200
+Subject: [PATCH] i686: Add missing IS_IN (libc) guards to vectorized strcspn
+
+Since commit d957c4d3fa48d685ff2726c605c988127ef99395 (i386: Compile
+rtld-*.os with -mno-sse -mno-mmx -mfpmath=387), vector intrinsics can
+no longer be used in ld.so, even if the compiled code never makes it
+into the final ld.so link. This commit adds the missing IS_IN (libc)
+guard to the SSE 4.2 strcspn implementation, so that it can be used from
+ld.so in the future.
+
+(cherry picked from commit 69052a3a95da37169a08f9e59b2cc1808312753c)
+
+diff --git a/sysdeps/i386/i686/multiarch/strcspn-c.c b/sysdeps/i386/i686/multiarch/strcspn-c.c
+index 6d61e19..ec230fb 100644
+--- a/sysdeps/i386/i686/multiarch/strcspn-c.c
++++ b/sysdeps/i386/i686/multiarch/strcspn-c.c
+@@ -1,2 +1,4 @@
+-#define __strcspn_sse2 __strcspn_ia32
+-#include <sysdeps/x86_64/multiarch/strcspn-c.c>
++#if IS_IN (libc)
++# define __strcspn_sse2 __strcspn_ia32
++# include <sysdeps/x86_64/multiarch/strcspn-c.c>
++#endif
+diff --git a/sysdeps/i386/i686/multiarch/varshift.c b/sysdeps/i386/i686/multiarch/varshift.c
+index 7760b96..6742a35 100644
+--- a/sysdeps/i386/i686/multiarch/varshift.c
++++ b/sysdeps/i386/i686/multiarch/varshift.c
+@@ -1 +1,3 @@
+-#include <sysdeps/x86_64/multiarch/varshift.c>
++#if IS_IN (libc)
++# include <sysdeps/x86_64/multiarch/varshift.c>
++#endif
+--
+2.9.3
+
+
diff --git a/patches/source/glibc/glibc.c69d4a0f.diff b/patches/source/glibc/glibc.c69d4a0f.diff
new file mode 100644
index 00000000..f4488000
--- /dev/null
+++ b/patches/source/glibc/glibc.c69d4a0f.diff
@@ -0,0 +1,201 @@
+From c69d4a0f680a24fdbe323764a50382ad324041e9 Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Mon, 19 Jun 2017 22:32:12 +0200
+Subject: [PATCH] ld.so: Reject overly long LD_AUDIT path elements
+
+Also only process the last LD_AUDIT entry.
+
+(cherry picked from commit 81b82fb966ffbd94353f793ad17116c6088dedd9)
+
+diff --git a/elf/rtld.c b/elf/rtld.c
+index 4badcf6..369724b 100644
+--- a/elf/rtld.c
++++ b/elf/rtld.c
+@@ -129,13 +129,91 @@ dso_name_valid_for_suid (const char *p)
+ return *p != '\0';
+ }
+
+-/* List of auditing DSOs. */
++/* LD_AUDIT variable contents. Must be processed before the
++ audit_list below. */
++const char *audit_list_string;
++
++/* Cyclic list of auditing DSOs. audit_list->next is the first
++ element. */
+ static struct audit_list
+ {
+ const char *name;
+ struct audit_list *next;
+ } *audit_list;
+
++/* Iterator for audit_list_string followed by audit_list. */
++struct audit_list_iter
++{
++ /* Tail of audit_list_string still needing processing, or NULL. */
++ const char *audit_list_tail;
++
++ /* The list element returned in the previous iteration. NULL before
++ the first element. */
++ struct audit_list *previous;
++
++ /* Scratch buffer for returning a name which is part of
++ audit_list_string. */
++ char fname[SECURE_NAME_LIMIT];
++};
++
++/* Initialize an audit list iterator. */
++static void
++audit_list_iter_init (struct audit_list_iter *iter)
++{
++ iter->audit_list_tail = audit_list_string;
++ iter->previous = NULL;
++}
++
++/* Iterate through both audit_list_string and audit_list. */
++static const char *
++audit_list_iter_next (struct audit_list_iter *iter)
++{
++ if (iter->audit_list_tail != NULL)
++ {
++ /* First iterate over audit_list_string. */
++ while (*iter->audit_list_tail != '\0')
++ {
++ /* Split audit list at colon. */
++ size_t len = strcspn (iter->audit_list_tail, ":");
++ if (len > 0 && len < sizeof (iter->fname))
++ {
++ memcpy (iter->fname, iter->audit_list_tail, len);
++ iter->fname[len] = '\0';
++ }
++ else
++ /* Do not return this name to the caller. */
++ iter->fname[0] = '\0';
++
++ /* Skip over the substring and the following delimiter. */
++ iter->audit_list_tail += len;
++ if (*iter->audit_list_tail == ':')
++ ++iter->audit_list_tail;
++
++ /* If the name is valid, return it. */
++ if (dso_name_valid_for_suid (iter->fname))
++ return iter->fname;
++ /* Otherwise, wrap around and try the next name. */
++ }
++ /* Fall through to the procesing of audit_list. */
++ }
++
++ if (iter->previous == NULL)
++ {
++ if (audit_list == NULL)
++ /* No pre-parsed audit list. */
++ return NULL;
++ /* Start of audit list. The first list element is at
++ audit_list->next (cyclic list). */
++ iter->previous = audit_list->next;
++ return iter->previous->name;
++ }
++ if (iter->previous == audit_list)
++ /* Cyclic list wrap-around. */
++ return NULL;
++ iter->previous = iter->previous->next;
++ return iter->previous->name;
++}
++
+ #ifndef HAVE_INLINED_SYSCALLS
+ /* Set nonzero during loading and initialization of executable and
+ libraries, cleared before the executable's entry point runs. This
+@@ -1303,11 +1381,13 @@ of this helper program; chances are you did not intend to run this program.\n\
+ GL(dl_rtld_map).l_tls_modid = _dl_next_tls_modid ();
+
+ /* If we have auditing DSOs to load, do it now. */
+- if (__glibc_unlikely (audit_list != NULL))
++ bool need_security_init = true;
++ if (__glibc_unlikely (audit_list != NULL)
++ || __glibc_unlikely (audit_list_string != NULL))
+ {
+- /* Iterate over all entries in the list. The order is important. */
+ struct audit_ifaces *last_audit = NULL;
+- struct audit_list *al = audit_list->next;
++ struct audit_list_iter al_iter;
++ audit_list_iter_init (&al_iter);
+
+ /* Since we start using the auditing DSOs right away we need to
+ initialize the data structures now. */
+@@ -1318,9 +1398,14 @@ of this helper program; chances are you did not intend to run this program.\n\
+ use different values (especially the pointer guard) and will
+ fail later on. */
+ security_init ();
++ need_security_init = false;
+
+- do
++ while (true)
+ {
++ const char *name = audit_list_iter_next (&al_iter);
++ if (name == NULL)
++ break;
++
+ int tls_idx = GL(dl_tls_max_dtv_idx);
+
+ /* Now it is time to determine the layout of the static TLS
+@@ -1329,7 +1414,7 @@ of this helper program; chances are you did not intend to run this program.\n\
+ no DF_STATIC_TLS bit is set. The reason is that we know
+ glibc will use the static model. */
+ struct dlmopen_args dlmargs;
+- dlmargs.fname = al->name;
++ dlmargs.fname = name;
+ dlmargs.map = NULL;
+
+ const char *objname;
+@@ -1342,7 +1427,7 @@ of this helper program; chances are you did not intend to run this program.\n\
+ not_loaded:
+ _dl_error_printf ("\
+ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+- al->name, err_str);
++ name, err_str);
+ if (malloced)
+ free ((char *) err_str);
+ }
+@@ -1446,10 +1531,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ goto not_loaded;
+ }
+ }
+-
+- al = al->next;
+ }
+- while (al != audit_list->next);
+
+ /* If we have any auditing modules, announce that we already
+ have two objects loaded. */
+@@ -1713,7 +1795,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
+ if (tcbp == NULL)
+ tcbp = init_tls ();
+
+- if (__glibc_likely (audit_list == NULL))
++ if (__glibc_likely (need_security_init))
+ /* Initialize security features. But only if we have not done it
+ earlier. */
+ security_init ();
+@@ -2344,9 +2426,7 @@ process_dl_audit (char *str)
+ char *p;
+
+ while ((p = (strsep) (&str, ":")) != NULL)
+- if (p[0] != '\0'
+- && (__builtin_expect (! __libc_enable_secure, 1)
+- || strchr (p, '/') == NULL))
++ if (dso_name_valid_for_suid (p))
+ {
+ /* This is using the local malloc, not the system malloc. The
+ memory can never be freed. */
+@@ -2410,7 +2490,7 @@ process_envvars (enum mode *modep)
+ break;
+ }
+ if (memcmp (envline, "AUDIT", 5) == 0)
+- process_dl_audit (&envline[6]);
++ audit_list_string = &envline[6];
+ break;
+
+ case 7:
+--
+2.9.3
+
+
diff --git a/patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff b/patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff
new file mode 100644
index 00000000..6b1f5c84
--- /dev/null
+++ b/patches/source/glibc/glibc.ldd.trace.through.dynamic.linker.diff
@@ -0,0 +1,49 @@
+2009-11-08 Aurelien Jarno <aurelien@aurel32.net>
+
+ * elf/ldd.bash.in: also handle error code 126 (ld.so non
+ executable). Always trace dynamic library dependencies through
+ the dynamic linker.
+
+--- a/elf/ldd.bash.in
++++ b/elf/ldd.bash.in
+@@ -153,8 +153,6 @@ for file do
+ echo "ldd: ${file}:" $"not regular file" >&2
+ result=1
+ elif test -r "$file"; then
+- test -x "$file" || echo 'ldd:' $"\
+-warning: you do not have execution permission for" "\`$file'" >&2
+ RTLD=
+ ret=1
+ for rtld in ${RTLDLIST}; do
+@@ -167,28 +165,16 @@ warning: you do not have execution permission for" "\`$file'" >&2
+ fi
+ done
+ case $ret in
+- 0)
+- # If the program exits with exit code 5, it means the process has been
+- # invoked with __libc_enable_secure. Fall back to running it through
+- # the dynamic linker.
+- try_trace "$file"
+- rc=$?
+- if [ $rc = 5 ]; then
+- try_trace "$RTLD" "$file"
+- rc=$?
+- fi
+- [ $rc = 0 ] || result=1
++ 0|2)
++ try_trace "$RTLD" "$file" || result=1
+ ;;
+- 1)
++ 1|126)
+ # This can be a non-ELF binary or no binary at all.
+ nonelf "$file" || {
+ echo $" not a dynamic executable"
+ result=1
+ }
+ ;;
+- 2)
+- try_trace "$RTLD" "$file" || result=1
+- ;;
+ *)
+ echo 'ldd:' ${RTLD} $"exited with unknown exit code" "($ret)" >&2
+ exit 1
diff --git a/patches/source/glibc/glibc.locale.no-archive.diff b/patches/source/glibc/glibc.locale.no-archive.diff
new file mode 100644
index 00000000..bf1a83b7
--- /dev/null
+++ b/patches/source/glibc/glibc.locale.no-archive.diff
@@ -0,0 +1,10 @@
+--- ./localedata/Makefile.orig 2003-11-20 15:31:38.000000000 -0800
++++ ./localedata/Makefile 2004-08-03 17:20:54.000000000 -0700
+@@ -222,6 +222,7 @@
+ echo -n '...'; \
+ input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
+ $(LOCALEDEF) --alias-file=../intl/locale.alias \
++ --no-archive \
+ -i locales/$$input -c -f charmaps/$$charset \
+ $(addprefix --prefix=,$(install_root)) $$locale; \
+ echo ' done'; \
diff --git a/patches/source/glibc/glibc.make-3.82.diff b/patches/source/glibc/glibc.make-3.82.diff
new file mode 100644
index 00000000..56b0675b
--- /dev/null
+++ b/patches/source/glibc/glibc.make-3.82.diff
@@ -0,0 +1,28 @@
+Submitted By: Matt Burgess <matthew_at_linuxfromscratch_dot_org>
+Date: 2010-07-26
+Initial Package Version: 2.11.2
+Upstream Status: Not submitted
+Origin: Denis Onischenko
+ (http://www.mail-archive.com/help-make@gnu.org/msg08847.html)
+Description: Fixes an incompatibility with Make-3.82.
+
+diff -Naur glibc-2.11.2.orig/manual/Makefile glibc-2.11.2/manual/Makefile
+--- glibc-2.11.2.orig/manual/Makefile 2010-05-19 20:38:20.000000000 +0000
++++ glibc-2.11.2/manual/Makefile 2010-07-26 06:51:27.049899308 +0000
+@@ -232,9 +232,13 @@
+ .PHONY: stubs
+ stubs: $(objpfx)stubs
+ endif
+-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+- $(make-target-directory)
+- touch $@
++$(objpfx)stubs ../po/manual.pot:
++ $(make-target-directory)
++ touch $@
++
++$(objpfx)stamp%:
++ $(make-target-directory)
++ touch $@
+
+ # Make the target directory if it doesn't exist, using the `mkinstalldirs'
+ # script that does `mkdir -p' even if `mkdir' doesn't support that flag.
diff --git a/patches/source/glibc/glibc.revert.to.fix.build.breakages.diff b/patches/source/glibc/glibc.revert.to.fix.build.breakages.diff
new file mode 100644
index 00000000..9c8e93b9
--- /dev/null
+++ b/patches/source/glibc/glibc.revert.to.fix.build.breakages.diff
@@ -0,0 +1,13 @@
+--- ./sysdeps/unix/sysv/linux/bits/socket.h.orig 2008-07-27 03:25:30.000000000 -0500
++++ ./sysdeps/unix/sysv/linux/bits/socket.h 2009-02-24 17:38:52.000000000 -0600
+@@ -26,8 +26,9 @@
+ #endif
+
+ #define __need_size_t
++#define __need_NULL
+ #include <stddef.h>
+-
++#include <limits.h>
+ #include <sys/types.h>
+
+ /* Type for length arguments in socket calls. */
diff --git a/patches/source/glibc/glibc.ru_RU.CP1251.diff b/patches/source/glibc/glibc.ru_RU.CP1251.diff
new file mode 100644
index 00000000..376cf76a
--- /dev/null
+++ b/patches/source/glibc/glibc.ru_RU.CP1251.diff
@@ -0,0 +1,10 @@
+--- ./localedata/SUPPORTED.orig 2005-07-17 20:50:35.000000000 -0500
++++ ./localedata/SUPPORTED 2006-08-22 01:33:09.000000000 -0500
+@@ -270,6 +270,7 @@
+ ro_RO/ISO-8859-2 \
+ ru_RU.KOI8-R/KOI8-R \
+ ru_RU.UTF-8/UTF-8 \
++ru_RU.CP1251/CP1251 \
+ ru_RU/ISO-8859-5 \
+ ru_UA.UTF-8/UTF-8 \
+ ru_UA/KOI8-U \
diff --git a/patches/source/glibc/is_IS.diff b/patches/source/glibc/is_IS.diff
new file mode 100644
index 00000000..52a99696
--- /dev/null
+++ b/patches/source/glibc/is_IS.diff
@@ -0,0 +1,19 @@
+--- ./localedata/locales/is_IS.orig 2007-09-30 17:30:17.000000000 -0500
++++ ./localedata/locales/is_IS 2006-07-30 17:19:43.000000000 -0500
+@@ -947,6 +947,7 @@
+ <UE00D> IGNORE;IGNORE;IGNORE;<UE00D>
+ <UE00E> IGNORE;IGNORE;IGNORE;<UE00E>
+ <UE00F> IGNORE;IGNORE;IGNORE;<UE00F>
++<"=> IGNORE;IGNORE;IGNORE;<"=>
+ <UE011> IGNORE;IGNORE;IGNORE;<UE011>
+ <UE012> IGNORE;IGNORE;IGNORE;<UE012>
+ <UE013> IGNORE;IGNORE;IGNORE;<UE013>
+@@ -955,6 +956,8 @@
+ <UE017> IGNORE;IGNORE;IGNORE;<UE017>
+ <UE018> IGNORE;IGNORE;IGNORE;<UE018>
+ <UE019> IGNORE;IGNORE;IGNORE;<UE019>
++<Mc> IGNORE;IGNORE;IGNORE;<Mc>
++<Fl> IGNORE;IGNORE;IGNORE;<Fl>
+ UNDEFINED IGNORE;IGNORE;IGNORE
+
+ <U0030> <U0030>;<U0030>;IGNORE;IGNORE
diff --git a/patches/source/glibc/profile.d/glibc.csh.new b/patches/source/glibc/profile.d/glibc.csh.new
new file mode 100755
index 00000000..1f33e966
--- /dev/null
+++ b/patches/source/glibc/profile.d/glibc.csh.new
@@ -0,0 +1,9 @@
+#!/bin/csh
+# Set more relaxed (glibc-2.3.5 like) malloc() checking.
+#
+# This relaxes the default paranoia level so that it reports
+# bugs, but does not kill the questionable process. You can
+# get away with running broken programs with this setting,
+# but at a possible performance and security cost.
+#
+#setenv MALLOC_CHECK_ 1
diff --git a/patches/source/glibc/profile.d/glibc.sh.new b/patches/source/glibc/profile.d/glibc.sh.new
new file mode 100755
index 00000000..979f4879
--- /dev/null
+++ b/patches/source/glibc/profile.d/glibc.sh.new
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Set more relaxed (glibc-2.3.5 like) malloc() checking.
+#
+# This relaxes the default paranoia level so that it reports
+# bugs, but does not kill the questionable process. You can
+# get away with running broken programs with this setting,
+# but at a possible performance and security cost.
+#export MALLOC_CHECK_=1
diff --git a/patches/source/glibc/slack-desc.glibc b/patches/source/glibc/slack-desc.glibc
new file mode 100644
index 00000000..c9c35c2d
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc
@@ -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------------------------------------------------------|
+glibc: glibc (GNU C libraries)
+glibc:
+glibc: This package contains the GNU C libraries and header files. The GNU
+glibc: C library was written originally by Roland McGrath, and is currently
+glibc: maintained by Ulrich Drepper. Some parts of the library were
+glibc: contributed or worked on by other people.
+glibc:
+glibc: You'll need this package to compile programs.
+glibc:
+glibc:
+glibc:
diff --git a/patches/source/glibc/slack-desc.glibc-debug b/patches/source/glibc/slack-desc.glibc-debug
new file mode 100644
index 00000000..79398d0b
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-debug
@@ -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------------------------------------------------------|
+glibc-debug: glibc-debug (GNU C libraries with debugging symbols)
+glibc-debug:
+glibc-debug: This package contains versions of the GNU C libraries with debugging
+glibc-debug: information. These are needed only if you wish to be able to step
+glibc-debug: through C library routines while debugging programs. Most debugging
+glibc-debug: efforts will not require these.
+glibc-debug: To use these libraries, set LD_LIBRARY_PATH when calling the debugger:
+glibc-debug: LD_LIBRARY_PATH=/usr/lib/debug gdb <executable>
+glibc-debug:
+glibc-debug: Or, use this approach if you need to debug a setuid binary:
+glibc-debug: su user -c "LD_LIBRARY_PATH=/usr/lib/debug gdb <executable>"
diff --git a/patches/source/glibc/slack-desc.glibc-i18n b/patches/source/glibc/slack-desc.glibc-i18n
new file mode 100644
index 00000000..1a678d98
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-i18n
@@ -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------------------------------------------------------|
+glibc-i18n: glibc-i18n (locale files from glibc)
+glibc-i18n:
+glibc-i18n: These files go in /usr/lib/locale, /usr/share/i18n/, and
+glibc-i18n: /usr/share/locale/ to provide internationalization support.
+glibc-i18n: You'll need this package unless you will be using US English only.
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
+glibc-i18n:
diff --git a/patches/source/glibc/slack-desc.glibc-profile b/patches/source/glibc/slack-desc.glibc-profile
new file mode 100644
index 00000000..8c873fd9
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-profile
@@ -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------------------------------------------------------|
+glibc-profile: glibc-profile (GNU C libraries with profiling support)
+glibc-profile:
+glibc-profile: This package contains static versions of the GNU C libraries with
+glibc-profile: support for profiling binaries using gprof. gprof calculates how
+glibc-profile: much time a program spends in each routine which can suggest where
+glibc-profile: to concentrate efforts to improve performance.
+glibc-profile:
+glibc-profile: See the gprof man page for more details.
+glibc-profile:
+glibc-profile:
+glibc-profile:
diff --git a/patches/source/glibc/slack-desc.glibc-solibs b/patches/source/glibc/slack-desc.glibc-solibs
new file mode 100644
index 00000000..807df645
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-solibs
@@ -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------------------------------------------------------|
+glibc-solibs: glibc-solibs (shared GNU C libraries)
+glibc-solibs:
+glibc-solibs: This package contains the shared libraries, binaries, and support
+glibc-solibs: files required to run most Linux applications linked with glibc.
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
+glibc-solibs:
diff --git a/patches/source/glibc/slack-desc.glibc-solibs-linuxthreads b/patches/source/glibc/slack-desc.glibc-solibs-linuxthreads
new file mode 100644
index 00000000..9efe3bf1
--- /dev/null
+++ b/patches/source/glibc/slack-desc.glibc-solibs-linuxthreads
@@ -0,0 +1,18 @@
+# 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------------------------------------------------------|
+glibc-solibs-linuxthreads: glibc-solibs-linuxthreads (LinuxThreads shared GNU C libraries)
+glibc-solibs-linuxthreads:
+glibc-solibs-linuxthreads: This package contains the shared libraries for glibc that uses
+glibc-solibs-linuxthreads: LinuxThreads, the threading implementation in Linux 2.4.x and
+glibc-solibs-linuxthreads: earlier kernels. In some cases you'll need to use these libraries
+glibc-solibs-linuxthreads: to run old binaries by setting these environment variables:
+glibc-solibs-linuxthreads: export LD_ASSUME_KERNEL=2.4.33
+glibc-solibs-linuxthreads: export LD_LIBRARY_PATH=/lib/obsolete/linuxthreads
+glibc-solibs-linuxthreads: old-program
+glibc-solibs-linuxthreads: Most users should have no need for this package. Recompile. :-)
diff --git a/patches/source/gnupg/gnupg.SlackBuild b/patches/source/gnupg/gnupg.SlackBuild
new file mode 100755
index 00000000..b031808f
--- /dev/null
+++ b/patches/source/gnupg/gnupg.SlackBuild
@@ -0,0 +1,115 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2015, 2016 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=gnupg
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gnupg
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+rm -rf $PKG
+mkdir -p $PKG $PKG
+
+cd $TMP
+rm -rf gnupg-$VERSION
+tar xvf $CWD/gnupg-$VERSION.tar.?z* || exit 1
+cd gnupg-$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 \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+gzip -9 $PKG/usr/man/*/*
+
+mkdir -p $PKG/usr/doc/gnupg-$VERSION
+cp -a \
+ ABOUT-NLS AUTHORS BUGS COPYING* INSTALL NEWS PROJECTS README* THANKS TODO VERSION \
+ $PKG/usr/doc/gnupg-$VERSION
+if [ -r $PKG/usr/share/gnupg/FAQ ]; then
+ ( cd $PKG/usr/doc/gnupg-$VERSION
+ ln -sf /usr/share/gnupg/FAQ . )
+fi
+
+# 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
+
+# Add slack-desc files:
+mkdir -p $PKG/install
+cat $CWD/slack-desc.gnupg > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/gnupg-$VERSION-$ARCH-$BUILD.txz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/gnupg-$VERSION
+ rm -rf $PKG
+fi
diff --git a/patches/source/gnupg/slack-desc.gnupg b/patches/source/gnupg/slack-desc.gnupg
new file mode 100644
index 00000000..496005e9
--- /dev/null
+++ b/patches/source/gnupg/slack-desc.gnupg
@@ -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------------------------------------------------------|
+gnupg: gnupg (The GNU Privacy Guard)
+gnupg:
+gnupg: GnuPG is GNU's tool for secure communication and data storage. It can
+gnupg: be used to encrypt data and to create digital signatures. It includes
+gnupg: an advanced key management facility and is compliant with the proposed
+gnupg: OpenPGP Internet standard as described in RFC2440.
+gnupg:
+gnupg:
+gnupg:
+gnupg:
+gnupg:
diff --git a/patches/source/gnutls/gnutls.SlackBuild b/patches/source/gnutls/gnutls.SlackBuild
new file mode 100755
index 00000000..a74330a6
--- /dev/null
+++ b/patches/source/gnutls/gnutls.SlackBuild
@@ -0,0 +1,141 @@
+#!/bin/sh
+
+# Copyright 2007, 2008, 2009, 2010, 2016, 2017 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=gnutls
+VERSION=${VERSION:-$(echo gnutls-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+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 || 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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --enable-static=no \
+ --disable-rpath \
+ --with-included-libtasn1 \
+ --enable-openssl-compatibility \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# 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
+
+( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *.info*
+)
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL LICENSE NEWS README* THANKS \
+ doc/COPYING* \
+ $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
+
+# Likewise for the bloated NEWS:
+if [ -r NEWS ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$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 -p $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gnutls/slack-desc b/patches/source/gnutls/slack-desc
new file mode 100644
index 00000000..49fdb9f0
--- /dev/null
+++ b/patches/source/gnutls/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------------------------------------------------------|
+gnutls: gnutls (GNU TLS library)
+gnutls:
+gnutls: This is a TLS (Transport Layer Security) 1.0 and SSL (Secure Sockets
+gnutls: Layer) 3.0 implementation. In brief, GnuTLS can be described as a
+gnutls: library which offers an API to access secure communication protocols.
+gnutls: These protocols provide privacy over insecure lines, and were designed
+gnutls: to prevent eavesdropping, tampering, or message forgery.
+gnutls:
+gnutls: Homepage: http://www.gnu.org/software/gnutls/
+gnutls:
+gnutls:
diff --git a/patches/source/gtk+2/doinst.sh b/patches/source/gtk+2/doinst.sh
new file mode 100644
index 00000000..ee74ab9c
--- /dev/null
+++ b/patches/source/gtk+2/doinst.sh
@@ -0,0 +1,26 @@
+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/gtk-2.0/im-multipress.conf.new
+
+chroot . rm -f /usr/share/icons/*/icon-theme.cache 1> /dev/null 2> /dev/null
+
+# Run this if we are on an installed system. Otherwise it will be
+# handled on first boot.
+if [ -x /usr/bin/update-gtk-immodules-2.0 ]; then
+ /usr/bin/update-gtk-immodules
+fi
+
+# In case this is the first run installing the standalone gdk-pixbuf,
+# we will run this a second time to fix machines that will not reboot.
+chroot . /usr/bin/update-gdk-pixbuf-loaders 1> /dev/null 2> /dev/null
+
diff --git a/patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff b/patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff
new file mode 100644
index 00000000..6c352351
--- /dev/null
+++ b/patches/source/gtk+2/fix_build_issues_on_tutorial_and_faq.diff
@@ -0,0 +1,26 @@
+diff -Nur gtk+-2.24.27.orig/docs/faq/Makefile.in gtk+-2.24.27/docs/faq/Makefile.in
+--- gtk+-2.24.27.orig/docs/faq/Makefile.in 2015-03-03 10:41:21.000000000 -0600
++++ gtk+-2.24.27/docs/faq/Makefile.in 2015-03-05 20:21:08.037167566 -0600
+@@ -644,7 +644,8 @@
+ @HAVE_DOCBOOK_TRUE@ (cd $(srcdir); \
+ @HAVE_DOCBOOK_TRUE@ db2html gtk-faq.sgml; \
+ @HAVE_DOCBOOK_TRUE@ test -d html && rm -r html; \
+-@HAVE_DOCBOOK_TRUE@ mv gtk-faq html); \
++@HAVE_DOCBOOK_TRUE@ mkdir html; \
++@HAVE_DOCBOOK_TRUE@ mv *.html html); \
+ @HAVE_DOCBOOK_TRUE@ fi
+
+ @HAVE_DOCBOOK_TRUE@pdf:
+diff -Nur gtk+-2.24.27.orig/docs/tutorial/Makefile.in gtk+-2.24.27/docs/tutorial/Makefile.in
+--- gtk+-2.24.27.orig/docs/tutorial/Makefile.in 2015-03-03 10:41:21.000000000 -0600
++++ gtk+-2.24.27/docs/tutorial/Makefile.in 2015-03-05 20:19:52.973017063 -0600
+@@ -657,7 +657,8 @@
+ @HAVE_DOCBOOK_TRUE@ (cd $(srcdir); \
+ @HAVE_DOCBOOK_TRUE@ db2html gtk-tut.sgml; \
+ @HAVE_DOCBOOK_TRUE@ test -d html && rm -r html; \
+-@HAVE_DOCBOOK_TRUE@ mv gtk-tut html; \
++@HAVE_DOCBOOK_TRUE@ mkdir html; \
++@HAVE_DOCBOOK_TRUE@ mv *.html html; \
+ @HAVE_DOCBOOK_TRUE@ mkdir html/images; \
+ @HAVE_DOCBOOK_TRUE@ cp images/*.png html/images); \
+ @HAVE_DOCBOOK_TRUE@ fi
diff --git a/patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff
new file mode 100644
index 00000000..3fc35dca
--- /dev/null
+++ b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.am.diff
@@ -0,0 +1,264 @@
+--- gtk+-2.24.14.orig/gtk/Makefile.am 2012-08-24 18:38:09.000000000 -0500
++++ gtk+-2.24.14/gtk/Makefile.am 2012-12-12 19:03:36.039889640 -0600
+@@ -1339,7 +1339,171 @@
+ stock-icons/24/document-save.png \
+ stock-icons/24/folder-remote.png \
+ stock-icons/24/user-home.png \
+- stock-icons/24/user-desktop.png
++ stock-icons/24/user-desktop.png \
++ stock-icons/16/gtk-quit.png \
++ stock-icons/16/gtk-info.png \
++ stock-icons/16/gtk-file.png \
++ stock-icons/16/gtk-open.png \
++ stock-icons/16/gtk-print-preview.png \
++ stock-icons/16/gtk-print.png \
++ stock-icons/16/gtk-properties.png \
++ stock-icons/16/gtk-revert-to-saved-ltr.png \
++ stock-icons/16/gtk-revert-to-saved-rtl.png \
++ stock-icons/16/gtk-save-as.png \
++ stock-icons/16/gtk-new.png \
++ stock-icons/16/gtk-harddisk.png \
++ stock-icons/16/gtk-clear.png \
++ stock-icons/16/gtk-copy.png \
++ stock-icons/16/gtk-cut.png \
++ stock-icons/16/gtk-delete.png \
++ stock-icons/16/gtk-find-and-replace.png \
++ stock-icons/16/gtk-find.png \
++ stock-icons/16/gtk-paste.png \
++ stock-icons/16/gtk-redo-ltr.png \
++ stock-icons/16/gtk-redo-rtl.png \
++ stock-icons/16/gtk-select-all.png \
++ stock-icons/16/gtk-undo-ltr.png \
++ stock-icons/16/gtk-undo-rtl.png \
++ stock-icons/16/gtk-directory.png \
++ stock-icons/16/gtk-unindent-ltr.png \
++ stock-icons/16/gtk-unindent-rtl.png \
++ stock-icons/16/gtk-indent-ltr.png \
++ stock-icons/16/gtk-indent-rtl.png \
++ stock-icons/16/gtk-justify-center.png \
++ stock-icons/16/gtk-justify-fill.png \
++ stock-icons/16/gtk-justify-left.png \
++ stock-icons/16/gtk-justify-right.png \
++ stock-icons/16/gtk-bold.png \
++ stock-icons/16/gtk-italic.png \
++ stock-icons/16/gtk-strikethrough.png \
++ stock-icons/16/gtk-underline.png \
++ stock-icons/16/gtk-goto-bottom.png \
++ stock-icons/16/gtk-go-down.png \
++ stock-icons/16/gtk-goto-first-ltr.png \
++ stock-icons/16/gtk-home.png \
++ stock-icons/16/gtk-jump-to-ltr.png \
++ stock-icons/16/gtk-jump-to-rtl.png \
++ stock-icons/16/gtk-goto-last-ltr.png \
++ stock-icons/16/gtk-go-forward-ltr.png \
++ stock-icons/16/gtk-go-back-ltr.png \
++ stock-icons/16/gtk-goto-top.png \
++ stock-icons/16/gtk-go-up.png \
++ stock-icons/16/gtk-about.png \
++ stock-icons/16/gtk-help.png \
++ stock-icons/16/gtk-missing-image.png \
++ stock-icons/16/gtk-add.png \
++ stock-icons/16/gtk-remove.png \
++ stock-icons/16/gtk-floppy.png \
++ stock-icons/16/gtk-cdrom.png \
++ stock-icons/16/gtk-media-pause.png \
++ stock-icons/16/gtk-media-play-ltr.png \
++ stock-icons/16/gtk-media-play-rtl.png \
++ stock-icons/16/gtk-media-stop.png \
++ stock-icons/16/gtk-media-record.png \
++ stock-icons/16/gtk-media-rewind-ltr.png \
++ stock-icons/16/gtk-media-forward-ltr.png \
++ stock-icons/16/gtk-media-previous-ltr.png \
++ stock-icons/16/gtk-media-next-ltr.png \
++ stock-icons/16/gtk-network.png \
++ stock-icons/16/gtk-print-error.png \
++ stock-icons/16/gtk-print-report.png \
++ stock-icons/16/gtk-print-paused.png \
++ stock-icons/16/gtk-print-warning.png \
++ stock-icons/16/gtk-stop.png \
++ stock-icons/16/gtk-execute.png \
++ stock-icons/16/gtk-spell-check.png \
++ stock-icons/16/gtk-fullscreen.png \
++ stock-icons/16/gtk-refresh.png \
++ stock-icons/16/gtk-leave-fullscreen.png \
++ stock-icons/16/gtk-sort-ascending.png \
++ stock-icons/16/gtk-sort-descending.png \
++ stock-icons/16/gtk-close.png \
++ stock-icons/16/gtk-zoom-fit.png \
++ stock-icons/16/gtk-zoom-in.png \
++ stock-icons/16/gtk-zoom-100.png \
++ stock-icons/16/gtk-zoom-out.png \
++ stock-icons/24/gtk-quit.png \
++ stock-icons/24/gtk-info.png \
++ stock-icons/24/gtk-file.png \
++ stock-icons/24/gtk-open.png \
++ stock-icons/24/gtk-print-preview.png \
++ stock-icons/24/gtk-print.png \
++ stock-icons/24/gtk-properties.png \
++ stock-icons/24/gtk-revert-to-saved-ltr.png \
++ stock-icons/24/gtk-revert-to-saved-rtl.png \
++ stock-icons/24/gtk-save-as.png \
++ stock-icons/24/gtk-new.png \
++ stock-icons/24/gtk-harddisk.png \
++ stock-icons/24/gtk-clear.png \
++ stock-icons/24/gtk-copy.png \
++ stock-icons/24/gtk-cut.png \
++ stock-icons/24/gtk-delete.png \
++ stock-icons/24/gtk-find-and-replace.png \
++ stock-icons/24/gtk-find.png \
++ stock-icons/24/gtk-paste.png \
++ stock-icons/24/gtk-redo-ltr.png \
++ stock-icons/24/gtk-redo-rtl.png \
++ stock-icons/24/gtk-select-all.png \
++ stock-icons/24/gtk-undo-ltr.png \
++ stock-icons/24/gtk-undo-rtl.png \
++ stock-icons/24/gtk-directory.png \
++ stock-icons/24/gtk-unindent-ltr.png \
++ stock-icons/24/gtk-unindent-rtl.png \
++ stock-icons/24/gtk-indent-ltr.png \
++ stock-icons/24/gtk-indent-rtl.png \
++ stock-icons/24/gtk-justify-center.png \
++ stock-icons/24/gtk-justify-fill.png \
++ stock-icons/24/gtk-justify-left.png \
++ stock-icons/24/gtk-justify-right.png \
++ stock-icons/24/gtk-bold.png \
++ stock-icons/24/gtk-italic.png \
++ stock-icons/24/gtk-strikethrough.png \
++ stock-icons/24/gtk-underline.png \
++ stock-icons/24/gtk-goto-bottom.png \
++ stock-icons/24/gtk-go-down.png \
++ stock-icons/24/gtk-goto-first-ltr.png \
++ stock-icons/24/gtk-home.png \
++ stock-icons/24/gtk-jump-to-ltr.png \
++ stock-icons/24/gtk-jump-to-rtl.png \
++ stock-icons/24/gtk-goto-last-ltr.png \
++ stock-icons/24/gtk-go-forward-ltr.png \
++ stock-icons/24/gtk-go-back-ltr.png \
++ stock-icons/24/gtk-goto-top.png \
++ stock-icons/24/gtk-go-up.png \
++ stock-icons/24/gtk-about.png \
++ stock-icons/24/gtk-help.png \
++ stock-icons/24/gtk-missing-image.png \
++ stock-icons/24/gtk-add.png \
++ stock-icons/24/gtk-remove.png \
++ stock-icons/24/gtk-floppy.png \
++ stock-icons/24/gtk-cdrom.png \
++ stock-icons/24/gtk-media-pause.png \
++ stock-icons/24/gtk-media-play-ltr.png \
++ stock-icons/24/gtk-media-play-rtl.png \
++ stock-icons/24/gtk-media-stop.png \
++ stock-icons/24/gtk-media-record.png \
++ stock-icons/24/gtk-media-rewind-ltr.png \
++ stock-icons/24/gtk-media-forward-ltr.png \
++ stock-icons/24/gtk-media-previous-ltr.png \
++ stock-icons/24/gtk-media-next-ltr.png \
++ stock-icons/24/gtk-network.png \
++ stock-icons/24/gtk-print-error.png \
++ stock-icons/24/gtk-print-report.png \
++ stock-icons/24/gtk-print-paused.png \
++ stock-icons/24/gtk-print-warning.png \
++ stock-icons/24/gtk-stop.png \
++ stock-icons/24/gtk-execute.png \
++ stock-icons/24/gtk-spell-check.png \
++ stock-icons/24/gtk-fullscreen.png \
++ stock-icons/24/gtk-refresh.png \
++ stock-icons/24/gtk-leave-fullscreen.png \
++ stock-icons/24/gtk-sort-ascending.png \
++ stock-icons/24/gtk-sort-descending.png \
++ stock-icons/24/gtk-close.png \
++ stock-icons/24/gtk-zoom-fit.png \
++ stock-icons/24/gtk-zoom-in.png \
++ stock-icons/24/gtk-zoom-100.png \
++ stock-icons/24/gtk-zoom-out.png
+
+ # need to copy the icons so that we can replace the generated ones with
+ # symlinks, even in the readonly srcdir case
+@@ -1379,6 +1543,88 @@
+ && $(LN_S) folder.png user-desktop.png \
+ && $(RM) user-home.png \
+ && $(LN_S) folder.png user-home.png \
++ && $(LN_S) application-exit.png gtk-quit.png \
++ && $(LN_S) dialog-info.png gtk-info.png \
++ && $(LN_S) document-new.png gtk-file.png \
++ && $(LN_S) document-open.png gtk-open.png \
++ && $(LN_S) document-print-preview.png gtk-print-preview.png \
++ && $(LN_S) document-print.png gtk-print.png \
++ && $(LN_S) document-properties.png gtk-properties.png \
++ && $(LN_S) document-revert-ltr.png gtk-revert-to-saved-ltr.png \
++ && $(LN_S) document-revert-rtl.png gtk-revert-to-saved-rtl.png \
++ && $(LN_S) document-save-as.png gtk-save-as.png \
++ && $(LN_S) document-x-generic.png gtk-new.png \
++ && $(LN_S) drive-harddisk.png gtk-harddisk.png \
++ && $(LN_S) edit-clear.png gtk-clear.png \
++ && $(LN_S) edit-copy.png gtk-copy.png \
++ && $(LN_S) edit-cut.png gtk-cut.png \
++ && $(LN_S) edit-delete.png gtk-delete.png \
++ && $(LN_S) edit-find-replace.png gtk-find-and-replace.png \
++ && $(LN_S) edit-find.png gtk-find.png \
++ && $(LN_S) edit-paste.png gtk-paste.png \
++ && $(LN_S) edit-redo-ltr.png gtk-redo-ltr.png \
++ && $(LN_S) edit-redo-rtl.png gtk-redo-rtl.png \
++ && $(LN_S) edit-select-all.png gtk-select-all.png \
++ && $(LN_S) edit-undo-ltr.png gtk-undo-ltr.png \
++ && $(LN_S) edit-undo-rtl.png gtk-undo-rtl.png \
++ && $(LN_S) folder.png gtk-directory.png \
++ && $(LN_S) format-indent-less-ltr.png gtk-unindent-ltr.png \
++ && $(LN_S) format-indent-less-rtl.png gtk-unindent-rtl.png \
++ && $(LN_S) format-indent-more-ltr.png gtk-indent-ltr.png \
++ && $(LN_S) format-indent-more-rtl.png gtk-indent-rtl.png \
++ && $(LN_S) format-justify-center.png gtk-justify-center.png \
++ && $(LN_S) format-justify-fill.png gtk-justify-fill.png \
++ && $(LN_S) format-justify-left.png gtk-justify-left.png \
++ && $(LN_S) format-justify-right.png gtk-justify-right.png \
++ && $(LN_S) format-text-bold.png gtk-bold.png \
++ && $(LN_S) format-text-italic.png gtk-italic.png \
++ && $(LN_S) format-text-strikethrough.png gtk-strikethrough.png \
++ && $(LN_S) format-text-underline.png gtk-underline.png \
++ && $(LN_S) go-bottom.png gtk-goto-bottom.png \
++ && $(LN_S) go-down.png gtk-go-down.png \
++ && $(LN_S) go-first-ltr.png gtk-goto-first-ltr.png \
++ && $(LN_S) go-home.png gtk-home.png \
++ && $(LN_S) go-jump-ltr.png gtk-jump-to-ltr.png \
++ && $(LN_S) go-jump-rtl.png gtk-jump-to-rtl.png \
++ && $(LN_S) go-last-ltr.png gtk-goto-last-ltr.png \
++ && $(LN_S) go-next-ltr.png gtk-go-forward-ltr.png \
++ && $(LN_S) go-previous-ltr.png gtk-go-back-ltr.png \
++ && $(LN_S) go-top.png gtk-goto-top.png \
++ && $(LN_S) go-up.png gtk-go-up.png \
++ && $(LN_S) help-about.png gtk-about.png \
++ && $(LN_S) help-contents.png gtk-help.png \
++ && $(LN_S) image-missing.png gtk-missing-image.png \
++ && $(LN_S) list-add.png gtk-add.png \
++ && $(LN_S) list-remove.png gtk-remove.png \
++ && $(LN_S) media-floppy.png gtk-floppy.png \
++ && $(LN_S) media-optical.png gtk-cdrom.png \
++ && $(LN_S) media-playback-pause.png gtk-media-pause.png \
++ && $(LN_S) media-playback-start-ltr.png gtk-media-play-ltr.png \
++ && $(LN_S) media-playback-start-rtl.png gtk-media-play-rtl.png \
++ && $(LN_S) media-playback-stop.png gtk-media-stop.png \
++ && $(LN_S) media-record.png gtk-media-record.png \
++ && $(LN_S) media-seek-backward-ltr.png gtk-media-rewind-ltr.png \
++ && $(LN_S) media-seek-forward-ltr.png gtk-media-forward-ltr.png \
++ && $(LN_S) media-skip-backward-ltr.png gtk-media-previous-ltr.png \
++ && $(LN_S) media-skip-forward-ltr.png gtk-media-next-ltr.png \
++ && $(LN_S) network-idle.png gtk-network.png \
++ && $(LN_S) printer-error.png gtk-print-error.png \
++ && $(LN_S) printer-info.png gtk-print-report.png \
++ && $(LN_S) printer-paused.png gtk-print-paused.png \
++ && $(LN_S) printer-warning.png gtk-print-warning.png \
++ && $(LN_S) process-stop.png gtk-stop.png \
++ && $(LN_S) system-run.png gtk-execute.png \
++ && $(LN_S) tools-check-spelling.png gtk-spell-check.png \
++ && $(LN_S) view-fullscreen.png gtk-fullscreen.png \
++ && $(LN_S) view-refresh.png gtk-refresh.png \
++ && $(LN_S) view-restore.png gtk-leave-fullscreen.png \
++ && $(LN_S) view-sort-ascending.png gtk-sort-ascending.png \
++ && $(LN_S) view-sort-descending.png gtk-sort-descending.png \
++ && $(LN_S) window-close.png gtk-close.png \
++ && $(LN_S) zoom-fit-best.png gtk-zoom-fit.png \
++ && $(LN_S) zoom-in.png gtk-zoom-in.png \
++ && $(LN_S) zoom-original.png gtk-zoom-100.png \
++ && $(LN_S) zoom-out.png gtk-zoom-out.png \
+ ) done \
+ && touch stamp-icons
+
diff --git a/patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff
new file mode 100644
index 00000000..ff9a444b
--- /dev/null
+++ b/patches/source/gtk+2/gtk+-2.24.x.icon-compat.diff
@@ -0,0 +1,264 @@
+--- gtk+-2.24.14.orig/gtk/Makefile.in 2012-12-05 21:46:20.000000000 -0600
++++ gtk+-2.24.14/gtk/Makefile.in 2012-12-12 18:59:17.734970161 -0600
+@@ -1938,7 +1938,171 @@
+ stock-icons/24/document-save.png \
+ stock-icons/24/folder-remote.png \
+ stock-icons/24/user-home.png \
+- stock-icons/24/user-desktop.png
++ stock-icons/24/user-desktop.png \
++ stock-icons/16/gtk-quit.png \
++ stock-icons/16/gtk-info.png \
++ stock-icons/16/gtk-file.png \
++ stock-icons/16/gtk-open.png \
++ stock-icons/16/gtk-print-preview.png \
++ stock-icons/16/gtk-print.png \
++ stock-icons/16/gtk-properties.png \
++ stock-icons/16/gtk-revert-to-saved-ltr.png \
++ stock-icons/16/gtk-revert-to-saved-rtl.png \
++ stock-icons/16/gtk-save-as.png \
++ stock-icons/16/gtk-new.png \
++ stock-icons/16/gtk-harddisk.png \
++ stock-icons/16/gtk-clear.png \
++ stock-icons/16/gtk-copy.png \
++ stock-icons/16/gtk-cut.png \
++ stock-icons/16/gtk-delete.png \
++ stock-icons/16/gtk-find-and-replace.png \
++ stock-icons/16/gtk-find.png \
++ stock-icons/16/gtk-paste.png \
++ stock-icons/16/gtk-redo-ltr.png \
++ stock-icons/16/gtk-redo-rtl.png \
++ stock-icons/16/gtk-select-all.png \
++ stock-icons/16/gtk-undo-ltr.png \
++ stock-icons/16/gtk-undo-rtl.png \
++ stock-icons/16/gtk-directory.png \
++ stock-icons/16/gtk-unindent-ltr.png \
++ stock-icons/16/gtk-unindent-rtl.png \
++ stock-icons/16/gtk-indent-ltr.png \
++ stock-icons/16/gtk-indent-rtl.png \
++ stock-icons/16/gtk-justify-center.png \
++ stock-icons/16/gtk-justify-fill.png \
++ stock-icons/16/gtk-justify-left.png \
++ stock-icons/16/gtk-justify-right.png \
++ stock-icons/16/gtk-bold.png \
++ stock-icons/16/gtk-italic.png \
++ stock-icons/16/gtk-strikethrough.png \
++ stock-icons/16/gtk-underline.png \
++ stock-icons/16/gtk-goto-bottom.png \
++ stock-icons/16/gtk-go-down.png \
++ stock-icons/16/gtk-goto-first-ltr.png \
++ stock-icons/16/gtk-home.png \
++ stock-icons/16/gtk-jump-to-ltr.png \
++ stock-icons/16/gtk-jump-to-rtl.png \
++ stock-icons/16/gtk-goto-last-ltr.png \
++ stock-icons/16/gtk-go-forward-ltr.png \
++ stock-icons/16/gtk-go-back-ltr.png \
++ stock-icons/16/gtk-goto-top.png \
++ stock-icons/16/gtk-go-up.png \
++ stock-icons/16/gtk-about.png \
++ stock-icons/16/gtk-help.png \
++ stock-icons/16/gtk-missing-image.png \
++ stock-icons/16/gtk-add.png \
++ stock-icons/16/gtk-remove.png \
++ stock-icons/16/gtk-floppy.png \
++ stock-icons/16/gtk-cdrom.png \
++ stock-icons/16/gtk-media-pause.png \
++ stock-icons/16/gtk-media-play-ltr.png \
++ stock-icons/16/gtk-media-play-rtl.png \
++ stock-icons/16/gtk-media-stop.png \
++ stock-icons/16/gtk-media-record.png \
++ stock-icons/16/gtk-media-rewind-ltr.png \
++ stock-icons/16/gtk-media-forward-ltr.png \
++ stock-icons/16/gtk-media-previous-ltr.png \
++ stock-icons/16/gtk-media-next-ltr.png \
++ stock-icons/16/gtk-network.png \
++ stock-icons/16/gtk-print-error.png \
++ stock-icons/16/gtk-print-report.png \
++ stock-icons/16/gtk-print-paused.png \
++ stock-icons/16/gtk-print-warning.png \
++ stock-icons/16/gtk-stop.png \
++ stock-icons/16/gtk-execute.png \
++ stock-icons/16/gtk-spell-check.png \
++ stock-icons/16/gtk-fullscreen.png \
++ stock-icons/16/gtk-refresh.png \
++ stock-icons/16/gtk-leave-fullscreen.png \
++ stock-icons/16/gtk-sort-ascending.png \
++ stock-icons/16/gtk-sort-descending.png \
++ stock-icons/16/gtk-close.png \
++ stock-icons/16/gtk-zoom-fit.png \
++ stock-icons/16/gtk-zoom-in.png \
++ stock-icons/16/gtk-zoom-100.png \
++ stock-icons/16/gtk-zoom-out.png \
++ stock-icons/24/gtk-quit.png \
++ stock-icons/24/gtk-info.png \
++ stock-icons/24/gtk-file.png \
++ stock-icons/24/gtk-open.png \
++ stock-icons/24/gtk-print-preview.png \
++ stock-icons/24/gtk-print.png \
++ stock-icons/24/gtk-properties.png \
++ stock-icons/24/gtk-revert-to-saved-ltr.png \
++ stock-icons/24/gtk-revert-to-saved-rtl.png \
++ stock-icons/24/gtk-save-as.png \
++ stock-icons/24/gtk-new.png \
++ stock-icons/24/gtk-harddisk.png \
++ stock-icons/24/gtk-clear.png \
++ stock-icons/24/gtk-copy.png \
++ stock-icons/24/gtk-cut.png \
++ stock-icons/24/gtk-delete.png \
++ stock-icons/24/gtk-find-and-replace.png \
++ stock-icons/24/gtk-find.png \
++ stock-icons/24/gtk-paste.png \
++ stock-icons/24/gtk-redo-ltr.png \
++ stock-icons/24/gtk-redo-rtl.png \
++ stock-icons/24/gtk-select-all.png \
++ stock-icons/24/gtk-undo-ltr.png \
++ stock-icons/24/gtk-undo-rtl.png \
++ stock-icons/24/gtk-directory.png \
++ stock-icons/24/gtk-unindent-ltr.png \
++ stock-icons/24/gtk-unindent-rtl.png \
++ stock-icons/24/gtk-indent-ltr.png \
++ stock-icons/24/gtk-indent-rtl.png \
++ stock-icons/24/gtk-justify-center.png \
++ stock-icons/24/gtk-justify-fill.png \
++ stock-icons/24/gtk-justify-left.png \
++ stock-icons/24/gtk-justify-right.png \
++ stock-icons/24/gtk-bold.png \
++ stock-icons/24/gtk-italic.png \
++ stock-icons/24/gtk-strikethrough.png \
++ stock-icons/24/gtk-underline.png \
++ stock-icons/24/gtk-goto-bottom.png \
++ stock-icons/24/gtk-go-down.png \
++ stock-icons/24/gtk-goto-first-ltr.png \
++ stock-icons/24/gtk-home.png \
++ stock-icons/24/gtk-jump-to-ltr.png \
++ stock-icons/24/gtk-jump-to-rtl.png \
++ stock-icons/24/gtk-goto-last-ltr.png \
++ stock-icons/24/gtk-go-forward-ltr.png \
++ stock-icons/24/gtk-go-back-ltr.png \
++ stock-icons/24/gtk-goto-top.png \
++ stock-icons/24/gtk-go-up.png \
++ stock-icons/24/gtk-about.png \
++ stock-icons/24/gtk-help.png \
++ stock-icons/24/gtk-missing-image.png \
++ stock-icons/24/gtk-add.png \
++ stock-icons/24/gtk-remove.png \
++ stock-icons/24/gtk-floppy.png \
++ stock-icons/24/gtk-cdrom.png \
++ stock-icons/24/gtk-media-pause.png \
++ stock-icons/24/gtk-media-play-ltr.png \
++ stock-icons/24/gtk-media-play-rtl.png \
++ stock-icons/24/gtk-media-stop.png \
++ stock-icons/24/gtk-media-record.png \
++ stock-icons/24/gtk-media-rewind-ltr.png \
++ stock-icons/24/gtk-media-forward-ltr.png \
++ stock-icons/24/gtk-media-previous-ltr.png \
++ stock-icons/24/gtk-media-next-ltr.png \
++ stock-icons/24/gtk-network.png \
++ stock-icons/24/gtk-print-error.png \
++ stock-icons/24/gtk-print-report.png \
++ stock-icons/24/gtk-print-paused.png \
++ stock-icons/24/gtk-print-warning.png \
++ stock-icons/24/gtk-stop.png \
++ stock-icons/24/gtk-execute.png \
++ stock-icons/24/gtk-spell-check.png \
++ stock-icons/24/gtk-fullscreen.png \
++ stock-icons/24/gtk-refresh.png \
++ stock-icons/24/gtk-leave-fullscreen.png \
++ stock-icons/24/gtk-sort-ascending.png \
++ stock-icons/24/gtk-sort-descending.png \
++ stock-icons/24/gtk-close.png \
++ stock-icons/24/gtk-zoom-fit.png \
++ stock-icons/24/gtk-zoom-in.png \
++ stock-icons/24/gtk-zoom-100.png \
++ stock-icons/24/gtk-zoom-out.png
+
+ @CROSS_COMPILING_FALSE@gtk_update_icon_cache_program = \
+ @CROSS_COMPILING_FALSE@ ./gtk-update-icon-cache
+@@ -5401,6 +5565,88 @@
+ && $(LN_S) folder.png user-desktop.png \
+ && $(RM) user-home.png \
+ && $(LN_S) folder.png user-home.png \
++ && $(LN_S) application-exit.png gtk-quit.png \
++ && $(LN_S) dialog-info.png gtk-info.png \
++ && $(LN_S) document-new.png gtk-file.png \
++ && $(LN_S) document-open.png gtk-open.png \
++ && $(LN_S) document-print-preview.png gtk-print-preview.png \
++ && $(LN_S) document-print.png gtk-print.png \
++ && $(LN_S) document-properties.png gtk-properties.png \
++ && $(LN_S) document-revert-ltr.png gtk-revert-to-saved-ltr.png \
++ && $(LN_S) document-revert-rtl.png gtk-revert-to-saved-rtl.png \
++ && $(LN_S) document-save-as.png gtk-save-as.png \
++ && $(LN_S) document-x-generic.png gtk-new.png \
++ && $(LN_S) drive-harddisk.png gtk-harddisk.png \
++ && $(LN_S) edit-clear.png gtk-clear.png \
++ && $(LN_S) edit-copy.png gtk-copy.png \
++ && $(LN_S) edit-cut.png gtk-cut.png \
++ && $(LN_S) edit-delete.png gtk-delete.png \
++ && $(LN_S) edit-find-replace.png gtk-find-and-replace.png \
++ && $(LN_S) edit-find.png gtk-find.png \
++ && $(LN_S) edit-paste.png gtk-paste.png \
++ && $(LN_S) edit-redo-ltr.png gtk-redo-ltr.png \
++ && $(LN_S) edit-redo-rtl.png gtk-redo-rtl.png \
++ && $(LN_S) edit-select-all.png gtk-select-all.png \
++ && $(LN_S) edit-undo-ltr.png gtk-undo-ltr.png \
++ && $(LN_S) edit-undo-rtl.png gtk-undo-rtl.png \
++ && $(LN_S) folder.png gtk-directory.png \
++ && $(LN_S) format-indent-less-ltr.png gtk-unindent-ltr.png \
++ && $(LN_S) format-indent-less-rtl.png gtk-unindent-rtl.png \
++ && $(LN_S) format-indent-more-ltr.png gtk-indent-ltr.png \
++ && $(LN_S) format-indent-more-rtl.png gtk-indent-rtl.png \
++ && $(LN_S) format-justify-center.png gtk-justify-center.png \
++ && $(LN_S) format-justify-fill.png gtk-justify-fill.png \
++ && $(LN_S) format-justify-left.png gtk-justify-left.png \
++ && $(LN_S) format-justify-right.png gtk-justify-right.png \
++ && $(LN_S) format-text-bold.png gtk-bold.png \
++ && $(LN_S) format-text-italic.png gtk-italic.png \
++ && $(LN_S) format-text-strikethrough.png gtk-strikethrough.png \
++ && $(LN_S) format-text-underline.png gtk-underline.png \
++ && $(LN_S) go-bottom.png gtk-goto-bottom.png \
++ && $(LN_S) go-down.png gtk-go-down.png \
++ && $(LN_S) go-first-ltr.png gtk-goto-first-ltr.png \
++ && $(LN_S) go-home.png gtk-home.png \
++ && $(LN_S) go-jump-ltr.png gtk-jump-to-ltr.png \
++ && $(LN_S) go-jump-rtl.png gtk-jump-to-rtl.png \
++ && $(LN_S) go-last-ltr.png gtk-goto-last-ltr.png \
++ && $(LN_S) go-next-ltr.png gtk-go-forward-ltr.png \
++ && $(LN_S) go-previous-ltr.png gtk-go-back-ltr.png \
++ && $(LN_S) go-top.png gtk-goto-top.png \
++ && $(LN_S) go-up.png gtk-go-up.png \
++ && $(LN_S) help-about.png gtk-about.png \
++ && $(LN_S) help-contents.png gtk-help.png \
++ && $(LN_S) image-missing.png gtk-missing-image.png \
++ && $(LN_S) list-add.png gtk-add.png \
++ && $(LN_S) list-remove.png gtk-remove.png \
++ && $(LN_S) media-floppy.png gtk-floppy.png \
++ && $(LN_S) media-optical.png gtk-cdrom.png \
++ && $(LN_S) media-playback-pause.png gtk-media-pause.png \
++ && $(LN_S) media-playback-start-ltr.png gtk-media-play-ltr.png \
++ && $(LN_S) media-playback-start-rtl.png gtk-media-play-rtl.png \
++ && $(LN_S) media-playback-stop.png gtk-media-stop.png \
++ && $(LN_S) media-record.png gtk-media-record.png \
++ && $(LN_S) media-seek-backward-ltr.png gtk-media-rewind-ltr.png \
++ && $(LN_S) media-seek-forward-ltr.png gtk-media-forward-ltr.png \
++ && $(LN_S) media-skip-backward-ltr.png gtk-media-previous-ltr.png \
++ && $(LN_S) media-skip-forward-ltr.png gtk-media-next-ltr.png \
++ && $(LN_S) network-idle.png gtk-network.png \
++ && $(LN_S) printer-error.png gtk-print-error.png \
++ && $(LN_S) printer-info.png gtk-print-report.png \
++ && $(LN_S) printer-paused.png gtk-print-paused.png \
++ && $(LN_S) printer-warning.png gtk-print-warning.png \
++ && $(LN_S) process-stop.png gtk-stop.png \
++ && $(LN_S) system-run.png gtk-execute.png \
++ && $(LN_S) tools-check-spelling.png gtk-spell-check.png \
++ && $(LN_S) view-fullscreen.png gtk-fullscreen.png \
++ && $(LN_S) view-refresh.png gtk-refresh.png \
++ && $(LN_S) view-restore.png gtk-leave-fullscreen.png \
++ && $(LN_S) view-sort-ascending.png gtk-sort-ascending.png \
++ && $(LN_S) view-sort-descending.png gtk-sort-descending.png \
++ && $(LN_S) window-close.png gtk-close.png \
++ && $(LN_S) zoom-fit-best.png gtk-zoom-fit.png \
++ && $(LN_S) zoom-in.png gtk-zoom-in.png \
++ && $(LN_S) zoom-original.png gtk-zoom-100.png \
++ && $(LN_S) zoom-out.png gtk-zoom-out.png \
+ ) done \
+ && touch stamp-icons
+
diff --git a/patches/source/gtk+2/gtk+2.SlackBuild b/patches/source/gtk+2/gtk+2.SlackBuild
new file mode 100755
index 00000000..54812fff
--- /dev/null
+++ b/patches/source/gtk+2/gtk+2.SlackBuild
@@ -0,0 +1,203 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 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.
+
+
+VERSION=${VERSION:-$(echo gtk+-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-gtk2
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr
+cd $TMP
+rm -rf gtk+-$VERSION
+tar xvf $CWD/gtk+-$VERSION.tar.?z* || exit 1
+cd gtk+-$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 {} \;
+
+# Fix build errors
+zcat $CWD/fix_build_issues_on_tutorial_and_faq.diff.gz | patch -p1 --verbose || exit 1
+
+# Do not flood the console or .xsession-errors with "trouble ahead"
+# warnings (most noticable when using Firefox and Flash):
+zcat $CWD/gtk.xid.nowarningflood.diff.gz | patch -p1 --verbose || exit 1
+
+# Patch to restore commonly used icon names, otherwise everything breaks.
+# I fail to see the point of this "cleanup"
+zcat $CWD/gtk+-2.24.x.icon-compat.am.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gtk+-2.24.x.icon-compat.diff.gz | patch -p1 --verbose || exit 1
+
+# Prevents build failures in the docs. Found online.
+# Only needed if autoreconf is used... ?
+zcat $CWD/gtk.gtk-faq.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/gtk.gtk-tut.diff.gz | patch -p1 --verbose || exit 1
+
+# Regenerate ./configure:
+libtoolize --force
+autoreconf -vif
+
+# Autoconf changes linux to linux-gnu.
+# Our host is $ARCH-slackware-linux not $ARCH-slackware-linux-gnu:
+sed -i -e 's#linux|linux-gnu|#linux|linux|#' config.sub
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --with-xinput=yes \
+ --enable-xkb \
+ --enable-introspection \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+
+# Check the host value that is passed to the compile to the one in this script:
+host="$ARCH-slackware-linux"
+compile_host=$(grep 'host_triplet =' gtk/Makefile | sed -e "s/.* = //")
+if [ "x$compile_host" != "x$host" ]; then
+ echo "Host mismatch: compile='$compile_host', SlackBuild='$host'" && exit 1
+fi
+
+make install \
+ RUN_QUERY_IMMODULES_TEST=false RUN_QUERY_LOADER_TEST=false \
+ DESTDIR=$PKG \
+ || exit 1
+
+# Don't clobber im-multipress.conf
+mv $PKG/etc/gtk-2.0/im-multipress.conf $PKG/etc/gtk-2.0/im-multipress.conf.new || exit 1
+
+# Install a "starter" gtkrc
+# /etc/gtk-2.0/gtkrc overrides this --rworkman
+echo 'gtk-theme-name="GTK+"' > $PKG/usr/share/gtk-2.0/gtkrc
+echo 'gtk-icon-theme-name="Adwaita"' >> $PKG/usr/share/gtk-2.0/gtkrc
+echo 'gtk-fallback-icon-theme = "Tango"' >> $PKG/usr/share/gtk-2.0/gtkrc
+
+# We need to have separate 32-bit and 64-bit binaries
+# for places where we have two copies of the GTK+ package installed.
+# (we might have x86_64 and i486 packages on the same system, for example.)
+case "$host" in
+ s390x*|x86_64*)
+ mv $PKG/usr/bin/gtk-query-immodules-2.0{,-64}
+ ( cd $PKG/usr/bin
+ ln -sf gtk-query-immodules-2.0-64 gtk-query-immodules-2.0
+ )
+ ;;
+ *)
+ mv $PKG/usr/bin/gtk-query-immodules-2.0{,-32}
+ ( cd $PKG/usr/bin
+ ln -sf gtk-query-immodules-2.0-32 gtk-query-immodules-2.0
+ )
+ ;;
+esac
+
+# Install wrappers for the binaries:
+cp -a $CWD/update-gtk-immodules* $PKG/usr/bin
+chown root:root $PKG/usr/bin/update-*
+chmod 0755 $PKG/usr/bin/update-*
+
+# Add profile scripts to set up GTK+ environment:
+mkdir -p $PKG/etc/profile.d
+cp -a $CWD/profile.d/* $PKG/etc/profile.d
+chmod 0755 $PKG/etc/profile.d/*
+
+# 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 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
+
+mkdir -p $PKG/usr/doc/gtk+-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* TODO \
+ $PKG/usr/doc/gtk+-$VERSION
+( cd $PKG/usr/doc/gtk+-$VERSION
+ ln -s ../../share/gtk-doc/html/gail-libgail-util .
+ ln -s ../../share/gtk-doc/html/gdk .
+ ln -s ../../share/gtk-doc/html/gtk .
+)
+
+# 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
+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/gtk+2-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/gtk+2/gtk.gtk-faq.diff b/patches/source/gtk+2/gtk.gtk-faq.diff
new file mode 100644
index 00000000..f3307d51
--- /dev/null
+++ b/patches/source/gtk+2/gtk.gtk-faq.diff
@@ -0,0 +1,11 @@
+--- ./docs/faq/Makefile.am.orig 2014-09-29 15:02:16.000000000 -0500
++++ ./docs/faq/Makefile.am 2015-03-18 22:11:42.692413132 -0500
+@@ -7,7 +7,7 @@
+ html:
+ if test -w $(srcdir); then \
+ (cd $(srcdir); \
+- db2html gtk-faq.sgml; \
++ db2html -o gtk-faq gtk-faq.sgml; \
+ test -d html && rm -r html; \
+ mv gtk-faq html); \
+ fi
diff --git a/patches/source/gtk+2/gtk.gtk-tut.diff b/patches/source/gtk+2/gtk.gtk-tut.diff
new file mode 100644
index 00000000..ee363a26
--- /dev/null
+++ b/patches/source/gtk+2/gtk.gtk-tut.diff
@@ -0,0 +1,11 @@
+--- ./docs/tutorial/Makefile.am.orig 2014-09-29 15:02:16.000000000 -0500
++++ ./docs/tutorial/Makefile.am 2015-03-18 22:04:36.171382357 -0500
+@@ -40,7 +40,7 @@
+ html: gtk-tut.sgml
+ if test -w $(srcdir); then \
+ (cd $(srcdir); \
+- db2html gtk-tut.sgml; \
++ db2html -o gtk-tut gtk-tut.sgml; \
+ test -d html && rm -r html; \
+ mv gtk-tut html; \
+ mkdir html/images; \
diff --git a/patches/source/gtk+2/gtk.xid.nowarningflood.diff b/patches/source/gtk+2/gtk.xid.nowarningflood.diff
new file mode 100644
index 00000000..6b8c854d
--- /dev/null
+++ b/patches/source/gtk+2/gtk.xid.nowarningflood.diff
@@ -0,0 +1,12 @@
+--- ./gdk/x11/gdkxid.c.orig 2009-12-18 20:54:50.000000000 -0600
++++ ./gdk/x11/gdkxid.c 2010-02-08 14:42:50.000000000 -0600
+@@ -57,9 +57,6 @@
+ display_x11->xid_ht = g_hash_table_new ((GHashFunc) gdk_xid_hash,
+ (GEqualFunc) gdk_xid_equal);
+
+- if (g_hash_table_lookup (display_x11->xid_ht, xid))
+- g_warning ("XID collision, trouble ahead");
+-
+ g_hash_table_insert (display_x11->xid_ht, xid, data);
+ }
+
diff --git a/patches/source/gtk+2/profile.d/gtk+.csh b/patches/source/gtk+2/profile.d/gtk+.csh
new file mode 100755
index 00000000..c9ea5acb
--- /dev/null
+++ b/patches/source/gtk+2/profile.d/gtk+.csh
@@ -0,0 +1,2 @@
+#!/bin/csh
+setenv GDK_USE_XFT 1
diff --git a/patches/source/gtk+2/profile.d/gtk+.sh b/patches/source/gtk+2/profile.d/gtk+.sh
new file mode 100755
index 00000000..ff3d4927
--- /dev/null
+++ b/patches/source/gtk+2/profile.d/gtk+.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+GDK_USE_XFT=1
+export GDK_USE_XFT
diff --git a/patches/source/gtk+2/slack-desc b/patches/source/gtk+2/slack-desc
new file mode 100644
index 00000000..bd800ade
--- /dev/null
+++ b/patches/source/gtk+2/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------------------------------------------------------|
+gtk+2: GTK+ version 2 (multi-platform GUI toolkit)
+gtk+2:
+gtk+2: This is GTK+, a multi-platform toolkit for creating graphical user
+gtk+2: interfaces. Offering a complete set of widgets, GTK+ is suitable for
+gtk+2: projects ranging from small one-off projects to complete application
+gtk+2: suites.
+gtk+2:
+gtk+2:
+gtk+2:
+gtk+2:
+gtk+2:
diff --git a/patches/source/gtk+2/update-gtk-immodules b/patches/source/gtk+2/update-gtk-immodules
new file mode 100644
index 00000000..a56b3fdc
--- /dev/null
+++ b/patches/source/gtk+2/update-gtk-immodules
@@ -0,0 +1,12 @@
+#! /bin/sh
+#
+# This is a wrapper script that calls update-gtk-immodules-2.0 (GTK+2)
+# and/or update-gtk-immodules-3.0 (GTK+3) to do the actual updating.
+
+if [ -x /usr/bin/update-gtk-immodules-2.0 ]; then
+ /usr/bin/update-gtk-immodules-2.0 $*
+fi
+if [ -x /usr/bin/update-gtk-immodules-3.0 ]; then
+ /usr/bin/update-gtk-immodules-3.0 $*
+fi
+
diff --git a/patches/source/gtk+2/update-gtk-immodules-2.0 b/patches/source/gtk+2/update-gtk-immodules-2.0
new file mode 100644
index 00000000..f12353fb
--- /dev/null
+++ b/patches/source/gtk+2/update-gtk-immodules-2.0
@@ -0,0 +1,48 @@
+#! /bin/sh
+# Updates the immodules cache at /usr/lib(64)/gtk-2.0/2.10.0/immodules.cache
+
+umask 022
+
+# Get the machine type from uname:
+host=$(uname -m)-slackware-linux
+
+# Fix $host for arm arch:
+case "$host" in
+ arm*) host=arm-slackware-linux-gnueabi ;;
+esac
+
+case "$host" in
+ s390x*|x86_64*)
+ if [ -x /usr/bin/gtk-query-immodules-2.0-64 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gtk.immodules for ${host}:"
+ echo " /usr/bin/gtk-query-immodules-2.0-64 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0-64 --update-cache 2>/dev/null
+ # Check for multilib
+ if [ -x /usr/bin/gtk-query-immodules-2.0-32 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating 32bit gtk.immodules: "
+ echo " /usr/bin/gtk-query-immodules-2.0-32 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2>/dev/null
+ fi
+ fi
+ ;;
+ *)
+ if [ -x /usr/bin/gtk-query-immodules-2.0-32 ]; then
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gtk.immodules for ${host}:"
+ echo " /usr/bin/gtk-query-immodules-2.0-32 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0-32 --update-cache 2>/dev/null
+ else
+ if [ "$1" = "--verbose" ]; then
+ echo "Updating gtk.immodules for ${host}:"
+ echo " /usr/bin/gtk-query-immodules-2.0 --update-cache"
+ fi
+ /usr/bin/gtk-query-immodules-2.0 --update-cache 2>/dev/null
+ fi
+ ;;
+esac
+
diff --git a/patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch b/patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch
new file mode 100644
index 00000000..be590f29
--- /dev/null
+++ b/patches/source/httpd/apache-2.4.CVE-2017-9798.optionsbleed.patch
@@ -0,0 +1,15 @@
+--- httpd/httpd/branches/2.4.x/server/core.c 2017/08/16 16:50:29 1805223
++++ httpd/httpd/branches/2.4.x/server/core.c 2017/09/08 13:13:11 1807754
+@@ -2266,6 +2266,12 @@
+ /* method has not been registered yet, but resource restriction
+ * is always checked before method handling, so register it.
+ */
++ if (cmd->pool == cmd->temp_pool) {
++ /* In .htaccess, we can't globally register new methods. */
++ return apr_psprintf(cmd->pool, "Could not register method '%s' "
++ "for %s from .htaccess configuration",
++ method, cmd->cmd->name);
++ }
+ methnum = ap_method_register(cmd->pool,
+ apr_pstrdup(cmd->pool, method));
+ }
diff --git a/patches/source/httpd/doinst.sh b/patches/source/httpd/doinst.sh
new file mode 100644
index 00000000..e233c362
--- /dev/null
+++ b/patches/source/httpd/doinst.sh
@@ -0,0 +1,71 @@
+#!/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...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ # Don't use config() -- we always want to install this, changed or unchanged.
+ #config ${NEW}
+}
+
+if [ ! -e var/log/httpd ]; then
+ mkdir -p var/log/httpd
+ chmod 755 var/log/httpd
+fi
+
+# Don't wipe out an existing document root with symlinks. If someone has
+# replaced the symlinks that are created on a fresh installation, assume
+# that they know what they are doing and leave things as-is.
+if [ ! -e srv/www ]; then
+ ( cd srv ; ln -sf /var/www www )
+fi
+if [ ! -e srv/httpd ]; then
+ ( cd srv ; ln -sf /var/www httpd )
+fi
+
+# Once again, our intent is not to wipe out anyone's
+# site, but building in Apache's docs tree is not as
+# good an idea as picking a unique DocumentRoot.
+#
+# Still, we will do what we can here to mitigate
+# possible site damage:
+if [ -r var/www/htdocs/index.html ]; then
+ if [ ! -r "var/log/packages/httpd-*upgraded*" ]; then
+ if [ var/www/htdocs/index.html -nt var/log/packages/httpd-*-? ]; then
+ cp -a var/www/htdocs/index.html var/www/htdocs/index.html.bak.$$
+ fi
+ fi
+fi
+
+# Keep same perms when installing rc.httpd.new:
+preserve_perms etc/rc.d/rc.httpd.new
+# Always install the new rc.httpd:
+mv etc/rc.d/rc.httpd.new etc/rc.d/rc.httpd
+
+# Handle config files. Unless this is a fresh installation, the
+# admin will have to move the .new files into place to complete
+# the package installation, as we don't want to clobber files that
+# may contain local customizations.
+config etc/httpd/httpd.conf.new
+config etc/logrotate.d/httpd.new
+for conf_file in etc/httpd/extra/*.new; do
+ config $conf_file
+done
+config var/www/htdocs/index.html.new
+
diff --git a/patches/source/httpd/httpd.SlackBuild b/patches/source/httpd/httpd.SlackBuild
new file mode 100755
index 00000000..b4366527
--- /dev/null
+++ b/patches/source/httpd/httpd.SlackBuild
@@ -0,0 +1,246 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2017 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.
+
+# This script was written using the one from slackbuilds.org as a reference,
+# so thanks to Adis Nezirovic ( adis _at_ linux.org.ba ) for the original work.
+
+
+PKGNAM=httpd
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.bz2 || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# 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 {} \;
+
+# A brief note about mpms:
+#
+# "prefork" is the legacy forked mpm, used with mod_php. Starting with httpd
+# 2.4.0, new threaded mpms are available, and previously experimental mpms are
+# now stable
+#
+# Non-threaded mpms are no longer required, since php applications can now be
+# deployed with the help of mod_fcgid, essentially a set of fixed dedicated cgi
+# processes spawned for the whole purpose of executing dynamic applications
+#
+# Threaded mpms, by their very nature, are far more scalable than the
+# traditional preforking solution. They consume less memory for the same
+# workload, when serving the same amount of clients. httpd 2.4 ships with two
+# options, "event" and "worker", where the former is the default mpm used if
+# none is specified at the ./configure line
+#
+# Lastly, the "prefork" mpm can be used with mod_php as of version 5.4.0,
+# which yields a much improved stability, even with most mod_php extensions
+# loaded.
+#
+# The running mpm can be changed by simply loading the module. Here is a sample:
+# LoadModule mpm_event_module lib(64)/httpd/modules/mod_mpm_event.so
+#
+# When upgrading from 2.2, please make sure to stop the deamon first, or your
+# new instance may segfault.
+
+# Fix config.layout to use lib${LIBDIRSUFFIX}:
+sed -i -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" config.layout
+
+# If /var/run becomes a tmpfs or a link to /run, subdirectories could be a problem.
+# Just use /var/run rather than /var/run/httpd.
+sed -i -e "s#/run/httpd#/run#" config.layout
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --enable-layout=Slackware-FHS \
+ --with-apr=/usr \
+ --with-apr-util=/usr \
+ --enable-mods-shared=all \
+ --enable-so \
+ --enable-mpms-shared=all \
+ --enable-pie \
+ --enable-cgi \
+ --with-pcre \
+ --enable-ssl \
+ --enable-rewrite \
+ --enable-vhost-alias \
+ --enable-proxy \
+ --enable-proxy-http \
+ --enable-proxy-ftp \
+ --enable-cache \
+ --enable-mem-cache \
+ --enable-file-cache \
+ --enable-disk-cache \
+ --enable-dav \
+ --enable-ldap \
+ --enable-authnz-ldap \
+ --enable-authn-anon \
+ --enable-authn-alias \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+rmdir $PKG/usr/bin
+
+# Tweak default apache configuration
+( cd $PKG
+ zcat $CWD/httpd.runasapache.diff.gz | patch -p1 --verbose || exit 1
+ # mod_proxy_balancer should be commented out, as otherwise httpd
+ # will not start without additional configuration:
+ sed -i "s/^LoadModule proxy_balancer_module/#LoadModule proxy_balancer_module/g" $PKG/etc/httpd/httpd.conf
+ # This module issues a warning unless some non-default modules are loaded:
+ sed -i "s/^LoadModule lbmethod_heartbeat_module/#LoadModule lbmethod_heartbeat_module/g" $PKG/etc/httpd/httpd.conf
+ rm -f $PKG/etc/httpd/httpd.conf~ $PKG/etc/httpd/httpd.conf.orig
+) || exit 1
+# Change config files to .new:
+( cd $PKG/etc/httpd
+ mv httpd.conf httpd.conf.new
+ for file in extra/*; do
+ mv $file "${file}.new"
+ done
+)
+
+cat << EOF >> $PKG/etc/httpd/httpd.conf.new
+
+# Uncomment the following line to enable PHP:
+#
+#Include /etc/httpd/mod_php.conf
+
+# Uncomment the following lines (and mod_dav above) to enable svn support:
+#
+#LoadModule dav_svn_module lib${LIBDIRSUFFIX}/httpd/modules/mod_dav_svn.so
+#LoadModule authz_svn_module lib${LIBDIRSUFFIX}/httpd/modules/mod_authz_svn.so
+
+EOF
+
+rmdir $PKG/var/log/httpd
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.httpd > $PKG/etc/rc.d/rc.httpd.new
+
+mkdir -p $PKG/etc/logrotate.d
+cat $CWD/logrotate.httpd > $PKG/etc/logrotate.d/httpd.new
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/
+cp -a \
+ ABOUT_APACHE Apache.dsw BuildBin.dsp CHANGES INSTALL InstallBin.dsp LAYOUT LICENSE NOTICE NWGNUmakefile README* ROADMAP VERSIONING \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Other distributions also strip the manual down to just English.
+# If this isn't your language of choice, mea culpa.
+( cd $PKG/srv/httpd/htdocs/manual
+ for file in $(find . -type f -name "*.html") ; do
+ if [ -f ${file}.en ]; then
+ cp ${file}.en ${file}
+ rm -f ${file}.*
+ fi
+ done
+)
+
+# On Slackware, the traditional location for the Apache document root has always
+# been "/var/www/htdocs/". We can avoid an unpleasant surprise for people by
+# leaving things where they've always been, and comply with the FHS by providing
+# symlinks allowing access through the FHS-approved pathnames. KDE, for example,
+# will look for htdig's htsearch here: /var/www/cgi-bin/htsearch
+mv $PKG/srv/httpd $PKG/var/www
+
+## DISABLED. Don't make these symlinks prior to packaging any more, as it is
+## possibly dangerous to an existing document root created in the place where
+## these symlinks are normally found. Instead, we make them in the install
+## script (only if nothing exists there already)
+#( cd $PKG/srv
+# ln -sf /var/www .
+# ln -sf /var/www httpd
+#)
+
+# OK, it's just not generally good form to put your web site in /var/www/htdocs,
+# but people do it every day. Like all new .new files, this won't save them this
+# time, but if they don't learn their lesson now then it will the next time:
+mv $PKG/var/www/htdocs/index.html $PKG/var/www/htdocs/index.html.new
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# 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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/httpd/httpd.runasapache.diff b/patches/source/httpd/httpd.runasapache.diff
new file mode 100644
index 00000000..c1954ec3
--- /dev/null
+++ b/patches/source/httpd/httpd.runasapache.diff
@@ -0,0 +1,13 @@
+--- ./etc/httpd/httpd.conf.orig 2008-02-14 15:24:21.000000000 -0600
++++ ./etc/httpd/httpd.conf 2008-02-14 15:34:58.000000000 -0600
+@@ -125,8 +125,8 @@
+ # It is usually good practice to create a dedicated user and group for
+ # running httpd, as with most system services.
+ #
+-User daemon
+-Group daemon
++User apache
++Group apache
+
+ </IfModule>
+ </IfModule>
diff --git a/patches/source/httpd/httpd.url b/patches/source/httpd/httpd.url
new file mode 100644
index 00000000..b86771d4
--- /dev/null
+++ b/patches/source/httpd/httpd.url
@@ -0,0 +1,2 @@
+http://www.apache.org/dist/httpd/httpd-2.4.29.tar.bz2
+http://www.apache.org/dist/httpd/httpd-2.4.29.tar.bz2.asc
diff --git a/patches/source/httpd/logrotate.httpd b/patches/source/httpd/logrotate.httpd
new file mode 100644
index 00000000..cc638367
--- /dev/null
+++ b/patches/source/httpd/logrotate.httpd
@@ -0,0 +1,12 @@
+/var/log/httpd/*_log {
+ rotate 10
+ notifempty
+ missingok
+ size=5M
+ compress
+ delaycompress
+ sharedscripts
+ postrotate
+ /etc/rc.d/rc.httpd restart
+ endscript
+}
diff --git a/patches/source/httpd/rc.httpd b/patches/source/httpd/rc.httpd
new file mode 100644
index 00000000..81189098
--- /dev/null
+++ b/patches/source/httpd/rc.httpd
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.httpd
+#
+# Start/stop/restart/graceful[ly restart]/graceful[ly]-stop
+# the Apache (httpd) web server.
+#
+# To make Apache start automatically at boot, make this
+# file executable: chmod 755 /etc/rc.d/rc.httpd
+#
+# For information on these options, "man apachectl".
+
+case "$1" in
+ 'start')
+ /usr/sbin/apachectl -k start
+ ;;
+ 'stop')
+ /usr/sbin/apachectl -k stop
+ killall httpd
+ # Remove both old and new .pid locations:
+ rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
+ ;;
+ 'force-restart')
+ # Because sometimes restarting through apachectl just doesn't do the trick...
+ /usr/sbin/apachectl -k stop
+ killall httpd
+ # Remove both old and new .pid locations:
+ rm -f /var/run/httpd.pid /var/run/httpd/httpd.pid
+ /usr/sbin/apachectl -k start
+ ;;
+ 'restart')
+ /usr/sbin/apachectl -k restart
+ ;;
+ 'graceful')
+ /usr/sbin/apachectl -k graceful
+ ;;
+ 'graceful-stop')
+ /usr/sbin/apachectl -k graceful-stop
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|graceful|graceful-stop}"
+ ;;
+esac
+
diff --git a/patches/source/httpd/slack-desc b/patches/source/httpd/slack-desc
new file mode 100644
index 00000000..38d240b6
--- /dev/null
+++ b/patches/source/httpd/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------------------------------------------------------|
+httpd: httpd (The Apache HTTP Server)
+httpd:
+httpd: Apache is an HTTP server designed as a plug-in replacement for the
+httpd: NCSA HTTP server. It fixes numerous bugs in the NCSA server and
+httpd: includes many frequently requested new features, and has an API which
+httpd: allows it to be extended to meet users' needs more easily.
+httpd:
+httpd: Apache is the most popular web server in the known universe; over
+httpd: half of the servers on the Internet are running Apache or one of
+httpd: its variants.
+httpd:
diff --git a/patches/source/intltool/intltool-0.51.0-perl-5.22.patch b/patches/source/intltool/intltool-0.51.0-perl-5.22.patch
new file mode 100644
index 00000000..be672d0c
--- /dev/null
+++ b/patches/source/intltool/intltool-0.51.0-perl-5.22.patch
@@ -0,0 +1,44 @@
+diff -Naur intltool-0.51.0.orig/intltool-update.in intltool-0.51.0/intltool-update.in
+--- intltool-0.51.0.orig/intltool-update.in 2015-03-09 02:39:54.000000000 +0100
++++ intltool-0.51.0/intltool-update.in 2015-06-19 01:52:07.171228154 +0200
+@@ -1062,7 +1062,7 @@
+ }
+ }
+
+- if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/)
++ if ($str =~ /^(.*)\$\{?([A-Z_]+)}?(.*)$/)
+ {
+ my $rest = $3;
+ my $untouched = $1;
+@@ -1190,10 +1190,10 @@
+ $name =~ s/\(+$//g;
+ $version =~ s/\(+$//g;
+
+- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
+ }
+
+ if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m)
+@@ -1219,11 +1219,11 @@
+ $version =~ s/\(+$//g;
+ $bugurl =~ s/\(+$//g if (defined $bugurl);
+
+- $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/);
+- $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);
+- $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/);
+- $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/);
+- $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/);
++ $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\$\{?AC_PACKAGE_NAME}?/);
++ $varhash{"PACKAGE"} = $name if (not $name =~ /\$\{?PACKAGE}?/);
++ $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\$\{?AC_PACKAGE_VERSION}?/);
++ $varhash{"VERSION"} = $version if (not $name =~ /\$\{?VERSION}?/);
++ $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\$\{?\w+}?/);
+ }
+
+ # \s makes this not work, why?
diff --git a/patches/source/intltool/intltool.SlackBuild b/patches/source/intltool/intltool.SlackBuild
new file mode 100755
index 00000000..89f1e065
--- /dev/null
+++ b/patches/source/intltool/intltool.SlackBuild
@@ -0,0 +1,132 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 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=intltool
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+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 || exit 1
+
+# 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 {} \;
+
+# Compatability with perl 5.22:
+zcat $CWD/intltool-0.51.0-perl-5.22.patch.gz | patch -p1 --verbose || exit 1
+
+# Fix build issues when used with automake >= 1.15:
+zcat $CWD/no-guess-builddir.diff.gz | patch -p0 --verbose || exit 1
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/${PKGNAM}-$VERSION \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# 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 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ rm -f $PKG/usr/info/dir
+ gzip -9 $PKG/usr/info/*
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+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/intltool/no-guess-builddir.diff b/patches/source/intltool/no-guess-builddir.diff
new file mode 100644
index 00000000..3670ee52
--- /dev/null
+++ b/patches/source/intltool/no-guess-builddir.diff
@@ -0,0 +1,31 @@
+=== modified file 'intltool-update.in'
+--- intltool-update.in 2014-05-14 02:15:53 +0000
++++ intltool-update.in 2015-02-03 15:05:59 +0000
+@@ -620,6 +620,14 @@
+
+ my @result;
+
++ # If the builddir is a subdir of srcdir, the list of files found will be prefixed with
++ # an additional prefix (e.g. "_build/sub" for automake 1.15 make distcheck). Try to
++ # handle that, by removing those matches as well.
++ my $absbuilddir = Cwd::abs_path("..\/");
++ my $abssrcdir = Cwd::abs_path("$SRCDIR/..");
++ # Check if builddir is a subdir of srcdir
++ my ($abspath,$relpath) = split /\s*$abssrcdir\/\s*/, $absbuilddir, 2;
++
+ foreach (@buf_allfiles_sorted)
+ {
+ my $dummy = $_;
+@@ -628,7 +636,10 @@
+ $srcdir =~ s#^../##;
+ $dummy =~ s#^$srcdir/../##;
+ $dummy =~ s#^$srcdir/##;
+- $dummy =~ s#_build/##;
++ if ($relpath)
++ {
++ $dummy =~ s#^$relpath/##;
++ }
+ if (!exists($in2{$dummy}))
+ {
+ push @result, $dummy
+
diff --git a/patches/source/intltool/slack-desc b/patches/source/intltool/slack-desc
new file mode 100644
index 00000000..1486c048
--- /dev/null
+++ b/patches/source/intltool/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------------------------------------------------------|
+intltool: intltool (Utilities for translation support)
+intltool:
+intltool: This package contains scripts and autoconf files for
+intltool: internationalizing data.
+intltool:
+intltool: Homepage: https://edge.launchpad.net/intltool
+intltool:
+intltool:
+intltool:
+intltool:
+intltool:
diff --git a/patches/source/irssi/doinst.sh b/patches/source/irssi/doinst.sh
new file mode 100644
index 00000000..197eddce
--- /dev/null
+++ b/patches/source/irssi/doinst.sh
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/irssi.conf.new
diff --git a/patches/source/irssi/irssi.SlackBuild b/patches/source/irssi/irssi.SlackBuild
new file mode 100755
index 00000000..c3905a80
--- /dev/null
+++ b/patches/source/irssi/irssi.SlackBuild
@@ -0,0 +1,143 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017 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)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-irssi
+
+VERSION=${VERSION:-$(echo irssi-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+DIRCD=${VERSION}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf irssi-$VERSION
+tar xvf $CWD/irssi-$VERSION.tar.xz || exit 1
+cd irssi-$DIRCD
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 -o -perm 2777 -o -perm 2775 \) \
+ -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 \
+ --docdir=/usr/doc/irssi-$VERSION \
+ --enable-true-color \
+ --with-textui \
+ --with-perl-lib=vendor \
+ --with-proxy \
+ --build=$ARCH-slackware-linux || exit 1
+
+make \
+ docdir=/usr/doc/irssi-$VERSION \
+ $NUMJOBS || make || exit 1
+make install \
+ docdir=/usr/doc/irssi-$VERSION \
+ DESTDIR=$PKG || exit 1
+
+# This removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%$PKG%%g" \
+ -e "s%/share/man%/man%g" \
+ -re "s%\.([1-9]n?|3pm)$%&.gz%g # extend man filenames for .gz" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+mv $PKG/etc/irssi.conf $PKG/etc/irssi.conf.new
+
+find $PKG -name perllocal.pod | xargs rm -f
+eval $(perl '-V:archlib') ; rmdir -p $PKG/$archlib 2> /dev/null
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# 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
+
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/irssi-$VERSION
+( cd $PKG/usr/doc/irssi-$VERSION ; ln -sf /usr/share/irssi/help . )
+
+# 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
+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/irssi-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/irssi/slack-desc b/patches/source/irssi/slack-desc
new file mode 100644
index 00000000..2a057892
--- /dev/null
+++ b/patches/source/irssi/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------------------------------------------------------|
+irssi: irssi (Internet Relay Chat client)
+irssi:
+irssi: Irssi is an Internet Relay Chat client. Designed to be both secure
+irssi: and expandable, irssi is easily customized using modules and scripts.
+irssi:
+irssi: For more information, visit: http://irssi.org
+irssi:
+irssi: irssi was written by Timo Sirainen.
+irssi:
+irssi:
+irssi:
diff --git a/patches/source/kdelibs/KDE.SlackBuild b/patches/source/kdelibs/KDE.SlackBuild
new file mode 100755
index 00000000..ea663a69
--- /dev/null
+++ b/patches/source/kdelibs/KDE.SlackBuild
@@ -0,0 +1,532 @@
+#!/bin/sh
+# Copyright 2011, 2012 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.
+
+# Adapted by Eric Hameleers <alien@slackware.com> from the modular x.org build.
+
+# To build only a single package group, specify it as $1, like:
+# ./KDE.SlackBuild kdeedu
+# To build only a single package, specify both the group name
+# and the name of the package, like:
+# ./KDE.SlackBuild kdeedu:marble
+# ./KDE.SlackBuild kdebindings:perlqt,perlkde
+
+
+CLEANUP=${CLEANUP:-"yes"} # clean up build directory after successful build.
+PRECHECK=${PRECHECK:-"no"} # don't let the script check the available sources.
+CHECKOUT=${CHECKOUT:-"no"} # don't let the script checkout missing sources.
+
+KDEGITURI="git://anongit.kde.org"
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Set up a few useful functions:
+
+fix_perms() {
+ target_dir=$1
+ [ -z "$target_dir" ] && target_dir='.'
+
+ chown -R root:root $target_dir
+ find $target_dir \
+ \( -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 {} \;
+}
+
+strip_binaries() {
+ target_dir=$1
+ [ -z "$target_dir" ] && target_dir='.'
+
+ find $target_dir | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find $target_dir | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find $target_dir | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+precheck() {
+ # See if the sources we have match the module components we want to build:
+ RETVAL=0
+
+ for SRCFILE in $(find $CWD/src -name "*.tar.?z*") ; do
+ if cat modules/* |grep "^ *#" |grep -wq $(echo $(basename $SRCFILE) | rev | cut -f2- -d- | rev)$ ; then
+ echo "Source file '$(basename $SRCFILE)' is commented out in 'modules' !"
+ elif ! cat modules/* |grep -v "^ *#" |grep -wq $(echo $(basename $SRCFILE) | rev | cut -f2- -d- | rev) ; then
+ echo "Source file '$(basename $SRCFILE)' is not mentioned in 'modules' !"
+ RETVAL=1
+ fi
+ done
+
+ for MODULE in $(cat $CWD/modules/* | grep -v "^#") ; do
+ #if [ -z "$(find $CWD/src -name ${MODULE}-*)" ] ; then
+ if [ -z "$(find $CWD/src -name $MODULE-*.tar.* |grep -E "$MODULE-[^-]+.tar.*$|$MODULE-[0-9].+.tar.*$")" ] ; then
+ echo "Module '$MODULE' does not have a matching source tarball !"
+ if [ "$CHECKOUT" = "yes" -o "$CHECKOUT" = "YES" ]; then
+ echo "Checking out KDE component at branch '$VERSION'."
+ git archive --format=tar --prefix {$MODULE}-${VERSION}/ --remote ${KDEGITURI}/${MODULE}.git v${VERSION} | xz -c > $CWD/src/${MODULE}-${VERSION}.tar.xz
+ RETVAL=$?
+ if [ $RETVAL -ne 0 ]; then
+ echo "Error while checking out '$MODULE' !"
+ mv $CWD/src/${MODULE}-${VERSION}.tar.xz $CWD/src/${MODULE}-${VERSION}.tar.xz.failed
+ fi
+ else
+ RETVAL=1
+ fi
+ fi
+ # A missing slack-desc counts as fatal even if the program may end up
+ # inside the big meta-package.
+ if [ -z "$(find $CWD/slack-desc -name ${MODULE})" ] ; then
+ echo "Module '$MODULE' does not have a slack-desc file !"
+ RETVAL=1
+ fi
+ done
+
+ if [ $RETVAL -eq 0 ]; then
+ echo "Check complete, build starts in 5 seconds"
+ sleep 5
+ else
+ exit 1
+ fi
+}
+
+# Support function builds one complete module (like 'kdelibs'), or
+# exactly one package which is part of a module (like 'okular'):
+build_mod_pkg () {
+ kde_module=$1
+ kde_pkg=$2
+
+ cd $CWD/modules
+
+ # See if $kde_module is a module name like "kdeadmin":
+ if [ ! -z "$kde_module" ]; then
+ if [ ! -f "$kde_module" ]; then
+ return
+ fi
+ fi
+ PKG=${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( for PKGNAME in $(cat $kde_module |grep -v "^$" |grep -v "^#") ; do
+ # Find the full source filename - yeah ugly, but I had two goals:
+ # 1- source tarball can be in a random subdirectory of src/
+ # 2- differentiate between e.g. 'kdepim' and 'kdepim-runtime'
+ kde_src=$(basename $(find $CWD/src -name "$PKGNAME-*.tar.?z*" |grep -E "$PKGNAME-[^-]+.tar.*$|$PKGNAME-[0-9].+.tar.*$") 2>/dev/null)
+ if [ "x$kde_src" = "x" ]; then
+ echo "** Did not find '$PKGNAME' in src"
+ continue
+ fi
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_KDE_BUILD_DIR/${kde_module}
+ # If $kde_pkg is set, we only want to build one package:
+ if [ ! -z "$kde_pkg" ]; then
+ if [ "$kde_pkg" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${kde_src}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $kde_src | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $kde_src)
+ tar xf $(find $CWD/src -name ${kde_src}) || exit 1
+ cd $(pkgbase $kde_src) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch || exit 1
+ fi
+
+ # If there's any pre-install things to do, do them:
+ if [ -r $CWD/pre-install/${PKGNAME}.pre-install ]; then
+ . $CWD/pre-install/${PKGNAME}.pre-install
+ fi
+
+ # Run cmake, using custom cmake script if needed:
+ if [ -r $CWD/cmake/${PKGNAME} ]; then
+ . $CWD/cmake/${PKGNAME}
+ elif [ -r $CWD/cmake/${kde_module} ]; then
+ . $CWD/cmake/${kde_module}
+ else
+ # This is the default configure script:
+ . $CWD/cmake/cmake
+ fi
+
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+
+ # Back to source toplevel builddir, since cmake may have run in a subdir:
+ cd $SLACK_KDE_BUILD_DIR/${kde_module}/$(pkgbase $kde_src)
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ # Use specific documentation files if available, else use a default set:
+ if [ -r $CWD/docs/${PKGNAME} ]; then
+ cp -a $(cat $CWD/docs/${PKGNAME}) \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ else
+ cp -a \
+ AUTHORS* CONTRIBUTING* COPYING* HACKING* \
+ INSTALL* MAINTAINERS README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # Strip binaries:
+ strip_binaries $PKG
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ . $CWD/post-install/${PKGNAME}.post-install
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-$(echo $MODULAR_PACKAGE_VERSION |tr - _)-${PKGARCH}-${MODBUILD}.txz
+ fi
+ # We will continue with the fresh packages installed:
+ upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ # Keep MIME database current:
+ /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null &
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}
+
+ done
+
+ # At this point, we have left the loop to build modular packages.
+ # We might need to build a package for the "<kde_module>", but to
+ # avoid needlessly repacking if there happens to be a package with
+ # the same name as "<kde_module>", we'll do some checks first.
+
+ # If every package listed in modules/"<kde_module>" is also listed
+ # in the modularize file, then there's no need to make a package
+ # for "<kde_module>":
+ echo
+ echo "Searching for packages in ${kde_module} that were not built modular:"
+ cat $CWD/modules/${kde_module} | grep -v "^#" | grep -v -w "^" | while read checkpackage ; do
+ if ! grep -wq "^$checkpackage" ${CWD}/modularize ; then
+ # Non-modular package found, so we'll have to build the package below.
+ # It might already have been built once, but in that case it is likely
+ # that more things have been added to the package directory since then.
+ echo "Found non-modular package $checkpackage."
+ exit 99
+ fi
+ done
+
+ # Exit if everything in "<kde_module>" was built modular:
+ if [ ! $? = 99 ]; then
+ echo "No non-modular components found in ${kde_module}."
+ echo "Not building catch-all package for ${kde_module}."
+ echo
+ return
+ fi
+
+ # If there's no /usr directory in the "<kde_module>" package directory,
+ # then skip it. There's nothing present worth packing up.
+ if [ ! -d ${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}/usr ]; then
+ echo "No /usr directory found in package-${kde_module}."
+ echo "Not building catch-all package for ${kde_module}."
+ echo
+ return
+ fi
+
+ # Build a "<kde_module>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+
+ # Put up a bit of a black-box warning, in case this was a mistake where
+ # something was meant to be listed in the modularize file and wasn't:
+ echo
+ echo "**************************************************************************"
+ echo "* Building combined package for non-modular parts of ${kde_module}"
+ echo "**************************************************************************"
+ echo
+
+ PKGARCH=$ARCH
+ cd $PKG
+
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/${kde_module}.post-install ]; then
+ . $CWD/post-install/${kde_module}.post-install
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${kde_module} ]; then
+ cat $CWD/slack-desc/${kde_module} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/${kde_module} ]; then
+ cat $CWD/doinst.sh/${kde_module} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/${kde_module} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/${kde_module})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${kde_module} ]; then
+ BUILD=$SRCDIRBUILD . $CWD/makepkg/${kde_module}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-$(echo $VERSION |tr - _)-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ # We will continue with the fresh packages installed:
+ upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ # Keep MIME database current:
+ /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null &
+ )
+}
+
+# Process the module queue. Format is:
+# module[:subpackage[,subpackage]] [module...]
+deterministic_build() {
+ RET=0
+ for ENTRY in $1 ; do
+ KDE_MOD=$(echo "$ENTRY": | cut -f1 -d:)
+ KDE_PKGS=$(echo "$ENTRY": | cut -f2 -d:)
+ if [ -z "$KDE_PKGS" ]; then
+ build_mod_pkg $KDE_MOD
+ let RET=$RET+$?
+ else
+ for KDE_PKG in $(echo $KDE_PKGS |tr ',' ' ') ; do
+ build_mod_pkg $KDE_MOD $KDE_PKG
+ let RET=$RET+$?
+ done
+ fi
+ done
+
+ return $RET
+}
+
+# MAIN PART #
+
+# Import the build configuration options for as far as they are not already set:
+[ -r ./KDE.options ] && . ./KDE.options
+
+# This avoids compiling a version number into KDE's .la files:
+QTDIR=/usr/lib${LIBDIRSUFFIX}/qt ; export QTDIR
+
+# Get the kde environment variables
+[ -d post-install/kdebase ] && eval $(sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" ./post-install/kdebase/profile.d/kde.sh)
+
+# Where we are going to do all the hard labour:
+SLACK_KDE_BUILD_DIR=$TMP/kde_build
+mkdir -p $SLACK_KDE_BUILD_DIR
+
+# Yes, we know kde-workspace is built twice. kdebase needs the
+# plasma bits from it, and then we build it again for good measure...
+# Same goes for kdelibs (at least during KDE 4.8.x) kdeutils:ksecrets needs
+# kdelibs and then kdelibs needs a rebuild to pick up ksecretservice
+# (this will no longer be required in KDE 4.9).
+# And kde-baseapps is rebuilt after kdewebdev because it can then pickup
+# libtidy and enable the Konqueror validators plugin to validate HTML.
+KDEMODS=" \
+ kdelibs \
+ kdebase:nepomuk-core \
+ kdepimlibs \
+ kdebase \
+ kdesdk \
+ extragear:libkscreen \
+ kdegraphics \
+ kdebindings \
+ kdebase:kde-workspace \
+ kdeaccessibility \
+ kdeutils \
+ kdelibs \
+ kdemultimedia \
+ extragear:libktorrent \
+ kdenetwork \
+ oxygen-icons \
+ kdeadmin \
+ kdeartwork \
+ kdegames \
+ kdetoys \
+ kdepim \
+ kdepim-runtime \
+ kdenetwork:kopete \
+ kdeedu \
+ kdewebdev \
+ kdebase:kde-baseapps \
+ kdeplasma-addons \
+ polkit-kde \
+ extragear \
+ "
+
+# Allow for specification of individual packages to be built:
+if [ -z "$1" ]; then
+ MODQUEUE=$KDEMODS
+else
+ MODQUEUE="$*"
+fi
+
+# If requested, check if
+# sources, module definitions and slack-desc are complete and matching:
+if [ "$PRECHECK" = "yes" -o "$PRECHECK" = "YES" ]; then
+ precheck
+fi
+
+# And finally, start working!
+for module in \
+ $MODQUEUE ;
+do
+ echo "SlackBuild processing module '$module'"
+ deterministic_build $module
+ if [ $? = 0 ]; then
+ # Move the created packages up into the KDE build directory:
+ mv ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)/*.t?z ${SLACK_KDE_BUILD_DIR}/
+ if [ "$CLEANUP" = "yes" -o "$CLEANUP" = "YES" ]; then
+ # Clean out package and build directories:
+ rm -rf ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)
+ fi
+ else
+ echo "${module} failed to build."
+ exit 1
+ fi
+ cd - ;
+done
+
+exit 0
+
+
diff --git a/patches/source/kdelibs/KDE.options b/patches/source/kdelibs/KDE.options
new file mode 100644
index 00000000..c54dbfcf
--- /dev/null
+++ b/patches/source/kdelibs/KDE.options
@@ -0,0 +1,58 @@
+# Set default version/arch/build. You can override these settings
+# in the SlackBuild scripts for each package (koffice, for example,
+# usually has a different version number), or by setting your own
+# environment variables.
+
+[ -z $VERSION ] && export VERSION=4.14.3
+[ -z $BUILD ] && export BUILD=1
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+[ -z $PKGARCH ] && export PKGARCH=$ARCH
+
+# Use this as CFLAGS and CXXFLAGS:
+if [ -z "$SLKCFLAGS" ]; then
+ if [ "$ARCH" = "i586" ]; then
+ export SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ export SLKCFLAGS="-O2 -fPIC"
+ export LIBDIRSUFFIX="64"
+ elif [ "$ARCH" = "arm" ]; then
+ export SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "armel" ]; then
+ export SLKCFLAGS="-O2 -march=armv4t"
+ export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "armv7hl" ]; then
+ export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ export LIBDIRSUFFIX=""
+ else
+ export SLKCFLAGS="-O2"
+ export LIBDIRSUFFIX=""
+ fi
+fi
+
+# Use this to set the number of parallel make jobs:
+if [ -z "$NUMJOBS" ]; then
+ export NUMJOBS="-j7"
+fi
+
+# Additional cmake flags that are spanned across the KDE modules
+# Do not use "final build" unless we build an actual release.
+#export KDE_OPT_ARGS=" -DKDE4_ENABLE_FINAL=\"ON\" -DSITE=\"slackware.com\" "
+export KDE_OPT_ARGS=" -DKDE4_BUILD_TESTS=OFF -DSITE=\"slackware.com\" -DKDE_DISTRIBUTION_TEXT=\"volkerdi@slackware.com\" "
+
diff --git a/patches/source/kdelibs/build/kdelibs b/patches/source/kdelibs/build/kdelibs
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/kdelibs/build/kdelibs
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/kdelibs/cmake/kdelibs b/patches/source/kdelibs/cmake/kdelibs
new file mode 100644
index 00000000..92015a91
--- /dev/null
+++ b/patches/source/kdelibs/cmake/kdelibs
@@ -0,0 +1,17 @@
+mkdir -p build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DWITH_HAL=OFF \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DKDE_DISTRIBUTION_TEXT="volkerdi@slackware.com" \
+ ..
+
diff --git a/patches/source/kdelibs/doinst.sh/kdelibs b/patches/source/kdelibs/doinst.sh/kdelibs
new file mode 100644
index 00000000..d7006c70
--- /dev/null
+++ b/patches/source/kdelibs/doinst.sh/kdelibs
@@ -0,0 +1,9 @@
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1
+fi
+
diff --git a/patches/source/kdelibs/kdelibs.SlackBuild b/patches/source/kdelibs/kdelibs.SlackBuild
new file mode 100755
index 00000000..542ddb60
--- /dev/null
+++ b/patches/source/kdelibs/kdelibs.SlackBuild
@@ -0,0 +1,2 @@
+./KDE.SlackBuild kdelibs:kdelibs
+mv /tmp/kde_build/kdelibs*txz /tmp
diff --git a/patches/source/kdelibs/modularize b/patches/source/kdelibs/modularize
new file mode 100644
index 00000000..4dd401b5
--- /dev/null
+++ b/patches/source/kdelibs/modularize
@@ -0,0 +1,268 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+#
+# Things to note:
+#
+# Listing a package here will not cause it to be built. To do that,
+# make sure it is added to one of the files in the modules/ directory
+# that is built by the main KDE.SlackBuild script.
+#
+# If a subpackage name happens to be the same as the "grab bag" package
+# that contains it, you need to be a bit careful. Unless everything
+# in that collection will be built modular, *do not* list that name
+# here! If you do, first the module by that name will be built, and
+# then everything that's not modular in that collection will be built
+# into a "grab bag" that will replace that first package.
+#
+# If the goal is to build the most combined packages possible, the
+# easiest way to accomplish that is just to move this file out of the
+# way and replace it with an empty one before building.
+
+# kdeaccessibility
+jovie
+kaccessible
+kmouth
+kmousetool
+kmag
+
+# kdelibs:
+kdelibs
+
+# kdebase:
+baloo
+baloo-widgets
+nepomuk-core
+nepomuk-widgets
+kfilemetadata
+kde-baseapps
+kactivities
+konsole
+kate
+kde-wallpapers
+kde-workspace
+kde-runtime
+kde-base-artwork
+
+# kdeedu:
+libkdeedu
+analitza
+artikulate
+blinken
+cantor
+kalgebra
+kalzium
+kanagram
+kbruch
+kgeography
+khangman
+kig
+kiten
+klettres
+kmplot
+kqtquickcharts
+kstars
+ktouch
+kturtle
+kwordquiz
+marble
+parley
+pairs
+rocs
+step
+
+# kdeadmin
+kcron
+ksystemlog
+kuser
+#kdeadmin
+
+# kdeartwork
+kdeartwork
+
+# kdegraphics:
+libkipi
+libkexiv2
+libkdcraw
+libksane
+okular
+kdegraphics-mobipocket
+kdegraphics-strigi-analyzer
+kdegraphics-thumbnailers
+gwenview
+kamera
+kcolorchooser
+kgamma
+kolourpaint
+kruler
+ksaneplugin
+ksnapshot
+svgpart
+
+# kdebindings
+smokegen
+smokeqt
+qtruby
+perlqt
+smokekde
+korundum
+perlkde
+pykde4
+kross-interpreters
+kimono
+qyoto
+
+# kdemultimedia
+libkcddb
+libkcompactdisc
+audiocd-kio
+dragon
+ffmpegthumbs
+mplayerthumbs
+juk
+kmix
+kscd
+
+# kdenetwork
+kdenetwork-filesharing
+kdenetwork-strigi-analyzers
+#kdnssd
+zeroconf-ioslave
+kget
+kopete
+kppp
+krdc
+krfb
+#kdenetwork
+
+# kdeutils
+ark
+filelight
+kcalc
+kcharselect
+kdf
+kfloppy
+kgpg
+#printer-applet
+print-manager
+kremotecontrol
+ktimer
+kwalletmanager
+superkaramba
+sweeper
+
+# kdegames
+libkdegames
+libkmahjongg
+klickety
+ksudoku
+ksquares
+kpat
+klines
+ksnakeduel
+kollision
+kshisen
+kblocks
+lskat
+kreversi
+bovo
+kajongg
+granatier
+kmines
+kiriki
+kigo
+bomber
+kolf
+kdiamond
+kbounce
+konquest
+kapman
+knavalbattle
+killbots
+kubrick
+kgoldrunner
+knetwalk
+kbreakout
+ksirk
+kfourinline
+picmi
+kblackbox
+palapeli
+katomic
+ktuberling
+kjumpingcube
+kmahjongg
+kspaceduel
+
+# kdewebdev
+kdewebdev
+
+# kdepim
+kdepim
+kdepim-runtime
+
+# kdepimlibs
+kdepimlibs
+
+# kdeplasma-addons
+kdeplasma-addons
+
+# kdesdk
+cervisia
+dolphin-plugins
+kapptemplate
+kcachegrind
+kde-dev-scripts
+kde-dev-utils
+kdesdk-kioslaves
+kdesdk-strigi-analyzers
+kdesdk-thumbnailers
+libkomparediff2
+kompare
+lokalize
+okteta
+poxml
+umbrello
+#kdesdk
+
+# kdetoys
+amor
+kteatime
+ktux
+#kdetoys
+
+# oxygen-icons
+oxygen-icons
+
+# polkit-kde
+polkit-kde-agent-1
+polkit-kde-kcmodules-1
+
+# extragear
+bluedevil
+k3b
+kaudiocreator
+kplayer
+kwebkitpart
+oxygen-gtk2
+kdevplatform
+kdevelop-pg-qt
+kdevelop
+kdev-python
+kdevelop-php
+kdevelop-php-docs
+#quanta
+wicd-kde
+libmm-qt
+libnm-qt
+plasma-nm
+skanlite
+kio-mtp
+libktorrent
+ktorrent
+amarok
+calligra
+libkscreen
+kscreen
+partitionmanager
+kdeconnect-kde
+
diff --git a/patches/source/kdelibs/modules/kdelibs b/patches/source/kdelibs/modules/kdelibs
new file mode 100644
index 00000000..47315978
--- /dev/null
+++ b/patches/source/kdelibs/modules/kdelibs
@@ -0,0 +1 @@
+kdelibs
diff --git a/patches/source/kdelibs/noarch b/patches/source/kdelibs/noarch
new file mode 100644
index 00000000..0c1318f1
--- /dev/null
+++ b/patches/source/kdelibs/noarch
@@ -0,0 +1,5 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+
+kde-wallpapers
+
diff --git a/patches/source/kdelibs/package-blacklist b/patches/source/kdelibs/package-blacklist
new file mode 100644
index 00000000..71e99c40
--- /dev/null
+++ b/patches/source/kdelibs/package-blacklist
@@ -0,0 +1,9 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+## kdebindings:
+# needs c-sharp:
+kimono
+qyoto
+
diff --git a/patches/source/kdelibs/patch/kdelibs.patch b/patches/source/kdelibs/patch/kdelibs.patch
new file mode 100644
index 00000000..c314b559
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs.patch
@@ -0,0 +1,14 @@
+# Slackware ships a different version of XML DTDs:
+zcat $CWD/patch/kdelibs/kdelibs.docbook.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Make uPnP support depend on the environment variable SOLID_UPNP,
+# e.g. by creating an /etc/profile.d/upnp.sh file with the following contents:
+# export SOLID_UPNP=1
+zcat $CWD/patch/kdelibs/kdelibs.upnp_conditional.patch.gz | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Revert 3 patches which (although they probably follow the FDo spec better),
+# cause incorrect icon overrides:
+zcat $CWD/patch/kdelibs/return-not-break.-copy-paste-error.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/kdelibs/coding-style-fixes.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/kdelibs/return-application-icons-properly.patch.gz | patch -R -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch b/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch
new file mode 100644
index 00000000..11108f0a
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/coding-style-fixes.patch
@@ -0,0 +1,62 @@
+From 2173580f070e806d4715e13048c697c49ec262e2 Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo@kde.org>
+Date: Thu, 21 Feb 2013 17:59:58 +0100
+Subject: [PATCH 047/111] coding style fixes
+
+---
+ kdeui/icons/kiconloader.cpp | 27 ++++++++++++---------------
+ 1 file changed, 12 insertions(+), 15 deletions(-)
+
+diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp
+index 6fed667..dba474d 100644
+--- a/kdeui/icons/kiconloader.cpp
++++ b/kdeui/icons/kiconloader.cpp
+@@ -938,32 +938,29 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const
+ }
+ }
+
+- foreach (KIconThemeNode *themeNode, links)
+- {
++ foreach (KIconThemeNode *themeNode, links) {
+ QString currentName = name;
+
+- while (!currentName.isEmpty())
+- {
+-
++ while (!currentName.isEmpty()) {
+ //kDebug(264) << "Looking up" << currentName;
+
+-// The following code has been commented out because the Qt SVG renderer needs
+-// to be improved. If you are going to change/remove some code from this part,
+-// please contact me before (ereslibre@kde.org), or kde-core-devel@kde.org. (ereslibre)
+- for (int i = 0 ; i < 4 ; i++)
+- {
++ for (int i = 0 ; i < 4 ; i++) {
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchExact);
+- if (icon.isValid())
+- return icon;
++ if (icon.isValid()) {
++ break;
++ }
+
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchBest);
+- if (icon.isValid())
+- return icon;
++ if (icon.isValid()) {
++ break;
++ }
+ }
++ //kDebug(264) << "Looking up" << currentName;
+
+- if (genericFallback)
++ if (genericFallback) {
+ // we already tested the base name
+ break;
++ }
+
+ int rindex = currentName.lastIndexOf('-');
+ if (rindex > 1) { // > 1 so that we don't split x-content or x-epoc
+--
+1.8.1.4
+
+
diff --git a/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch b/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch
new file mode 100644
index 00000000..6a20cd27
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/kdelibs.docbook.patch
@@ -0,0 +1,11 @@
+--- kdelibs-4.4.85/cmake/modules/FindDocBookXML.cmake.orig 2010-05-27 19:25:00.000000000 +0200
++++ kdelibs-4.4.85/cmake/modules/FindDocBookXML.cmake 2010-06-07 16:18:35.000000000 +0200
+@@ -12,7 +12,7 @@
+ # Redistribution and use is allowed according to the terms of the BSD license.
+ # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+-set (DOCBOOKXML_CURRENTDTD_VERSION "4.2"
++set (DOCBOOKXML_CURRENTDTD_VERSION "4.5"
+ CACHE INTERNAL "Required version of XML DTDs")
+
+ set (DTD_PATH_LIST
diff --git a/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch b/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch
new file mode 100644
index 00000000..3a194477
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/kdelibs.upnp_conditional.patch
@@ -0,0 +1,15 @@
+--- kdelibs-4.8.0/solid/solid/managerbase.cpp.orig 2011-07-27 20:34:39.000000000 +0200
++++ kdelibs-4.8.0/solid/solid/managerbase.cpp 2012-01-26 09:17:49.409993419 +0100
+@@ -90,7 +90,11 @@
+ # endif
+
+ # if defined (HUPNP_FOUND)
+- m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0);
++ bool solidUpnpEnabled
++ = QString::fromLocal8Bit(qgetenv("SOLID_UPNP")).toInt()==1;
++ if (solidUpnpEnabled) {
++ m_backends << new Solid::Backends::UPnP::UPnPDeviceManager(0);
++ }
+ # endif
+ }
+ }
diff --git a/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch b/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch
new file mode 100644
index 00000000..2bdb53ad
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/return-application-icons-properly.patch
@@ -0,0 +1,56 @@
+From 613c951a1157df0d8a907a155a5eaa706816d5f9 Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo@kde.org>
+Date: Thu, 21 Feb 2013 17:58:11 +0100
+Subject: return application icons properly
+
+BUG:315578
+---
+ kdeui/icons/kiconloader.cpp | 31 ++++++++++++++++++++++++++++++-
+ 1 file changed, 30 insertions(+), 1 deletion(-)
+
+diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp
+index f65e941..6fed667 100644
+--- a/kdeui/icons/kiconloader.cpp
++++ b/kdeui/icons/kiconloader.cpp
+@@ -909,7 +909,36 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const
+ const char * const ext[4] = { ".png", ".svgz", ".svg", ".xpm" };
+ bool genericFallback = name.endsWith(QLatin1String("-x-generic"));
+
+- foreach(KIconThemeNode *themeNode, links)
++ // Do two passes through themeNodes.
++ //
++ // The first pass looks for an exact match in each themeNode one after the other.
++ // If one is found and it is an app icon then return that icon.
++ //
++ // In the next pass (assuming the first pass failed), it looks for exact matches
++ // and then generic fallbacks in each themeNode one after the other
++ //
++ // The reasoning is that application icons should always match exactly, all other
++ // icons may fallback. Since we do not know what the context is here when we start
++ // looking for it, we can only go by the path found.
++ foreach (KIconThemeNode *themeNode, links) {
++ for (int i = 0 ; i < 4 ; i++) {
++ icon = themeNode->theme->iconPath(name + ext[i], size, KIconLoader::MatchExact);
++ if (icon.isValid()) {
++ break;
++ }
++
++ icon = themeNode->theme->iconPath(name + ext[i], size, KIconLoader::MatchBest);
++ if (icon.isValid()) {
++ break;
++ }
++ }
++
++ if (icon.isValid() && icon.path.contains("/apps/")) {
++ return icon;
++ }
++ }
++
++ foreach (KIconThemeNode *themeNode, links)
+ {
+ QString currentName = name;
+
+--
+1.8.1.4
+
+
diff --git a/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch b/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch
new file mode 100644
index 00000000..b62818ed
--- /dev/null
+++ b/patches/source/kdelibs/patch/kdelibs/return-not-break.-copy-paste-error.patch
@@ -0,0 +1,31 @@
+From 0edfd42151ad57322a10a24ab4971b638e220e6e Mon Sep 17 00:00:00 2001
+From: Aaron Seigo <aseigo@kde.org>
+Date: Thu, 21 Feb 2013 18:14:54 +0100
+Subject: [PATCH 049/111] return, not break. copy/paste error
+
+---
+ kdeui/icons/kiconloader.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kdeui/icons/kiconloader.cpp b/kdeui/icons/kiconloader.cpp
+index dba474d..ce6aeea 100644
+--- a/kdeui/icons/kiconloader.cpp
++++ b/kdeui/icons/kiconloader.cpp
+@@ -947,12 +947,12 @@ K3Icon KIconLoaderPrivate::findMatchingIcon(const QString& name, int size) const
+ for (int i = 0 ; i < 4 ; i++) {
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchExact);
+ if (icon.isValid()) {
+- break;
++ return icon;
+ }
+
+ icon = themeNode->theme->iconPath(currentName + ext[i], size, KIconLoader::MatchBest);
+ if (icon.isValid()) {
+- break;
++ return icon;
+ }
+ }
+ //kDebug(264) << "Looking up" << currentName;
+--
+1.8.1.4
+
diff --git a/patches/source/kdelibs/post-install/kdelibs.post-install b/patches/source/kdelibs/post-install/kdelibs.post-install
new file mode 100644
index 00000000..9239a3e5
--- /dev/null
+++ b/patches/source/kdelibs/post-install/kdelibs.post-install
@@ -0,0 +1,2 @@
+# Move the polkit dbus configuration files to the proper place:
+mv $PKG/etc/kde/dbus-1 $PKG/etc/
diff --git a/patches/source/kdelibs/slack-desc/kdelibs b/patches/source/kdelibs/slack-desc/kdelibs
new file mode 100644
index 00000000..a89ea3c8
--- /dev/null
+++ b/patches/source/kdelibs/slack-desc/kdelibs
@@ -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------------------------------------------------------|
+kdelibs: kdelibs (KDE libraries)
+kdelibs:
+kdelibs: System libraries and other resources required for the KDE Platform.
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
+kdelibs:
diff --git a/patches/source/libX11/arch.use.flags b/patches/source/libX11/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libX11/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libX11/build/libX11 b/patches/source/libX11/build/libX11
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libX11/build/libX11
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libX11/configure/libX11 b/patches/source/libX11/configure/libX11
new file mode 100644
index 00000000..cf85e58d
--- /dev/null
+++ b/patches/source/libX11/configure/libX11
@@ -0,0 +1,12 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libX11/libX11.SlackBuild b/patches/source/libX11/libX11.SlackBuild
new file mode 100755
index 00000000..6db22779
--- /dev/null
+++ b/patches/source/libX11/libX11.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libX11
+mv /tmp/x11-build/libX11*txz /tmp
diff --git a/patches/source/libX11/modularize b/patches/source/libX11/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libX11/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libX11/noarch b/patches/source/libX11/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libX11/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libX11/package-blacklist b/patches/source/libX11/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libX11/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libX11/post-install/libX11.post-install b/patches/source/libX11/post-install/libX11.post-install
new file mode 100644
index 00000000..7232b680
--- /dev/null
+++ b/patches/source/libX11/post-install/libX11.post-install
@@ -0,0 +1,2 @@
+mkdir -p $PKG/usr/share/X11
+zcat $CWD/post-install/libX11/XKeysymDB.gz > $PKG/usr/share/X11/XKeysymDB
diff --git a/patches/source/libX11/slack-desc/libX11 b/patches/source/libX11/slack-desc/libX11
new file mode 100644
index 00000000..2ec4f39a
--- /dev/null
+++ b/patches/source/libX11/slack-desc/libX11
@@ -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------------------------------------------------------|
+libX11: libX11 (Core X11 protocol client library)
+libX11:
+libX11: libX11 is part of X11.
+libX11:
+libX11: For more information about the X.Org Foundation (the providers of the
+libX11: X.Org implementation of the X Window System), see their website:
+libX11:
+libX11: http://www.x.org
+libX11:
+libX11:
+libX11:
diff --git a/patches/source/libX11/x11.SlackBuild b/patches/source/libX11/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libX11/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXcursor/arch.use.flags b/patches/source/libXcursor/arch.use.flags
new file mode 100644
index 00000000..641c24a4
--- /dev/null
+++ b/patches/source/libXcursor/arch.use.flags
@@ -0,0 +1,7 @@
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXcursor/build/increment.sh b/patches/source/libXcursor/build/increment.sh
new file mode 100755
index 00000000..6de5d0da
--- /dev/null
+++ b/patches/source/libXcursor/build/increment.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# A script to increment build numbers.
+# Call it with the list of the build numbers to increase by one:
+#
+# ./increment.sh xf86-input-acecad xf86-input-aiptek xf86-input-joystick
+#
+# If a build file does not exist, it will be created with a value of 2.
+
+for build in $* ; do
+ if [ ! -r $build ]; then
+ echo "Creating $build with value 2"
+ echo 2 > $build
+ else
+ echo "Incrementing $build $(cat $build) -> $(expr $(cat $build) + 1)"
+ echo $(expr $(cat $build) + 1) > $build
+ fi
+done
diff --git a/patches/source/libXcursor/build/libXcursor b/patches/source/libXcursor/build/libXcursor
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXcursor/build/libXcursor
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXcursor/configure/configure b/patches/source/libXcursor/configure/configure
new file mode 100644
index 00000000..0f3bccf2
--- /dev/null
+++ b/patches/source/libXcursor/configure/configure
@@ -0,0 +1,12 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXcursor/libXcursor.SlackBuild b/patches/source/libXcursor/libXcursor.SlackBuild
new file mode 100755
index 00000000..4d4f81d2
--- /dev/null
+++ b/patches/source/libXcursor/libXcursor.SlackBuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copyright 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.
+
+
+UPGRADE_PACKAGES=no sh x11-build-script.sh lib libXcursor
+mv --verbose /tmp/x11-build/*.txz /tmp
+
diff --git a/patches/source/libXcursor/modularize b/patches/source/libXcursor/modularize
new file mode 100644
index 00000000..38762ffd
--- /dev/null
+++ b/patches/source/libXcursor/modularize
@@ -0,0 +1,272 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXcursor/noarch b/patches/source/libXcursor/noarch
new file mode 100644
index 00000000..480ffc26
--- /dev/null
+++ b/patches/source/libXcursor/noarch
@@ -0,0 +1,76 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-cf-files
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXcursor/package-blacklist b/patches/source/libXcursor/package-blacklist
new file mode 100644
index 00000000..8e2f3eb5
--- /dev/null
+++ b/patches/source/libXcursor/package-blacklist
@@ -0,0 +1,43 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXcursor/slack-desc/libXcursor b/patches/source/libXcursor/slack-desc/libXcursor
new file mode 100644
index 00000000..2906c6aa
--- /dev/null
+++ b/patches/source/libXcursor/slack-desc/libXcursor
@@ -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------------------------------------------------------|
+libXcursor: libXcursor (X Window System Cursor management library)
+libXcursor:
+libXcursor: libXcursor is part of X11.
+libXcursor:
+libXcursor: For more information about the X.Org Foundation (the providers of the
+libXcursor: X.Org implementation of the X Window System), see their website:
+libXcursor:
+libXcursor: http://www.x.org
+libXcursor:
+libXcursor:
+libXcursor:
diff --git a/patches/source/libXcursor/x11-build-script.sh b/patches/source/libXcursor/x11-build-script.sh
new file mode 100755
index 00000000..9869c665
--- /dev/null
+++ b/patches/source/libXcursor/x11-build-script.sh
@@ -0,0 +1,374 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# This is default. To not upgrade, pass UPGRADE_PACKAGES=no (or anything else).
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXfixes/arch.use.flags b/patches/source/libXfixes/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXfixes/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXfixes/build/libXfixes b/patches/source/libXfixes/build/libXfixes
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXfixes/build/libXfixes
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXfixes/configure/configure b/patches/source/libXfixes/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXfixes/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXfixes/libXfixes.SlackBuild b/patches/source/libXfixes/libXfixes.SlackBuild
new file mode 100755
index 00000000..8d5116f4
--- /dev/null
+++ b/patches/source/libXfixes/libXfixes.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXfixes
+mv /tmp/x11-build/libXfixes*txz /tmp
diff --git a/patches/source/libXfixes/modularize b/patches/source/libXfixes/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXfixes/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXfixes/noarch b/patches/source/libXfixes/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXfixes/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXfixes/package-blacklist b/patches/source/libXfixes/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXfixes/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXfixes/slack-desc/libXfixes b/patches/source/libXfixes/slack-desc/libXfixes
new file mode 100644
index 00000000..3c44fa46
--- /dev/null
+++ b/patches/source/libXfixes/slack-desc/libXfixes
@@ -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------------------------------------------------------|
+libXfixes: libXfixes (client library for the Xfixes extension)
+libXfixes:
+libXfixes: libXfixes is part of X11.
+libXfixes:
+libXfixes: For more information about the X.Org Foundation (the providers of the
+libXfixes: X.Org implementation of the X Window System), see their website:
+libXfixes:
+libXfixes: http://www.x.org
+libXfixes:
+libXfixes:
+libXfixes:
diff --git a/patches/source/libXfixes/x11.SlackBuild b/patches/source/libXfixes/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXfixes/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXfont/arch.use.flags b/patches/source/libXfont/arch.use.flags
new file mode 100644
index 00000000..f28a6cca
--- /dev/null
+++ b/patches/source/libXfont/arch.use.flags
@@ -0,0 +1,7 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXfont/build/increment.sh b/patches/source/libXfont/build/increment.sh
new file mode 100755
index 00000000..6de5d0da
--- /dev/null
+++ b/patches/source/libXfont/build/increment.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# A script to increment build numbers.
+# Call it with the list of the build numbers to increase by one:
+#
+# ./increment.sh xf86-input-acecad xf86-input-aiptek xf86-input-joystick
+#
+# If a build file does not exist, it will be created with a value of 2.
+
+for build in $* ; do
+ if [ ! -r $build ]; then
+ echo "Creating $build with value 2"
+ echo 2 > $build
+ else
+ echo "Incrementing $build $(cat $build) -> $(expr $(cat $build) + 1)"
+ echo $(expr $(cat $build) + 1) > $build
+ fi
+done
diff --git a/patches/source/libXfont/build/libXfont b/patches/source/libXfont/build/libXfont
new file mode 100644
index 00000000..cf5deb27
--- /dev/null
+++ b/patches/source/libXfont/build/libXfont
@@ -0,0 +1 @@
+2_slack14.2
diff --git a/patches/source/libXfont/configure/configure b/patches/source/libXfont/configure/configure
new file mode 100644
index 00000000..0f3bccf2
--- /dev/null
+++ b/patches/source/libXfont/configure/configure
@@ -0,0 +1,12 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXfont/libXfont.SlackBuild b/patches/source/libXfont/libXfont.SlackBuild
new file mode 100755
index 00000000..25821f17
--- /dev/null
+++ b/patches/source/libXfont/libXfont.SlackBuild
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Copyright 2014 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.
+
+
+UPGRADE_PACKAGES=no sh x11-build-script.sh lib libXfont
+mv --verbose /tmp/x11-build/*.txz /tmp
+
diff --git a/patches/source/libXfont/modularize b/patches/source/libXfont/modularize
new file mode 100644
index 00000000..38762ffd
--- /dev/null
+++ b/patches/source/libXfont/modularize
@@ -0,0 +1,272 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXfont/noarch b/patches/source/libXfont/noarch
new file mode 100644
index 00000000..480ffc26
--- /dev/null
+++ b/patches/source/libXfont/noarch
@@ -0,0 +1,76 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-cf-files
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXfont/package-blacklist b/patches/source/libXfont/package-blacklist
new file mode 100644
index 00000000..8e2f3eb5
--- /dev/null
+++ b/patches/source/libXfont/package-blacklist
@@ -0,0 +1,43 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXfont/patch/libXfont.patch b/patches/source/libXfont/patch/libXfont.patch
new file mode 100644
index 00000000..7b6e2457
--- /dev/null
+++ b/patches/source/libXfont/patch/libXfont.patch
@@ -0,0 +1 @@
+zcat $CWD/patch/libXfont/libXfont.CVE-2017-16611.diff.gz | patch -p1 || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff b/patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff
new file mode 100644
index 00000000..5b50ae66
--- /dev/null
+++ b/patches/source/libXfont/patch/libXfont/libXfont.CVE-2017-16611.diff
@@ -0,0 +1,105 @@
+From 7b377456f95d2ec3ead40f4fb74ea620191f88c8 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Thu, 26 Oct 2017 09:48:13 +0200
+Subject: Open files with O_NOFOLLOW. (CVE-2017-16611)
+
+A non-privileged X client can instruct X server running under root to open any
+file by creating own directory with "fonts.dir", "fonts.alias" or any font file
+being a symbolic link to any other file in the system. X server will then open
+it. This can be issue with special files such as /dev/watchdog.
+
+Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+
+diff --git a/src/fontfile/dirfile.c b/src/fontfile/dirfile.c
+index 04cfa40..2802980 100644
+--- a/src/fontfile/dirfile.c
++++ b/src/fontfile/dirfile.c
+@@ -42,6 +42,7 @@ in this Software without prior written authorization from The Open Group.
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <fcntl.h>
+ #include <errno.h>
+ #include <limits.h>
+
+@@ -61,8 +62,9 @@ FontFileReadDirectory (const char *directory, FontDirectoryPtr *pdir)
+ char dir_file[MAXFONTFILENAMELEN];
+ char dir_path[MAXFONTFILENAMELEN];
+ char *ptr;
+- FILE *file;
+- int count,
++ FILE *file = 0;
++ int file_fd,
++ count,
+ num_fonts,
+ status;
+ struct stat statb;
+@@ -92,7 +94,14 @@ FontFileReadDirectory (const char *directory, FontDirectoryPtr *pdir)
+ if (dir_file[strlen(dir_file) - 1] != '/')
+ strcat(dir_file, "/");
+ strcat(dir_file, FontDirFile);
++#ifndef WIN32
++ file_fd = open(dir_file, O_RDONLY | O_NOFOLLOW);
++ if (file_fd >= 0) {
++ file = fdopen(file_fd, "rt");
++ }
++#else
+ file = fopen(dir_file, "rt");
++#endif
+ if (file) {
+ #ifndef WIN32
+ if (fstat (fileno(file), &statb) == -1)
+@@ -262,7 +271,8 @@ ReadFontAlias(char *directory, Bool isFile, FontDirectoryPtr *pdir)
+ char alias[MAXFONTNAMELEN];
+ char font_name[MAXFONTNAMELEN];
+ char alias_file[MAXFONTFILENAMELEN];
+- FILE *file;
++ int file_fd;
++ FILE *file = 0;
+ FontDirectoryPtr dir;
+ int token;
+ char *lexToken;
+@@ -280,7 +290,16 @@ ReadFontAlias(char *directory, Bool isFile, FontDirectoryPtr *pdir)
+ strcat(alias_file, "/");
+ strcat(alias_file, FontAliasFile);
+ }
++
++#ifndef WIN32
++ file_fd = open(alias_file, O_RDONLY | O_NOFOLLOW);
++ if (file_fd >= 0) {
++ file = fdopen(file_fd, "rt");
++ }
++#else
+ file = fopen(alias_file, "rt");
++#endif
++
+ if (!file)
+ return ((errno == ENOENT) ? Successful : BadFontPath);
+ if (!dir)
+diff --git a/src/fontfile/fileio.c b/src/fontfile/fileio.c
+index 074ebcb..05374b4 100644
+--- a/src/fontfile/fileio.c
++++ b/src/fontfile/fileio.c
+@@ -40,6 +40,9 @@ in this Software without prior written authorization from The Open Group.
+ #ifndef O_CLOEXEC
+ #define O_CLOEXEC 0
+ #endif
++#ifndef O_NOFOLLOW
++#define O_NOFOLLOW 0
++#endif
+
+ FontFilePtr
+ FontFileOpen (const char *name)
+@@ -48,7 +51,7 @@ FontFileOpen (const char *name)
+ int len;
+ BufFilePtr raw, cooked;
+
+- fd = open (name, O_BINARY|O_CLOEXEC);
++ fd = open (name, O_BINARY|O_CLOEXEC|O_NOFOLLOW);
+ if (fd < 0)
+ return 0;
+ raw = BufFileOpenRead (fd);
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/libXfont/slack-desc/libXfont b/patches/source/libXfont/slack-desc/libXfont
new file mode 100644
index 00000000..d78d6a0e
--- /dev/null
+++ b/patches/source/libXfont/slack-desc/libXfont
@@ -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------------------------------------------------------|
+libXfont: libXfont (library for legacy X11 font system)
+libXfont:
+libXfont: libXfont provides the core of the legacy X11 font system, handling the
+libXfont: index files (fonts.dir, fonts.alias, fonts.scale), the various font
+libXfont: file formats, and rasterizing them. It is used by the X servers, the
+libXfont: X Font Server (xfs), and some font utilities (bdftopcf for instance),
+libXfont: but should not be used by normal X11 clients. X11 clients access fonts
+libXfont: via either the new API's in libXft, or the legacy API's in libX11.
+libXfont:
+libXfont:
+libXfont:
diff --git a/patches/source/libXfont/x11-build-script.sh b/patches/source/libXfont/x11-build-script.sh
new file mode 100755
index 00000000..6da53346
--- /dev/null
+++ b/patches/source/libXfont/x11-build-script.sh
@@ -0,0 +1,374 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# This is default. To not upgrade, pass UPGRADE_PACKAGES=no (or anything else).
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# 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
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXi/arch.use.flags b/patches/source/libXi/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXi/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXi/build/libXi b/patches/source/libXi/build/libXi
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXi/build/libXi
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXi/configure/configure b/patches/source/libXi/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXi/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXi/libXi.SlackBuild b/patches/source/libXi/libXi.SlackBuild
new file mode 100755
index 00000000..eea1be6d
--- /dev/null
+++ b/patches/source/libXi/libXi.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXi
+mv /tmp/x11-build/libXi*txz /tmp
diff --git a/patches/source/libXi/modularize b/patches/source/libXi/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXi/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXi/noarch b/patches/source/libXi/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXi/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXi/package-blacklist b/patches/source/libXi/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXi/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXi/slack-desc/libXi b/patches/source/libXi/slack-desc/libXi
new file mode 100644
index 00000000..4585f82e
--- /dev/null
+++ b/patches/source/libXi/slack-desc/libXi
@@ -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------------------------------------------------------|
+libXi: libXi (library for the X Input Extension)
+libXi:
+libXi: libXi is part of X11.
+libXi:
+libXi: For more information about the X.Org Foundation (the providers of the
+libXi: X.Org implementation of the X Window System), see their website:
+libXi:
+libXi: http://www.x.org
+libXi:
+libXi:
+libXi:
diff --git a/patches/source/libXi/slack-desc/libXinerama b/patches/source/libXi/slack-desc/libXinerama
new file mode 100644
index 00000000..3b16b81f
--- /dev/null
+++ b/patches/source/libXi/slack-desc/libXinerama
@@ -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------------------------------------------------------|
+libXinerama: libXinerama (library for Xinerama extension to X11 Protocol)
+libXinerama:
+libXinerama: libXinerama is part of X11.
+libXinerama:
+libXinerama: For more information about the X.Org Foundation (the providers of the
+libXinerama: X.Org implementation of the X Window System), see their website:
+libXinerama:
+libXinerama: http://www.x.org
+libXinerama:
+libXinerama:
+libXinerama:
diff --git a/patches/source/libXi/x11.SlackBuild b/patches/source/libXi/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXi/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXrandr/arch.use.flags b/patches/source/libXrandr/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXrandr/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXrandr/build/libXrandr b/patches/source/libXrandr/build/libXrandr
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXrandr/build/libXrandr
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXrandr/configure/configure b/patches/source/libXrandr/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXrandr/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXrandr/libXrandr.SlackBuild b/patches/source/libXrandr/libXrandr.SlackBuild
new file mode 100755
index 00000000..8bc75df3
--- /dev/null
+++ b/patches/source/libXrandr/libXrandr.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXrandr
+mv /tmp/x11-build/libXrandr*txz /tmp
diff --git a/patches/source/libXrandr/modularize b/patches/source/libXrandr/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXrandr/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXrandr/noarch b/patches/source/libXrandr/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXrandr/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXrandr/package-blacklist b/patches/source/libXrandr/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXrandr/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXrandr/slack-desc/libXrandr b/patches/source/libXrandr/slack-desc/libXrandr
new file mode 100644
index 00000000..ad2e243b
--- /dev/null
+++ b/patches/source/libXrandr/slack-desc/libXrandr
@@ -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------------------------------------------------------|
+libXrandr: libXrandr (X Resize, Rotate and Reflection extension library)
+libXrandr:
+libXrandr: libXrandr is part of X11.
+libXrandr:
+libXrandr: For more information about the X.Org Foundation (the providers of the
+libXrandr: X.Org implementation of the X Window System), see their website:
+libXrandr:
+libXrandr: http://www.x.org
+libXrandr:
+libXrandr:
+libXrandr:
diff --git a/patches/source/libXrandr/x11.SlackBuild b/patches/source/libXrandr/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXrandr/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXrender/arch.use.flags b/patches/source/libXrender/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXrender/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXrender/build/libXrender b/patches/source/libXrender/build/libXrender
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXrender/build/libXrender
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXrender/configure/configure b/patches/source/libXrender/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXrender/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXrender/libXrender.SlackBuild b/patches/source/libXrender/libXrender.SlackBuild
new file mode 100755
index 00000000..b18aef0e
--- /dev/null
+++ b/patches/source/libXrender/libXrender.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXrender
+mv /tmp/x11-build/libXrender*txz /tmp
diff --git a/patches/source/libXrender/modularize b/patches/source/libXrender/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXrender/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXrender/noarch b/patches/source/libXrender/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXrender/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXrender/package-blacklist b/patches/source/libXrender/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXrender/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXrender/slack-desc/libXrender b/patches/source/libXrender/slack-desc/libXrender
new file mode 100644
index 00000000..c5fe7269
--- /dev/null
+++ b/patches/source/libXrender/slack-desc/libXrender
@@ -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------------------------------------------------------|
+libXrender: libXrender (library for the Render Extension to the X11 protocol)
+libXrender:
+libXrender: libXrender is part of X11.
+libXrender:
+libXrender: For more information about the X.Org Foundation (the providers of the
+libXrender: X.Org implementation of the X Window System), see their website:
+libXrender:
+libXrender: http://www.x.org
+libXrender:
+libXrender:
+libXrender:
diff --git a/patches/source/libXrender/x11.SlackBuild b/patches/source/libXrender/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXrender/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXres/arch.use.flags b/patches/source/libXres/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXres/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXres/build/libXres b/patches/source/libXres/build/libXres
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXres/build/libXres
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXres/configure/configure b/patches/source/libXres/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXres/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXres/libXres.SlackBuild b/patches/source/libXres/libXres.SlackBuild
new file mode 100755
index 00000000..e0207968
--- /dev/null
+++ b/patches/source/libXres/libXres.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXres
+mv /tmp/x11-build/libXres*txz /tmp
diff --git a/patches/source/libXres/modularize b/patches/source/libXres/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXres/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXres/noarch b/patches/source/libXres/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXres/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXres/package-blacklist b/patches/source/libXres/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXres/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXres/slack-desc/libXres b/patches/source/libXres/slack-desc/libXres
new file mode 100644
index 00000000..4582cd5f
--- /dev/null
+++ b/patches/source/libXres/slack-desc/libXres
@@ -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------------------------------------------------------|
+libXres: libXres (X-Resource extension client library)
+libXres:
+libXres: libXres is part of X11.
+libXres:
+libXres: For more information about the X.Org Foundation (the providers of the
+libXres: X.Org implementation of the X Window System), see their website:
+libXres:
+libXres: http://www.x.org
+libXres:
+libXres:
+libXres:
diff --git a/patches/source/libXres/x11.SlackBuild b/patches/source/libXres/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXres/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXtst/arch.use.flags b/patches/source/libXtst/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXtst/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXtst/build/libXtst b/patches/source/libXtst/build/libXtst
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXtst/build/libXtst
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXtst/configure/configure b/patches/source/libXtst/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXtst/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXtst/libXtst.SlackBuild b/patches/source/libXtst/libXtst.SlackBuild
new file mode 100755
index 00000000..0a4bb940
--- /dev/null
+++ b/patches/source/libXtst/libXtst.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXtst
+mv /tmp/x11-build/libXtst*txz /tmp
diff --git a/patches/source/libXtst/modularize b/patches/source/libXtst/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXtst/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXtst/noarch b/patches/source/libXtst/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXtst/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXtst/package-blacklist b/patches/source/libXtst/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXtst/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXtst/slack-desc/libXtst b/patches/source/libXtst/slack-desc/libXtst
new file mode 100644
index 00000000..63b93c01
--- /dev/null
+++ b/patches/source/libXtst/slack-desc/libXtst
@@ -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------------------------------------------------------|
+libXtst: libXtst (client library for the XTEST & RECORD extensions)
+libXtst:
+libXtst: libXtst is part of X11.
+libXtst:
+libXtst: For more information about the X.Org Foundation (the providers of the
+libXtst: X.Org implementation of the X Window System), see their website:
+libXtst:
+libXtst: http://www.x.org
+libXtst:
+libXtst:
+libXtst:
diff --git a/patches/source/libXtst/x11.SlackBuild b/patches/source/libXtst/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXtst/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXv/arch.use.flags b/patches/source/libXv/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXv/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXv/build/libXv b/patches/source/libXv/build/libXv
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXv/build/libXv
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXv/configure/configure b/patches/source/libXv/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXv/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXv/libXv.SlackBuild b/patches/source/libXv/libXv.SlackBuild
new file mode 100755
index 00000000..b4a99f6c
--- /dev/null
+++ b/patches/source/libXv/libXv.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXv
+mv /tmp/x11-build/libXv*txz /tmp
diff --git a/patches/source/libXv/modularize b/patches/source/libXv/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXv/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXv/noarch b/patches/source/libXv/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXv/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXv/package-blacklist b/patches/source/libXv/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXv/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXv/slack-desc/libXv b/patches/source/libXv/slack-desc/libXv
new file mode 100644
index 00000000..d72865bf
--- /dev/null
+++ b/patches/source/libXv/slack-desc/libXv
@@ -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------------------------------------------------------|
+libXv: libXv (library for the X Video (Xv) extension to the X Window System)
+libXv:
+libXv: libXv is part of X11.
+libXv:
+libXv: For more information about the X.Org Foundation (the providers of the
+libXv: X.Org implementation of the X Window System), see their website:
+libXv:
+libXv: http://www.x.org
+libXv:
+libXv:
+libXv:
diff --git a/patches/source/libXv/slack-desc/libXvMC b/patches/source/libXv/slack-desc/libXvMC
new file mode 100644
index 00000000..aecd7f3a
--- /dev/null
+++ b/patches/source/libXv/slack-desc/libXvMC
@@ -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------------------------------------------------------|
+libXvMC: libXvMC (X.Org X11 libXvMC runtime library)
+libXvMC:
+libXvMC: libXvMC is part of X11.
+libXvMC:
+libXvMC: For more information about the X.Org Foundation (the providers of the
+libXvMC: X.Org implementation of the X Window System), see their website:
+libXvMC:
+libXvMC: http://www.x.org
+libXvMC:
+libXvMC:
+libXvMC:
diff --git a/patches/source/libXv/x11.SlackBuild b/patches/source/libXv/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXv/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libXvMC/arch.use.flags b/patches/source/libXvMC/arch.use.flags
new file mode 100644
index 00000000..11087c88
--- /dev/null
+++ b/patches/source/libXvMC/arch.use.flags
@@ -0,0 +1,9 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/libXvMC/build/libXvMC b/patches/source/libXvMC/build/libXvMC
new file mode 100644
index 00000000..1074c561
--- /dev/null
+++ b/patches/source/libXvMC/build/libXvMC
@@ -0,0 +1 @@
+1_slack14.2
diff --git a/patches/source/libXvMC/configure/configure b/patches/source/libXvMC/configure/configure
new file mode 100644
index 00000000..dcb1109b
--- /dev/null
+++ b/patches/source/libXvMC/configure/configure
@@ -0,0 +1,13 @@
+CFLAGS=$SLKCFLAGS \
+CXXFLAGS=$SLKCFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION} \
+ --with-udev-rules-dir=/lib/udev/rules.d \
+ --disable-static \
+ --build=$ARCH-slackware-linux
diff --git a/patches/source/libXvMC/libXvMC.SlackBuild b/patches/source/libXvMC/libXvMC.SlackBuild
new file mode 100755
index 00000000..2b657972
--- /dev/null
+++ b/patches/source/libXvMC/libXvMC.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild lib libXvMC
+mv /tmp/x11-build/libXvMC*txz /tmp
diff --git a/patches/source/libXvMC/modularize b/patches/source/libXvMC/modularize
new file mode 100644
index 00000000..8a28ed93
--- /dev/null
+++ b/patches/source/libXvMC/modularize
@@ -0,0 +1,279 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+dri3proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glamor-egl
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXpresent
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+libxshmfence
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+presentproto
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+transset
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-cursor
+xcb-util-errors
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcm
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-keyboard
+xf86-input-mouse
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-amdgpu
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-omap
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86-video-xgixp
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/libXvMC/noarch b/patches/source/libXvMC/noarch
new file mode 100644
index 00000000..8785ee52
--- /dev/null
+++ b/patches/source/libXvMC/noarch
@@ -0,0 +1,75 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/libXvMC/package-blacklist b/patches/source/libXvMC/package-blacklist
new file mode 100644
index 00000000..603b8c31
--- /dev/null
+++ b/patches/source/libXvMC/package-blacklist
@@ -0,0 +1,44 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# ARM only packages:
+# They also say in the README for this one that it is not yet ready:
+xf86-video-omap
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+xf86-video-modesetting
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/libXvMC/slack-desc/libXvMC b/patches/source/libXvMC/slack-desc/libXvMC
new file mode 100644
index 00000000..aecd7f3a
--- /dev/null
+++ b/patches/source/libXvMC/slack-desc/libXvMC
@@ -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------------------------------------------------------|
+libXvMC: libXvMC (X.Org X11 libXvMC runtime library)
+libXvMC:
+libXvMC: libXvMC is part of X11.
+libXvMC:
+libXvMC: For more information about the X.Org Foundation (the providers of the
+libXvMC: X.Org implementation of the X Window System), see their website:
+libXvMC:
+libXvMC: http://www.x.org
+libXvMC:
+libXvMC:
+libXvMC:
diff --git a/patches/source/libXvMC/x11.SlackBuild b/patches/source/libXvMC/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/libXvMC/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/libcgroup/doinst.sh b/patches/source/libcgroup/doinst.sh
new file mode 100644
index 00000000..0799f0d9
--- /dev/null
+++ b/patches/source/libcgroup/doinst.sh
@@ -0,0 +1,43 @@
+#!/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...
+}
+
+# Leave any new rc files with the same permissions as the old ones:
+if [ -e etc/rc.d/rc.cgconfig ]; then
+ if [ -x etc/rc.d/rc.cgconfig ]; then
+ chmod 755 etc/rc.d/rc.cgconfig.new
+ else
+ chmod 644 etc/rc.d/rc.cgconfig.new
+ fi
+fi
+if [ -e etc/rc.d/rc.cgred ]; then
+ if [ -x etc/rc.d/rc.cgred ]; then
+ chmod 755 etc/rc.d/rc.cgred.new
+ else
+ chmod 644 etc/rc.d/rc.cgred.new
+ fi
+fi
+
+# Then config() them:
+config etc/rc.d/rc.cgconfig.new
+config etc/rc.d/rc.cgred.new
+
+# config() the other configuration files:
+config etc/cgconfig.conf.new
+config etc/cgred.conf.new
+config etc/cgrules.conf.new
+config etc/cgsnapshot_blacklist.conf.new
+
+# If there are already installed config files, get rid of the .new ones.
+# There will still be fresh samples in the docs.
+rm -f etc/cgconfig.conf.new etc/cgred.conf.new etc/cgrules.conf.new etc/cgsnapshot_blacklist.conf.new
+
diff --git a/patches/source/libcgroup/libcgroup.SlackBuild b/patches/source/libcgroup/libcgroup.SlackBuild
new file mode 100755
index 00000000..61d27b33
--- /dev/null
+++ b/patches/source/libcgroup/libcgroup.SlackBuild
@@ -0,0 +1,171 @@
+#!/bin/sh
+
+# Copyright 2011, 2014, 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.
+
+
+PKGNAM=libcgroup
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+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
+
+# Remove Red Hat / LSB init-scriptisms:
+zcat $CWD/libcgroup.init.diff.gz | patch -p1 --verbose || exit 1
+
+# Slackware does not use /etc/sysconfig:
+zcat $CWD/libcgroup.conf.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -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 \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-pam \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# If this directory is empty, do not include it in the package:
+rmdir $PKG/usr/lib${LIBDIRSUFFIX}/security 2> /dev/null
+
+## COMMENTED OUT FOR 14.2 PACKAGE BUGFIX SINCE IT WOULD REQUIRE A NEW GROUP:
+## cgexec doesn't need to be setuid root -- setgid cgred is sufficient:
+#chown root:cgred $PKG/usr/bin/cgexec
+#chmod 2755 $PKG/usr/bin/cgexec
+
+# Install init scripts:
+mkdir -p $PKG/etc/rc.d
+cp -a scripts/init.d/cgconfig $PKG/etc/rc.d/rc.cgconfig.new
+cp -a scripts/init.d/cgred $PKG/etc/rc.d/rc.cgred.new
+chmod 644 $PKG/etc/rc.d/*
+chown -R root:root $PKG/etc/rc.d/*
+
+# Install sample config files:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION/samples
+( cd samples
+ for conffile in cgconfig.conf cgred.conf cgrules.conf cgsnapshot_blacklist.conf ; do
+ cp -a $conffile $PKG/etc/${conffile}.new
+ cp -a $conffile $PKG/usr/doc/${PKGNAM}-$VERSION/samples
+ done
+)
+
+## DON'T TRY TO USE cgred GROUP, IT DOESN'T EXIST ON 14.2:
+sed -i "s/SOCKET_GROUP=\"cgred\"/SOCKET_GROUP=\"\"/g" $PKG/etc/cgred.conf.new
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* THANKS TODO \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libcgroup/libcgroup.conf.diff b/patches/source/libcgroup/libcgroup.conf.diff
new file mode 100644
index 00000000..f6e9dd10
--- /dev/null
+++ b/patches/source/libcgroup/libcgroup.conf.diff
@@ -0,0 +1,8 @@
+--- ./samples/cgred.conf.orig 2011-01-10 14:16:09.750002388 -0600
++++ ./samples/cgred.conf 2011-01-10 14:16:20.446998061 -0600
+@@ -1,4 +1,4 @@
+-# /etc/sysconfig/cgred.conf - CGroup Rules Engine Daemon configuration file
++# /etc/cgred.conf - CGroup Rules Engine Daemon configuration file
+ #
+ # The four options listed below (CONFIG_FILE, LOG_FILE, NODAEMON, LOG) are
+ # the only valid ones. Defining anything else in this file will cause the
diff --git a/patches/source/libcgroup/libcgroup.init.diff b/patches/source/libcgroup/libcgroup.init.diff
new file mode 100644
index 00000000..1d1be2cc
--- /dev/null
+++ b/patches/source/libcgroup/libcgroup.init.diff
@@ -0,0 +1,136 @@
+--- ./scripts/init.d/cgred.in.orig 2014-01-13 08:05:56.000000000 -0600
++++ ./scripts/init.d/cgred.in 2017-02-28 12:41:11.307424565 -0600
+@@ -39,13 +39,12 @@
+ # Sanity checks
+ [ -x $CGRED_BIN ] || exit 1
+
+-# Source function library & LSB routines
++# Source function library
+ . /etc/rc.d/init.d/functions
+-. /lib/lsb/init-functions
+
+ # Read in configuration options.
+-if [ -f "/etc/sysconfig/cgred.conf" ] ; then
+- . /etc/sysconfig/cgred.conf
++if [ -f /etc/cgred.conf ] ; then
++ . /etc/cgred.conf
+ OPTIONS="$NODAEMON $LOG"
+ if [ -n "$LOG_FILE" ]; then
+ OPTIONS="$OPTIONS --logfile=$LOG_FILE"
+@@ -70,13 +69,13 @@
+ {
+ echo -n $"Starting CGroup Rules Engine Daemon: "
+ if [ -f "$lockfile" ]; then
+- log_failure_msg "$servicename is already running with PID `cat ${pidfile}`"
++ echo "$servicename is already running with PID `cat ${pidfile}`"
+ return 0
+ fi
+ num=`grep "cgroup" /proc/mounts | awk '$3=="cgroup"' | wc -l`
+ if [ $num -eq 0 ]; then
+ echo
+- log_failure_msg $"Cannot find cgroups, is cgconfig service running?"
++ echo $"Cannot find cgroups, is cgconfig service running?"
+ return 1
+ fi
+ daemon --check $servicename --pidfile $pidfile $CGRED_BIN $OPTIONS
+@@ -97,7 +96,7 @@
+ {
+ echo -n $"Stopping CGroup Rules Engine Daemon..."
+ if [ ! -f $pidfile ]; then
+- log_success_msg
++ #log_success_msg
+ return 0
+ fi
+ killproc -p $pidfile -TERM "$processname"
+@@ -143,13 +142,13 @@
+ echo $"Reloading rules configuration..."
+ kill -s 12 `cat ${pidfile}`
+ RETVAL=$?
+- if [ $RETVAL -eq 0 ] ; then
+- log_success_msg
+- else
+- log_failure_msg
+- fi
++ #if [ $RETVAL -eq 0 ] ; then
++ # log_success_msg
++ #else
++ # log_failure_msg
++ #fi
+ else
+- log_failure_msg "$servicename is not running."
++ echo "$servicename is not running."
+ fi
+ ;;
+ *)
+--- ./scripts/init.d/cgconfig.in.orig 2014-01-13 08:05:56.000000000 -0600
++++ ./scripts/init.d/cgconfig.in 2017-02-28 12:42:13.278423245 -0600
+@@ -36,11 +36,6 @@
+ servicename=cgconfig
+ lockfile=/var/lock/subsys/$servicename
+
+-#
+-# Source LSB routines
+-#
+-. /lib/lsb/init-functions
+-
+ # read the config
+ CREATE_DEFAULT=yes
+ if [ -e /etc/sysconfig/cgconfig ]; then
+@@ -54,8 +49,8 @@
+ read user ctrl defaultcgroup <<< \
+ $(grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf)
+ if [ -n "$defaultcgroup" -a "$defaultcgroup" = "*" ]; then
+- log_warning_msg "/etc/cgrules.conf incorrect"
+- log_warning_msg "Overriding it"
++ echo "/etc/cgrules.conf incorrect"
++ echo "Overriding it"
+ defaultcgroup=
+ fi
+ fi
+@@ -98,20 +93,20 @@
+ start() {
+ echo -n "Starting cgconfig service: "
+ if [ -f "$lockfile" ]; then
+- log_warning_msg "lock file already exists"
++ echo "lock file already exists"
+ return 0
+ fi
+
+ if [ $? -eq 0 ]; then
+ if [ ! -s $CONFIG_FILE ]; then
+- log_failure_msg $CONFIG_FILE "is not configured"
++ echo $CONFIG_FILE "is not configured"
+ return 6
+ fi
+
+ $CGCONFIGPARSER_BIN -l $CONFIG_FILE
+ retval=$?
+ if [ $retval -ne 0 ]; then
+- log_failure_msg "Failed to parse " $CONFIG_FILE
++ echo "Failed to parse " $CONFIG_FILE
+ return 1
+ fi
+ fi
+@@ -123,18 +118,18 @@
+ touch "$lockfile"
+ retval=$?
+ if [ $retval -ne 0 ]; then
+- log_failure_msg "Failed to touch $lockfile"
++ echo "Failed to touch $lockfile"
+ return 1
+ fi
+- log_success_msg
++ #log_success_msg
+ return 0
+ }
+
+ stop() {
+ echo -n "Stopping cgconfig service: "
+- cgclear
++ /usr/sbin/cgclear -l /etc/cgconfig.conf
+ rm -f "$lockfile"
+- log_success_msg
++ #log_success_msg
+ return 0
+ }
+
diff --git a/patches/source/libcgroup/slack-desc b/patches/source/libcgroup/slack-desc
new file mode 100644
index 00000000..30a43ebe
--- /dev/null
+++ b/patches/source/libcgroup/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-------------------------------------------------------|
+libcgroup: libcgroup (library and utilities for kernel control groups)
+libcgroup:
+libcgroup: Control Groups provide a mechanism for aggregating/partitioning sets of
+libcgroup: tasks, and all their future children, into hierarchical groups with
+libcgroup: specialized behaviour. It makes use of a filesystem interface.
+libcgroup: This package contains a library for developing applications that use
+libcgroup: control groups, as well as some basic userspace tools for controlling
+libcgroup: and monitoring control groups.
+libcgroup:
+libcgroup: Homepage: http://libcg.sourceforge.net/
+libcgroup:
diff --git a/patches/source/libgcrypt/libgcrypt.SlackBuild b/patches/source/libgcrypt/libgcrypt.SlackBuild
new file mode 100755
index 00000000..aced611f
--- /dev/null
+++ b/patches/source/libgcrypt/libgcrypt.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+# Copyright 2006-2009 Robby Workman, Northport, AL, USA
+# Copyright 2007, 2008, 2009, 2010 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=libgcrypt
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.bz2 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || 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" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/libgcrypt-$VERSION \
+ --enable-shared=yes \
+ --enable-static=no \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Move the shared library to $PKG/lib${LIBDIRSUFFIX}:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.??.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.?? ../../lib${LIBDIRSUFFIX}
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS BUGS COPYING* ChangeLog INSTALL NEWS \
+ README* THANKS TODO VERSION \
+ $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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libgcrypt/slack-desc b/patches/source/libgcrypt/slack-desc
new file mode 100644
index 00000000..365fab64
--- /dev/null
+++ b/patches/source/libgcrypt/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------------------------------------------------------|
+libgcrypt: libgcrypt (General purpose crypto library)
+libgcrypt:
+libgcrypt: Libgcrypt is a general purpose crypto library based on the code
+libgcrypt: used in GnuPG.
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
+libgcrypt:
diff --git a/patches/source/libidn/libidn.SlackBuild b/patches/source/libidn/libidn.SlackBuild
new file mode 100755
index 00000000..2187060e
--- /dev/null
+++ b/patches/source/libidn/libidn.SlackBuild
@@ -0,0 +1,137 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=libidn
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libidn
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf libidn-$VERSION
+tar xvf $CWD/libidn-$VERSION.tar.?z || exit 1
+cd libidn-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress and if needed symlink the man pages:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Compress info pages and purge "dir" file from the package:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+mkdir -p $PKG/usr/doc/libidn-$VERSION
+cp -a \
+ ABOUT-NLS AUTHORS COPYING* FAQ INSTALL NEWS README* THANKS TODO \
+ contrib \
+ libidn/libidn.html \
+ $PKG/usr/doc/libidn-$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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libidn-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libidn/slack-desc b/patches/source/libidn/slack-desc
new file mode 100644
index 00000000..a10cfe7b
--- /dev/null
+++ b/patches/source/libidn/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------------------------------------------------------|
+libidn: libidn (GNU Internationalized Domain Name library)
+libidn:
+libidn: GNU Libidn is an implementation of the Stringprep, Punycode and IDNA
+libidn: specifications defined by the IETF Internationalized Domain Names
+libidn: (IDN) working group, used for internationalized domain names.
+libidn:
+libidn:
+libidn:
+libidn:
+libidn:
+libidn:
diff --git a/patches/source/libpcap/libpcap.SlackBuild b/patches/source/libpcap/libpcap.SlackBuild
new file mode 100755
index 00000000..c1261200
--- /dev/null
+++ b/patches/source/libpcap/libpcap.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012 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=libpcap
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libpcap
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf libpcap-$VERSION
+tar xvf $CWD/libpcap-$VERSION.tar.gz || exit 1
+cd libpcap-$VERSION || exit 1
+
+find . -type d -name CVS -depth -exec rm -rf {} \;
+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="$(getconf LFS_CFLAGS)" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/libpcap-$VERSION \
+ --enable-ipv6 \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make shared $NUMJOBS || make || exit 1
+
+mkdir -p $PKG/usr/bin # otherwise it errors out on install
+make install DESTDIR=$PKG || exit 1
+
+strip --strip-debug libpcap.so.1.?.?
+
+mkdir -p $PKG/usr/doc/libpcap-$VERSION
+cp -a \
+ CHANGES CREDITS INSTALL.txt LICENSE README* TODO VERSION \
+ $PKG/usr/doc/libpcap-$VERSION
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Use symbolic links in the man pages:
+( cd $PKG/usr/man/man3
+ ln -sf pcap_datalink_val_to_name.3pcap pcap_datalink_val_to_description.3pcap
+ ln -sf pcap_dump_open.3pcap pcap_dump_fopen.3pcap
+ ln -sf pcap_geterr.3pcap pcap_perror.3pcap
+ ln -sf pcap_inject.3pcap pcap_sendpacket.3pcap
+ ln -sf pcap_loop.3pcap pcap_dispatch.3pcap
+ ln -sf pcap_major_version.3pcap pcap_minor_version.3pcap
+ ln -sf pcap_next_ex.3pcap pcap_next.3pcap
+ ln -sf pcap_open_offline.3pcap pcap_fopen_offline.3pcap
+ ln -sf pcap_setnonblock.3pcap pcap_getnonblock.3pcap
+ ln -sf pcap_findalldevs.3pcap pcap_freealldevs.3pcap
+ ln -sf pcap_free_tstamp_types.3pcap pcap_list_tstamp_types.3pcap
+ ln -sf pcap_free_datalinks.3pcap pcap_list_datalinks.3pcap
+)
+
+# 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 *.?
+ gzip -9 *.?pcap
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libpcap/slack-desc b/patches/source/libpcap/slack-desc
new file mode 100644
index 00000000..63fb9876
--- /dev/null
+++ b/patches/source/libpcap/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------------------------------------------------------|
+libpcap: libpcap (packet capture library)
+libpcap:
+libpcap: libpcap is a library for user-level packet capture. libpcap provides
+libpcap: a portable framework for low-level network monitoring. Applications
+libpcap: include network statistics collection, security monitoring, network
+libpcap: debugging, etc. The tcpdump utility uses libpcap.
+libpcap:
+libpcap: Project homepage: http://www.tcpdump.org
+libpcap:
+libpcap:
+libpcap:
diff --git a/patches/source/libplist/libplist.SlackBuild b/patches/source/libplist/libplist.SlackBuild
new file mode 100755
index 00000000..858b6085
--- /dev/null
+++ b/patches/source/libplist/libplist.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+# Copyright 2011, 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=libplist
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+if ls /var/log/packages/libplist-* 1> /dev/null 2> /dev/null ; then
+ echo "libplist is installed. The package should be removed before"
+ echo "building, or the new python modules might be linked to the"
+ echo "old library version. This is normally only a problem if the"
+ echo "major library version gets bumped, but still. :)"
+ echo
+ echo "Removing the libplist package in 15 seconds, and then continuing"
+ echo "with the build."
+ sleep 15
+ removepkg libplist
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 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" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# 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 *.?
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# Add some docs:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+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/libplist/slack-desc b/patches/source/libplist/slack-desc
new file mode 100644
index 00000000..cbe02442
--- /dev/null
+++ b/patches/source/libplist/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------------------------------------------------------|
+libplist: libplist (A library for Apple Binary and XML Property Lists)
+libplist:
+libplist: libplist is a library that attempts to support Apple Binary and XML
+libplist: Property Lists. It is used by libgpod.
+libplist:
+libplist: The libplist homepage: http://www.libimobiledevice.org/
+libplist:
+libplist:
+libplist:
+libplist:
+libplist:
diff --git a/patches/source/libpng/libpng.SlackBuild b/patches/source/libpng/libpng.SlackBuild
new file mode 100755
index 00000000..b2476bc5
--- /dev/null
+++ b/patches/source/libpng/libpng.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/sh
+
+# Copyright 2015 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=libpng
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+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 || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install 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
+)
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \
+ libpng*.txt example.c \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# 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
+
+# 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 ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+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/libpng/libpng.url b/patches/source/libpng/libpng.url
new file mode 100644
index 00000000..f50d4275
--- /dev/null
+++ b/patches/source/libpng/libpng.url
@@ -0,0 +1 @@
+ftp://ftp.simplesystems.org/pub/libpng/png/src/
diff --git a/patches/source/libpng/slack-desc b/patches/source/libpng/slack-desc
new file mode 100644
index 00000000..54d1d0f9
--- /dev/null
+++ b/patches/source/libpng/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------------------------------------------------------|
+libpng: libpng (Portable Network Graphics library)
+libpng:
+libpng: PNG (Portable Network Graphics) is an extensible file format for the
+libpng: lossless, portable, well-compressed storage of raster images. PNG
+libpng: provides a patent-free replacement for GIF and can also replace many
+libpng: common uses of TIFF. Indexed-color, grayscale, and truecolor images
+libpng: are supported, plus an optional alpha channel. Sample depths range
+libpng: from 1 to 16 bits.
+libpng:
+libpng:
+libpng:
diff --git a/patches/source/libsoup/libsoup.CVE-2017-2885.diff b/patches/source/libsoup/libsoup.CVE-2017-2885.diff
new file mode 100644
index 00000000..e0c318a2
--- /dev/null
+++ b/patches/source/libsoup/libsoup.CVE-2017-2885.diff
@@ -0,0 +1,43 @@
+--- libsoup-2.58.1/libsoup/soup-filter-input-stream.c 2016-12-03 08:59:41.000000000 -0600
++++ libsoup-2.58.2/libsoup/soup-filter-input-stream.c 2017-08-10 07:06:09.000000000 -0500
+@@ -198,7 +198,7 @@
+ GCancellable *cancellable,
+ GError **error)
+ {
+- gssize nread;
++ gssize nread, read_length;
+ guint8 *p, *buf, *end;
+ gboolean eof = FALSE;
+ GError *my_error = NULL;
+@@ -251,10 +251,11 @@
+ } else
+ buf = fstream->priv->buf->data;
+
+- /* Scan for the boundary */
+- end = buf + fstream->priv->buf->len;
+- if (!eof)
+- end -= boundary_length;
++ /* Scan for the boundary within the range we can possibly return. */
++ if (include_boundary)
++ end = buf + MIN (fstream->priv->buf->len, length) - boundary_length;
++ else
++ end = buf + MIN (fstream->priv->buf->len - boundary_length, length);
+ for (p = buf; p <= end; p++) {
+ if (*p == *(guint8*)boundary &&
+ !memcmp (p, boundary, boundary_length)) {
+@@ -268,10 +269,9 @@
+ if (!*got_boundary && fstream->priv->buf->len < length && !eof)
+ goto fill_buffer;
+
+- /* Return everything up to 'p' (which is either just after the boundary if
+- * include_boundary is TRUE, just before the boundary if include_boundary is
+- * FALSE, @boundary_len - 1 bytes before the end of the buffer, or end-of-
+- * file).
+- */
+- return read_from_buf (fstream, buffer, p - buf);
++ if (eof && !*got_boundary)
++ read_length = MIN (fstream->priv->buf->len, length);
++ else
++ read_length = p - buf;
++ return read_from_buf (fstream, buffer, read_length);
+ }
diff --git a/patches/source/libsoup/libsoup.SlackBuild b/patches/source/libsoup/libsoup.SlackBuild
new file mode 100755
index 00000000..f260a7ef
--- /dev/null
+++ b/patches/source/libsoup/libsoup.SlackBuild
@@ -0,0 +1,101 @@
+#!/bin/sh
+#
+# Slackware build script for libsoup
+#
+# Copyright 2009-2010 Erik W. Hanson, Minneapolis, 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=libsoup
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.2}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+zcat $CWD/libsoup.CVE-2017-2885.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var/lib \
+ --disable-static \
+ --with-gnome \
+ --enable-vala=no \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install-strip DESTDIR=$PKG || exit 1
+
+## NOTE: These _should_ go eventually, but for now it causes problems.
+## Don't ship .la files:
+#rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING* AUTHORS 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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/libsoup/slack-desc b/patches/source/libsoup/slack-desc
new file mode 100644
index 00000000..80cd6ef0
--- /dev/null
+++ b/patches/source/libsoup/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------------------------------------------------------|
+libsoup: libsoup (an HTTP client/server library)
+libsoup:
+libsoup: Soup is an HTTP client/server library implementation in C. It uses
+libsoup: GObjects and the glib main loop to integrate well with GTK+
+libsoup: applications, and has a synchronous API suitable for use in threaded
+libsoup: applications.
+libsoup:
+libsoup:
+libsoup:
+libsoup:
+libsoup:
diff --git a/patches/source/libtiff/libtiff-am-version.patch b/patches/source/libtiff/libtiff-am-version.patch
new file mode 100644
index 00000000..c94c2e00
--- /dev/null
+++ b/patches/source/libtiff/libtiff-am-version.patch
@@ -0,0 +1,31 @@
+Back off the minimum required automake version to 1.11. There isn't
+anything in libtiff currently that actually requires 1.12, and changing
+this allows the package to be built on pre-F18 machines for easier testing.
+
+This patch can go away once we no longer care about testing on pre-F18.
+
+
+diff -Naur tiff-4.0.3.orig/Makefile.am tiff-4.0.3/Makefile.am
+--- tiff-4.0.3.orig/Makefile.am 2012-09-20 09:22:47.000000000 -0400
++++ tiff-4.0.3/Makefile.am 2012-10-30 11:33:30.312823564 -0400
+@@ -25,7 +25,7 @@
+
+ docdir = $(LIBTIFF_DOCDIR)
+
+-AUTOMAKE_OPTIONS = 1.12 dist-zip foreign
++AUTOMAKE_OPTIONS = 1.11 dist-zip foreign
+ ACLOCAL_AMFLAGS = -I m4
+
+ docfiles = \
+diff -Naur tiff-4.0.3.orig/test/Makefile.am tiff-4.0.3/test/Makefile.am
+--- tiff-4.0.3.orig/test/Makefile.am 2012-09-20 09:22:28.000000000 -0400
++++ tiff-4.0.3/test/Makefile.am 2012-10-30 11:33:17.109696812 -0400
+@@ -23,7 +23,7 @@
+
+ # Process this file with automake to produce Makefile.in.
+
+-AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
++AUTOMAKE_OPTIONS = 1.11 color-tests parallel-tests foreign
+
+ LIBTIFF = $(top_builddir)/libtiff/libtiff.la
+
diff --git a/patches/source/libtiff/libtiff.SlackBuild b/patches/source/libtiff/libtiff.SlackBuild
new file mode 100755
index 00000000..f1c364df
--- /dev/null
+++ b/patches/source/libtiff/libtiff.SlackBuild
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# Copyright 2005-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 tiff-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libtiff
+
+rm -rf $PKG
+mkdir -p $PKG
+cd $TMP
+rm -rf tiff-$VERSION
+tar xvf $CWD/tiff-$VERSION.tar.?z* || exit 1
+cd tiff-$VERSION
+
+zcat $CWD/libtiff-am-version.patch.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -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 \
+ --disable-static \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+( cd man ; make install-man DESTDIR=$PKG || exit 1 ) || exit 1
+rm -r $PKG/usr/share
+( 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
+)
+strip -g $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
+chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/libtiff*.so.*
+mkdir -p $PKG/usr/doc/libtiff-$VERSION
+cp -a \
+ COPYRIGHT README RELEASE-DATE TODO VERSION \
+ $PKG/usr/doc/libtiff-$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/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mv $PKG/usr/local/man $PKG/usr
+rmdir $PKG/usr/local
+
+# I'd use that shiny new manpage script here but all the
+# .3 manpages end with '.3tiff'.
+gzip -9 $PKG/usr/man/man?/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+makepkg -l y -c n $TMP/libtiff-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libtiff/slack-desc b/patches/source/libtiff/slack-desc
new file mode 100644
index 00000000..42c79f47
--- /dev/null
+++ b/patches/source/libtiff/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------------------------------------------------------|
+libtiff: libtiff (a library for reading and writing TIFF files)
+libtiff:
+libtiff: This package provides support for the Tag Image File Format (TIFF),
+libtiff: a widely used format for storing image data. Included is the libtiff
+libtiff: library (for reading and writing TIFF files), and a collection of
+libtiff: tools for working with TIFF images.
+libtiff:
+libtiff:
+libtiff:
+libtiff:
+libtiff:
diff --git a/patches/source/libtirpc/doinst.sh b/patches/source/libtirpc/doinst.sh
new file mode 100644
index 00000000..409cfbe7
--- /dev/null
+++ b/patches/source/libtirpc/doinst.sh
@@ -0,0 +1,13 @@
+#!/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...
+}
+config etc/netconfig.new
diff --git a/patches/source/libtirpc/libtirpc.SlackBuild b/patches/source/libtirpc/libtirpc.SlackBuild
new file mode 100755
index 00000000..511030b2
--- /dev/null
+++ b/patches/source/libtirpc/libtirpc.SlackBuild
@@ -0,0 +1,164 @@
+#!/bin/sh
+
+# Copyright 2015 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.
+
+# Thanks to Jan Rafaj for contributing the original reference script.
+# Remark: - The GSS support (for secure RPC) is currently not built, as it
+# Remark: requires Kerberos 5 libraries. If you need it, install
+# Remark: Kerberos 5, remove '--disable-gssapi' from the configure flags
+# Remark: below and rebuild.
+
+PKGNAM=libtirpc
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# To build with GSS support (requires Kerberos 5 libraries), pass any value
+# other than "NO" in the environment, or edit the line below:
+WITH_GSS=${WITH_GSS:-NO}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+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 || 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 {} \;
+
+# Set proper GSS option:
+if [ "$WITH_GSS" = "NO" ]; then
+ GSSAPI="--disable-gssapi"
+else
+ GSSAPI="--enable-gssapi"
+fi
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-static \
+ $GSSAPI \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Make etc/netconfig file a .new:
+mv $PKG/etc/netconfig $PKG/etc/netconfig.new
+
+# Move library to /lib${LIBDIRSUFFIX} as it might be needed to mount /usr:
+mkdir $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# 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
+)
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* THANKS TODO \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Don't use .3t man page suffix:
+if [ -d $PKG/usr/man/man3 ]; then
+ ( cd $PKG/usr/man/man3
+ for file in *.3t ; do
+ mv $file $(basename $file .3t).3
+ done
+ )
+fi
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libtirpc/slack-desc b/patches/source/libtirpc/slack-desc
new file mode 100644
index 00000000..426c7917
--- /dev/null
+++ b/patches/source/libtirpc/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------------------------------------------------------|
+libtirpc: libtirpc (Transport-Independent RPC library)
+libtirpc:
+libtirpc: Libtirpc is a port of Sun's Transport-Independent RPC library to
+libtirpc: Linux. It is being developed by Bull GNU/Linux NFSv4 project.
+libtirpc:
+libtirpc: You will need this library if you plan to use RPC with a GLIBC
+libtirpc: version newer than 2.13, because the RPC stack has been removed
+libtirpc: from GLIBC versions newer than 2.13. The library is required
+libtirpc: by the 'rpcbind' package.
+libtirpc:
+libtirpc: http://sourceforge.net/projects/libtirpc/
diff --git a/patches/source/libtool/doinst.sh b/patches/source/libtool/doinst.sh
new file mode 100644
index 00000000..38b074dd
--- /dev/null
+++ b/patches/source/libtool/doinst.sh
@@ -0,0 +1,18 @@
+# Update the /usr/info/dir info-database, so that we will see the new
+# "libtool" item in info root structure, if we type "info".
+if [ -x /usr/bin/install-info ] ; then
+ install-info --info-dir=/usr/info /usr/info/libtool.info.gz 2>/dev/null
+elif fgrep "libtoolize" usr/info/dir 1> /dev/null 2> /dev/null ; then
+ GOOD=yes # It seems to be entered in the /usr/info/dir already
+else # add the info to the dir file directly:
+cat << EOF >> usr/info/dir
+
+GNU programming tools
+* libtoolize: (libtool)Invoking libtoolize. Adding libtool support.
+* Libtool: (libtool). Generic shared library support script.
+
+Individual utilities
+* libtoolize: (libtool)Invoking libtoolize. Adding libtool support.
+* Libtool: (libtool). Generic shared library support script.
+EOF
+fi
diff --git a/patches/source/libtool/libtool.SlackBuild b/patches/source/libtool/libtool.SlackBuild
new file mode 100755
index 00000000..c61c9ba6
--- /dev/null
+++ b/patches/source/libtool/libtool.SlackBuild
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# Copyright 2008, 2013, 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.
+
+VERSION=${VERSION:-$(echo libtool-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-5_slack14.2}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libtool
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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 libtool-$VERSION
+
+tar xvf $CWD/libtool-$VERSION.tar.xz || exit 1
+
+cd libtool-$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 {} \;
+
+zcat $CWD/libtool.no.moved.warning.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/libtool-$VERSION \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+mkdir -p $PKG/usr/doc/libtool-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* THANKS TODO \
+ $PKG/usr/doc/libtool-$VERSION
+
+mkdir $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/libtool-${VERSION}-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libtool/libtool.no.moved.warning.diff b/patches/source/libtool/libtool.no.moved.warning.diff
new file mode 100644
index 00000000..783c97af
--- /dev/null
+++ b/patches/source/libtool/libtool.no.moved.warning.diff
@@ -0,0 +1,42 @@
+diff -Nur libtool-2.4.3.orig/build-aux/ltmain.in libtool-2.4.3/build-aux/ltmain.in
+--- libtool-2.4.3.orig/build-aux/ltmain.in 2014-10-27 12:20:51.000000000 -0500
++++ libtool-2.4.3/build-aux/ltmain.in 2014-10-28 11:01:00.731257807 -0500
+@@ -5978,7 +5978,7 @@
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+- func_warning "library '$lib' was moved."
++ #func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+@@ -6546,7 +6546,7 @@
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+- func_warning "'$deplib' seems to be moved"
++ #func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
+diff -Nur libtool-2.4.3.orig/build-aux/ltmain.sh libtool-2.4.3/build-aux/ltmain.sh
+--- libtool-2.4.3.orig/build-aux/ltmain.sh 2014-10-27 13:04:31.000000000 -0500
++++ libtool-2.4.3/build-aux/ltmain.sh 2014-10-28 11:01:14.196484821 -0500
+@@ -7890,7 +7890,7 @@
+ # Find the relevant object directory and library name.
+ if test yes = "$installed"; then
+ if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+- func_warning "library '$lib' was moved."
++ #func_warning "library '$lib' was moved."
+ dir=$ladir
+ absdir=$abs_ladir
+ libdir=$abs_ladir
+@@ -8458,7 +8458,7 @@
+ test -z "$libdir" && \
+ func_fatal_error "'$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+- func_warning "'$deplib' seems to be moved"
++ #func_warning "'$deplib' seems to be moved"
+
+ path=-L$absdir
+ fi
diff --git a/patches/source/libtool/slack-desc b/patches/source/libtool/slack-desc
new file mode 100644
index 00000000..7bf0e8d3
--- /dev/null
+++ b/patches/source/libtool/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------------------------------------------------------|
+libtool: libtool (a generic library support script)
+libtool:
+libtool: This is GNU Libtool, a generic library support script. Libtool hides
+libtool: the complexity of using shared libraries behind a consistent, portable
+libtool: interface. To use libtool, add the new generic library building
+libtool: commands to your Makefile, Makefile.in, or Makefile.am. See the
+libtool: documentation for details.
+libtool:
+libtool: You must install the "m4" package to be able to use libtool.
+libtool:
+libtool:
diff --git a/patches/source/libvorbis/libvorbis.SlackBuild b/patches/source/libvorbis/libvorbis.SlackBuild
new file mode 100755
index 00000000..882d6473
--- /dev/null
+++ b/patches/source/libvorbis/libvorbis.SlackBuild
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 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 libvorbis-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libvorbis
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf libvorbis-$VERSION
+tar xvf $CWD/libvorbis-$VERSION.tar.?z* || exit 1
+cd libvorbis-$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" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+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
+
+mv $PKG/usr/share/doc $PKG/usr
+cp -a \
+ AUTHORS COPYING HACKING README \
+ $PKG/usr/doc/libvorbis-$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/*-$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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libvorbis-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libvorbis/slack-desc b/patches/source/libvorbis/slack-desc
new file mode 100644
index 00000000..2a3bb8f7
--- /dev/null
+++ b/patches/source/libvorbis/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------------------------------------------------------|
+libvorbis: libvorbis (Ogg Vorbis library)
+libvorbis:
+libvorbis: This library supports the Vorbis General Audio Compression Codec
+libvorbis: (commonly known as Ogg Vorbis). Ogg Vorbis is a fully open,
+libvorbis: non-proprietary, patent-and-royalty-free, general-purpose compressed
+libvorbis: audio format for audio and music at fixed and variable bitrates.
+libvorbis:
+libvorbis: The libvorbis library requires libao and libogg. You'll find some
+libvorbis: basic tools for creating and using Ogg Vorbis files in the
+libvorbis: vorbis-tools package.
+libvorbis:
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch
new file mode 100644
index 00000000..581e4e09
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2004-0941.patch
@@ -0,0 +1,17 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:02:37.407589824 -0500
++++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 2004-11-11 14:04:29.672522960 -0500
+@@ -188,6 +188,14 @@
+
+ png_get_IHDR (png_ptr, info_ptr, &width, &height, &bit_depth, &color_type,
+ &interlace_type, NULL, NULL);
++ if (overflow2(sizeof (int), width))
++ {
++ return NULL;
++ }
++ if (overflow2(sizeof (int) * width, height))
++ {
++ return NULL;
++ }
+ if ((color_type == PNG_COLOR_TYPE_RGB) ||
+ (color_type == PNG_COLOR_TYPE_RGB_ALPHA))
+ {
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch
new file mode 100644
index 00000000..507fe662
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2006-3376.patch
@@ -0,0 +1,27 @@
+--- libwmf-0.2.8.4.orig/src/player.c 2002-12-10 19:30:26.000000000 +0000
++++ libwmf-0.2.8.4/src/player.c 2006-07-12 15:12:52.000000000 +0100
+@@ -42,6 +42,7 @@
+ #include "player/defaults.h" /* Provides: default settings */
+ #include "player/record.h" /* Provides: parameter mechanism */
+ #include "player/meta.h" /* Provides: record interpreters */
++#include <stdint.h>
+
+ /**
+ * @internal
+@@ -132,8 +134,14 @@
+ }
+ }
+
+-/* P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API)-3) * 2 * sizeof (unsigned char));
+- */ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
++ if (MAX_REC_SIZE(API) > UINT32_MAX / 2)
++ {
++ API->err = wmf_E_InsMem;
++ WMF_DEBUG (API,"bailing...");
++ return (API->err);
++ }
++
++ P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
+
+ if (ERR (API))
+ { WMF_DEBUG (API,"bailing...");
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch
new file mode 100644
index 00000000..0cc5abc7
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-0455.patch
@@ -0,0 +1,11 @@
+--- libwmf-0.2.8.4/src/extra/gd/gdft.c 2010-12-06 11:18:26.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gdft.c 2010-12-06 11:21:09.000000000 +0000
+@@ -811,7 +811,7 @@
+ {
+ ch = c & 0xFF; /* don't extend sign */
+ }
+- next++;
++ if (*next) next++;
+ }
+ else
+ {
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch
new file mode 100644
index 00000000..eba8fac2
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-2756.patch
@@ -0,0 +1,16 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_png.c 1 Apr 2007 20:41:01 -0000 1.21.2.1
++++ libwmf-0.2.8.4/src/extra/gd/gd_png.c 16 May 2007 19:06:11 -0000
+@@ -78,8 +78,11 @@
+ gdPngReadData (png_structp png_ptr,
+ png_bytep data, png_size_t length)
+ {
+- gdGetBuf (data, length, (gdIOCtx *)
+- png_get_io_ptr (png_ptr));
++ int check;
++ check = gdGetBuf (data, length, (gdIOCtx *) png_get_io_ptr (png_ptr));
++ if (check != length) {
++ png_error(png_ptr, "Read Error: truncated data");
++ }
+ }
+
+ static void
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch
new file mode 100644
index 00000000..ac1ead5a
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3472.patch
@@ -0,0 +1,61 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -106,6 +106,18 @@
+ gdImagePtr im;
+ unsigned long cpa_size;
+
++ if (overflow2(sx, sy)) {
++ return NULL;
++ }
++
++ if (overflow2(sizeof (int *), sy)) {
++ return NULL;
++ }
++
++ if (overflow2(sizeof(int), sx)) {
++ return NULL;
++ }
++
+ im = (gdImage *) gdMalloc (sizeof (gdImage));
+ if (im == 0) return 0;
+ memset (im, 0, sizeof (gdImage));
+--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.c 2010-12-06 11:47:31.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.c 2010-12-06 11:48:04.000000000 +0000
+@@ -2,6 +2,7 @@
+ #include "gdhelpers.h"
+ #include <stdlib.h>
+ #include <string.h>
++#include <limits.h>
+
+ /* TBB: gd_strtok_r is not portable; provide an implementation */
+
+@@ -94,3 +95,18 @@
+ {
+ free (ptr);
+ }
++
++int overflow2(int a, int b)
++{
++ if(a < 0 || b < 0) {
++ fprintf(stderr, "gd warning: one parameter to a memory allocation multiplication is negative, failing operation gracefully\n");
++ return 1;
++ }
++ if(b == 0)
++ return 0;
++ if(a > INT_MAX / b) {
++ fprintf(stderr, "gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n");
++ return 1;
++ }
++ return 0;
++}
+--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2010-12-06 11:47:17.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2010-12-06 11:48:36.000000000 +0000
+@@ -15,6 +15,8 @@
+ void *gdMalloc(size_t size);
+ void *gdRealloc(void *ptr, size_t size);
+
++int overflow2(int a, int b);
++
+ #pragma GCC visibility pop
+
+ #endif /* GDHELPERS_H */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch
new file mode 100644
index 00000000..59018996
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3473.patch
@@ -0,0 +1,13 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -2483,6 +2483,10 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromXbm (FILE * fd)
+ }
+ bytes = (w * h / 8) + 1;
+ im = gdImageCreate (w, h);
++ if (!im) {
++ return 0;
++ }
++
+ gdImageColorAllocate (im, 255, 255, 255);
+ gdImageColorAllocate (im, 0, 0, 0);
+ x = 0;
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch
new file mode 100644
index 00000000..81ac0385
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2007-3477.patch
@@ -0,0 +1,38 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -1335,10 +1335,31 @@
+ int w2, h2;
+ w2 = w / 2;
+ h2 = h / 2;
+- while (e < s)
+- {
+- e += 360;
+- }
++
++ if ((s % 360) == (e % 360)) {
++ s = 0; e = 360;
++ } else {
++ if (s > 360) {
++ s = s % 360;
++ }
++
++ if (e > 360) {
++ e = e % 360;
++ }
++
++ while (s < 0) {
++ s += 360;
++ }
++
++ while (e < s) {
++ e += 360;
++ }
++
++ if (s == e) {
++ s = 0; e = 360;
++ }
++ }
++
+ for (i = s; (i <= e); i++)
+ {
+ int x, y;
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch
new file mode 100644
index 00000000..d718976a
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2009-3546.patch
@@ -0,0 +1,13 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2010-12-06 14:56:06.000000000 +0000
++++ libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2010-12-06 14:57:04.000000000 +0000
+@@ -42,6 +42,10 @@
+ {
+ goto fail1;
+ }
++ if (&im->colorsTotal > gdMaxColors)
++ {
++ goto fail1;
++ }
+ }
+ /* Int to accommodate truecolor single-color transparency */
+ if (!gdGetInt (&im->transparent, in))
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch
new file mode 100644
index 00000000..e8ba8db1
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch
@@ -0,0 +1,118 @@
+--- libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:24.591876404 +0100
++++ libwmf-0.2.8.4/src/ipa/ipa/bmp.h 2015-06-08 14:46:35.345993247 +0100
+@@ -859,7 +859,7 @@
+ %
+ %
+ */
+-static void DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
++static int DecodeImage (wmfAPI* API,wmfBMP* bmp,BMPSource* src,unsigned int compression,unsigned char* pixels)
+ { int byte;
+ int count;
+ int i;
+@@ -870,12 +870,14 @@
+ U32 u;
+
+ unsigned char* q;
++ unsigned char* end;
+
+ for (u = 0; u < ((U32) bmp->width * (U32) bmp->height); u++) pixels[u] = 0;
+
+ byte = 0;
+ x = 0;
+ q = pixels;
++ end = pixels + bmp->width * bmp->height;
+
+ for (y = 0; y < bmp->height; )
+ { count = ReadBlobByte (src);
+@@ -884,7 +886,10 @@
+ { /* Encoded mode. */
+ byte = ReadBlobByte (src);
+ for (i = 0; i < count; i++)
+- { if (compression == 1)
++ {
++ if (q == end)
++ return 0;
++ if (compression == 1)
+ { (*(q++)) = (unsigned char) byte;
+ }
+ else
+@@ -896,13 +901,15 @@
+ else
+ { /* Escape mode. */
+ count = ReadBlobByte (src);
+- if (count == 0x01) return;
++ if (count == 0x01) return 1;
+ switch (count)
+ {
+ case 0x00:
+ { /* End of line. */
+ x = 0;
+ y++;
++ if (y >= bmp->height)
++ return 0;
+ q = pixels + y * bmp->width;
+ break;
+ }
+@@ -910,13 +917,20 @@
+ { /* Delta mode. */
+ x += ReadBlobByte (src);
+ y += ReadBlobByte (src);
++ if (y >= bmp->height)
++ return 0;
++ if (x >= bmp->width)
++ return 0;
+ q = pixels + y * bmp->width + x;
+ break;
+ }
+ default:
+ { /* Absolute mode. */
+ for (i = 0; i < count; i++)
+- { if (compression == 1)
++ {
++ if (q == end)
++ return 0;
++ if (compression == 1)
+ { (*(q++)) = ReadBlobByte (src);
+ }
+ else
+@@ -943,7 +957,7 @@
+ byte = ReadBlobByte (src); /* end of line */
+ byte = ReadBlobByte (src);
+
+- return;
++ return 1;
+ }
+
+ /*
+@@ -1143,8 +1157,18 @@
+ }
+ }
+ else
+- { /* Convert run-length encoded raster pixels. */
+- DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image);
++ {
++ if (bmp_info.bits_per_pixel == 8) /* Convert run-length encoded raster pixels. */
++ {
++ if (!DecodeImage (API,bmp,src,(unsigned int) bmp_info.compression,data->image))
++ { WMF_ERROR (API,"corrupt bmp");
++ API->err = wmf_E_BadFormat;
++ }
++ }
++ else
++ { WMF_ERROR (API,"Unexpected pixel depth");
++ API->err = wmf_E_BadFormat;
++ }
+ }
+
+ if (ERR (API))
+--- libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:24.590876393 +0100
++++ libwmf-0.2.8.4/src/ipa/ipa.h 2015-06-08 14:46:35.345993247 +0100
+@@ -48,7 +48,7 @@
+ static unsigned short ReadBlobLSBShort (BMPSource*);
+ static unsigned long ReadBlobLSBLong (BMPSource*);
+ static long TellBlob (BMPSource*);
+-static void DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
++static int DecodeImage (wmfAPI*,wmfBMP*,BMPSource*,unsigned int,unsigned char*);
+ static void ReadBMPImage (wmfAPI*,wmfBMP*,BMPSource*);
+ static int ExtractColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned int,unsigned int);
+ static void SetColor (wmfAPI*,wmfBMP*,wmfRGB*,unsigned char,unsigned int,unsigned int);
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch
new file mode 100644
index 00000000..b6d499da
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4695.patch
@@ -0,0 +1,56 @@
+--- libwmf-0.2.8.4/src/player/meta.h
++++ libwmf-0.2.8.4/src/player/meta.h
+@@ -1565,7 +1565,7 @@ static int meta_rgn_create (wmfAPI* API,
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -2142,7 +2142,7 @@ static int meta_dib_brush (wmfAPI* API,w
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3067,7 +3067,7 @@ static int meta_pen_create (wmfAPI* API,
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3181,7 +3181,7 @@ static int meta_brush_create (wmfAPI* AP
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3288,7 +3288,7 @@ static int meta_font_create (wmfAPI* API
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
+@@ -3396,7 +3396,7 @@ static int meta_palette_create (wmfAPI*
+ objects = P->objects;
+
+ i = 0;
+- while (objects[i].type && (i < NUM_OBJECTS (API))) i++;
++ while ((i < NUM_OBJECTS (API)) && objects[i].type) i++;
+
+ if (i == NUM_OBJECTS (API))
+ { WMF_ERROR (API,"Object out of range!");
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch
new file mode 100644
index 00000000..33128412
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2015-4696.patch
@@ -0,0 +1,23 @@
+--- libwmf-0.2.8.4/src/player/meta.h
++++ libwmf-0.2.8.4/src/player/meta.h
+@@ -2585,6 +2585,8 @@
+ polyrect.BR[i] = clip->rects[i].BR;
+ }
+
++ if (FR->region_clip) FR->region_clip (API,&polyrect);
++
+ wmf_free (API,polyrect.TL);
+ wmf_free (API,polyrect.BR);
+ }
+@@ -2593,9 +2595,10 @@
+ polyrect.BR = 0;
+
+ polyrect.count = 0;
++
++ if (FR->region_clip) FR->region_clip (API,&polyrect);
+ }
+
+- if (FR->region_clip) FR->region_clip (API,&polyrect);
+
+ return (changed);
+ }
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch
new file mode 100644
index 00000000..5e281974
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10167.patch
@@ -0,0 +1,30 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
++++ libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
+@@ -362,10 +362,9 @@
+ {
+ if (!gdGetInt (&im->tpixels[y][x], in))
+ {
+- /*printf("EOF while reading\n"); */
+- /*gdImageDestroy(im); */
+- /*return 0; */
+- im->tpixels[y][x] = 0;
++ fprintf(stderr, "gd2: EOF while reading\n");
++ gdImageDestroy(im);
++ return NULL;
+ }
+ }
+ else
+@@ -373,10 +372,9 @@
+ int ch;
+ if (!gdGetByte (&ch, in))
+ {
+- /*printf("EOF while reading\n"); */
+- /*gdImageDestroy(im); */
+- /*return 0; */
+- ch = 0;
++ fprintf(stderr, "gd2: EOF while reading\n");
++ gdImageDestroy(im);
++ return NULL;
+ }
+ im->pixels[y][x] = ch;
+ }
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch
new file mode 100644
index 00000000..f08b1f1e
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-10168.patch
@@ -0,0 +1,14 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
++++ libwmf-0.2.8.4/src/extra/gd/gd_gd2.c
+@@ -145,6 +145,11 @@
+
+ if ((*fmt) == GD2_FMT_COMPRESSED)
+ {
++ if (*ncx <= 0 || *ncy <= 0 || *ncx > INT_MAX / *ncy) {
++ GD2_DBG(printf ("Illegal chunk counts: %d * %d\n", *ncx, *ncy));
++ goto fail1;
++ }
++
+ nc = (*ncx) * (*ncy);
+ GD2_DBG (printf ("Reading %d chunk index entries\n", nc));
+ sidx = sizeof (t_chunk_info) * nc;
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch
new file mode 100644
index 00000000..c6bd017c
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9011.patch
@@ -0,0 +1,36 @@
+--- libwmf-0.2.8.4/src/player.c
++++ libwmf-0.2.8.4/src/player.c
+@@ -139,8 +139,31 @@
+ WMF_DEBUG (API,"bailing...");
+ return (API->err);
+ }
+-
+- P->Parameters = (unsigned char*) wmf_malloc (API,(MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char));
++
++ U32 nMaxRecordSize = (MAX_REC_SIZE(API) ) * 2 * sizeof (unsigned char);
++ if (nMaxRecordSize)
++ {
++ //before allocating memory do a sanity check on size by seeking
++ //to claimed end to see if its possible. We're constrained here
++ //by the api and existing implementations to not simply seeking
++ //to SEEK_END. So use what we have to skip to the last byte and
++ //try and read it.
++ const long nPos = WMF_TELL (API);
++ WMF_SEEK (API, nPos + nMaxRecordSize - 1);
++ if (ERR (API))
++ { WMF_DEBUG (API,"bailing...");
++ return (API->err);
++ }
++ int byte = WMF_READ (API);
++ if (byte == (-1))
++ { WMF_ERROR (API,"Unexpected EOF!");
++ API->err = wmf_E_EOF;
++ return (API->err);
++ }
++ WMF_SEEK (API, nPos);
++ }
++
++ P->Parameters = (unsigned char*) wmf_malloc (API, nMaxRecordSize);
+
+ if (ERR (API))
+ { WMF_DEBUG (API,"bailing...");
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch
new file mode 100644
index 00000000..cf57734e
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2016-9317.patch
@@ -0,0 +1,21 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd.c
++++ libwmf-0.2.8.4/src/extra/gd/gd.c
+@@ -65,6 +65,18 @@
+ {
+ int i;
+ gdImagePtr im;
++
++ if (overflow2(sx, sy)) {
++ return NULL;
++ }
++
++ if (overflow2(sizeof (unsigned char *), sy)) {
++ return NULL;
++ }
++ if (overflow2(sizeof (unsigned char), sx)) {
++ return NULL;
++ }
++
+ im = (gdImage *) gdMalloc (sizeof (gdImage));
+ memset (im, 0, sizeof (gdImage));
+ /* Row-major ever since gd 1.3 */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch
new file mode 100644
index 00000000..2ad180d9
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-CVE-2017-6362.patch
@@ -0,0 +1,32 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_png.c
++++ libwmf-0.2.8.4/src/extra/gd/gd_png.c
+@@ -435,17 +435,6 @@
+ out->free (out);
+ }
+
+-void *
+-gdImagePngPtr (gdImagePtr im, int *size)
+-{
+- void *rv;
+- gdIOCtx *out = gdNewDynamicCtx (2048, NULL);
+- gdImagePngCtx (im, out);
+- rv = gdDPExtractData (out, size);
+- out->free (out);
+- return rv;
+-}
+-
+ /* This routine is based in part on code from Dale Lutz (Safe Software Inc.)
+ * and in part on demo code from Chapter 15 of "PNG: The Definitive Guide"
+ * (http://www.cdrom.com/pub/png/pngbook.html).
+--- libwmf-0.2.8.4/src/extra/gd/gd.h
++++ libwmf-0.2.8.4/src/extra/gd/gd.h
+@@ -373,9 +373,6 @@
+ void gdImageGd2(gdImagePtr im, FILE *out, int cs, int fmt);
+
+ /* Best to free this memory with gdFree(), not free() */
+-void* gdImagePngPtr(gdImagePtr im, int *size);
+-
+-/* Best to free this memory with gdFree(), not free() */
+ void* gdImageGdPtr(gdImagePtr im, int *size);
+
+ /* Best to free this memory with gdFree(), not free() */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch b/patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch
new file mode 100644
index 00000000..83383138
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-fallbackfont.patch
@@ -0,0 +1,18 @@
+diff -ru libwmf-0.2.8.4.orig/src/font.c libwmf-0.2.8.4/src/font.c
+--- libwmf-0.2.8.4.orig/src/font.c 2005-07-27 21:35:06.000000000 +0100
++++ libwmf-0.2.8.4/src/font.c 2006-01-03 12:53:38.000000000 +0000
+@@ -1429,11 +1429,9 @@
+ if (GS->len == 0) return (0);
+
+ name = font->lfFaceName;
+- if (name == 0)
+- { WMF_DEBUG (API,"No font name?");
+- API->err = wmf_E_Glitch;
+- return (0);
+- }
++
++ if (name == 0 || name[0] == 0)
++ name = "Times";
+
+ /* Find first white-space character or eol
+ */
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch b/patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch
new file mode 100644
index 00000000..a0357858
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-pixbufloaderdir.patch
@@ -0,0 +1,14 @@
+diff -up libwmf-0.2.8.4/configure.in.pixbufloaderdir libwmf-0.2.8.4/configure.in
+--- libwmf-0.2.8.4/configure.in.pixbufloaderdir 2010-06-28 23:35:06.227167269 -0400
++++ libwmf-0.2.8.4/configure.in 2010-06-28 23:36:00.948420306 -0400
+@@ -741,8 +741,8 @@
+
+ if test $LIBWMF_BUILDSTYLE != lite; then
+ PKG_CHECK_MODULES(GDK_PIXBUF,gdk-pixbuf-2.0 >= 2.1.2,[
+- GTK_VERSION=`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`
+- GDK_PIXBUF_DIR="gtk-2.0/$GTK_VERSION/loaders"
++ GDK_PIXBUF_VERSION=`$PKG_CONFIG --variable=gdk_pixbuf_binary_version gdk-pixbuf-2.0`
++ GDK_PIXBUF_DIR="gdk-pixbuf-2.0/$GDK_PIXBUF_VERSION/loaders"
+ wmf_gdk_pixbuf=yes
+ ],[ wmf_gdk_pixbuf=no
+ ])
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch b/patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch
new file mode 100644
index 00000000..45d82b32
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch
@@ -0,0 +1,520 @@
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd.c
+--- libwmf-0.2.8.4/src/extra/gd/gd.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.c 2006-11-16 12:27:05.000000000 +0000
+@@ -249,6 +249,7 @@
+ }
+ HWBType;
+
++#if 0
+ static HWBType *
+ RGB_to_HWB (RGBType RGB, HWBType * HWB)
+ {
+@@ -308,7 +309,6 @@
+ return diff;
+ }
+
+-#if 0
+ /*
+ * This is not actually used, but is here for completeness, in case someone wants to
+ * use the HWB stuff for anything else...
+@@ -355,6 +355,7 @@
+ }
+ #endif
+
++#if 0
+ int
+ gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
+ {
+@@ -384,6 +385,7 @@
+ }
+ return ct;
+ }
++#endif
+
+ int
+ gdImageColorExact (gdImagePtr im, int r, int g, int b)
+@@ -677,7 +679,7 @@
+ }
+ }
+
+-int
++static int
+ gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
+ {
+ int p = gdImageGetPixel (im, x, y);
+@@ -1286,11 +1288,11 @@
+ return len;
+ }
+
+-#ifndef HAVE_LSQRT
++#if 0
+ /* If you don't have a nice square root function for longs, you can use
+ ** this hack
+ */
+-long
++static long
+ lsqrt (long n)
+ {
+ long result = (long) sqrt ((double) n);
+@@ -2250,7 +2252,7 @@
+ }
+ }
+
+-int gdCompareInt (const void *a, const void *b);
++static int gdCompareInt (const void *a, const void *b);
+
+ /* THANKS to Kirsten Schulz for the polygon fixes! */
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdcache.h libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h
+--- libwmf-0.2.8.4/src/extra/gd/gdcache.h 2001-08-21 15:40:33.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h 2006-11-16 12:13:40.000000000 +0000
+@@ -41,6 +41,9 @@
+ /*********************************************************/
+
+ /* #include <malloc.h> */
++
++#pragma GCC visibility push(hidden)
++
+ #ifndef NULL
+ #define NULL (void *)0
+ #endif
+@@ -81,3 +84,5 @@
+
+ void *
+ gdCacheGet( gdCache_head_t *head, void *keydata );
++
++#pragma GCC visibility pop
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_clip.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h
+--- libwmf-0.2.8.4/src/extra/gd/gd_clip.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h 2006-11-16 12:11:49.000000000 +0000
+@@ -1,6 +1,8 @@
+ #ifndef GD_CLIP_H
+ #define GD_CLIP_H 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -23,4 +25,6 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif /* GD_CLIP_H */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontg.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontg.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h 2006-11-16 12:12:03.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTG_H_
+ #define _GDFONTG_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -25,5 +27,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontl.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontl.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h 2006-11-16 12:12:11.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTL_H_
+ #define _GDFONTL_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -26,5 +28,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontmb.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontmb.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h 2006-11-16 12:12:19.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTMB_H_
+ #define _GDFONTMB_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -24,5 +26,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfonts.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfonts.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h 2006-11-16 12:12:28.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTS_H_
+ #define _GDFONTS_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -24,5 +26,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontt.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h
+--- libwmf-0.2.8.4/src/extra/gd/gdfontt.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h 2006-11-16 12:12:36.000000000 +0000
+@@ -2,6 +2,8 @@
+ #ifndef _GDFONTT_H_
+ #define _GDFONTT_H_ 1
+
++#pragma GCC visibility push(hidden)
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -25,5 +27,7 @@
+ }
+ #endif
+
++#pragma GCC visibility pop
++
+ #endif
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdft.c libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c
+--- libwmf-0.2.8.4/src/extra/gd/gdft.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c 2006-11-16 12:24:50.000000000 +0000
+@@ -533,7 +533,7 @@
+ }
+
+ /* draw_bitmap - transfers glyph bitmap to GD image */
+-/* static */ char *
++static char *
+ gdft_draw_bitmap (gdImage * im, int fg, FT_Bitmap bitmap, int pen_x, int pen_y)
+ {
+ unsigned char *pixel = 0;
+@@ -643,7 +643,7 @@
+ return (char *) NULL;
+ }
+
+-int
++static int
+ gdroundupdown (FT_F26Dot6 v1, int updown)
+ {
+ return (!updown)
+@@ -651,7 +651,9 @@
+ : (v1 > 0 ? ((v1 + 63) >> 6) : v1 >> 6);
+ }
+
++#pragma GCC visibility push(hidden)
+ extern int any2eucjp (char *, char *, unsigned int);
++#pragma GCC visibility pop
+
+ /********************************************************************/
+ /* gdImageStringFT - render a utf8 string onto a gd image */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd2.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c 2006-11-16 12:21:28.000000000 +0000
+@@ -34,8 +34,10 @@
+ }
+ t_chunk_info;
+
++#pragma GCC visibility push(hidden)
+ extern int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
+ extern void _gdPutColors (gdImagePtr im, gdIOCtx * out);
++#pragma GCC visibility pop
+
+ /* */
+ /* Read the extra info in the gd2 header. */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_gd.c 2005-07-27 21:35:05.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c 2006-11-16 12:21:43.000000000 +0000
+@@ -11,6 +11,11 @@
+ /* Exported functions: */
+ extern void gdImageGd (gdImagePtr im, FILE * out);
+
++#pragma GCC visibility push(hidden)
++int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
++void _gdPutColors (gdImagePtr im, gdIOCtx * out);
++#pragma GCC visibility pop
++
+
+ /* Use this for commenting out debug-print statements. */
+ /* Just use the first '#define' to allow all the prints... */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd.h libwmf-0.2.8.4.symbols/src/extra/gd/gd.h
+--- libwmf-0.2.8.4/src/extra/gd/gd.h 2002-12-05 20:09:11.000000000 +0000
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.h 2006-11-16 12:14:11.000000000 +0000
+@@ -25,6 +25,8 @@
+ #include <gd_io.h>
+ #include <gd_clip.h>
+
++#pragma GCC visibility push(hidden)
++
+ /* The maximum number of palette entries in palette-based images.
+ In the wonderful new world of gd 2.0, you can of course have
+ many more colors when using truecolor mode. */
+@@ -497,6 +499,8 @@
+ /* resolution affects ttf font rendering, particularly hinting */
+ #define GD_RESOLUTION 96 /* pixels per inch */
+
++#pragma GCC visibility pop
++
+ #ifdef __cplusplus
+ }
+ #endif
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdhelpers.h libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h
+--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h 2001-03-28 10:37:31.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h 2006-11-16 12:12:55.000000000 +0000
+@@ -1,6 +1,8 @@
+ #ifndef GDHELPERS_H
+ #define GDHELPERS_H 1
+
++#pragma GCC visibility push(hidden)
++
+ /* TBB: strtok_r is not universal; provide an implementation of it. */
+
+ extern char *gd_strtok_r(char *s, char *sep, char **state);
+@@ -13,5 +15,7 @@
+ void *gdMalloc(size_t size);
+ void *gdRealloc(void *ptr, size_t size);
+
++#pragma GCC visibility pop
++
+ #endif /* GDHELPERS_H */
+
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_io.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h
+--- libwmf-0.2.8.4/src/extra/gd/gd_io.h 2001-03-28 10:37:30.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h 2006-11-16 12:13:08.000000000 +0000
+@@ -2,6 +2,8 @@
+ #define GD_IO_H 1
+
+ #include <stdio.h>
++
++#pragma GCC visibility push(hidden)
+
+ typedef struct gdIOCtx {
+ int (*getC)(struct gdIOCtx*);
+@@ -36,4 +38,6 @@
+ int gdSeek(gdIOCtx *ctx, const int);
+ long gdTell(gdIOCtx *ctx);
+
++#pragma GCC visibility pop
++
+ #endif
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c 2005-07-27 21:35:06.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c 2006-11-16 12:28:13.000000000 +0000
+@@ -99,7 +99,7 @@
+ return rv;
+ }
+
+-void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
++static void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
+
+ void
+ gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
+@@ -266,7 +266,7 @@
+ return im;
+ }
+
+-void
++static void
+ jpeg_gdIOCtx_src (j_decompress_ptr cinfo,
+ gdIOCtx * infile);
+
+@@ -511,7 +511,7 @@
+ * before any data is actually read.
+ */
+
+-void
++static void
+ init_source (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -559,7 +559,7 @@
+
+ #define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
+
+-safeboolean
++static safeboolean
+ fill_input_buffer (j_decompress_ptr cinfo)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -627,7 +627,7 @@
+ * buffer is the application writer's problem.
+ */
+
+-void
++static void
+ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+ {
+ my_src_ptr src = (my_src_ptr) cinfo->src;
+@@ -669,7 +669,7 @@
+ * for error exit.
+ */
+
+-void
++static void
+ term_source (j_decompress_ptr cinfo)
+ {
+
+@@ -742,7 +742,7 @@
+ * before any data is actually written.
+ */
+
+-void
++static void
+ init_destination (j_compress_ptr cinfo)
+ {
+ my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+@@ -780,7 +780,7 @@
+ * write it out when emptying the buffer externally.
+ */
+
+-safeboolean
++static safeboolean
+ empty_output_buffer (j_compress_ptr cinfo)
+ {
+ my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+@@ -805,7 +805,7 @@
+ * for error exit.
+ */
+
+-void
++static void
+ term_destination (j_compress_ptr cinfo)
+ {
+ my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdkanji.c libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c
+--- libwmf-0.2.8.4/src/extra/gd/gdkanji.c 2001-05-19 14:09:34.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c 2006-11-16 12:29:42.000000000 +0000
+@@ -555,6 +555,11 @@
+ return kanji;
+ }
+
++#pragma GCC visibility push(hidden)
++int
++any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max);
++#pragma GCC visibility pop
++
+ int
+ any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max)
+ {
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_topal.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_topal.c 2005-07-27 21:35:06.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c 2006-11-16 12:25:45.000000000 +0000
+@@ -1129,7 +1129,7 @@
+ * Map some rows of pixels to the output colormapped representation.
+ */
+
+-void
++static void
+ pass2_no_dither (gdImagePtr im, my_cquantize_ptr cquantize)
+ /* This version performs no dithering */
+ {
+@@ -1217,7 +1217,7 @@
+ #endif
+
+
+-void
++static void
+ pass2_fs_dither (gdImagePtr im, my_cquantize_ptr cquantize)
+
+ /* This version performs Floyd-Steinberg dithering */
+diff -ru libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c
+--- libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c 2001-05-19 14:09:34.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c 2006-11-16 12:28:33.000000000 +0000
+@@ -67,7 +67,7 @@
+ ** Wrapper around gdPutC for use with writewbmp
+ **
+ */
+-void
++static void
+ gd_putout (int i, void *out)
+ {
+ gdPutC (i, (gdIOCtx *) out);
+@@ -79,7 +79,7 @@
+ ** Wrapper around gdGetC for use with readwbmp
+ **
+ */
+-int
++static int
+ gd_getin (void *in)
+ {
+ return (gdGetC ((gdIOCtx *) in));
+diff -ru libwmf-0.2.8.4/src/extra/gd/gdxpm.c libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c
+--- libwmf-0.2.8.4/src/extra/gd/gdxpm.c 2001-05-19 14:09:34.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c 2006-11-16 12:18:29.000000000 +0000
+@@ -10,6 +10,7 @@
+ #include "gd.h"
+ #include "gdhelpers.h"
+
++#if 0
+ #ifndef HAVE_XPM
+ gdImagePtr
+ gdImageCreateFromXpm (char *filename)
+@@ -146,3 +147,4 @@
+ return (im);
+ }
+ #endif
++#endif
+diff -ru libwmf-0.2.8.4/src/extra/gd/jisx0208.h libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h
+--- libwmf-0.2.8.4/src/extra/gd/jisx0208.h 2001-03-28 10:37:35.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h 2006-11-16 12:13:19.000000000 +0000
+@@ -1,5 +1,8 @@
+ #ifndef JISX0208_H
+ #define JISX0208_H
++
++#pragma GCC visibility push(hidden)
++
+ /* This file was derived from "src/VF_Ftype.c" in VFlib2-2.24.2
+ by Dr. Kakugawa */
+
+@@ -1202,4 +1205,6 @@
+ 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
+ 0x2178, 0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02}};
+
++#pragma GCC visibility pop
++
+ #endif /* JISX0208_H */
+diff -ru libwmf-0.2.8.4/src/extra/gd/wbmp.h libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h
+--- libwmf-0.2.8.4/src/extra/gd/wbmp.h 2001-03-28 10:37:37.000000000 +0100
++++ libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h 2006-11-16 12:14:19.000000000 +0000
+@@ -12,6 +12,8 @@
+ #ifndef __WBMP_H
+ #define __WBMP_H 1
+
++#pragma GCC visibility push(hidden)
++
+
+ /* WBMP struct
+ ** -----------
+@@ -44,4 +46,6 @@
+ void freewbmp( Wbmp *wbmp );
+ void printwbmp( Wbmp *wbmp );
+
++#pragma GCC visibility pop
++
+ #endif
diff --git a/patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch b/patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch
new file mode 100644
index 00000000..328c5411
--- /dev/null
+++ b/patches/source/libwmf/libwmf-0.2.8.4-useafterfree.patch
@@ -0,0 +1,10 @@
+--- libwmf-0.2.8.4/src/extra/gd/gd_clip.c.CVE-2009-1364-im-clip-list 2009-04-24 04:06:44.000000000 -0400
++++ libwmf-0.2.8.4/src/extra/gd/gd_clip.c 2009-04-24 04:08:30.000000000 -0400
+@@ -70,6 +70,7 @@ void gdClipSetAdd(gdImagePtr im,gdClipRe
+ { more = gdRealloc (im->clip->list,(im->clip->max + 8) * sizeof (gdClipRectangle));
+ if (more == 0) return;
+ im->clip->max += 8;
++ im->clip->list = more;
+ }
+ im->clip->list[im->clip->count] = (*rect);
+ im->clip->count++;
diff --git a/patches/source/libwmf/libwmf.SlackBuild b/patches/source/libwmf/libwmf.SlackBuild
new file mode 100755
index 00000000..4fd24029
--- /dev/null
+++ b/patches/source/libwmf/libwmf.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+# Copyright 2008, 2009, 2010, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=libwmf
+VERSION=0.2.8.4
+BUILD=${BUILD:-7_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+TMP=${TMP:-/tmp}
+
+PKG=$TMP/package-libwmf
+
+rm -rf $PKG
+mkdir -p $PKG
+
+cd $TMP
+rm -rf libwmf-$VERSION
+tar xvf $CWD/libwmf-$VERSION.tar.?z* || exit 1
+cd libwmf-$VERSION || exit 1
+
+zcat $CWD/libwmf.png14.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Miscellaneous patches from Fedora:
+zcat $CWD/libwmf-0.2.8.4-fallbackfont.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-pixbufloaderdir.patch.gz | patch -p1 --verbose || exit 1
+
+# Don't export the modified embedded GD library symbols, to avoid conflicts with
+# the system libgd:
+zcat $CWD/libwmf-0.2.8.4-reducesymbols.patch.gz | patch -p1 --verbose || exit 1
+
+# Patch security issues:
+zcat $CWD/libwmf-0.2.8.4-useafterfree.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2006-3376.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2004-0941.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-0455.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-2756.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-3472.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-3473.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2007-3477.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2009-3546.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2015-0848+CVE-2015-4588.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2015-4695.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2015-4696.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-10167.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-10168.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-9011.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2016-9317.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/libwmf-0.2.8.4-CVE-2017-6362.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-static=no \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc
+mv $PKG/usr/share/doc/libwmf $PKG/usr/doc/libwmf-$VERSION
+rmdir $PKG/usr/share/doc
+cp -a \
+ AUTHORS BUILDING COPYING CREDITS NEWS README TODO \
+ $PKG/usr/doc/libwmf-$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/*-$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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libwmf-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/libwmf/libwmf.png14.diff b/patches/source/libwmf/libwmf.png14.diff
new file mode 100644
index 00000000..c55b143c
--- /dev/null
+++ b/patches/source/libwmf/libwmf.png14.diff
@@ -0,0 +1,11 @@
+--- ./src/extra/gd/gd_png.c.orig 2005-07-27 15:35:06.000000000 -0500
++++ ./src/extra/gd/gd_png.c 2010-02-14 18:24:19.000000000 -0600
+@@ -136,7 +136,7 @@
+ /* first do a quick check that the file really is a PNG image; could
+ * have used slightly more general png_sig_cmp() function instead */
+ gdGetBuf (sig, 8, infile);
+- if (!png_check_sig (sig, 8))
++ if (!(png_sig_cmp(sig, 0, 8) == 0))
+ return NULL; /* bad signature */
+
+ #ifndef PNG_SETJMP_NOT_SUPPORTED
diff --git a/patches/source/libwmf/slack-desc b/patches/source/libwmf/slack-desc
new file mode 100644
index 00000000..19f99a7d
--- /dev/null
+++ b/patches/source/libwmf/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------------------------------------------------------|
+libwmf: libwmf (WMF graphics format library)
+libwmf:
+libwmf: libwmf is a library for interpreting metafile images and either
+libwmf: displaying them using X or converting them to standard formats such
+libwmf: as PNG, JPEG, PS, EPS and SVG.
+libwmf:
+libwmf:
+libwmf:
+libwmf:
+libwmf:
+libwmf:
diff --git a/patches/source/libxml2/libxml2.SlackBuild b/patches/source/libxml2/libxml2.SlackBuild
new file mode 100755
index 00000000..5a4c810d
--- /dev/null
+++ b/patches/source/libxml2/libxml2.SlackBuild
@@ -0,0 +1,112 @@
+#!/bin/sh
+
+# Copyright 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=libxml2
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libxml2
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf libxml2-$VERSION
+tar xvf $CWD/libxml2-$VERSION.tar.?z* || exit 1
+cd libxml2-$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 {} \;
+
+zcat $CWD/libxml2.do-not-check-crc.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+#echo
+#echo "Only the python bindings in /usr/lib/python__/site-packages/ should"
+#echo "be kept... toss the other stuff"
+#echo
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/usr/doc/libxml2-python-$VERSION $PKG/usr/doc/libxml2-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README \
+ $PKG/usr/doc/libxml2-$VERSION
+find $PKG/usr/doc/libxml2-$VERSION -type f | xargs chmod 644
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+# Be sure to clobber any .pyc files that might have been generated so that
+# the new .py files will be used instead of the already compiled copies
+cat << EOF > $PKG/install/doinst.sh
+rm -f /usr/lib${LIBDIRSUFFIX}/python2.7/site-packages/libxml2.pyc
+rm -f /usr/lib${LIBDIRSUFFIX}/python2.7/site-packages/drv_libxml2.pyc
+EOF
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libxml2-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libxml2/libxml2.do-not-check-crc.diff b/patches/source/libxml2/libxml2.do-not-check-crc.diff
new file mode 100644
index 00000000..3e650776
--- /dev/null
+++ b/patches/source/libxml2/libxml2.do-not-check-crc.diff
@@ -0,0 +1,35 @@
+diff -up libxml2-2.9.0/xzlib.c.do-not-check-crc libxml2-2.9.0/xzlib.c
+--- libxml2-2.9.0/xzlib.c.do-not-check-crc 2012-09-11 05:52:46.000000000 +0200
++++ libxml2-2.9.0/xzlib.c 2012-11-19 19:28:42.431700534 +0100
+@@ -552,17 +552,20 @@ xz_decomp(xz_statep state)
+ #ifdef HAVE_ZLIB_H
+ if (state->how == GZIP) {
+ if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
+- xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
+- return -1;
+- }
+- if (crc != state->zstrm.adler) {
+- xz_error(state, LZMA_DATA_ERROR, "incorrect data check");
+- return -1;
+- }
+- if (len != (state->zstrm.total_out & 0xffffffffL)) {
+- xz_error(state, LZMA_DATA_ERROR, "incorrect length check");
+- return -1;
+- }
++ /*
++ xz_error(state, LZMA_DATA_ERROR, "unexpected end of file");
++ return -1;
++ */
++ } else {
++ if (crc != state->zstrm.adler) {
++ xz_error(state, LZMA_DATA_ERROR, "incorrect data check");
++ return -1;
++ }
++ if (len != (state->zstrm.total_out & 0xffffffffL)) {
++ xz_error(state, LZMA_DATA_ERROR, "incorrect length check");
++ return -1;
++ }
++ }
+ state->strm.avail_in = 0;
+ state->strm.next_in = NULL;
+ state->strm.avail_out = 0;
diff --git a/patches/source/libxml2/slack-desc b/patches/source/libxml2/slack-desc
new file mode 100644
index 00000000..dfbc38dc
--- /dev/null
+++ b/patches/source/libxml2/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------------------------------------------------------|
+libxml2: libxml2 (XML parser library)
+libxml2:
+libxml2: Libxml2 is the XML C parser library and toolkit. XML itself is a
+libxml2: metalanguage to design markup languages -- i.e. a text language where
+libxml2: structures are added to the content using extra "markup" information
+libxml2: enclosed between angle brackets. HTML is the most well-known markup
+libxml2: language. Though the library is written in C, a variety of language
+libxml2: bindings make it available in other environments.
+libxml2:
+libxml2:
+libxml2:
diff --git a/patches/source/libzip/libzip.CVE-2017-14107.diff b/patches/source/libzip/libzip.CVE-2017-14107.diff
new file mode 100644
index 00000000..b9999f31
--- /dev/null
+++ b/patches/source/libzip/libzip.CVE-2017-14107.diff
@@ -0,0 +1,14 @@
+--- ./lib/zip_open.c.orig 2017-09-12 15:55:04.378188022 -0500
++++ ./lib/zip_open.c 2017-09-12 15:57:11.813198577 -0500
+@@ -687,6 +687,11 @@
+ return NULL;
+ }
+
++ if (offset+size > buf_offset + eocd_offset) {
++ /* cdir spans past EOCD record */
++ zip_error_set(error, ZIP_ER_INCONS, 0);
++ return NULL;
++ }
+ if ((flags & ZIP_CHECKCONS) && offset+size != buf_offset + eocd_offset) {
+ zip_error_set(error, ZIP_ER_INCONS, 0);
+ return NULL;
diff --git a/patches/source/libzip/libzip.SlackBuild b/patches/source/libzip/libzip.SlackBuild
new file mode 100755
index 00000000..6a67648c
--- /dev/null
+++ b/patches/source/libzip/libzip.SlackBuild
@@ -0,0 +1,140 @@
+#!/bin/sh
+
+# Copyright 2007, 2013, 2015 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008, 2009, 2010 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.
+
+# Modified by Robby Workman <rworkman at slackware.com>
+
+
+PKGNAM=libzip
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j6}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-libzip
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf libzip-$VERSION
+tar xvf $CWD/libzip-$VERSION.tar.?z* || exit 1
+cd libzip-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/libzip.CVE-2017-14107.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Fix symbolic linking for manpages
+sed -i "s|\${LN}|\${LN_S}|g" man/Makefile
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# While I perhaps see the motive for putting platform-specific include files
+# in a place where they won't collide, the fact is that this breaks anything
+# currently using libzip. Adding a link to the standard include directory
+# mostly fixes this, but it is still not optimal. It's likely to cause
+# problems on multilib systems, for example (but like that whole thing isn't
+# an even uglier hack).
+( cd $PKG/usr/include ; ln -sf ../lib${LIBDIRSUFFIX}/libzip/include/zipconf.h . )
+
+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 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Now, fix the stupid symbolic manpage links again:
+( cd $PKG/usr/man/man3
+ find . -type l | while read link ; do
+ LINKFILE=$(basename $link)
+ LINKTARGET=$(basename $(readlink $LINKFILE))
+ rm $LINKFILE
+ ln -sf $LINKTARGET $LINKFILE
+ done
+)
+
+mkdir -p $PKG/usr/doc/libzip-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* THANKS TODO \
+ $PKG/usr/doc/libzip-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/libzip-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/libzip/slack-desc b/patches/source/libzip/slack-desc
new file mode 100644
index 00000000..b8b4aaab
--- /dev/null
+++ b/patches/source/libzip/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------------------------------------------------------|
+libzip: libzip (A library to read, create, and modify Zip archives)
+libzip:
+libzip: This is libzip, a C library for reading, creating, and modifying
+libzip: zip archives. Files can be added from data buffers, files, or
+libzip: compressed data copied directly from other zip archives. Changes
+libzip: made without closing the archive can be reverted.
+libzip:
+libzip: Homepage: http://www.nih.at/libzip/
+libzip:
+libzip:
+libzip:
diff --git a/patches/source/loudmouth/loudmouth.SlackBuild b/patches/source/loudmouth/loudmouth.SlackBuild
new file mode 100755
index 00000000..557a2c22
--- /dev/null
+++ b/patches/source/loudmouth/loudmouth.SlackBuild
@@ -0,0 +1,133 @@
+#!/bin/sh
+# Copyright 2009 Eric Hameleers, Eindhoven, NL
+# Copyright 2012, 2016 Patrick J. Volkerding, Sebeka, Minnesota, 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.
+# -----------------------------------------------------------------------------
+
+PKGNAM=loudmouth
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ 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 || exit 1
+
+# 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" \
+CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --with-ssl=gnutls \
+ --enable-debug=yes \
+ --enable-static=no \
+ --disable-gtk-doc \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux \
+ --host=$ARCH-slackware-linux || exit 1
+
+##
+## NOTE: For some reason --enable-debug=yes actually _disables_ verbose debug
+## messages to the console. Don't mess with it!
+##
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# --enable-static is often ignored
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/lib*.a
+
+# 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 documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTORS COPYING* 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
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
diff --git a/patches/source/loudmouth/slack-desc b/patches/source/loudmouth/slack-desc
new file mode 100644
index 00000000..ca3c4b70
--- /dev/null
+++ b/patches/source/loudmouth/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------------------------------------------------------|
+loudmouth: loudmouth (XMPP C programming library)
+loudmouth:
+loudmouth: Loudmouth is a lightweight and easy-to-use C library for programming
+loudmouth: with the Jabber protocol. It is designed to be easy to get started
+loudmouth: with, and yet extensible enough to allow you to do anything that the
+loudmouth: Jabber protocol allows.
+loudmouth:
+loudmouth: loudmouth home: https://github.com/mcabber/loudmouth
+loudmouth:
+loudmouth:
+loudmouth:
diff --git a/patches/source/lynx/doinst.sh b/patches/source/lynx/doinst.sh
new file mode 100644
index 00000000..79c36713
--- /dev/null
+++ b/patches/source/lynx/doinst.sh
@@ -0,0 +1,13 @@
+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/lynx.cfg.new
diff --git a/patches/source/lynx/lynx.SlackBuild b/patches/source/lynx/lynx.SlackBuild
new file mode 100755
index 00000000..2be59ddf
--- /dev/null
+++ b/patches/source/lynx/lynx.SlackBuild
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2016, 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.
+
+
+PKGVER=2.8.8rel.2
+DIRVER=2-8-8
+BUILD=${BUILD:-3_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-lynx
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}/lynx
+cd $TMP
+rm -rf lynx$DIRVER
+tar xvf $CWD/lynx${PKGVER}.tar.?z* || exit 1
+cd lynx$DIRVER || exit 1
+
+find . -name "*~" -exec rm -f {} \;
+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 {} \;
+
+# Change default colors and STARTFILE setting since the old site is gone:
+zcat $CWD/lynx.cfg.diff.gz | patch -p1 --verbose --backup || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX}/lynx \
+ --datadir=/usr/share/lynx \
+ --mandir=/usr/man \
+ --enable-default-colors \
+ --with-screen=ncursesw \
+ --enable-widec \
+ --enable-gzip-help \
+ --with-zlib \
+ --enable-read-eta \
+ --enable-scrollbar \
+ --with-ssl \
+ --enable-ipv6 \
+ --enable-color-style \
+ --enable-prettysrc \
+ --enable-source-cache \
+ --enable-nsl-fork \
+ --enable-nls \
+ --enable-persistent-cookies \
+ --enable-vertrace \
+ --disable-full-paths \
+ --enable-addrlist-page \
+ --enable-charset-choice \
+ --enable-cjk \
+ --enable-htmlized-cfg \
+ --enable-justify-elts \
+ --enable-locale-charset \
+ --enable-externs \
+ --enable-cgi-links \
+ --enable-change-exec \
+ --enable-exec-links \
+ --enable-exec-scripts \
+ --enable-internal-links \
+ --with-bzlib \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+make install-help DESTDIR=$PKG || exit 1
+make install-doc DESTDIR=$PKG || exit 1
+
+# Make lynx.cfg a preserved config file:
+mv $PKG/etc/lynx.cfg $PKG/etc/lynx.cfg.new
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Correct $DESTDIR brokenness:
+( cd $PKG/usr/share/lynx/lynx_help
+ rm -f COPYHEADER COPYING
+ ln -sf ../lynx_doc/COPYHEADER .
+ ln -sf ../lynx_doc/COPYING .
+)
+# Add documentation symlinks:
+( mkdir -p $PKG/usr/doc/lynx-$PKGVER
+ cd $PKG/usr/doc/lynx-$PKGVER
+ ln -sf /usr/share/lynx/lynx_doc .
+ ln -sf /usr/share/lynx/lynx_help .
+)
+
+# 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 ]; then
+ DOCSDIR=$(echo $PKG/usr/share/lynx/lynx_doc)
+ cat CHANGES | head -n 1000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+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/lynx-$PKGVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/lynx/lynx.cfg.diff b/patches/source/lynx/lynx.cfg.diff
new file mode 100644
index 00000000..c2ecefd8
--- /dev/null
+++ b/patches/source/lynx/lynx.cfg.diff
@@ -0,0 +1,31 @@
+--- ./lynx.cfg.orig 2014-03-09 16:43:10.000000000 -0500
++++ ./lynx.cfg 2017-05-29 14:35:52.629203408 -0500
+@@ -90,7 +90,7 @@
+ #
+ # Normally we expect you will connect to a remote site, e.g., the Lynx starting
+ # site:
+-STARTFILE:http://lynx.isc.org/
++STARTFILE:http://lynx.invisible-island.net/
+ #
+ # As an alternative, you may want to use a local URL. A good choice for this is
+ # the user's home directory:
+@@ -2969,8 +2969,18 @@
+ #COLOR:4:magenta:white
+ #COLOR:5:blue:white
+ #COLOR:6:red:white
+-COLOR:6:brightred:black
++#COLOR:6:brightred:black
+ #COLOR:7:magenta:cyan
++COLOR:0:black:white
++COLOR:1:blue:white
++COLOR:2:yellow:blue
++COLOR:3:green:white
++COLOR:4:magenta:white
++COLOR:5:blue:white
++# This makes links a *lot* more visible. The default settings are like
++# "let's torture the color-blind" :^)
++COLOR:6:brightred:black
++COLOR:7:magenta:cyan
+
+ .h2 COLOR_STYLE
+ # Also known as "lss" (lynx style-sheet), the color-style file assigns color
diff --git a/patches/source/lynx/slack-desc b/patches/source/lynx/slack-desc
new file mode 100644
index 00000000..c9209d29
--- /dev/null
+++ b/patches/source/lynx/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------------------------------------------------------|
+lynx: Lynx (text mode browser)
+lynx:
+lynx: Lynx is a distributed hypertext browser with full World Wide Web
+lynx: capabilities. Lynx can be used to access information on the World
+lynx: Wide Web, or to build information systems intended primarily for local
+lynx: access. For example, Lynx has been used to build several Campus Wide
+lynx: Information Systems (CWIS).
+lynx:
+lynx: Lynx's authors include Lou Montulli, Garrett Blythe, Craig Lavender,
+lynx: Michael Grobe, and Charles Rezac.
+lynx:
diff --git a/patches/source/mariadb/doinst.sh b/patches/source/mariadb/doinst.sh
new file mode 100644
index 00000000..0defd2fe
--- /dev/null
+++ b/patches/source/mariadb/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.mysqld.new:
+if [ -e etc/rc.d/rc.mysqld ]; then
+ cp -a etc/rc.d/rc.mysqld etc/rc.d/rc.mysqld.new.incoming
+ cat etc/rc.d/rc.mysqld.new > etc/rc.d/rc.mysqld.new.incoming
+ mv etc/rc.d/rc.mysqld.new.incoming etc/rc.d/rc.mysqld.new
+fi
+
+config etc/rc.d/rc.mysqld.new
+config etc/mysqlaccess.conf.new
+config etc/my.cnf.new
+config etc/my.cnf.d/client.cnf.new
+config etc/my.cnf.d/mysql-clients.cnf.new
+config etc/my.cnf.d/server.cnf.new
+config etc/logrotate.d/mysql.new
+
diff --git a/patches/source/mariadb/mariadb.SlackBuild b/patches/source/mariadb/mariadb.SlackBuild
new file mode 100755
index 00000000..ff451117
--- /dev/null
+++ b/patches/source/mariadb/mariadb.SlackBuild
@@ -0,0 +1,199 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2011, 2012, 2013, 2014 Heinz Wiesinger, Amsterdam, The Netherlands
+# 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.
+
+# Build and install MySQL on Slackware
+# by: David Cantrell <david@slackware.com>
+# MariaDB conversion by: Heinz Wiesinger <pprkut@liwjatan.at>
+# Also maintained by: Patrick Volkerding <volkerdi@slackware.com>
+
+PKGNAM=mariadb
+VERSION=${VERSION:-$(echo ${PKGNAM}-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# To reduce the package size, the embedded server may be omitted. Currently
+# only amarok uses this. To build without embedded support, set this to NO.
+EMBEDDED=${EMBEDDED:-YES}
+
+# Add a description tag to the $BUILD. This is used by
+# "build_embedded_package.sh" to mark packages containing the embedded server,
+# but can optionally be used with any kind of custom tag desired.
+TAG=${TAG:-}
+
+# Don't keep the large static libraries by default:
+KEEPSTATIC=${KEEPSTATIC:-NO}
+
+# Don't keep the test suite by default:
+KEEPTESTS=${KEEPTESTS:-NO}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+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
+
+if ls $CWD/*.diff.gz 1> /dev/null 2> /dev/null ; then
+ for patch in $CWD/*.diff.gz ; do
+ zcat $patch | patch -p1 --verbose || exit 1
+ done
+fi
+
+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 {} \;
+
+# Fix linking with libwrap
+sed -i "s|\${CMAKE_REQUIRED_LIBRARIES} wrap|\${CMAKE_REQUIRED_LIBRARIES} wrap nsl|" \
+ configure.cmake
+
+mkdir build
+cd build
+cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS -felide-constructors -fno-exceptions -fno-rtti" \
+ -DBUILD_CONFIG=mysql_release \
+ -DFEATURE_SET="community" \
+ -DINSTALL_LAYOUT="RPM" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_LIBDIR="lib${LIBDIRSUFFIX}" \
+ -DINSTALL_SBINDIR=libexec \
+ -DINSTALL_INCLUDEDIR=include/mysql \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_SQLBENCHDIR= \
+ -DINSTALL_MYSQLTESTDIR=mysql-test \
+ -DINSTALL_MANDIR=man \
+ -DINSTALL_PLUGINDIR="lib${LIBDIRSUFFIX}/mysql/plugin" \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DINSTALL_MYSQLDATADIR="/var/lib/mysql" \
+ -DINSTALL_DOCREADMEDIR="doc/${PKGNAM}-$VERSION" \
+ -DINSTALL_DOCDIR="doc/${PKGNAM}-$VERSION" \
+ -DMYSQL_DATADIR="/var/lib/mysql" \
+ -DMYSQL_UNIX_ADDR="/var/run/mysql/mysql.sock" \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_INNOBASE_STORAGE_ENGINE=1 \
+ -DENABLED_LOCAL_INFILE=ON \
+ -DWITH_EMBEDDED_SERVER=${EMBEDDED} \
+ -DWITH_READLINE=ON \
+ -DWITH_SSL=system \
+ -DWITH_ZLIB=system \
+ -DWITH_JEMALLOC=system \
+ -DUSE_ARIA_FOR_TMP_TABLES=ON \
+ ..
+
+# not building with libwrap. Do we still need tcp_wrappers support?
+# -DWITH_LIBWRAP=ON \
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Leave build directory:
+cd ..
+
+if [ "$KEEPSTATIC" = "NO" ]; then
+ # Remove large static libraries:
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient.a
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqlclient_r.a
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libmysqld.a
+fi
+
+if [ "$KEEPTESTS" = "NO" ]; then
+ # Do not include the test suite:
+ rm -rf $PKG/usr/mysql-test
+fi
+
+# The ./configure option to omit this has gone away, so we'll omit it
+# the old-fashioned way. It's all in the source tarball if you need it.
+rm -rf $PKG/usr/sql-bench
+
+# This is the directory where databases are stored
+mkdir -p $PKG/var/lib/mysql
+chown mysql.mysql $PKG/var/lib/mysql
+chmod 0750 $PKG/var/lib/mysql
+
+# This is where the socket is stored
+mkdir -p $PKG/var/run/mysql
+chown mysql.mysql $PKG/var/run/mysql
+chmod 0755 $PKG/var/run/mysql
+
+# Add init script:
+mkdir -p $PKG/etc/rc.d
+# This is installed chmod 644 so that the server does not run by default.
+zcat $CWD/rc.mysqld.gz > $PKG/etc/rc.d/rc.mysqld.new
+rm -rf $PKG/etc/init.d
+
+# Install mysqlaccess.conf
+install -m 644 scripts/mysqlaccess.conf $PKG/etc/mysqlaccess.conf.new
+
+# Mark config files under /etc as .new
+mv $PKG/etc/my.cnf $PKG/etc/my.cnf.new
+mv $PKG/etc/logrotate.d/mysql $PKG/etc/logrotate.d/mysql.new
+for i in client mysql-clients server; do
+ mv $PKG/etc/my.cnf.d/$i.cnf $PKG/etc/my.cnf.d/$i.cnf.new
+done
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-${BUILD}${TAG}.txz
+
diff --git a/patches/source/mariadb/mirror.url b/patches/source/mariadb/mirror.url
new file mode 100644
index 00000000..17354301
--- /dev/null
+++ b/patches/source/mariadb/mirror.url
@@ -0,0 +1 @@
+ftp://ftp.osuosl.org/pub/mariadb/
diff --git a/patches/source/mariadb/rc.mysqld b/patches/source/mariadb/rc.mysqld
new file mode 100644
index 00000000..e7b7e85e
--- /dev/null
+++ b/patches/source/mariadb/rc.mysqld
@@ -0,0 +1,102 @@
+#!/bin/sh
+# Start/stop/restart mysqld.
+#
+# Copyright 2003 Patrick J. Volkerding, Concord, CA
+# Copyright 2003 Slackware Linux, Inc., Concord, CA
+# Copyright 2008, 2013 Patrick J. Volkerding, Sebeka, MN, USA
+#
+# This program comes with NO WARRANTY, to the extent permitted by law.
+# You may redistribute copies of this program under the terms of the
+# GNU General Public License.
+
+# To start MariaDB automatically at boot, be sure this script is executable:
+# chmod 755 /etc/rc.d/rc.mysqld
+
+# Before you can run MariaDB, you must have a database. To install an initial
+# database, do this as root:
+#
+# mysql_install_db --user=mysql
+#
+# Note that the mysql user must exist in /etc/passwd, and the created files
+# will be owned by this dedicated user. This is important, or else mysql
+# (which runs as user "mysql") will not be able to write to the database
+# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
+#
+# To increase system security, consider using "mysql_secure_installation"
+# as well. For more information on this tool, please read:
+# man mysql_secure_installation
+
+# To allow outside connections to the database comment out the next line.
+# If you don't need incoming network connections, then leave the line
+# uncommented to improve system security.
+SKIP="--skip-networking"
+
+# Uncomment the next line to use Oracle's InnoDB plugin instead of the included XtraDB
+#INNODB="--ignore-builtin-innodb --plugin-load=innodb=ha_innodb.so"
+
+# Uncomment the next line to use TokuDB
+#TOKUDB="--plugin-load=ha_tokudb"
+
+# Start mysqld:
+mysqld_start() {
+ if [ -x /usr/bin/mysqld_safe ]; then
+ # If there is an old PID file (no mysqld running), clean it up:
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ if ! ps axc | grep mysqld 1> /dev/null 2> /dev/null ; then
+ echo "Cleaning up old /var/run/mysql/mysql.pid."
+ rm -f /var/run/mysql/mysql.pid
+ fi
+ fi
+
+ if ! [ -z "$TOKUDB" ]; then
+ echo "never" > /sys/kernel/mm/transparent_hugepage/enabled
+ echo "never" > /sys/kernel/mm/transparent_hugepage/defrag
+ fi
+
+ /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP $INNODB $TOKUDB &
+ fi
+}
+
+# Stop mysqld:
+mysqld_stop() {
+ # If there is no PID file, ignore this request...
+ if [ -r /var/run/mysql/mysql.pid ]; then
+ killall mysqld
+ # Wait at least one minute for it to exit, as we don't know how big the DB is...
+ for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 \
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do
+ if [ ! -r /var/run/mysql/mysql.pid ]; then
+ break;
+ fi
+ sleep 1
+ done
+ if [ "$second" = "60" ]; then
+ echo "WARNING: Gave up waiting for mysqld to exit!"
+ sleep 15
+ fi
+ if ! [ -z "$TOKUDB" ]; then
+ echo "always" > /sys/kernel/mm/transparent_hugepage/enabled
+ echo "always" > /sys/kernel/mm/transparent_hugepage/defrag
+ fi
+ fi
+}
+
+# Restart mysqld:
+mysqld_restart() {
+ mysqld_stop
+ mysqld_start
+}
+
+case "$1" in
+'start')
+ mysqld_start
+ ;;
+'stop')
+ mysqld_stop
+ ;;
+'restart')
+ mysqld_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
diff --git a/patches/source/mariadb/slack-desc b/patches/source/mariadb/slack-desc
new file mode 100644
index 00000000..867765fa
--- /dev/null
+++ b/patches/source/mariadb/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------------------------------------------------------|
+mariadb: mariadb (Drop-in replacement for the MySQL Database Server)
+mariadb:
+mariadb: MariaDB is a backward compatible, drop-in replacement branch of the
+mariadb: MySQL(R) Database Server. It includes all major open source storage
+mariadb: engines, including the Aria storage engine.
+mariadb:
+mariadb: Homepage: http://mariadb.org/
+mariadb:
+mariadb:
+mariadb:
+mariadb:
diff --git a/patches/source/mcabber/mcabber.SlackBuild b/patches/source/mcabber/mcabber.SlackBuild
new file mode 100755
index 00000000..ea119e70
--- /dev/null
+++ b/patches/source/mcabber/mcabber.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010 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=mcabber
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION
+
+# 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 \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install 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
+)
+
+# 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 \
+ AUTHORS COPYING* NEWS README* TODO mcabberrc.example \
+ $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
+#zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mcabber/slack-desc b/patches/source/mcabber/slack-desc
new file mode 100644
index 00000000..e8cfe665
--- /dev/null
+++ b/patches/source/mcabber/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------------------------------------------------------|
+mcabber: mcabber (Jabber console client)
+mcabber:
+mcabber: mcabber is a small Jabber console client for Linux, maintained by
+mcabber: Mikael Berthe. Mcabber includes features such as SSL support,
+mcabber: multi-user chat (MUC), history logging, commands completion, and
+mcabber: external actions triggers.
+mcabber:
+mcabber: mcabber project home is: http://www.lilotux.net/~mikael/mcabber/
+mcabber:
+mcabber:
+mcabber:
diff --git a/patches/source/mercurial/doinst.sh b/patches/source/mercurial/doinst.sh
new file mode 100644
index 00000000..4cefcc34
--- /dev/null
+++ b/patches/source/mercurial/doinst.sh
@@ -0,0 +1,13 @@
+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/mercurial/hgrc.d/hgk.rc.new
+rm -f etc/mercurial/hgrc.d/hgk.rc.new
diff --git a/patches/source/mercurial/mercurial.SlackBuild b/patches/source/mercurial/mercurial.SlackBuild
new file mode 100755
index 00000000..e7c95116
--- /dev/null
+++ b/patches/source/mercurial/mercurial.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 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.
+
+VERSION=${VERSION:-$(echo mercurial-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mercurial
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf mercurial-$VERSION
+tar xvf $CWD/mercurial-$VERSION.tar.?z* || exit 1
+cd mercurial-$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 {} \;
+
+python setup.py build install --root=$PKG || exit 1
+
+# Ordinarily we will not add stuff that's not installed through the normal
+# default installation method, but we've had a lot of requests, and it appears
+# that installing at least the hgk extension is the ad-hoc standard.
+mkdir -p $PKG/usr/libexec/mercurial
+cp -a contrib/hgk $PKG/usr/libexec/mercurial
+chmod 0755 $PKG/usr/libexec/mercurial/hgk
+
+mkdir -p $PKG/etc/mercurial/hgrc.d
+cat << EOF > $PKG/etc/mercurial/hgrc.d/hgk.rc.new
+[extensions]
+# enable hgk extension ('hg help' shows 'view' as a command)
+hgk =
+[hgk]
+
+path=/usr/libexec/mercurial/hgk
+EOF
+
+# Bash and zsh completion:
+mkdir -p $PKG/usr/share/bash-completion/completions/
+cp -a contrib/bash_completion $PKG/usr/share/bash-completion/completions/hg
+chmod 644 $PKG/usr/share/bash-completion/completions/hg
+mkdir -p $PKG/usr/share/zsh/site-functions
+cp -a contrib/zsh_completion $PKG/usr/share/zsh/site-functions/_mercurial
+chmod 644 $PKG/usr/share/zsh/site-functions/_mercurial
+
+# Emacs Lisp extensions:
+mkdir -p $PKG/usr/share/emacs/site-lisp
+cp -a contrib/mercurial.el contrib/mq.el $PKG/usr/share/emacs/site-lisp
+chmod 644 $PKG/usr/share/emacs/site-lisp/*
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+( cd doc
+ for dir in 1 5 ; do
+ mkdir -p $PKG/usr/man/man${dir}
+ for file in *.${dir} ; do
+ cat $file | gzip -9c > $PKG/usr/man/man${dir}/${file}.gz
+ done
+ done
+)
+
+mkdir -p $PKG/usr/doc/mercurial-$VERSION
+cp -a \
+ CONTRIBUTORS COPYING* PKG-INFO README* \
+ $PKG/usr/doc/mercurial-$VERSION
+
+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/mercurial-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mercurial/slack-desc b/patches/source/mercurial/slack-desc
new file mode 100644
index 00000000..e770f6c3
--- /dev/null
+++ b/patches/source/mercurial/slack-desc
@@ -0,0 +1,22 @@
+# 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 ':'.
+
+# This article is licensed under the GNU Free Documentation License.
+# It uses material from the Wikipedia article "Mercurial".
+
+ |-----handy-ruler------------------------------------------------------|
+mercurial: mercurial (a distributed source management system)
+mercurial:
+mercurial: Mercurial is a cross-platform, distributed source management tool for
+mercurial: software developers. It is written in Python, with a binary diff
+mercurial: implementation written in C. Its major features include high-
+mercurial: performance; serverless, fully distributed collaborative development;
+mercurial: robust handling of both plain text and binary files; advanced
+mercurial: branching and merging capabilities; and full source code available
+mercurial: under the terms of the LGPL.
+mercurial:
+mercurial: Mercurial was written by Matt Mackall and other contributors.
diff --git a/patches/source/minicom/config.sub-x86_64.diff b/patches/source/minicom/config.sub-x86_64.diff
new file mode 100644
index 00000000..fa89bb3c
--- /dev/null
+++ b/patches/source/minicom/config.sub-x86_64.diff
@@ -0,0 +1,20 @@
+--- ./config.sub.orig 1998-04-26 17:20:59.000000000 +0400
++++ ./config.sub 2007-08-30 09:48:46.000000000 +0400
+@@ -129,7 +129,7 @@
+ case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+- tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
++ tahoe | i[345]86 | x86_64 | i860 | m68k | m68000 | m88k | ns32k | arm \
+ | arme[lb] | pyramid \
+ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
+ | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
+@@ -144,7 +144,7 @@
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+- vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \
++ vax-* | tahoe-* | i[345]86-* | x86_64-* | i860-* | m68k-* | m68000-* | m88k-* \
+ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
+ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
diff --git a/patches/source/minicom/doinst.sh b/patches/source/minicom/doinst.sh
new file mode 100644
index 00000000..5961829b
--- /dev/null
+++ b/patches/source/minicom/doinst.sh
@@ -0,0 +1,15 @@
+#!/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...
+}
+config etc/minicom.users.new
+config etc/minirc.dfl.new
+rm -f etc/minicom.users.new etc/minirc.dfl.new
diff --git a/patches/source/minicom/lrzsz_0.12.21-5.diff b/patches/source/minicom/lrzsz_0.12.21-5.diff
new file mode 100644
index 00000000..b2541a91
--- /dev/null
+++ b/patches/source/minicom/lrzsz_0.12.21-5.diff
@@ -0,0 +1,4194 @@
+--- lrzsz-0.12.21.orig/po/de.po
++++ lrzsz-0.12.21/po/de.po
+@@ -28,21 +28,21 @@
+
+ #: src/lsz.c:422
+ msgid "packetlength"
+-msgstr "Paketlänge"
++msgstr "Paketl?nge"
+
+ #: src/lsz.c:427
+ #, c-format
+ msgid "packetlength out of range 24..%ld"
+-msgstr "Argument der Option L außerhalb des Bereichs 24..%ld"
++msgstr "Argument der Option L au?erhalb des Bereichs 24..%ld"
+
+ #: src/lsz.c:436
+ msgid "framelength"
+-msgstr "Framelänge"
++msgstr "Framel?nge"
+
+ #: src/lsz.c:441
+ #, c-format
+ msgid "framelength out of range 32..%ld"
+-msgstr "Argument der Option l außerhalb des Bereichs 32..%ld"
++msgstr "Argument der Option l au?erhalb des Bereichs 32..%ld"
+
+ #: src/lrz.c:318 src/lsz.c:450
+ msgid "min_bps"
+@@ -50,7 +50,7 @@
+
+ #: src/lsz.c:452
+ msgid "min_bps must be >= 0"
+-msgstr "minimale BPS-Rate muß >= 0 sein"
++msgstr "minimale BPS-Rate mu? >= 0 sein"
+
+ #: src/lrz.c:324 src/lsz.c:458
+ msgid "min_bps_time"
+@@ -58,7 +58,7 @@
+
+ #: src/lrz.c:326 src/lsz.c:460
+ msgid "min_bps_time must be > 1"
+-msgstr "Zeitfenster für minimale BPS-Rate muß > 1 Sekunde sein"
++msgstr "Zeitfenster f?r minimale BPS-Rate mu? > 1 Sekunde sein"
+
+ #: src/lrz.c:342 src/lsz.c:484
+ msgid "hour to large (0..23)"
+@@ -70,7 +70,7 @@
+
+ #: src/lrz.c:348 src/lsz.c:490
+ msgid "minute to large (0..59)"
+-msgstr "Minute zu groß (0..59)"
++msgstr "Minute zu gro? (0..59)"
+
+ #: src/lrz.c:358 src/lrz.c:365 src/lsz.c:500 src/lsz.c:507
+ msgid "stop time to small"
+@@ -86,15 +86,15 @@
+
+ #: src/lrz.c:396 src/lsz.c:518
+ msgid "timeout out of range 10..1000"
+-msgstr "Argument der Option t außerhalb des Bereichs 10..1000"
++msgstr "Argument der Option t au?erhalb des Bereichs 10..1000"
+
+ #: src/lrz.c:412 src/lsz.c:526
+ msgid "security violation: can't do that under restricted shell\n"
+-msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten\n"
++msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten\n"
+
+ #: src/lrz.c:402 src/lsz.c:533
+ msgid "window size"
+-msgstr "Fenstergröße"
++msgstr "Fenstergr??e"
+
+ #: src/lrz.c:427 src/lrz.c:434 src/lsz.c:556 src/lsz.c:563
+ msgid "cannot turnoff syslog"
+@@ -102,7 +102,7 @@
+
+ #: src/lrz.c:449 src/lsz.c:571
+ msgid "startup delay"
+-msgstr "Startverzögerung"
++msgstr "Startverz?gerung"
+
+ #: src/lrz.c:465 src/lrz.c:483 src/lrz.c:760 src/lrz.c:1122 src/lrz.c:1244
+ #: src/lrz.c:1292 src/lrz.c:1309 src/lrz.c:1324 src/lrz.c:1423 src/lsz.c:580
+@@ -117,11 +117,11 @@
+
+ #: src/lsz.c:612 src/lsz.c:627
+ msgid "need at least one file to send"
+-msgstr "es muß mindestens ein Name einer zu sendenden Datei angegeben werden"
++msgstr "es mu? mindestens ein Name einer zu sendenden Datei angegeben werden"
+
+ #: src/lsz.c:629
+ msgid "Can't send command in restricted mode\n"
+-msgstr "Im eingeschränkten Modus ist das Senden von Kommandos verboten\n"
++msgstr "Im eingeschr?nkten Modus ist das Senden von Kommandos verboten\n"
+
+ #: src/lrz.c:527 src/lsz.c:656
+ msgid "hostname too long\n"
+@@ -137,21 +137,21 @@
+
+ #: src/lrz.c:574 src/lsz.c:803
+ msgid "Transfer incomplete\n"
+-msgstr "Übertragung nicht abgeschlossen\n"
++msgstr "?bertragung nicht abgeschlossen\n"
+
+ #: src/lrz.c:576 src/lsz.c:805
+ msgid "Transfer complete\n"
+-msgstr "Übertragung abgeschlossen\n"
++msgstr "?bertragung abgeschlossen\n"
+
+ #: src/lsz.c:838
+ #, c-format
+ msgid "send_pseudo %s: cannot open tmpfile %s: %s"
+-msgstr "send_pseudo %s: kann temporäre Datei %s nicht öffnen: %s"
++msgstr "send_pseudo %s: kann tempor?re Datei %s nicht ?ffnen: %s"
+
+ #: src/lsz.c:851
+ #, c-format
+ msgid "send_pseudo %s: cannot lstat tmpfile %s: %s"
+-msgstr "send_pseudo %s: kann lstat nicht auf temporäre Datei %s anwenden: %s"
++msgstr "send_pseudo %s: kann lstat nicht auf tempor?re Datei %s anwenden: %s"
+
+ #: src/lsz.c:859
+ #, c-format
+@@ -161,7 +161,7 @@
+ #: src/lsz.c:870
+ #, c-format
+ msgid "send_pseudo %s: cannot write to tmpfile %s: %s"
+-msgstr "send_pseudo %s: kann nicht in temporäre Datei %s schreiben: %s"
++msgstr "send_pseudo %s: kann nicht in tempor?re Datei %s schreiben: %s"
+
+ #: src/lsz.c:879
+ #, c-format
+@@ -188,17 +188,17 @@
+
+ #: src/lsz.c:953
+ msgid "Can't open any requested files."
+-msgstr "Kann keine der angeforderten Dateien öffnen"
++msgstr "Kann keine der angeforderten Dateien ?ffnen"
+
+ #: src/lsz.c:1009
+ #, c-format
+ msgid "security violation: not allowed to upload from %s"
+-msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten"
++msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten"
+
+ #: src/lrz.c:1384 src/lsz.c:1027
+ #, c-format
+ msgid "cannot open %s"
+-msgstr "kann %s nicht öffnen"
++msgstr "kann %s nicht ?ffnen"
+
+ #: src/lsz.c:1082
+ #, c-format
+@@ -213,12 +213,12 @@
+ #: src/lsz.c:1119
+ #, c-format
+ msgid "skipped: %s"
+-msgstr "übersprungen: %s"
++msgstr "?bersprungen: %s"
+
+ #: src/lsz.c:1122
+ #, c-format
+ msgid "%s/%s: skipped"
+-msgstr "%s/%s: übersprungen"
++msgstr "%s/%s: ?bersprungen"
+
+ #: src/lsz.c:1149
+ #, c-format
+@@ -228,7 +228,7 @@
+ #: src/lsz.c:1178
+ #, c-format
+ msgid "Sending %s, %ld blocks: "
+-msgstr "Sende %s, %ld Blöcke:"
++msgstr "Sende %s, %ld Bl?cke:"
+
+ #: src/lsz.c:1181
+ msgid "Give your local XMODEM receive command now."
+@@ -245,11 +245,11 @@
+
+ #: src/lsz.c:1314
+ msgid "Receiver Cancelled"
+-msgstr "Empfänger brach ab"
++msgstr "Empf?nger brach ab"
+
+ #: src/lsz.c:1340
+ msgid "No ACK on EOT"
+-msgstr "Keine Bestätigung für Übertragungsende erhalten"
++msgstr "Keine Best?tigung f?r ?bertragungsende erhalten"
+
+ #: src/lsz.c:1361
+ #, c-format
+@@ -267,11 +267,11 @@
+
+ #: src/lsz.c:1399
+ msgid "Timeout on sector ACK"
+-msgstr "Timeout bei Sektorbestätigung"
++msgstr "Timeout bei Sektorbest?tigung"
+
+ #: src/lsz.c:1404
+ msgid "NAK on sector"
+-msgstr "Sektor nicht bestätigt"
++msgstr "Sektor nicht best?tigt"
+
+ #: src/lsz.c:1410
+ msgid "Got burst for sector ACK"
+@@ -280,11 +280,11 @@
+ #: src/lsz.c:1412
+ #, c-format
+ msgid "Got %02x for sector ACK"
+-msgstr "Erhielt %02x als Sektorbestätigung"
++msgstr "Erhielt %02x als Sektorbest?tigung"
+
+ #: src/lsz.c:1424
+ msgid "Retry Count Exceeded"
+-msgstr "Maximale Wiederholungsanzahl überschritten"
++msgstr "Maximale Wiederholungsanzahl ?berschritten"
+
+ #: src/lrz.c:596 src/lsz.c:1502
+ #, c-format
+@@ -308,7 +308,7 @@
+
+ #: src/lsz.c:1513
+ msgid "Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n"
+-msgstr "Dateien mit ZMODEM/YMODEM/XMODEM übertragen\n"
++msgstr "Dateien mit ZMODEM/YMODEM/XMODEM ?bertragen\n"
+
+ # src/lrz.c:475 src/lsz.c:1330 xx
+ #: src/lrz.c:607 src/lsz.c:1515
+@@ -317,9 +317,9 @@
+ " (Y) = option applies to YMODEM only\n"
+ " (Z) = option applies to ZMODEM only\n"
+ msgstr ""
+-" (X) = Option gilt nur für XMODEM\n"
+-" (Y) = Option gilt nur für YMODEM\n"
+-" (Z) = Option gilt nur für ZMODEM\n"
++" (X) = Option gilt nur f?r XMODEM\n"
++" (Y) = Option gilt nur f?r YMODEM\n"
++" (Z) = Option gilt nur f?r ZMODEM\n"
+
+ #: src/lsz.c:1521
+ msgid ""
+@@ -347,32 +347,32 @@
+ " -m, --min-bps N stop transmission if BPS below N\n"
+ " -M, --min-bps-time N for at least N seconds (default: 120)\n"
+ msgstr ""
+-" -+, --append an existierende Dateien anhängen (Z)\n"
++" -+, --append an existierende Dateien anh?ngen (Z)\n"
+ " -2, --twostop zwei Stopbits verwenden\n"
+-" -4, --try-4k bis zu 4K Blockgröße verwenden\n"
+-" --start-4k mit 4K Blockgröße starten (versucht nicht 8)\n"
+-" -8, --try-8k bis zu 8K Blockgröße verwenden\n"
+-" --start-8k mit 8K Blockgröße starten\n"
++" -4, --try-4k bis zu 4K Blockgr??e verwenden\n"
++" --start-4k mit 4K Blockgr??e starten (versucht nicht 8)\n"
++" -8, --try-8k bis zu 8K Blockgr??e verwenden\n"
++" --start-8k mit 8K Blockgr??e starten\n"
+ " -a, --ascii ASCII: NL nach CR/LF wandeln\n"
+-" -b, --binary Binärübertragung erzwingen\n"
++" -b, --binary Bin?r?bertragung erzwingen\n"
+ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
+-" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausführen "
++" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausf?hren "
+ "(Z)\n"
+-" -C, --command-tries N N mal Kommandoausführung versuchen (Z)\n"
++" -C, --command-tries N N mal Kommandoausf?hrung versuchen (Z)\n"
+ " -d, --dot-to-slash C '.' in Dateinamen nach '/' wandeln (Y/Z)\n"
+ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
+ " -e, --escape alle Steuerzeichen escapen (Z)\n"
+-" -E, --rename Empfänger soll Datei umbenennen falls\n"
++" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+ " Zieldatei schon existiert\n"
+ " -f, --full-path Dateien mit vollen Pfaden senden (Y/Z)\n"
+-" -i, --immediate-command CMD wie `c', aber sofort zurückkehren (Z)\n"
++" -i, --immediate-command CMD wie `c', aber sofort zur?ckkehren (Z)\n"
+ " -h, --help diesen Hilfetext ausgeben\n"
+ " -k, --1k 1024 Bytes Pakete senden (Y)\n"
+-" -L, --packetlen N Unterpaketlänge auf N Bytes beschränken (Z)\n"
+-" -l, --framelen N Rahmenlänge auf N Bytes beschränken (l>=L) "
++" -L, --packetlen N Unterpaketl?nge auf N Bytes beschr?nken (Z)\n"
++" -l, --framelen N Rahmenl?nge auf N Bytes beschr?nken (l>=L) "
+ "(Z)\n"
+-" -m, --min-bps N Übertragung abbrechen bei weniger als N BPS\n"
+-" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+
+ #: src/lsz.c:1546
+ msgid ""
+@@ -400,28 +400,28 @@
+ "short options use the same arguments as the long ones\n"
+ msgstr ""
+ " -n, --newer Datei senden wenn sie neuer ist (Z)\n"
+-" -N, --newer-or-longer Datei senden wenn neuer oder länger (Z)\n"
++" -N, --newer-or-longer Datei senden wenn neuer oder l?nger (Z)\n"
+ " -o, --16-bit-crc 16Bit CRC statt 32Bit CRC verwenden (Z)\n"
+ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
+-" -p, --protect existierende Dateien nicht verändern\n"
+-" -r, --resume unterbrochene Übertragungen fortsetzen (Z)\n"
+-" -R, --restricted eingeschränkter, sichererer Modus\n"
++" -p, --protect existierende Dateien nicht ver?ndern\n"
++" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++" -R, --restricted eingeschr?nkter, sichererer Modus\n"
+ " -q, --quiet leise, keine Ausgaben machen\n"
+-" -s, --stop-at {HH:MM|+N} Übertragung um HH:MM oder in N Sek. abbrechen\n"
+-" --tcp-server Socket öffnen und auf Verbindung warten\n"
+-" --tcp-client ADDR:PORT Socket öffnen und verbindung mit ...\n"
+-" -u, --unlink Datei nach Übertragung löschen\n"
+-" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
++" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
++" -u, --unlink Datei nach ?bertragung l?schen\n"
++" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+ "erlaubt)\n"
+ " -v, --verbose mehr ausgeben\n"
+-" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+ " -X --xmodem XMODEM-Protokoll benutzen\n"
+-" -y, --overwrite existierende Dateien überschreiben\n"
+-" -Y, --overwrite-or-skip wie `y', aber nicht existierende überspringen\n"
++" -y, --overwrite existierende Dateien ?berschreiben\n"
++" -Y, --overwrite-or-skip wie `y', aber nicht existierende ?berspringen\n"
+ " --ymodem YMODEM-Protokoll benutzen\n"
+ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
+ "\n"
+-"Kurze Optionen benötigen dieselben Argumente wie Lange.\n"
++"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+
+ #: src/lsz.c:1768
+ msgid "got ZRQINIT"
+@@ -434,7 +434,7 @@
+ #: src/lsz.c:1991
+ #, c-format
+ msgid "blklen now %d\n"
+-msgstr "Blockgröße nun %d\n"
++msgstr "Blockgr??e nun %d\n"
+
+ #: src/lsz.c:2053
+ #, c-format
+@@ -453,7 +453,7 @@
+ #: src/lsz.c:2223
+ #, c-format
+ msgid "calc_blklen: reduced to %d due to error\n"
+-msgstr "calc_blklen: Blockgrösse auf %d reduziert wegen Fehler\n"
++msgstr "calc_blklen: Blockgr?sse auf %d reduziert wegen Fehler\n"
+
+ #: src/lsz.c:2256
+ #, c-format
+@@ -473,7 +473,7 @@
+ #: src/lsz.c:2278
+ #, c-format
+ msgid "calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n"
+-msgstr "calc_blklen: Blocklänge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
++msgstr "calc_blklen: Blockl?nge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
+
+ #: src/lsz.c:2290
+ #, c-format
+@@ -512,7 +512,7 @@
+
+ #: src/zm.c:712
+ msgid "Garbage count exceeded"
+-msgstr "Maximale Wiederholungsanzahl überschritten"
++msgstr "Maximale Wiederholungsanzahl ?berschritten"
+
+ #: src/zm.c:773
+ #, c-format
+@@ -526,11 +526,11 @@
+
+ #: src/lrz.c:382
+ msgid "don't have settimeofday, will not set time\n"
+-msgstr "Zeitsynchronisation nicht ausführbar, settimeofday() fehlt\n"
++msgstr "Zeitsynchronisation nicht ausf?hrbar, settimeofday() fehlt\n"
+
+ #: src/lrz.c:386
+ msgid "not running as root (this is good!), can not set time\n"
+-msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausführbar\n"
++msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausf?hrbar\n"
+
+ #: src/lrz.c:441
+ msgid "bytes_per_error"
+@@ -542,16 +542,16 @@
+
+ #: src/lrz.c:455
+ msgid "O_SYNC not supported by the kernel"
+-msgstr "O_SYNC vom Kernel nicht unterstützt"
++msgstr "O_SYNC vom Kernel nicht unterst?tzt"
+
+ #: src/lrz.c:497 src/lrz.c:499
+ msgid "garbage on commandline"
+-msgstr "Müll auf der Kommandozeile"
++msgstr "M?ll auf der Kommandozeile"
+
+ #: src/lrz.c:604
+ #, c-format
+ msgid "Usage: %s [options] [filename.if.xmodem]\n"
+-msgstr "Benutzung: %s [Optionen] [Dateiname.für.xmodem]\n"
++msgstr "Benutzung: %s [Optionen] [Dateiname.f?r.xmodem]\n"
+
+ #: src/lrz.c:605
+ msgid "Receive files with ZMODEM/YMODEM/XMODEM protocol\n"
+@@ -596,44 +596,44 @@
+ "\n"
+ "short options use the same arguments as the long ones\n"
+ msgstr ""
+-" -+, --append an existierende Dateien anhängen\n"
+-" -a, --ascii ASCII-Übertragung (CR/LF nach LF wandeln)\n"
+-" -b, --binary Binärübertragung (keine Umwandlungen)\n"
++" -+, --append an existierende Dateien anh?ngen\n"
++" -a, --ascii ASCII-?bertragung (CR/LF nach LF wandeln)\n"
++" -b, --binary Bin?r?bertragung (keine Umwandlungen)\n"
+ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
+-" -c, --with-crc 16bit CRC statt Prüfsumme verwenden (X)\n"
+-" -C, --allow-remote-commands Ausführung von Kommandos erlauben (Z)\n"
++" -c, --with-crc 16bit CRC statt Pr?fsumme verwenden (X)\n"
++" -C, --allow-remote-commands Ausf?hrung von Kommandos erlauben (Z)\n"
+ " -D, --null empfangene Daten nach /dev/null schreiben\n"
+ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
+ " -e, --escape Alle Steuerzeichen escapen (Z)\n"
+-" -E, --rename Empfänger soll Datei umbenennen falls\n"
++" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+ " Zieldatei schon existiert\n"
+ " --errors N Einen CRC-Fehler alle N Bytes erzeugen\n"
+ " -h, --help Diesen Hilfstext ausgeben\n"
+-" -m, --min-bps N Übertragung abbrechen bei weniger als N BPS\n"
+-" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
+ " --o-sync Ausgabedatei(en) im synchron schreiben\n"
+-" -p, --protect existierende Dateien nicht verändern\n"
++" -p, --protect existierende Dateien nicht ver?ndern\n"
+ " -q, --quiet leise, keine Ausgaben machen\n"
+-" -r, --resume unterbrochene Übertragungen fortsetzen (Z)\n"
+-" -R, --restricted eingeschränkter, sichererer Modus\n"
+-" -s, --stop-at {HH:MM|+N} Übertragung um HH:MM oder in N Sek. abbrechen\n"
++" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++" -R, --restricted eingeschr?nkter, sichererer Modus\n"
++" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
+ " -S, --timesync Zeit anfordern (doppelt: lokale Zeit setzen)\n"
+-" --syslog[=off] syslog an- oder ausschalten, wenn möglich\n"
++" --syslog[=off] syslog an- oder ausschalten, wenn m?glich\n"
+ " -t, --timeout N Timeout auf N Zehntelsekungen setzen\n"
+-" --tcp-server Socket öffnen und auf Verbindung warten\n"
+-" --tcp-client ADDR:PORT Socket öffnen und verbindung mit ...\n"
++" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
+ " -u, --keep-uppercase GROSS geschrieben Dateinamen beibehalten\n"
+-" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+ "erlaubt)\n"
+ " -v, --verbose mehr ausgeben\n"
+-" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+ " -X --xmodem XMODEM-Protokoll benutzen\n"
+-" -y, --overwrite existierende Dateien überschreiben\n"
++" -y, --overwrite existierende Dateien ?berschreiben\n"
+ " --ymodem YMODEM-Protokoll benutzen\n"
+ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
+ "\n"
+-"Kurze Optionen benötigen dieselben Argumente wie Lange.\n"
++"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+
+ #: src/lrz.c:676
+ #, c-format
+@@ -662,11 +662,11 @@
+ "%s: %s removed.\r\n"
+ msgstr ""
+ "\r\n"
+-"%s: %s gelöscht\r\n"
++"%s: %s gel?scht\r\n"
+
+ #: src/lrz.c:856
+ msgid "Pathname fetch returned EOT"
+-msgstr "Ende der Übertragung beim Warten auf Dateinamen"
++msgstr "Ende der ?bertragung beim Warten auf Dateinamen"
+
+ #: src/lrz.c:903
+ msgid "Received dup Sector"
+@@ -682,7 +682,7 @@
+
+ #: src/lrz.c:976
+ msgid "Checksum"
+-msgstr "Prüfsummenfehler"
++msgstr "Pr?fsummenfehler"
+
+ #: src/lrz.c:979
+ msgid "Sector number garbled"
+@@ -695,12 +695,12 @@
+ #: src/lrz.c:1005
+ #, c-format
+ msgid "Got 0%o sector header"
+-msgstr "Erhielt %02x als Sektorbestätigung"
++msgstr "Erhielt %02x als Sektorbest?tigung"
+
+ #: src/lrz.c:1113
+ #, c-format
+ msgid "file name ends with a /, skipped: %s\n"
+-msgstr "Dateiname endet mit /, übersprungen: %s\n"
++msgstr "Dateiname endet mit /, ?bersprungen: %s\n"
+
+ #: src/lrz.c:1127
+ #, c-format
+@@ -715,7 +715,7 @@
+ #: src/lrz.c:1192 src/lrz.c:1226
+ #, c-format
+ msgid "file exists, skipped: %s\n"
+-msgstr "Datei existiert, übersprungen: %s\n"
++msgstr "Datei existiert, ?bersprungen: %s\n"
+
+ #: src/lrz.c:1267
+ #, c-format
+@@ -739,7 +739,7 @@
+ #: src/lrz.c:1545
+ #, c-format
+ msgid "Blocks received: %d"
+-msgstr "Blöcke empfangen: %d"
++msgstr "Bl?cke empfangen: %d"
+
+ #: src/lrz.c:1599
+ #, c-format
+@@ -749,15 +749,15 @@
+ #: src/lrz.c:1612 src/lrz.c:1620
+ #, c-format
+ msgid "%s:\tSecurity Violation"
+-msgstr "%s:\tSicherheitsverstoß"
++msgstr "%s:\tSicherheitsversto?"
+
+ #: src/lrz.c:1730
+ msgid "remote command execution requested"
+-msgstr "Gegenseite versucht Kommandoausführung"
++msgstr "Gegenseite versucht Kommandoausf?hrung"
+
+ #: src/lrz.c:1737
+ msgid "not executed"
+-msgstr "nicht ausgeführt"
++msgstr "nicht ausgef?hrt"
+
+ #: src/lrz.c:1768
+ msgid "got ZRINIT"
+@@ -765,7 +765,7 @@
+
+ #: src/lrz.c:1817
+ msgid "Skipped"
+-msgstr "Übersprungen"
++msgstr "?bersprungen"
+
+ #. too bad
+ #: src/lrz.c:2049
+@@ -785,7 +785,7 @@
+
+ #: src/lrz.c:2215
+ msgid "file close error"
+-msgstr "Fehler beim Schließen der Datei"
++msgstr "Fehler beim Schlie?en der Datei"
+
+ #~ msgid "tcp protocol init failed\n"
+ #~ msgstr "TCP Protokoll Initialisierung fehlgeschlagen\n"
+@@ -797,7 +797,7 @@
+ #~ msgstr "fgets() bei tcp Protokoll Synchronisation fehlgeschlagen: "
+
+ #~ msgid "Transfer complete."
+-#~ msgstr "Übertragung abgeschlossen"
++#~ msgstr "?bertragung abgeschlossen"
+
+ #~ msgid "at"
+ #~ msgstr "um"
+@@ -809,4 +809,4 @@
+ #~ msgstr "Zeitsynchronisation: ok\n"
+
+ #~ msgid "Falldown to %ld blklen"
+-#~ msgstr "Blockgröße auf %ld gesenkt"
++#~ msgstr "Blockgr??e auf %ld gesenkt"
+--- lrzsz-0.12.21.orig/debian/copyright
++++ lrzsz-0.12.21/debian/copyright
+@@ -0,0 +1,31 @@
++This is the lrzsz Debian GNU/Linux package. It was first maintained by
++Michael Alan Dorman <mdorman@debian.org>, with help of Martin Mitchell
++and current upstream maintainer, Uwe Ohse <uwe@ohse.de>.
++
++Current maintainer is Josip Rodin <jrodin@jagor.srce.hr>
++
++Original source was downloaded from: ftp://tirka.ohse.de/uwe/
++
++Copyright (C) until 1988 Chuck Forsberg (Omen Technology INC)
++Copyright (C) 1994 Matt Porter, Michael D. Black
++Copyright (C) 1996, 1997 Uwe Ohse
++
++Please note that credit should be given to Chuck Forsberg (rzsz) and
++Stephen Satchell/Satchell Evaluations (crc routines) for this package.
++
++ This program is free software; you can redistribute it and/or modify
++ it under the terms of the GNU General Public License as published by
++ the Free Software Foundation; version 2 dated June, 1991.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program; if not, write to the Free Software
++ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
++ MA 02110-1301, USA.
++
++On Debian systems, the complete text of the GNU General Public License
++can be found in /usr/share/common-licenses/GPL file.
+--- lrzsz-0.12.21.orig/debian/control
++++ lrzsz-0.12.21/debian/control
+@@ -0,0 +1,18 @@
++Source: lrzsz
++Section: comm
++Priority: optional
++Maintainer: Martin A. Godisch <godisch@debian.org>
++Standards-Version: 3.8.3
++Build-Depends: autotools-dev, gettext
++
++Package: lrzsz
++Architecture: any
++Depends: ${shlibs:Depends}
++Suggests: minicom
++Description: Tools for zmodem/xmodem/ymodem file transfer
++ Lrzsz is a cosmetically modified zmodem/ymodem/xmodem package built
++ from the public-domain version of Chuck Forsberg's rzsz package.
++ .
++ These programs use error correcting protocols ({z,x,y}modem) to send
++ (sz, sx, sb) and receive (rz, rx, rb) files over a dial-in serial port
++ from a variety of programs running under various operating systems.
+--- lrzsz-0.12.21.orig/debian/changelog
++++ lrzsz-0.12.21/debian/changelog
+@@ -0,0 +1,104 @@
++lrzsz (0.12.21-5) unstable; urgency=low
++
++ * New maintainer upload, closes: #556238.
++ Thanks to Josip Rodin for his work.
++ * Removed build-dependency on debhelper.
++ * Added build-dependency on autotools-dev.
++ * Cut Debian diff.gz into pieces.
++ * Updated FSF address in copyright file.
++ * Updated German po file, added build-dependency on gettext.
++ Closes: #313992, thanks to Jens Seidel and Tobias Toedter.
++ * Fixed missing includes (compiler warnings).
++ * Fixed typo in sz manpage.
++ * Fixed linking to libnsl.
++ * Removed changelog emacs settings.
++ * Updated standards version.
++
++ -- Martin A. Godisch <godisch@debian.org> Sun, 22 Nov 2009 09:35:13 +0100
++
++lrzsz (0.12.21-4.1) unstable; urgency=low
++
++ * Non-maintainer upload.
++ * Rebuilt with current debhelper, finishing the /usr/doc transition.
++ Closes: #322762
++ * Rebuilt with a current toolchain, now it's prelinkable.
++ Closes: #288084
++ * Appled man page typo fix patch from A Costa. Closes: #311459
++
++ -- Joey Hess <joeyh@debian.org> Tue, 10 Jan 2006 01:35:00 -0500
++
++lrzsz (0.12.21-4) unstable; urgency=low
++
++ * Updated for Standards-Version: 3.5.2.
++ * Added touch stamp-h.in before make invocation in order to stop
++ autoheader from running.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 25 Mar 2001 19:48:18 +0200
++
++lrzsz (0.12.21-3) unstable; urgency=low
++
++ * Newish upstream version, (990823 in CVS).
++ * Updated for Policy 3.x.
++ * Misc. fixes for debian/*.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 19 Sep 1999 17:55:38 +0200
++
++lrzsz (0.12.21-2) unstable; urgency=low
++
++ * Removed definition of strstr, advised by upstream maintainer, to
++ get it to compile on glibc2.1, as John Goerzen and Bart Warmerdam
++ noticed (fixes: #39429 #39812).
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 20 Jun 1999 21:38:07 +0200
++
++lrzsz (0.12.21-1) unstable; urgency=low
++
++ * New upstream version (990604 in CVS).
++ * Cleaned up the diff by removing unneeded .deps/ files and not changing
++ aclocal et al.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 6 Jun 1999 21:01:50 +0200
++
++lrzsz (0.12.20-2) unstable; urgency=low
++
++ * Don't install ansi2knr.1 manpage, closing bug #33121
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 7 Feb 1999 01:32:31 +0100
++
++lrzsz (0.12.20-1) unstable; urgency=low
++
++ * New maintainer.
++ * Althought version number doesn't indicate that, this version is
++ today's CVS snapshot from ftp://tirka.ohse.de/uwe/cvs-trees
++ * This release fixes following bugs: #8373 #11208 #16170 #16744 #17210.
++ * Package is lintian clean.
++
++ -- Josip Rodin <jrodin@jagor.srce.hr> Sun, 7 Feb 1999 01:32:31 +0100
++
++lrzsz (0.12.17) unstable; urgency=low
++
++ * sorry, see ../ChangeLog. automagically generated debian/changelog
++
++ -- Uwe Ohse <uwe@ohse.de> Mon, 02 Jun 1997 10:06:05 +0200
++
++lrzsz (0.12.16) unstable; urgency=low
++
++ * sorry, see ../ChangeLog. changelog is here just to make
++ dpkg happy.
++ * initial release
++
++ -- Uwe Ohse <uwe@ohse.de> Sun, 2 Jun 1997 21:00:00 +0200
++
++lrzsz (0.12b-1.1) unstable; urgency=low
++
++ * Non-maintainer release.
++ * Libc6 compile.
++
++ -- Martin Mitchell <martin@debian.org> Sat, 18 Oct 1997 01:58:54 +1000
++
++lrzsz (0.12b-1) unstable; urgency=low
++
++ * Converted to new source packaging format.
++ * New upstream version.
++
++ -- Michael Alan Dorman <mdorman@calder.med.miami.edu> Tue, 17 Sep 1996 13:39:23 -0400
+--- lrzsz-0.12.21.orig/debian/rules
++++ lrzsz-0.12.21/debian/rules
+@@ -0,0 +1,80 @@
++#!/usr/bin/make -f
++
++testdir = test -f src/lrz.c && test -f debian/rules
++testroot = test x`whoami` = xroot
++
++# FOR AUTOCONF 2.13 ONLY
++ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
++ confflags += $(DEB_HOST_GNU_TYPE)
++else
++ $(error Cannot cross-compile this package out-of-the-box)
++endif
++
++CFLAGS = -Wall -g
++ifneq "$(findstring noopt,$(DEB_BUILD_OPTIONS))" ""
++ CFLAGS += -O0
++else
++ CFLAGS += -O2
++endif
++export CFLAGS
++
++build: build-stamp
++build-stamp:
++ $(testdir)
++ cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub .
++ -cat debian/patches/*.diff | patch -Ntp1 -r debian/rejected --no-backup-if-mismatch
++ ./configure $(CONFFLAGS) --prefix=/usr --mandir='$${prefix}/share/man' --program-transform-name=s/l//
++ touch stamp-h.in # to stop autoheader from running
++ touch -d yesterday aclocal.m4 # to stop automake from running
++ $(MAKE)
++ touch $@
++
++clean:
++ $(testdir)
++ $(testroot)
++ cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub .
++ touch stamp-h.in # to stop autoheader from running
++ touch -d yesterday aclocal.m4 # to stop automake from running
++ [ ! -f Makefile ] || $(MAKE) distclean
++ -cat `ls -r debian/patches/*.diff` /dev/null | patch -RNtp1 -r debian/rejected --no-backup-if-mismatch
++ rm -rf debian/tmp
++ rm -f build-stamp config.guess config.sub po/lrzsz.pot po/*.gmo debian/files debian/rejected debian/substvars
++
++binary: binary-arch
++
++binary-indep:
++
++binary-arch: build
++ $(testdir)
++ $(testroot)
++ rm -rf debian/tmp
++
++ $(MAKE) prefix=$(CURDIR)/debian/tmp/usr install
++
++ifeq "$(findstring nostrip,$(DEB_BUILD_OPTIONS))" ""
++ strip -R .comment -R .note debian/tmp/usr/bin/*
++endif
++
++ install -d -m 0755 debian/tmp/usr/share/doc/lrzsz
++ install -p -m 0644 NEWS README README.cvs README.isdn4linux TODO debian/copyright debian/tmp/usr/share/doc/lrzsz
++ install -p -m 0644 -D ChangeLog debian/tmp/usr/share/doc/lrzsz/changelog
++ install -p -m 0644 -D debian/changelog debian/tmp/usr/share/doc/lrzsz/changelog.Debian
++
++ find debian/tmp/usr/share/man -type f -print0 | xargs -0 gzip -9
++ find debian/tmp/usr/share/doc -type f ! -name copyright ! -name '*.html' \
++ \( -name 'changelog*' -o -size +8 \) -print0 | xargs -0 gzip -9
++
++ ln -s rz.1.gz debian/tmp/usr/share/man/man1/rb.1.gz
++ ln -s rz.1.gz debian/tmp/usr/share/man/man1/rx.1.gz
++ ln -s sz.1.gz debian/tmp/usr/share/man/man1/sb.1.gz
++ ln -s sz.1.gz debian/tmp/usr/share/man/man1/sx.1.gz
++
++ install -d -m 0755 debian/tmp/DEBIAN
++ install -p -m 0644 debian/control debian/tmp/DEBIAN
++ cd debian/tmp && find usr -type f -print0 | xargs -0 md5sum > DEBIAN/md5sums
++
++ dpkg-shlibdeps debian/tmp/usr/bin/*
++ dpkg-gencontrol -isp -plrzsz
++ dpkg --build debian/tmp ..
++
++.PHONY: build clean binary binary-indep binary-arch
+--- lrzsz-0.12.21.orig/debian/patches/206648_dszlog.diff.unchecked
++++ lrzsz-0.12.21/debian/patches/206648_dszlog.diff.unchecked
+@@ -0,0 +1,311 @@
++diff -ur lrzsz-0.12.21/src/lrz.c newlrzsz/src/lrz.c
++--- lrzsz-0.12.21/src/lrz.c 2003-08-21 16:22:01.000000000 -0500
+++++ newlrzsz/src/lrz.c 2003-08-21 17:05:53.000000000 -0500
++@@ -68,6 +68,7 @@
++ unsigned Baudrate = 2400;
++
++ FILE *fout;
+++char *dszlogpath;
++
++
++ int Lastrx;
++@@ -192,6 +193,9 @@
++ zmputs(Attn);
++ canit(STDOUT_FILENO);
++ io_mode(0,0);
+++ if (dszlogpath) {
+++ dszlog(dszlogpath, 'L', 0, 0, 0, errors, 0, 0);
+++ }
++ error(128+n,0,_("caught signal %d; exiting"), n);
++ }
++
++@@ -265,6 +269,13 @@
++ if ((cp=getenv("ZMODEM_RESTRICTED"))!=NULL)
++ Restricted=2;
++
+++ dszlogpath = getenv("DSZLOG");
+++ if (access(dszlogpath, F_OK) == 0) {
+++ if (unlink(dszlogpath) != 0) {
+++ perror("unlink dszlog");
+++ }
+++ }
+++
++ /* make temporary and unfinished files */
++ umask(0077);
++
++@@ -559,6 +570,7 @@
++ signal(SIGINT, bibi);
++ signal(SIGTERM, bibi);
++ signal(SIGPIPE, bibi);
+++ signal(SIGHUP, bibi);
++ if (wcreceive(npats, patts)==ERROR) {
++ exitcode=0200;
++ canit(STDOUT_FILENO);
++@@ -685,9 +697,9 @@
++ #endif
++ if (c)
++ goto fubar;
++- } else {
+++ } else { /* Not Xmodem, not Zmodem, so Ymodem */
++ for (;;) {
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -712,7 +724,7 @@
++ if (wcrx(&zi)==ERROR)
++ goto fubar;
++
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -734,16 +746,19 @@
++ lsyslog(LOG_INFO,"%s/%s: %ld Bytes, %ld BPS",
++ shortname,protname(),zi.bytes_received, bps);
++ #endif
+++ if (dszlogpath) dszlog(dszlogpath, 'R',
+++ zi.bytes_received, zi.fname,
+++ bps, errors, 0, 0);
++ }
++ }
++ }
++- } else {
+++ } else { /* Xmodem */
++ char dummy[128];
++ dummy[0]='\0'; /* pre-ANSI HPUX cc demands this */
++ dummy[1]='\0'; /* procheader uses name + 1 + strlen(name) */
++ zi.bytes_total = DEFBYTL;
++
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -782,7 +797,7 @@
++ if (wcrx(&zi)==ERROR) {
++ goto fubar;
++ }
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -803,6 +818,10 @@
++ lsyslog(LOG_INFO,"%s/%s: %ld Bytes, %ld BPS",
++ shortname,protname(),zi.bytes_received, bps);
++ #endif
+++ if (dszlogpath) dszlog(dszlogpath, 'R',
+++ zi.bytes_received, zi.fname,
+++ bps, errors, 0, 0);
+++
++ }
++ }
++ return OK;
++@@ -812,6 +831,13 @@
++ lsyslog(LOG_ERR,"%s/%s: got error",
++ shortname ? shortname : "no.name", protname());
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ dszlog(dszlogpath, 'E', zi.bytes_received, zi.fname,
+++ (zi.bytes_received-zi.bytes_skipped)/((d) ? d : 0.5),
+++ errors, 0, 0);
+++ }
+++
++ canit(STDOUT_FILENO);
++ if (Topipe && fout) {
++ pclose(fout); return ERROR;
++@@ -1783,10 +1809,18 @@
++ rzfiles(struct zm_fileinfo *zi)
++ {
++ register int c;
+++ long bps;
++
++ for (;;) {
++ timing(1,NULL);
++ c = rzfile(zi);
+++ {
+++ double d;
+++ d=timing(0,NULL);
+++ if (d==0)
+++ d=0.5; /* can happen if timing uses time() */
+++ bps=(zi->bytes_received-zi->bytes_skipped)/d;
+++ }
++ switch (c) {
++ case ZEOF:
++ if (Verbose > 1
++@@ -1794,12 +1828,6 @@
++ || enable_syslog
++ #endif
++ ) {
++- double d;
++- long bps;
++- d=timing(0,NULL);
++- if (d==0)
++- d=0.5; /* can happen if timing uses time() */
++- bps=(zi->bytes_received-zi->bytes_skipped)/d;
++ if (Verbose > 1) {
++ vstringf(
++ _("\rBytes received: %7ld/%7ld BPS:%-6ld \r\n"),
++@@ -1807,6 +1835,8 @@
++ }
++ DO_SYSLOG_FNAME((LOG_INFO, "%s/%s: %ld Bytes, %ld BPS",shortname,
++ protname(), (long) zi->bytes_total,bps));
+++ if (dszlogpath) dszlog(dszlogpath, 'z', zi->bytes_received,
+++ zi->fname, bps, errors, 0, 0);
++ }
++ /* FALL THROUGH */
++ case ZSKIP:
++@@ -1815,6 +1845,8 @@
++ if (Verbose)
++ vstringf(_("Skipped"));
++ DO_SYSLOG_FNAME((LOG_INFO, "%s/%s: skipped",shortname,protname()));
+++ if (dszlogpath) dszlog(dszlogpath, 'E', zi->bytes_received,
+++ zi->fname, bps, errors, 0, 0);
++ }
++ switch (tryz()) {
++ case ZCOMPL:
++@@ -1829,6 +1861,8 @@
++ return c;
++ case ERROR:
++ DO_SYSLOG_FNAME((LOG_INFO, "%s/%s: error",shortname,protname()));
+++ if (dszlogpath) dszlog(dszlogpath, 'E', zi->bytes_received,
+++ zi->fname, bps, errors, 0, 0);
++ return ERROR;
++ }
++ }
++diff -ur lrzsz-0.12.21/src/lsyslog.c newlrzsz/src/lsyslog.c
++--- lrzsz-0.12.21/src/lsyslog.c 1998-12-29 11:27:55.000000000 -0600
+++++ newlrzsz/src/lsyslog.c 2003-08-21 16:47:53.000000000 -0500
++@@ -26,6 +26,8 @@
++ #include <string.h>
++ #endif
++
+++#include <stdio.h>
+++
++ #if __STDC__
++ # include <stdarg.h>
++ # define VA_START(args, lastarg) va_start(args, lastarg)
++@@ -79,3 +81,23 @@
++ #endif
++ }
++
+++void dszlog(char *logname, char status, unsigned long num_bytes, char *fname,
+++ int cps, int retry_events, int flow_events, int blocksize) {
+++
+++ FILE *mylog;
+++ if ((mylog = fopen(logname, "a"))) {
+++ fprintf(mylog, "%c %6ld %5ld bps %4ld cps %3d errors %5u %4d %s %ld\r\n",
+++ status,
+++ num_bytes,
+++ cps*8, /* XXX where to get DTE from? */
+++ cps,
+++ retry_events,
+++ flow_events, /* XXX where is flow_control? */
+++ blocksize,
+++ fname,
+++ -1 /* serial number */
+++ );
+++ fclose(mylog);
+++ }
+++}
+++
++diff -ur lrzsz-0.12.21/src/lsz.c newlrzsz/src/lsz.c
++--- lrzsz-0.12.21/src/lsz.c 2003-08-21 16:22:01.000000000 -0500
+++++ newlrzsz/src/lsz.c 2003-08-21 17:02:18.000000000 -0500
++@@ -59,6 +59,8 @@
++ extern int errno;
++ #endif
++
+++char *dszlogpath;
+++
++ unsigned Baudrate=2400; /* Default, should be set by first mode() call */
++ unsigned Txwindow; /* Control the size of the transmitted window */
++ unsigned Txwspac; /* Spacing between zcrcq requests */
++@@ -223,6 +225,9 @@
++ canit(STDOUT_FILENO);
++ fflush (stdout);
++ io_mode (io_mode_fd,0);
+++ if (dszlogpath) {
+++ dszlog(dszlogpath, 'L', 0, 0, 0, errors, 0, 0);
+++ }
++ if (n == 99)
++ error (0, 0, _ ("io_mode(,2) in rbsb.c not implemented\n"));
++ else
++@@ -332,6 +337,14 @@
++ }
++ if ((cp=getenv("ZMODEM_RESTRICTED"))!=NULL)
++ Restricted=1;
+++
+++ dszlogpath = getenv("DSZLOG");
+++ if (access(dszlogpath, F_OK) == 0) {
+++ if (unlink(dszlogpath) != 0) {
+++ perror("unlink dszlog");
+++ }
+++ }
+++
++ from_cu();
++ chkinvok(argv[0]);
++
++@@ -1113,6 +1126,12 @@
++ if (enable_syslog)
++ lsyslog(LOG_INFO, _("%s/%s: error occured"),protname(),shortname);
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ dszlog(dszlogpath, 'E', zi.bytes_sent, zi.fname,
+++ zi.bytes_sent/((d) ? d : 0.5),
+++ errors, 0, blklen);
+++ }
++ return ERROR;
++ case ZSKIP:
++ error(0,0, _("skipped: %s"),name);
++@@ -1120,6 +1139,13 @@
++ if (enable_syslog)
++ lsyslog(LOG_INFO, _("%s/%s: skipped"),protname(),shortname);
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ /* XXX is Zmodem skip really deserving a 'E' ? */
+++ dszlog(dszlogpath, 'E', zi.bytes_sent, zi.fname,
+++ zi.bytes_sent/((d) ? d : 0.5),
+++ errors, 0, blklen);
+++ }
++ return OK;
++ }
++ if (!zmodem_requested && wctx(&zi)==ERROR)
++@@ -1128,12 +1154,18 @@
++ if (enable_syslog)
++ lsyslog(LOG_INFO, _("%s/%s: error occured"),protname(),shortname);
++ #endif
+++ if (dszlogpath) {
+++ double d = timing(0,NULL);
+++ dszlog(dszlogpath, 'E', zi.bytes_sent, zi.fname,
+++ zi.bytes_sent/((d) ? d : 0.5),
+++ errors, 0, blklen);
+++ }
++ return ERROR;
++ }
++ if (Unlinkafter)
++ unlink(oname);
++
++- if (Verbose > 1
+++ if (Verbose > 1 || dszlogpath
++ #ifdef ENABLE_SYSLOG
++ || enable_syslog
++ #endif
++@@ -1152,6 +1184,11 @@
++ lsyslog(LOG_INFO, "%s/%s: %ld Bytes, %ld BPS",shortname,
++ protname(), (long) zi.bytes_sent,bps);
++ #endif
+++ if (dszlogpath) {
+++ char whichprot = (protocol==ZM_ZMODEM)? 'Z' : 'S';
+++ dszlog(dszlogpath, whichprot, zi.bytes_sent,
+++ zi.fname, bps, errors, 0, blklen);
+++ }
++ }
++ return 0;
++ }
+--- lrzsz-0.12.21.orig/debian/patches/include.diff
++++ lrzsz-0.12.21/debian/patches/include.diff
+@@ -0,0 +1,20 @@
++--- lrzsz-0.12.21.orig/lib/long-options.c
+++++ lrzsz-0.12.21/lib/long-options.c
++@@ -22,6 +22,7 @@
++ #endif
++
++ #include <stdio.h>
+++#include <stdlib.h>
++ #include <getopt.h>
++ #include "long-options.h"
++
++--- lrzsz-0.12.21.orig/src/lsyslog.c
+++++ lrzsz-0.12.21/src/lsyslog.c
++@@ -22,6 +22,7 @@
++ #ifdef ENABLE_SYSLOG
++ #include "zglobal.h"
++ #include <pwd.h>
+++#include <stdio.h>
++ #include <stdlib.h>
++ #include <string.h>
++ #endif
+--- lrzsz-0.12.21.orig/debian/patches/mantypos.diff
++++ lrzsz-0.12.21/debian/patches/mantypos.diff
+@@ -0,0 +1,49 @@
++--- lrzsz-0.12.21.orig/man/lsz.1
+++++ lrzsz-0.12.21/man/lsz.1
++@@ -247,7 +247,7 @@
++ Escape all control characters;
++ normally XON, XOFF, DLE, CR-@-CR, and Ctrl-X are escaped.
++ .TP
++-.B"-E, --rename"
+++.B "-E, --rename"
++ Force the sender to rename the new file if a file with the same
++ name already exists.
++ .TP
++@@ -265,7 +265,7 @@
++ .TP
++ .B "-i COMMAND, --immediate-command COMMAND"
++ Send COMMAND to the receiver for execution, return immediately
++-upon the receiving program's successful recption of the command.
+++upon the receiving program's successful reception of the command.
++ .TP
++ .B "-k, --1k"
++ (XMODEM/YMODEM) Send files using 1024 byte blocks
++@@ -509,7 +509,7 @@
++ .RB ( \-a )
++ to end of line conventions appropriate to the receiving environment.
++ With ZMODEM AutoDownload enabled, Professional-YAM and ZCOMM
++-will automatically recieve
+++will automatically receive
++ the files after performing a security check.
++
++ .br
++@@ -592,8 +592,8 @@
++ the source file.
++ .SH "VMS VERSION"
++ The VMS version does not support wild cards.
++-Because of VMS DCL, upper case option letters muse be represented
++-by \\ proceding the letter.
+++Because of VMS DCL, upper case option letters must be represented
+++by \\ preceding the letter.
++
++ The current VMS version does not support XMODEM, XMODEM-1k, or YMODEM.
++
++@@ -682,7 +682,7 @@
++ The test mode leaves a zero length file on the receiving system.
++
++ A few high speed modems have a firmware bug that drops characters when the
++-direction of high speed transmissson is reversed.
+++direction of high speed transmission is reversed.
++ The environment variable ZNULLS may be used to specify the number of nulls to
++ send before a ZDATA frame.
++ Values of 101 for a 4.77 mHz PC and 124 for an AT are typical.
+--- lrzsz-0.12.21.orig/debian/patches/strstr.diff
++++ lrzsz-0.12.21/debian/patches/strstr.diff
+@@ -0,0 +1,20 @@
++--- lrzsz-0.12.21.orig/src/lrz.c
+++++ lrzsz-0.12.21/src/lrz.c
++@@ -44,7 +44,6 @@
++ #ifndef STRICT_PROTOTYPES
++ extern time_t time();
++ extern char *strerror();
++-extern char *strstr();
++ #endif
++
++ #ifndef HAVE_ERRNO_DECLARATION
++--- lrzsz-0.12.21.orig/src/lsz.c
+++++ lrzsz-0.12.21/src/lsz.c
++@@ -53,7 +53,6 @@
++ #ifndef STRICT_PROTOTYPES
++ extern time_t time();
++ extern char *strerror();
++-extern char *strstr();
++ #endif
++
++ #ifndef HAVE_ERRNO_DECLARATION
+--- lrzsz-0.12.21.orig/debian/patches/build.diff
++++ lrzsz-0.12.21/debian/patches/build.diff
+@@ -0,0 +1,2115 @@
++--- lrzsz-0.12.21.orig/Makefile.in
+++++ lrzsz-0.12.21/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -106,13 +105,13 @@
++
++ DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
++ INSTALL Makefile.am Makefile.in NEWS Specfile.in THANKS TODO acconfig.h \
++-acinclude.m4 aclocal.m4 config.guess config.h.in configure configure.in \
++-install-sh missing mkinstalldirs systype.in
+++acinclude.m4 aclocal.m4 config.guess config.h.in config.sub configure \
+++configure.in install-sh missing mkinstalldirs systype.in
++
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ all: all-redirect
++ .SUFFIXES:
++@@ -298,7 +297,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -340,7 +339,7 @@
++ all-am: Makefile $(SCRIPTS) config.h
++ all-redirect: all-recursive-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs: installdirs-recursive
++ installdirs-am:
++
++--- lrzsz-0.12.21.orig/aclocal.m4
+++++ lrzsz-0.12.21/aclocal.m4
++@@ -1,4 +1,4 @@
++-dnl aclocal.m4 generated automatically by aclocal 1.4a
+++dnl aclocal.m4 generated automatically by aclocal 1.4
++
++ dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ dnl This file is free software; the Free Software Foundation
++@@ -117,8 +117,6 @@
++
++ AC_DEFUN(AM_INIT_AUTOMAKE,
++ [AC_REQUIRE([AC_PROG_INSTALL])
++-dnl We require 2.13 because we rely on SHELL being computed by configure.
++-AC_PREREQ([2.13])
++ PACKAGE=[$1]
++ AC_SUBST(PACKAGE)
++ VERSION=[$2]
++--- lrzsz-0.12.21.orig/configure
+++++ lrzsz-0.12.21/configure
++@@ -703,7 +703,6 @@
++ fi
++
++
++-
++ PACKAGE=lrzsz
++
++ VERSION=0.12.21rc
++@@ -723,7 +722,7 @@
++
++ missing_dir=`cd $ac_aux_dir && pwd`
++ echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
++-echo "configure:727: checking for working aclocal" >&5
+++echo "configure:726: checking for working aclocal" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -736,7 +735,7 @@
++ fi
++
++ echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
++-echo "configure:740: checking for working autoconf" >&5
+++echo "configure:739: checking for working autoconf" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -749,7 +748,7 @@
++ fi
++
++ echo $ac_n "checking for working automake""... $ac_c" 1>&6
++-echo "configure:753: checking for working automake" >&5
+++echo "configure:752: checking for working automake" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -762,7 +761,7 @@
++ fi
++
++ echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
++-echo "configure:766: checking for working autoheader" >&5
+++echo "configure:765: checking for working autoheader" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -775,7 +774,7 @@
++ fi
++
++ echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
++-echo "configure:779: checking for working makeinfo" >&5
+++echo "configure:778: checking for working makeinfo" >&5
++ # Run test in a subshell; some versions of sh will print an error if
++ # an executable is not found, even if stderr is redirected.
++ # Redirect stdin to placate older versions of autoconf. Sigh.
++@@ -926,7 +925,7 @@
++ # Extract the first word of "gcc", so it can be a program name with args.
++ set dummy gcc; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:930: checking for $ac_word" >&5
+++echo "configure:929: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -956,7 +955,7 @@
++ # Extract the first word of "cc", so it can be a program name with args.
++ set dummy cc; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:960: checking for $ac_word" >&5
+++echo "configure:959: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1007,7 +1006,7 @@
++ # Extract the first word of "cl", so it can be a program name with args.
++ set dummy cl; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:1011: checking for $ac_word" >&5
+++echo "configure:1010: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1039,7 +1038,7 @@
++ fi
++
++ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
++-echo "configure:1043: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+++echo "configure:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
++
++ ac_ext=c
++ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
++@@ -1050,12 +1049,12 @@
++
++ cat > conftest.$ac_ext << EOF
++
++-#line 1054 "configure"
+++#line 1053 "configure"
++ #include "confdefs.h"
++
++ main(){return(0);}
++ EOF
++-if { (eval echo configure:1059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ ac_cv_prog_cc_works=yes
++ # If we can't run a trivial program, we are probably using a cross compiler.
++ if (./conftest; exit) 2>/dev/null; then
++@@ -1081,12 +1080,12 @@
++ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
++ fi
++ echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
++-echo "configure:1085: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+++echo "configure:1084: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
++ echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
++ cross_compiling=$ac_cv_prog_cc_cross
++
++ echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
++-echo "configure:1090: checking whether we are using GNU C" >&5
+++echo "configure:1089: checking whether we are using GNU C" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1095,7 +1094,7 @@
++ yes;
++ #endif
++ EOF
++-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+++if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
++ ac_cv_prog_gcc=yes
++ else
++ ac_cv_prog_gcc=no
++@@ -1114,7 +1113,7 @@
++ ac_save_CFLAGS="$CFLAGS"
++ CFLAGS=
++ echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
++-echo "configure:1118: checking whether ${CC-cc} accepts -g" >&5
+++echo "configure:1117: checking whether ${CC-cc} accepts -g" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1146,7 +1145,7 @@
++ fi
++
++ echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
++-echo "configure:1150: checking how to run the C preprocessor" >&5
+++echo "configure:1149: checking how to run the C preprocessor" >&5
++ # On Suns, sometimes $CPP names a directory.
++ if test -n "$CPP" && test -d "$CPP"; then
++ CPP=
++@@ -1161,13 +1160,13 @@
++ # On the NeXT, cc -E runs the code through the compiler's parser,
++ # not just through cpp.
++ cat > conftest.$ac_ext <<EOF
++-#line 1165 "configure"
+++#line 1164 "configure"
++ #include "confdefs.h"
++ #include <assert.h>
++ Syntax Error
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ :
++@@ -1178,13 +1177,13 @@
++ rm -rf conftest*
++ CPP="${CC-cc} -E -traditional-cpp"
++ cat > conftest.$ac_ext <<EOF
++-#line 1182 "configure"
+++#line 1181 "configure"
++ #include "confdefs.h"
++ #include <assert.h>
++ Syntax Error
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ :
++@@ -1195,13 +1194,13 @@
++ rm -rf conftest*
++ CPP="${CC-cc} -nologo -E"
++ cat > conftest.$ac_ext <<EOF
++-#line 1199 "configure"
+++#line 1198 "configure"
++ #include "confdefs.h"
++ #include <assert.h>
++ Syntax Error
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ :
++@@ -1235,13 +1234,13 @@
++ fi
++ if test $ac_cv_prog_gcc = yes; then
++ echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
++-echo "configure:1239: checking whether ${CC-cc} needs -traditional" >&5
+++echo "configure:1238: checking whether ${CC-cc} needs -traditional" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ ac_pattern="Autoconf.*'x'"
++ cat > conftest.$ac_ext <<EOF
++-#line 1245 "configure"
+++#line 1244 "configure"
++ #include "confdefs.h"
++ #include <sgtty.h>
++ Autoconf TIOCGETP
++@@ -1259,7 +1258,7 @@
++
++ if test $ac_cv_prog_gcc_traditional = no; then
++ cat > conftest.$ac_ext <<EOF
++-#line 1263 "configure"
+++#line 1262 "configure"
++ #include "confdefs.h"
++ #include <termio.h>
++ Autoconf TCGETA
++@@ -1283,7 +1282,7 @@
++ # Extract the first word of "ranlib", so it can be a program name with args.
++ set dummy ranlib; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:1287: checking for $ac_word" >&5
+++echo "configure:1286: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1311,7 +1310,7 @@
++ fi
++
++ echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
++-echo "configure:1315: checking for POSIXized ISC" >&5
+++echo "configure:1314: checking for POSIXized ISC" >&5
++ if test -d /etc/conf/kconfig.d &&
++ grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
++ then
++@@ -1332,9 +1331,9 @@
++ fi
++
++ echo $ac_n "checking for AIX""... $ac_c" 1>&6
++-echo "configure:1336: checking for AIX" >&5
+++echo "configure:1335: checking for AIX" >&5
++ cat > conftest.$ac_ext <<EOF
++-#line 1338 "configure"
+++#line 1337 "configure"
++ #include "confdefs.h"
++ #ifdef _AIX
++ yes
++@@ -1357,17 +1356,17 @@
++
++ ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
++-echo "configure:1361: checking for minix/config.h" >&5
+++echo "configure:1360: checking for minix/config.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1366 "configure"
+++#line 1365 "configure"
++ #include "confdefs.h"
++ #include <minix/config.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1408,7 +1407,7 @@
++
++
++ echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
++-echo "configure:1412: checking for ${CC-cc} option to accept ANSI C" >&5
+++echo "configure:1411: checking for ${CC-cc} option to accept ANSI C" >&5
++ if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -1424,7 +1423,7 @@
++ do
++ CC="$ac_save_CC $ac_arg"
++ cat > conftest.$ac_ext <<EOF
++-#line 1428 "configure"
+++#line 1427 "configure"
++ #include "confdefs.h"
++ #include <stdarg.h>
++ #include <stdio.h>
++@@ -1461,7 +1460,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:1464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ am_cv_prog_cc_stdc="$ac_arg"; break
++ else
++@@ -1487,7 +1486,7 @@
++
++
++ echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
++-echo "configure:1491: checking for function prototypes" >&5
+++echo "configure:1490: checking for function prototypes" >&5
++ if test "$am_cv_prog_cc_stdc" != no; then
++ echo "$ac_t""yes" 1>&6
++ cat >> confdefs.h <<\EOF
++@@ -1500,12 +1499,12 @@
++ U=_ ANSI2KNR=./ansi2knr
++ # Ensure some checks needed by ansi2knr itself.
++ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
++-echo "configure:1504: checking for ANSI C header files" >&5
+++echo "configure:1503: checking for ANSI C header files" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1509 "configure"
+++#line 1508 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ #include <stdarg.h>
++@@ -1513,7 +1512,7 @@
++ #include <float.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1530,7 +1529,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1534 "configure"
+++#line 1533 "configure"
++ #include "confdefs.h"
++ #include <string.h>
++ EOF
++@@ -1548,7 +1547,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1552 "configure"
+++#line 1551 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ EOF
++@@ -1569,7 +1568,7 @@
++ :
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1573 "configure"
+++#line 1572 "configure"
++ #include "confdefs.h"
++ #include <ctype.h>
++ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++@@ -1580,7 +1579,7 @@
++ exit (0); }
++
++ EOF
++-if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ :
++ else
++@@ -1607,17 +1606,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:1611: checking for $ac_hdr" >&5
+++echo "configure:1610: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1616 "configure"
+++#line 1615 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1646,12 +1645,12 @@
++ fi
++
++ echo $ac_n "checking for working const""... $ac_c" 1>&6
++-echo "configure:1650: checking for working const" >&5
+++echo "configure:1649: checking for working const" >&5
++ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1655 "configure"
+++#line 1654 "configure"
++ #include "confdefs.h"
++
++ int main() {
++@@ -1700,7 +1699,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_c_const=yes
++ else
++@@ -1721,21 +1720,21 @@
++ fi
++
++ echo $ac_n "checking for inline""... $ac_c" 1>&6
++-echo "configure:1725: checking for inline" >&5
+++echo "configure:1724: checking for inline" >&5
++ if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ ac_cv_c_inline=no
++ for ac_kw in inline __inline__ __inline; do
++ cat > conftest.$ac_ext <<EOF
++-#line 1732 "configure"
+++#line 1731 "configure"
++ #include "confdefs.h"
++
++ int main() {
++ } $ac_kw foo() {
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:1738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_c_inline=$ac_kw; break
++ else
++@@ -1786,7 +1785,7 @@
++ esac
++
++ echo $ac_n "checking for syslog in -lsocket""... $ac_c" 1>&6
++-echo "configure:1790: checking for syslog in -lsocket" >&5
+++echo "configure:1789: checking for syslog in -lsocket" >&5
++ ac_lib_var=`echo socket'_'syslog | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -1794,7 +1793,7 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-lsocket $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 1798 "configure"
+++#line 1797 "configure"
++ #include "confdefs.h"
++ /* Override any gcc2 internal prototype to avoid an error. */
++ /* We use char because int might match the return type of a gcc2
++@@ -1805,7 +1804,7 @@
++ syslog()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:1808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -1832,108 +1831,14 @@
++ echo "$ac_t""no" 1>&6
++ fi
++
++-echo $ac_n "checking for syslog in -lbe""... $ac_c" 1>&6
++-echo "configure:1837: checking for syslog in -lbe" >&5
++-ac_lib_var=`echo be'_'syslog | sed 'y%./+-%__p_%'`
++-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++- echo $ac_n "(cached) $ac_c" 1>&6
++-else
++- ac_save_LIBS="$LIBS"
++-LIBS="-lbe $LIBS"
++-cat > conftest.$ac_ext <<EOF
++-#line 1845 "configure"
++-#include "confdefs.h"
++-/* Override any gcc2 internal prototype to avoid an error. */
++-/* We use char because int might match the return type of a gcc2
++- builtin and then its argument prototype would still apply. */
++-char syslog();
++-
++-int main() {
++-syslog()
++-; return 0; }
++-EOF
++-if { (eval echo configure:1856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=yes"
++-else
++- echo "configure: failed program was:" >&5
++- cat conftest.$ac_ext >&5
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=no"
++-fi
++-rm -f conftest*
++-LIBS="$ac_save_LIBS"
++-
++-fi
++-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++- echo "$ac_t""yes" 1>&6
++- ac_tr_lib=HAVE_LIB`echo be | sed -e 's/[^a-zA-Z0-9_]/_/g' \
++- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
++- cat >> confdefs.h <<EOF
++-#define $ac_tr_lib 1
++-EOF
++-
++- LIBS="-lbe $LIBS"
++-
++-else
++- echo "$ac_t""no" 1>&6
++-fi
++-
++-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
++-echo "configure:1884: checking for gethostbyname in -lnsl" >&5
++-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
++-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++- echo $ac_n "(cached) $ac_c" 1>&6
++-else
++- ac_save_LIBS="$LIBS"
++-LIBS="-lnsl $LIBS"
++-cat > conftest.$ac_ext <<EOF
++-#line 1892 "configure"
++-#include "confdefs.h"
++-/* Override any gcc2 internal prototype to avoid an error. */
++-/* We use char because int might match the return type of a gcc2
++- builtin and then its argument prototype would still apply. */
++-char gethostbyname();
++-
++-int main() {
++-gethostbyname()
++-; return 0; }
++-EOF
++-if { (eval echo configure:1903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=yes"
++-else
++- echo "configure: failed program was:" >&5
++- cat conftest.$ac_ext >&5
++- rm -rf conftest*
++- eval "ac_cv_lib_$ac_lib_var=no"
++-fi
++-rm -f conftest*
++-LIBS="$ac_save_LIBS"
++-
++-fi
++-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++- echo "$ac_t""yes" 1>&6
++- ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
++- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
++- cat >> confdefs.h <<EOF
++-#define $ac_tr_lib 1
++-EOF
++-
++- LIBS="-lnsl $LIBS"
++-
++-else
++- echo "$ac_t""no" 1>&6
++-fi
++-
++
++ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
++-echo "configure:1932: checking for ANSI C header files" >&5
+++echo "configure:1931: checking for ANSI C header files" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 1937 "configure"
+++#line 1936 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ #include <stdarg.h>
++@@ -1941,7 +1846,7 @@
++ #include <float.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:1945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:1944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -1958,7 +1863,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1962 "configure"
+++#line 1961 "configure"
++ #include "confdefs.h"
++ #include <string.h>
++ EOF
++@@ -1976,7 +1881,7 @@
++ if test $ac_cv_header_stdc = yes; then
++ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
++ cat > conftest.$ac_ext <<EOF
++-#line 1980 "configure"
+++#line 1979 "configure"
++ #include "confdefs.h"
++ #include <stdlib.h>
++ EOF
++@@ -1997,7 +1902,7 @@
++ :
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2001 "configure"
+++#line 2000 "configure"
++ #include "confdefs.h"
++ #include <ctype.h>
++ #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
++@@ -2008,7 +1913,7 @@
++ exit (0); }
++
++ EOF
++-if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:2011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ :
++ else
++@@ -2035,17 +1940,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2039: checking for $ac_hdr" >&5
+++echo "configure:2038: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2044 "configure"
+++#line 2043 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2076,17 +1981,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2080: checking for $ac_hdr" >&5
+++echo "configure:2079: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2085 "configure"
+++#line 2084 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2116,17 +2021,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2120: checking for $ac_hdr" >&5
+++echo "configure:2119: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2125 "configure"
+++#line 2124 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2156,17 +2061,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2160: checking for $ac_hdr" >&5
+++echo "configure:2159: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2165 "configure"
+++#line 2164 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2196,17 +2101,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2200: checking for $ac_hdr" >&5
+++echo "configure:2199: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2205 "configure"
+++#line 2204 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2234,12 +2139,12 @@
++
++
++ echo $ac_n "checking for size_t""... $ac_c" 1>&6
++-echo "configure:2238: checking for size_t" >&5
+++echo "configure:2237: checking for size_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2243 "configure"
+++#line 2242 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2267,12 +2172,12 @@
++ fi
++
++ echo $ac_n "checking for mode_t""... $ac_c" 1>&6
++-echo "configure:2271: checking for mode_t" >&5
+++echo "configure:2270: checking for mode_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2276 "configure"
+++#line 2275 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2300,12 +2205,12 @@
++ fi
++
++ echo $ac_n "checking for off_t""... $ac_c" 1>&6
++-echo "configure:2304: checking for off_t" >&5
+++echo "configure:2303: checking for off_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2309 "configure"
+++#line 2308 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2334,12 +2239,12 @@
++
++
++ echo $ac_n "checking for speed_t""... $ac_c" 1>&6
++-echo "configure:2338: checking for speed_t" >&5
+++echo "configure:2337: checking for speed_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_speed_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2343 "configure"
+++#line 2342 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #if STDC_HEADERS
++@@ -2389,12 +2294,12 @@
++ fi
++
++ echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
++-echo "configure:2393: checking for st_rdev in struct stat" >&5
+++echo "configure:2392: checking for st_rdev in struct stat" >&5
++ if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2398 "configure"
+++#line 2397 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <sys/stat.h>
++@@ -2402,7 +2307,7 @@
++ struct stat s; s.st_rdev;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_struct_st_rdev=yes
++ else
++@@ -2423,12 +2328,12 @@
++ fi
++
++ echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
++-echo "configure:2427: checking whether time.h and sys/time.h may both be included" >&5
+++echo "configure:2426: checking whether time.h and sys/time.h may both be included" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2432 "configure"
+++#line 2431 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <sys/time.h>
++@@ -2437,7 +2342,7 @@
++ struct tm *tp;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_header_time=yes
++ else
++@@ -2459,12 +2364,12 @@
++
++
++ echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
++-echo "configure:2463: checking for socklen_t" >&5
+++echo "configure:2462: checking for socklen_t" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2468 "configure"
+++#line 2467 "configure"
++ #include "confdefs.h"
++
++ #include "confdefs.h"
++@@ -2480,7 +2385,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_type_socklen_t=yes
++ else
++@@ -2505,12 +2410,12 @@
++ fi
++
++ echo $ac_n "checking whether sys/time.h and sys/select.h may both be included""... $ac_c" 1>&6
++-echo "configure:2509: checking whether sys/time.h and sys/select.h may both be included" >&5
+++echo "configure:2508: checking whether sys/time.h and sys/select.h may both be included" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_header_sys_select'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2514 "configure"
+++#line 2513 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <sys/time.h>
++@@ -2519,7 +2424,7 @@
++ struct tm *tp;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ lrzsz_cv_header_sys_select=yes
++ else
++@@ -2540,12 +2445,12 @@
++ fi
++
++ echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
++-echo "configure:2544: checking whether struct tm is in sys/time.h or time.h" >&5
+++echo "configure:2543: checking whether struct tm is in sys/time.h or time.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2549 "configure"
+++#line 2548 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <time.h>
++@@ -2553,7 +2458,7 @@
++ struct tm *tp; tp->tm_sec;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_struct_tm=time.h
++ else
++@@ -2575,19 +2480,19 @@
++
++
++ echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
++-echo "configure:2579: checking for errno declaration" >&5
+++echo "configure:2578: checking for errno declaration" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_decl_errno'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2584 "configure"
+++#line 2583 "configure"
++ #include "confdefs.h"
++ #include <errno.h>
++ int main() {
++ int i = errno; errno = 1;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ lrzsz_cv_decl_errno=yes
++ else
++@@ -2610,7 +2515,7 @@
++
++ if test $cross_compiling = no ; then
++ echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
++-echo "configure:2614: checking whether setvbuf arguments are reversed" >&5
+++echo "configure:2613: checking whether setvbuf arguments are reversed" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -2618,7 +2523,7 @@
++ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2622 "configure"
+++#line 2621 "configure"
++ #include "confdefs.h"
++ #include <stdio.h>
++ /* If setvbuf has the reversed format, exit 0. */
++@@ -2632,7 +2537,7 @@
++ exit(0); /* Non-reversed systems segv here. */
++ }
++ EOF
++-if { (eval echo configure:2636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:2635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ ac_cv_func_setvbuf_reversed=yes
++ else
++@@ -2657,12 +2562,12 @@
++
++ fi
++ echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
++-echo "configure:2661: checking return type of signal handlers" >&5
+++echo "configure:2660: checking return type of signal handlers" >&5
++ if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2666 "configure"
+++#line 2665 "configure"
++ #include "confdefs.h"
++ #include <sys/types.h>
++ #include <signal.h>
++@@ -2679,7 +2584,7 @@
++ int i;
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+++if { (eval echo configure:2682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++ rm -rf conftest*
++ ac_cv_type_signal=void
++ else
++@@ -2701,17 +2606,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:2705: checking for $ac_hdr" >&5
+++echo "configure:2704: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2710 "configure"
+++#line 2709 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:2715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:2714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -2740,12 +2645,12 @@
++ for ac_func in getpagesize
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:2744: checking for $ac_func" >&5
+++echo "configure:2743: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2749 "configure"
+++#line 2748 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -2768,7 +2673,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -2793,7 +2698,7 @@
++ done
++
++ echo $ac_n "checking for working mmap""... $ac_c" 1>&6
++-echo "configure:2797: checking for working mmap" >&5
+++echo "configure:2796: checking for working mmap" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -2801,7 +2706,7 @@
++ ac_cv_func_mmap_fixed_mapped=no
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2805 "configure"
+++#line 2804 "configure"
++ #include "confdefs.h"
++
++ /* Thanks to Mike Haertel and Jim Avera for this test.
++@@ -2941,7 +2846,7 @@
++ }
++
++ EOF
++-if { (eval echo configure:2945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ ac_cv_func_mmap_fixed_mapped=yes
++ else
++@@ -2966,19 +2871,19 @@
++ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
++ # for constant arguments. Useless!
++ echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
++-echo "configure:2970: checking for working alloca.h" >&5
+++echo "configure:2969: checking for working alloca.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 2975 "configure"
+++#line 2974 "configure"
++ #include "confdefs.h"
++ #include <alloca.h>
++ int main() {
++ char *p = alloca(2 * sizeof(int));
++ ; return 0; }
++ EOF
++-if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ ac_cv_header_alloca_h=yes
++ else
++@@ -2999,12 +2904,12 @@
++ fi
++
++ echo $ac_n "checking for alloca""... $ac_c" 1>&6
++-echo "configure:3003: checking for alloca" >&5
+++echo "configure:3002: checking for alloca" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3008 "configure"
+++#line 3007 "configure"
++ #include "confdefs.h"
++
++ #ifdef __GNUC__
++@@ -3032,7 +2937,7 @@
++ char *p = (char *) alloca(1);
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ ac_cv_func_alloca_works=yes
++ else
++@@ -3064,12 +2969,12 @@
++
++
++ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
++-echo "configure:3068: checking whether alloca needs Cray hooks" >&5
+++echo "configure:3067: checking whether alloca needs Cray hooks" >&5
++ if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3073 "configure"
+++#line 3072 "configure"
++ #include "confdefs.h"
++ #if defined(CRAY) && ! defined(CRAY2)
++ webecray
++@@ -3094,12 +2999,12 @@
++ if test $ac_cv_os_cray = yes; then
++ for ac_func in _getb67 GETB67 getb67; do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3098: checking for $ac_func" >&5
+++echo "configure:3097: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3103 "configure"
+++#line 3102 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3122,7 +3027,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3149,7 +3054,7 @@
++ fi
++
++ echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
++-echo "configure:3153: checking stack direction for C alloca" >&5
+++echo "configure:3152: checking stack direction for C alloca" >&5
++ if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -3157,7 +3062,7 @@
++ ac_cv_c_stack_direction=0
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3161 "configure"
+++#line 3160 "configure"
++ #include "confdefs.h"
++ find_stack_direction ()
++ {
++@@ -3176,7 +3081,7 @@
++ exit (find_stack_direction() < 0);
++ }
++ EOF
++-if { (eval echo configure:3180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:3179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ ac_cv_c_stack_direction=1
++ else
++@@ -3198,7 +3103,7 @@
++ fi
++
++ cat > conftest.$ac_ext <<EOF
++-#line 3202 "configure"
+++#line 3201 "configure"
++ #include "confdefs.h"
++ #include <utime.h>
++ EOF
++@@ -3216,12 +3121,12 @@
++ for ac_func in gettimeofday settimeofday
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3220: checking for $ac_func" >&5
+++echo "configure:3219: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3225 "configure"
+++#line 3224 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3244,7 +3149,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3271,12 +3176,12 @@
++ for ac_func in strchr memcpy select vprintf
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3275: checking for $ac_func" >&5
+++echo "configure:3274: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3280 "configure"
+++#line 3279 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3299,7 +3204,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3326,12 +3231,12 @@
++ for ac_func in times rdchk utime syslog siginterrupt
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3330: checking for $ac_func" >&5
+++echo "configure:3329: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3335 "configure"
+++#line 3334 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3354,7 +3259,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3381,12 +3286,12 @@
++ for ac_func in mkdir mktime strerror strstr strdup strtoul strtol strpbrk
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3385: checking for $ac_func" >&5
+++echo "configure:3384: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3390 "configure"
+++#line 3389 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3409,7 +3314,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3438,12 +3343,12 @@
++ for ac_func in stpcpy strftime vasprintf
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3442: checking for $ac_func" >&5
+++echo "configure:3441: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3447 "configure"
+++#line 3446 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3466,7 +3371,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3494,12 +3399,12 @@
++
++
++ echo $ac_n "checking for getopt_long""... $ac_c" 1>&6
++-echo "configure:3498: checking for getopt_long" >&5
+++echo "configure:3497: checking for getopt_long" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_getopt_long'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3503 "configure"
+++#line 3502 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char getopt_long(); below. */
++@@ -3522,7 +3427,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_getopt_long=yes"
++ else
++@@ -3552,12 +3457,12 @@
++
++
++ echo $ac_n "checking for ftime""... $ac_c" 1>&6
++-echo "configure:3556: checking for ftime" >&5
+++echo "configure:3555: checking for ftime" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_ftime'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3561 "configure"
+++#line 3560 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char ftime(); below. */
++@@ -3580,7 +3485,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_ftime=yes"
++ else
++@@ -3595,7 +3500,7 @@
++ if eval "test \"`echo '$ac_cv_func_'ftime`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ echo $ac_n "checking that ftime works correctly""... $ac_c" 1>&6
++-echo "configure:3599: checking that ftime works correctly" >&5
+++echo "configure:3598: checking that ftime works correctly" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_sys_ftime_ok'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -3603,7 +3508,7 @@
++ lrzsz_cv_sys_ftime_ok=runtime
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3607 "configure"
+++#line 3606 "configure"
++ #include "confdefs.h"
++
++ #include <sys/types.h>
++@@ -3632,7 +3537,7 @@
++ }
++
++ EOF
++-if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+++if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
++ then
++ lrzsz_cv_sys_ftime_ok=yes
++ else
++@@ -3666,20 +3571,20 @@
++
++
++ echo $ac_n "checking for timezone variable""... $ac_c" 1>&6
++-echo "configure:3670: checking for timezone variable" >&5
+++echo "configure:3669: checking for timezone variable" >&5
++ if eval "test \"`echo '$''{'libquark_cv_var_timezone'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++
++ cat > conftest.$ac_ext <<EOF
++-#line 3676 "configure"
+++#line 3675 "configure"
++ #include "confdefs.h"
++ #include <time.h>
++ int main() {
++ return(int)(timezone/2);
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ libquark_cv_var_timezone=yes
++ else
++@@ -3705,13 +3610,13 @@
++ :
++ else
++ echo $ac_n "checking for $lookup_facility""... $ac_c" 1>&6
++-echo "configure:3709: checking for $lookup_facility" >&5
+++echo "configure:3708: checking for $lookup_facility" >&5
++ if eval "test \"`echo '$''{'lrzsz_cv_lookup_facility'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++
++ cat > conftest.$ac_ext <<EOF
++-#line 3715 "configure"
+++#line 3714 "configure"
++ #include "confdefs.h"
++
++ #ifdef HAVE_SYSLOG_H
++@@ -3763,17 +3668,17 @@
++ do
++ ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
++-echo "configure:3767: checking for $ac_hdr" >&5
+++echo "configure:3766: checking for $ac_hdr" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3772 "configure"
+++#line 3771 "configure"
++ #include "confdefs.h"
++ #include <$ac_hdr>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:3777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:3776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -3803,12 +3708,12 @@
++ strdup __argz_count __argz_stringify __argz_next
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3807: checking for $ac_func" >&5
+++echo "configure:3806: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3812 "configure"
+++#line 3811 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3831,7 +3736,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3860,12 +3765,12 @@
++ for ac_func in stpcpy
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:3864: checking for $ac_func" >&5
+++echo "configure:3863: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3869 "configure"
+++#line 3868 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -3888,7 +3793,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -3922,19 +3827,19 @@
++
++ if test $ac_cv_header_locale_h = yes; then
++ echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
++-echo "configure:3926: checking for LC_MESSAGES" >&5
+++echo "configure:3925: checking for LC_MESSAGES" >&5
++ if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 3931 "configure"
+++#line 3930 "configure"
++ #include "confdefs.h"
++ #include <locale.h>
++ int main() {
++ return LC_MESSAGES
++ ; return 0; }
++ EOF
++-if { (eval echo configure:3938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ am_cv_val_LC_MESSAGES=yes
++ else
++@@ -3955,7 +3860,7 @@
++ fi
++ fi
++ echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
++-echo "configure:3959: checking whether NLS is requested" >&5
+++echo "configure:3958: checking whether NLS is requested" >&5
++ # Check whether --enable-nls or --disable-nls was given.
++ if test "${enable_nls+set}" = set; then
++ enableval="$enable_nls"
++@@ -3975,7 +3880,7 @@
++ EOF
++
++ echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
++-echo "configure:3979: checking whether included gettext is requested" >&5
+++echo "configure:3978: checking whether included gettext is requested" >&5
++ # Check whether --with-included-gettext or --without-included-gettext was given.
++ if test "${with_included_gettext+set}" = set; then
++ withval="$with_included_gettext"
++@@ -3994,17 +3899,17 @@
++
++ ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
++-echo "configure:3998: checking for libintl.h" >&5
+++echo "configure:3997: checking for libintl.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4003 "configure"
+++#line 4002 "configure"
++ #include "confdefs.h"
++ #include <libintl.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:4008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:4007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++@@ -4021,19 +3926,19 @@
++ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
++-echo "configure:4025: checking for gettext in libc" >&5
+++echo "configure:4024: checking for gettext in libc" >&5
++ if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4030 "configure"
+++#line 4029 "configure"
++ #include "confdefs.h"
++ #include <libintl.h>
++ int main() {
++ return (int) gettext ("")
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ gt_cv_func_gettext_libc=yes
++ else
++@@ -4049,7 +3954,7 @@
++
++ if test "$gt_cv_func_gettext_libc" != "yes"; then
++ echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
++-echo "configure:4053: checking for bindtextdomain in -lintl" >&5
+++echo "configure:4052: checking for bindtextdomain in -lintl" >&5
++ ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -4057,7 +3962,7 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-lintl $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 4061 "configure"
+++#line 4060 "configure"
++ #include "confdefs.h"
++ /* Override any gcc2 internal prototype to avoid an error. */
++ /* We use char because int might match the return type of a gcc2
++@@ -4068,7 +3973,7 @@
++ bindtextdomain()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -4084,12 +3989,12 @@
++ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
++ echo "$ac_t""yes" 1>&6
++ echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
++-echo "configure:4088: checking for gettext in libintl" >&5
+++echo "configure:4087: checking for gettext in libintl" >&5
++ if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
++-echo "configure:4093: checking for gettext in -lintl" >&5
+++echo "configure:4092: checking for gettext in -lintl" >&5
++ ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -4097,7 +4002,7 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-lintl $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 4101 "configure"
+++#line 4100 "configure"
++ #include "confdefs.h"
++ /* Override any gcc2 internal prototype to avoid an error. */
++ /* We use char because int might match the return type of a gcc2
++@@ -4108,7 +4013,7 @@
++ gettext()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -4147,7 +4052,7 @@
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++ set dummy msgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4151: checking for $ac_word" >&5
+++echo "configure:4150: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4181,12 +4086,12 @@
++ for ac_func in dcgettext
++ do
++ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
++-echo "configure:4185: checking for $ac_func" >&5
+++echo "configure:4184: checking for $ac_func" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4190 "configure"
+++#line 4189 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char $ac_func(); below. */
++@@ -4209,7 +4114,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++ else
++@@ -4236,7 +4141,7 @@
++ # Extract the first word of "gmsgfmt", so it can be a program name with args.
++ set dummy gmsgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4240: checking for $ac_word" >&5
+++echo "configure:4239: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4272,7 +4177,7 @@
++ # Extract the first word of "xgettext", so it can be a program name with args.
++ set dummy xgettext; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4276: checking for $ac_word" >&5
+++echo "configure:4275: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4304,7 +4209,7 @@
++ fi
++
++ cat > conftest.$ac_ext <<EOF
++-#line 4308 "configure"
+++#line 4307 "configure"
++ #include "confdefs.h"
++
++ int main() {
++@@ -4312,7 +4217,7 @@
++ return _nl_msg_cat_cntr
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ CATOBJEXT=.gmo
++ DATADIRNAME=share
++@@ -4335,7 +4240,7 @@
++
++ if test "$CATOBJEXT" = "NONE"; then
++ echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
++-echo "configure:4339: checking whether catgets can be used" >&5
+++echo "configure:4338: checking whether catgets can be used" >&5
++ # Check whether --with-catgets or --without-catgets was given.
++ if test "${with_catgets+set}" = set; then
++ withval="$with_catgets"
++@@ -4348,7 +4253,7 @@
++
++ if test "$nls_cv_use_catgets" = "yes"; then
++ echo $ac_n "checking for main in -li""... $ac_c" 1>&6
++-echo "configure:4352: checking for main in -li" >&5
+++echo "configure:4351: checking for main in -li" >&5
++ ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
++ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++@@ -4356,14 +4261,14 @@
++ ac_save_LIBS="$LIBS"
++ LIBS="-li $LIBS"
++ cat > conftest.$ac_ext <<EOF
++-#line 4360 "configure"
+++#line 4359 "configure"
++ #include "confdefs.h"
++
++ int main() {
++ main()
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_lib_$ac_lib_var=yes"
++ else
++@@ -4391,12 +4296,12 @@
++ fi
++
++ echo $ac_n "checking for catgets""... $ac_c" 1>&6
++-echo "configure:4395: checking for catgets" >&5
+++echo "configure:4394: checking for catgets" >&5
++ if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4400 "configure"
+++#line 4399 "configure"
++ #include "confdefs.h"
++ /* System header to define __stub macros and hopefully few prototypes,
++ which can conflict with char catgets(); below. */
++@@ -4419,7 +4324,7 @@
++
++ ; return 0; }
++ EOF
++-if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+++if { (eval echo configure:4422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
++ rm -rf conftest*
++ eval "ac_cv_func_catgets=yes"
++ else
++@@ -4441,7 +4346,7 @@
++ # Extract the first word of "gencat", so it can be a program name with args.
++ set dummy gencat; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4445: checking for $ac_word" >&5
+++echo "configure:4444: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4477,7 +4382,7 @@
++ # Extract the first word of "gmsgfmt", so it can be a program name with args.
++ set dummy gmsgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4481: checking for $ac_word" >&5
+++echo "configure:4480: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4514,7 +4419,7 @@
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++ set dummy msgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4518: checking for $ac_word" >&5
+++echo "configure:4517: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4549,7 +4454,7 @@
++ # Extract the first word of "xgettext", so it can be a program name with args.
++ set dummy xgettext; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4553: checking for $ac_word" >&5
+++echo "configure:4552: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4607,7 +4512,7 @@
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++ set dummy msgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4611: checking for $ac_word" >&5
+++echo "configure:4610: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4641,7 +4546,7 @@
++ # Extract the first word of "gmsgfmt", so it can be a program name with args.
++ set dummy gmsgfmt; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4645: checking for $ac_word" >&5
+++echo "configure:4644: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4677,7 +4582,7 @@
++ # Extract the first word of "xgettext", so it can be a program name with args.
++ set dummy xgettext; ac_word=$2
++ echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
++-echo "configure:4681: checking for $ac_word" >&5
+++echo "configure:4680: checking for $ac_word" >&5
++ if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++@@ -4770,7 +4675,7 @@
++ LINGUAS=
++ else
++ echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
++-echo "configure:4774: checking for catalogs to be installed" >&5
+++echo "configure:4773: checking for catalogs to be installed" >&5
++ NEW_LINGUAS=
++ for lang in ${LINGUAS=$ALL_LINGUAS}; do
++ case "$ALL_LINGUAS" in
++@@ -4798,17 +4703,17 @@
++ if test "$CATOBJEXT" = ".cat"; then
++ ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
++ echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
++-echo "configure:4802: checking for linux/version.h" >&5
+++echo "configure:4801: checking for linux/version.h" >&5
++ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&6
++ else
++ cat > conftest.$ac_ext <<EOF
++-#line 4807 "configure"
+++#line 4806 "configure"
++ #include "confdefs.h"
++ #include <linux/version.h>
++ EOF
++ ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
++-{ (eval echo configure:4812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+++{ (eval echo configure:4811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
++ ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
++ if test -z "$ac_err"; then
++ rm -rf conftest*
++--- lrzsz-0.12.21.orig/lib/Makefile.in
+++++ lrzsz-0.12.21/lib/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -127,7 +126,7 @@
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ DEP_FILES = .deps/alloca.P .deps/error.P .deps/getopt.P .deps/getopt1.P \
++ .deps/long-options.P .deps/mkdir.P .deps/mktime.P .deps/stpcpy.P \
++@@ -282,7 +281,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -343,7 +342,7 @@
++ all-am: Makefile $(ANSI2KNR) $(LIBRARIES) $(HEADERS)
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++
++
++--- lrzsz-0.12.21.orig/man/Makefile.in
+++++ lrzsz-0.12.21/man/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -106,7 +105,7 @@
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ all: all-redirect
++ .SUFFIXES:
++@@ -173,7 +172,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -202,7 +201,7 @@
++ all-am: Makefile $(MANS)
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
++
++--- lrzsz-0.12.21.orig/src/Makefile.in
+++++ lrzsz-0.12.21/src/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -45,10 +45,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -132,7 +131,7 @@
++
++ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ DEP_FILES = .deps/canit.P .deps/crctab.P .deps/lrz.P .deps/lsyslog.P \
++ .deps/lsz.P .deps/protname.P .deps/rbsb.P .deps/tcp.P .deps/timing.P \
++@@ -167,8 +166,8 @@
++ $(mkinstalldirs) $(DESTDIR)$(bindir)
++ @list='$(bin_PROGRAMS)'; for p in $$list; do \
++ if test -f $$p; then \
++- echo " $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
++- $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+++ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+++ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
++ else :; fi; \
++ done
++
++@@ -292,7 +291,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -353,7 +352,7 @@
++ all-am: Makefile $(ANSI2KNR) $(PROGRAMS) $(HEADERS)
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++ $(mkinstalldirs) $(DESTDIR)$(bindir)
++
++--- lrzsz-0.12.21.orig/testsuite/Makefile.in
+++++ lrzsz-0.12.21/testsuite/Makefile.in
++@@ -1,4 +1,4 @@
++-# Makefile.in generated automatically by automake 1.4a from Makefile.am
+++# Makefile.in generated automatically by automake 1.4 from Makefile.am
++
++ # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
++ # This Makefile.in is free software; the Free Software Foundation
++@@ -46,10 +46,9 @@
++ AUTOHEADER = @AUTOHEADER@
++
++ INSTALL = @INSTALL@
++-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+++INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
++ INSTALL_DATA = @INSTALL_DATA@
++ INSTALL_SCRIPT = @INSTALL_SCRIPT@
++-INSTALL_STRIP_FLAG =
++ transform = @program_transform_name@
++
++ NORMAL_INSTALL = :
++@@ -103,7 +102,7 @@
++ DIST_COMMON = Makefile.am Makefile.in
++
++
++-TAR = gtar
+++TAR = tar
++ GZIP_ENV = --best
++ EXPECT = expect
++ RUNTEST = runtest
++@@ -133,7 +132,7 @@
++ @for file in $(DISTFILES); do \
++ d=$(srcdir); \
++ if test -d $$d/$$file; then \
++- cp -pr $$d/$$file $(distdir)/$$file; \
+++ cp -pr $$/$$file $(distdir)/$$file; \
++ else \
++ test -f $(distdir)/$$file \
++ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
++@@ -192,7 +191,7 @@
++ all-am: Makefile
++ all-redirect: all-am
++ install-strip:
++- $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
+++ $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
++ installdirs:
++
++
+--- lrzsz-0.12.21.orig/debian/patches/cat-id-tbl.diff
++++ lrzsz-0.12.21/debian/patches/cat-id-tbl.diff
+@@ -0,0 +1,118 @@
++--- lrzsz-0.12.21.orig/po/cat-id-tbl.c
+++++ lrzsz-0.12.21/po/cat-id-tbl.c
++@@ -141,22 +141,23 @@
++ {"\
++ \n\
++ countem: Total %d %ld\n", 84},
++- {"Bad escape sequence %x", 85},
++- {"Sender Canceled", 86},
++- {"TIMEOUT", 87},
++- {"Bad data subpacket", 88},
++- {"Data subpacket too long", 89},
++- {"Garbage count exceeded", 90},
++- {"Got %s", 91},
++- {"Retry %d: ", 92},
++- {"don't have settimeofday, will not set time\n", 93},
++- {"not running as root (this is good!), can not set time\n", 94},
++- {"bytes_per_error", 95},
++- {"bytes-per-error should be >100", 96},
++- {"O_SYNC not supported by the kernel", 97},
++- {"garbage on commandline", 98},
++- {"Usage: %s [options] [filename.if.xmodem]\n", 99},
++- {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 100},
+++ {"Bad CRC", 85},
+++ {"Bad escape sequence %x", 86},
+++ {"Sender Canceled", 87},
+++ {"TIMEOUT", 88},
+++ {"Bad data subpacket", 89},
+++ {"Data subpacket too long", 90},
+++ {"Garbage count exceeded", 91},
+++ {"Got %s", 92},
+++ {"Retry %d: ", 93},
+++ {"don't have settimeofday, will not set time\n", 94},
+++ {"not running as root (this is good!), can not set time\n", 95},
+++ {"bytes_per_error", 96},
+++ {"bytes-per-error should be >100", 97},
+++ {"O_SYNC not supported by the kernel", 98},
+++ {"garbage on commandline", 99},
+++ {"Usage: %s [options] [filename.if.xmodem]\n", 100},
+++ {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
++ {"\
++ -+, --append append to existing files\n\
++ -a, --ascii ASCII transfer (change CR/LF to LF)\n\
++@@ -193,41 +194,41 @@
++ --ymodem use YMODEM protocol\n\
++ -Z, --zmodem use ZMODEM protocol\n\
++ \n\
++-short options use the same arguments as the long ones\n", 101},
++- {"%s waiting to receive.", 102},
++- {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 103},
++- {"%s: ready to receive %s", 104},
++- {"\rBytes received: %7ld BPS:%-6ld \r\n", 105},
+++short options use the same arguments as the long ones\n", 102},
+++ {"%s waiting to receive.", 103},
+++ {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 104},
+++ {"%s: ready to receive %s", 105},
+++ {"\rBytes received: %7ld BPS:%-6ld \r\n", 106},
++ {"\
++ \r\n\
++-%s: %s removed.\r\n", 106},
++- {"Pathname fetch returned EOT", 107},
++- {"Received dup Sector", 108},
++- {"Sync Error", 109},
++- {"CRC", 110},
++- {"Checksum", 111},
++- {"Sector number garbled", 112},
++- {"Sender Cancelled", 113},
++- {"Got 0%o sector header", 114},
++- {"file name ends with a /, skipped: %s\n", 115},
++- {"zmanag=%d, Lzmanag=%d\n", 116},
++- {"zconv=%d\n", 117},
++- {"file exists, skipped: %s\n", 118},
++- {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 119},
++- {"TIMESYNC: cannot set time: %s\n", 120},
++- {"Topipe", 121},
++- {"Receiving: %s\n", 122},
++- {"Blocks received: %d", 123},
++- {"%s: %s exists\n", 124},
++- {"%s:\tSecurity Violation", 125},
++- {"remote command execution requested", 126},
++- {"not executed", 127},
++- {"got ZRINIT", 128},
++- {"Skipped", 129},
++- {"rzfile: bps rate %ld below min %ld", 130},
++- {"rzfile: reached stop time", 131},
++- {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 132},
++- {"file close error", 133},
+++%s: %s removed.\r\n", 107},
+++ {"Pathname fetch returned EOT", 108},
+++ {"Received dup Sector", 109},
+++ {"Sync Error", 110},
+++ {"CRC", 111},
+++ {"Checksum", 112},
+++ {"Sector number garbled", 113},
+++ {"Sender Cancelled", 114},
+++ {"Got 0%o sector header", 115},
+++ {"file name ends with a /, skipped: %s\n", 116},
+++ {"zmanag=%d, Lzmanag=%d\n", 117},
+++ {"zconv=%d\n", 118},
+++ {"file exists, skipped: %s\n", 119},
+++ {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
+++ {"TIMESYNC: cannot set time: %s\n", 121},
+++ {"Topipe", 122},
+++ {"Receiving: %s\n", 123},
+++ {"Blocks received: %d", 124},
+++ {"%s: %s exists\n", 125},
+++ {"%s:\tSecurity Violation", 126},
+++ {"remote command execution requested", 127},
+++ {"not executed", 128},
+++ {"got ZRINIT", 129},
+++ {"Skipped", 130},
+++ {"rzfile: bps rate %ld below min %ld", 131},
+++ {"rzfile: reached stop time", 132},
+++ {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 133},
+++ {"file close error", 134},
++ };
++
++-int _msg_tbl_length = 133;
+++int _msg_tbl_length = 134;
+--- lrzsz-0.12.21.orig/debian/patches/206499_ymodemg.diff.unchecked
++++ lrzsz-0.12.21/debian/patches/206499_ymodemg.diff.unchecked
+@@ -0,0 +1,70 @@
++--- org/lrz.c 1998-12-29 23:49:24.000000000 -0800
+++++ lrz.c 2003-08-21 15:15:15.000000000 -0700
++@@ -73,6 +73,7 @@
++
++ int Lastrx;
++ int Crcflg;
+++int Optiong;
++ int Firstsec;
++ int errors;
++ int Restricted=1; /* restricted; no /.. or ../ in filenames */
++@@ -211,6 +212,7 @@
++ {"allow-remote-commands", no_argument, NULL, 'C'},
++ {"escape", no_argument, NULL, 'e'},
++ {"rename", no_argument, NULL, 'E'},
+++ {"go", no_argument, NULL, 'g'},
++ {"help", no_argument, NULL, 'h'},
++ {"crc-check", no_argument, NULL, 'H'},
++ {"junk-path", no_argument, NULL, 'j'},
++@@ -288,7 +290,7 @@
++ parse_long_options (argc, argv, show_version, usage1);
++
++ while ((c = getopt_long (argc, argv,
++- "a+bB:cCDeEhm:M:OprRqs:St:uUvw:XZy",
+++ "a+bB:cCDeEghm:M:OprRqs:St:uUvw:XZy",
++ long_options, (int *) 0)) != EOF)
++ {
++ unsigned long int tmp;
++@@ -313,6 +315,7 @@
++ case 'D': Nflag = TRUE; break;
++ case 'E': Lzmanag = ZF1_ZMCHNG; break;
++ case 'e': Zctlesc = 1; break;
+++ case 'g': Optiong = 1; break;
++ case 'h': usage(0,NULL); break;
++ case 'H': Lzmanag= ZF1_ZMCRC; break;
++ case 'j': junk_path=TRUE; break;
++@@ -617,6 +620,7 @@
++ " -e, --escape Escape control characters (Z)\n"
++ " -E, --rename rename any files already existing\n"
++ " --errors N generate CRC error every N bytes (debugging)\n"
+++" -g, --go use X/YMODEM-g protocol (with CRC)\n"
++ " -h, --help Help, print this usage message\n"
++ " -m, --min-bps N stop transmission if BPS below N\n"
++ " -M, --min-bps-time N for at least N seconds (default: 120)\n"
++@@ -843,7 +847,7 @@
++ et_tu:
++ Firstsec=TRUE;
++ zi->eof_seen=FALSE;
++- sendline(Crcflg?WANTCRC:NAK);
+++ sendline(Optiong?WANTG:(Crcflg?WANTCRC:NAK));
++ flushmo();
++ purgeline(0); /* Do read next time ... */
++ while ((c = wcgetsec(&Blklen, rpn, 100)) != 0) {
++@@ -875,7 +879,7 @@
++
++ Firstsec=TRUE;sectnum=0;
++ zi->eof_seen=FALSE;
++- sendchar=Crcflg?WANTCRC:NAK;
+++ sendchar=(Optiong?WANTG:(Crcflg?WANTCRC:NAK));
++
++ for (;;) {
++ sendline(sendchar); /* send it now, we're ready! */
++@@ -1007,7 +1011,7 @@
++ ;
++ }
++ if (Firstsec) {
++- sendline(Crcflg?WANTCRC:NAK);
+++ sendline(Optiong?WANTG:(Crcflg?WANTCRC:NAK));
++ flushmo();
++ purgeline(0); /* Do read next time ... */
++ } else {
+--- lrzsz-0.12.21.orig/debian/patches/313992_de_po.diff
++++ lrzsz-0.12.21/debian/patches/313992_de_po.diff
+@@ -0,0 +1,650 @@
++--- lrzsz-0.12.21.orig/po/de.po
+++++ lrzsz-0.12.21/po/de.po
++@@ -1,17 +1,18 @@
++-# german translation of lrzsz output
++-# Copyright (C) 1997 Uwe Ohse
++-# Uwe Ohse <uwe@ohse.de>, 1997.
+++# German translation of lrzsz
+++# Copyright (C) Uwe Ohse <uwe@ohse.de>, 1997.
+++# Copyright (C) Tobias Toedter <t.toedter@gmx.net>, 2005, 2006.
++ #
++ msgid ""
++ msgstr ""
++-"Project-Id-Version: PACKAGE VERSION\n"
+++"Project-Id-Version: lrzsz 0.12.21\n"
++ "POT-Creation-Date: 1999-08-22 21:00+0200\n"
++-"PO-Revision-Date: 1997-06-01 19:00+0200\n"
++-"Last-Translator: FULL NAME <uwe@ohse.de>\n"
++-"Language-Team: none. try <uwe@ohse.de>\n"
+++"PO-Revision-Date: 2006-01-12 10:23+0100\n"
+++"Last-Translator: Tobias Toedter <t.toedter@gmx.net>\n"
+++"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
++ "MIME-Version: 1.0\n"
++-"Content-Type: text/plain; charset=iso-8859-1\n"
+++"Content-Type: text/plain; charset=UTF-8\n"
++ "Content-Transfer-Encoding: 8bit\n"
+++"X-Generator: KBabel 1.10.2\n"
++
++ #: src/lsz.c:228
++ msgid "io_mode(,2) in rbsb.c not implemented\n"
++@@ -28,21 +29,21 @@
++
++ #: src/lsz.c:422
++ msgid "packetlength"
++-msgstr "Paketl?nge"
+++msgstr "Paketlänge"
++
++ #: src/lsz.c:427
++ #, c-format
++ msgid "packetlength out of range 24..%ld"
++-msgstr "Argument der Option L au?erhalb des Bereichs 24..%ld"
+++msgstr "Argument der Option L außerhalb des Bereichs 24..%ld"
++
++ #: src/lsz.c:436
++ msgid "framelength"
++-msgstr "Framel?nge"
+++msgstr "Framelänge"
++
++ #: src/lsz.c:441
++ #, c-format
++ msgid "framelength out of range 32..%ld"
++-msgstr "Argument der Option l au?erhalb des Bereichs 32..%ld"
+++msgstr "Argument der Option l außerhalb des Bereichs 32..%ld"
++
++ #: src/lrz.c:318 src/lsz.c:450
++ msgid "min_bps"
++@@ -50,27 +51,27 @@
++
++ #: src/lsz.c:452
++ msgid "min_bps must be >= 0"
++-msgstr "minimale BPS-Rate mu? >= 0 sein"
+++msgstr "minimale BPS-Rate muss >= 0 sein"
++
++ #: src/lrz.c:324 src/lsz.c:458
++ msgid "min_bps_time"
++-msgstr ""
+++msgstr "Zeitfenster für minimale BPS-Rate"
++
++ #: src/lrz.c:326 src/lsz.c:460
++ msgid "min_bps_time must be > 1"
++-msgstr "Zeitfenster f?r minimale BPS-Rate mu? > 1 Sekunde sein"
+++msgstr "Zeitfenster für minimale BPS-Rate muss > 1 Sekunde sein"
++
++ #: src/lrz.c:342 src/lsz.c:484
++ msgid "hour to large (0..23)"
++-msgstr "Stunde zu gross (0..23)"
+++msgstr "Stunde zu groß (0..23)"
++
++ #: src/lrz.c:344 src/lsz.c:486
++ msgid "unparsable stop time\n"
++-msgstr "unparsbare Endzeit\n"
+++msgstr "Endzeit nicht auszuwerten\n"
++
++ #: src/lrz.c:348 src/lsz.c:490
++ msgid "minute to large (0..59)"
++-msgstr "Minute zu gro? (0..59)"
+++msgstr "Minute zu groß (0..59)"
++
++ #: src/lrz.c:358 src/lrz.c:365 src/lsz.c:500 src/lsz.c:507
++ msgid "stop time to small"
++@@ -78,7 +79,7 @@
++
++ #: src/lrz.c:363 src/lsz.c:505
++ msgid "stop-at"
++-msgstr ""
+++msgstr "Stopp um"
++
++ #: src/lrz.c:394 src/lsz.c:516
++ msgid "timeout"
++@@ -86,15 +87,15 @@
++
++ #: src/lrz.c:396 src/lsz.c:518
++ msgid "timeout out of range 10..1000"
++-msgstr "Argument der Option t au?erhalb des Bereichs 10..1000"
+++msgstr "Argument der Option t außerhalb des Bereichs 10..1000"
++
++ #: src/lrz.c:412 src/lsz.c:526
++ msgid "security violation: can't do that under restricted shell\n"
++-msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten\n"
+++msgstr "Sicherheitsverstoß: Ausführung unter eingeschränkter Shell verboten\n"
++
++ #: src/lrz.c:402 src/lsz.c:533
++ msgid "window size"
++-msgstr "Fenstergr??e"
+++msgstr "Fenstergröße"
++
++ #: src/lrz.c:427 src/lrz.c:434 src/lsz.c:556 src/lsz.c:563
++ msgid "cannot turnoff syslog"
++@@ -102,7 +103,7 @@
++
++ #: src/lrz.c:449 src/lsz.c:571
++ msgid "startup delay"
++-msgstr "Startverz?gerung"
+++msgstr "Startverzögerung"
++
++ #: src/lrz.c:465 src/lrz.c:483 src/lrz.c:760 src/lrz.c:1122 src/lrz.c:1244
++ #: src/lrz.c:1292 src/lrz.c:1309 src/lrz.c:1324 src/lrz.c:1423 src/lsz.c:580
++@@ -117,11 +118,11 @@
++
++ #: src/lsz.c:612 src/lsz.c:627
++ msgid "need at least one file to send"
++-msgstr "es mu? mindestens ein Name einer zu sendenden Datei angegeben werden"
+++msgstr "es muss mindestens ein Name einer zu sendenden Datei angegeben werden"
++
++ #: src/lsz.c:629
++ msgid "Can't send command in restricted mode\n"
++-msgstr "Im eingeschr?nkten Modus ist das Senden von Kommandos verboten\n"
+++msgstr "Im eingeschränkten Modus ist das Senden von Kommandos verboten\n"
++
++ #: src/lrz.c:527 src/lsz.c:656
++ msgid "hostname too long\n"
++@@ -129,7 +130,7 @@
++
++ #: src/lrz.c:542 src/lsz.c:671
++ msgid "illegal server address\n"
++-msgstr "Illegale Serveraddresse\n"
+++msgstr "Illegale Serveradresse\n"
++
++ #: src/lsz.c:710
++ msgid "can read only one file from stdin"
++@@ -137,21 +138,21 @@
++
++ #: src/lrz.c:574 src/lsz.c:803
++ msgid "Transfer incomplete\n"
++-msgstr "?bertragung nicht abgeschlossen\n"
+++msgstr "Ãœbertragung nicht abgeschlossen\n"
++
++ #: src/lrz.c:576 src/lsz.c:805
++ msgid "Transfer complete\n"
++-msgstr "?bertragung abgeschlossen\n"
+++msgstr "Ãœbertragung abgeschlossen\n"
++
++ #: src/lsz.c:838
++ #, c-format
++ msgid "send_pseudo %s: cannot open tmpfile %s: %s"
++-msgstr "send_pseudo %s: kann tempor?re Datei %s nicht ?ffnen: %s"
+++msgstr "send_pseudo %s: kann temporäre Datei %s nicht öffnen: %s"
++
++ #: src/lsz.c:851
++ #, c-format
++ msgid "send_pseudo %s: cannot lstat tmpfile %s: %s"
++-msgstr "send_pseudo %s: kann lstat nicht auf tempor?re Datei %s anwenden: %s"
+++msgstr "send_pseudo %s: kann lstat nicht auf temporäre Datei %s anwenden: %s"
++
++ #: src/lsz.c:859
++ #, c-format
++@@ -161,7 +162,7 @@
++ #: src/lsz.c:870
++ #, c-format
++ msgid "send_pseudo %s: cannot write to tmpfile %s: %s"
++-msgstr "send_pseudo %s: kann nicht in tempor?re Datei %s schreiben: %s"
+++msgstr "send_pseudo %s: kann nicht in temporäre Datei %s schreiben: %s"
++
++ #: src/lsz.c:879
++ #, c-format
++@@ -188,17 +189,17 @@
++
++ #: src/lsz.c:953
++ msgid "Can't open any requested files."
++-msgstr "Kann keine der angeforderten Dateien ?ffnen"
+++msgstr "Kann keine der angeforderten Dateien öffnen"
++
++ #: src/lsz.c:1009
++ #, c-format
++ msgid "security violation: not allowed to upload from %s"
++-msgstr "Sicherheitsversto?: Ausf?hrung unter eingeschr?nkter Shell verboten"
+++msgstr "Sicherheitsverstoß: Hochladen von %s nicht erlaubt"
++
++ #: src/lrz.c:1384 src/lsz.c:1027
++ #, c-format
++ msgid "cannot open %s"
++-msgstr "kann %s nicht ?ffnen"
+++msgstr "kann %s nicht öffnen"
++
++ #: src/lsz.c:1082
++ #, c-format
++@@ -213,12 +214,12 @@
++ #: src/lsz.c:1119
++ #, c-format
++ msgid "skipped: %s"
++-msgstr "?bersprungen: %s"
+++msgstr "übersprungen: %s"
++
++ #: src/lsz.c:1122
++ #, c-format
++ msgid "%s/%s: skipped"
++-msgstr "%s/%s: ?bersprungen"
+++msgstr "%s/%s: übersprungen"
++
++ #: src/lsz.c:1149
++ #, c-format
++@@ -228,7 +229,7 @@
++ #: src/lsz.c:1178
++ #, c-format
++ msgid "Sending %s, %ld blocks: "
++-msgstr "Sende %s, %ld Bl?cke:"
+++msgstr "Sende %s, %ld Blöcke:"
++
++ #: src/lsz.c:1181
++ msgid "Give your local XMODEM receive command now."
++@@ -245,11 +246,11 @@
++
++ #: src/lsz.c:1314
++ msgid "Receiver Cancelled"
++-msgstr "Empf?nger brach ab"
+++msgstr "Empfänger brach ab"
++
++ #: src/lsz.c:1340
++ msgid "No ACK on EOT"
++-msgstr "Keine Best?tigung f?r ?bertragungsende erhalten"
+++msgstr "Keine Bestätigung für Übertragungsende erhalten"
++
++ #: src/lsz.c:1361
++ #, c-format
++@@ -267,24 +268,24 @@
++
++ #: src/lsz.c:1399
++ msgid "Timeout on sector ACK"
++-msgstr "Timeout bei Sektorbest?tigung"
+++msgstr "Timeout bei Sektorbestätigung"
++
++ #: src/lsz.c:1404
++ msgid "NAK on sector"
++-msgstr "Sektor nicht best?tigt"
+++msgstr "Sektor nicht bestätigt"
++
++ #: src/lsz.c:1410
++ msgid "Got burst for sector ACK"
++-msgstr ""
+++msgstr "Erhielt Bruch als Sektorbestätigung"
++
++ #: src/lsz.c:1412
++ #, c-format
++ msgid "Got %02x for sector ACK"
++-msgstr "Erhielt %02x als Sektorbest?tigung"
+++msgstr "Erhielt %02x als Sektorbestätigung"
++
++ #: src/lsz.c:1424
++ msgid "Retry Count Exceeded"
++-msgstr "Maximale Wiederholungsanzahl ?berschritten"
+++msgstr "Maximale Wiederholungsanzahl überschritten"
++
++ #: src/lrz.c:596 src/lsz.c:1502
++ #, c-format
++@@ -304,11 +305,11 @@
++ #: src/lsz.c:1512
++ #, c-format
++ msgid " or: %s [options] -{c|i} COMMAND\n"
++-msgstr " oder: %s [Optionen] -{c|i} KOMMANDO\n"
+++msgstr " oder: %s [-2Ceqv] -{c|i} KOMMANDO\n"
++
++ #: src/lsz.c:1513
++ msgid "Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n"
++-msgstr "Dateien mit ZMODEM/YMODEM/XMODEM ?bertragen\n"
+++msgstr "Dateien mit ZMODEM/YMODEM/XMODEM übertragen\n"
++
++ # src/lrz.c:475 src/lsz.c:1330 xx
++ #: src/lrz.c:607 src/lsz.c:1515
++@@ -317,9 +318,9 @@
++ " (Y) = option applies to YMODEM only\n"
++ " (Z) = option applies to ZMODEM only\n"
++ msgstr ""
++-" (X) = Option gilt nur f?r XMODEM\n"
++-" (Y) = Option gilt nur f?r YMODEM\n"
++-" (Z) = Option gilt nur f?r ZMODEM\n"
+++" (X) = Option gilt nur für XMODEM\n"
+++" (Y) = Option gilt nur für YMODEM\n"
+++" (Z) = Option gilt nur für ZMODEM\n"
++
++ #: src/lsz.c:1521
++ msgid ""
++@@ -347,32 +348,32 @@
++ " -m, --min-bps N stop transmission if BPS below N\n"
++ " -M, --min-bps-time N for at least N seconds (default: 120)\n"
++ msgstr ""
++-" -+, --append an existierende Dateien anh?ngen (Z)\n"
+++" -+, --append an existierende Dateien anhängen (Z)\n"
++ " -2, --twostop zwei Stopbits verwenden\n"
++-" -4, --try-4k bis zu 4K Blockgr??e verwenden\n"
++-" --start-4k mit 4K Blockgr??e starten (versucht nicht 8)\n"
++-" -8, --try-8k bis zu 8K Blockgr??e verwenden\n"
++-" --start-8k mit 8K Blockgr??e starten\n"
+++" -4, --try-4k bis zu 4K Blockgröße verwenden\n"
+++" --start-4k mit 4K Blockgröße starten (versucht nicht 8)\n"
+++" -8, --try-8k bis zu 8K Blockgröße verwenden\n"
+++" --start-8k mit 8K Blockgröße starten\n"
++ " -a, --ascii ASCII: NL nach CR/LF wandeln\n"
++-" -b, --binary Bin?r?bertragung erzwingen\n"
+++" -b, --binary Binärübertragung erzwingen\n"
++ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
++-" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausf?hren "
+++" -c, --command COMMAND Kommando KOMMANDO auf Gegenseite ausführen "
++ "(Z)\n"
++-" -C, --command-tries N N mal Kommandoausf?hrung versuchen (Z)\n"
+++" -C, --command-tries N N mal Kommandoausführung versuchen (Z)\n"
++ " -d, --dot-to-slash C '.' in Dateinamen nach '/' wandeln (Y/Z)\n"
++ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
++ " -e, --escape alle Steuerzeichen escapen (Z)\n"
++-" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+++" -E, --rename Empfänger soll Datei umbenennen falls\n"
++ " Zieldatei schon existiert\n"
++ " -f, --full-path Dateien mit vollen Pfaden senden (Y/Z)\n"
++-" -i, --immediate-command CMD wie `c', aber sofort zur?ckkehren (Z)\n"
+++" -i, --immediate-command CMD wie `c', aber sofort zurückkehren (Z)\n"
++ " -h, --help diesen Hilfetext ausgeben\n"
++ " -k, --1k 1024 Bytes Pakete senden (Y)\n"
++-" -L, --packetlen N Unterpaketl?nge auf N Bytes beschr?nken (Z)\n"
++-" -l, --framelen N Rahmenl?nge auf N Bytes beschr?nken (l>=L) "
+++" -L, --packetlen N Unterpaketlänge auf N Bytes beschränken (Z)\n"
+++" -l, --framelen N Rahmenlänge auf N Bytes beschränken (l>=L) "
++ "(Z)\n"
++-" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++-" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+++" -m, --min-bps N Ãœbertragung abbrechen bei weniger als N BPS\n"
+++" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++
++ #: src/lsz.c:1546
++ msgid ""
++@@ -400,28 +401,28 @@
++ "short options use the same arguments as the long ones\n"
++ msgstr ""
++ " -n, --newer Datei senden wenn sie neuer ist (Z)\n"
++-" -N, --newer-or-longer Datei senden wenn neuer oder l?nger (Z)\n"
+++" -N, --newer-or-longer Datei senden wenn neuer oder länger (Z)\n"
++ " -o, --16-bit-crc 16Bit CRC statt 32Bit CRC verwenden (Z)\n"
++ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
++-" -p, --protect existierende Dateien nicht ver?ndern\n"
++-" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++-" -R, --restricted eingeschr?nkter, sichererer Modus\n"
+++" -p, --protect existierende Dateien nicht verändern\n"
+++" -r, --resume unterbrochene Ãœbertragungen fortsetzen (Z)\n"
+++" -R, --restricted eingeschränkter, sichererer Modus\n"
++ " -q, --quiet leise, keine Ausgaben machen\n"
++-" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
++-" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++-" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
++-" -u, --unlink Datei nach ?bertragung l?schen\n"
++-" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+++" -s, --stop-at {HH:MM|+N} Ãœbertragung um HH:MM oder in N Sek. abbrechen\n"
+++" --tcp-server Socket öffnen, Verbindung abwarten (Z)\n"
+++" --tcp-client ADDR:PORT Socket öffnen, verbinden mit ... (Z)\n"
+++" -u, --unlink Datei nach Übertragung löschen\n"
+++" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++ "erlaubt)\n"
++ " -v, --verbose mehr ausgeben\n"
++-" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+++" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++ " -X --xmodem XMODEM-Protokoll benutzen\n"
++-" -y, --overwrite existierende Dateien ?berschreiben\n"
++-" -Y, --overwrite-or-skip wie `y', aber nicht existierende ?berspringen\n"
+++" -y, --overwrite existierende Dateien überschreiben\n"
+++" -Y, --overwrite-or-skip wie `y', aber nicht existierende überspringen\n"
++ " --ymodem YMODEM-Protokoll benutzen\n"
++ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
++ "\n"
++-"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+++"Kurze Optionen benötigen dieselben Argumente wie die langen.\n"
++
++ #: src/lsz.c:1768
++ msgid "got ZRQINIT"
++@@ -434,7 +435,7 @@
++ #: src/lsz.c:1991
++ #, c-format
++ msgid "blklen now %d\n"
++-msgstr "Blockgr??e nun %d\n"
+++msgstr "Blockgröße nun %d\n"
++
++ #: src/lsz.c:2053
++ #, c-format
++@@ -453,7 +454,7 @@
++ #: src/lsz.c:2223
++ #, c-format
++ msgid "calc_blklen: reduced to %d due to error\n"
++-msgstr "calc_blklen: Blockgr?sse auf %d reduziert wegen Fehler\n"
+++msgstr "calc_blklen: Blockgröße auf %d reduziert wegen Fehler\n"
++
++ #: src/lsz.c:2256
++ #, c-format
++@@ -468,12 +469,12 @@
++ #: src/lsz.c:2267
++ #, c-format
++ msgid "calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n"
++-msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%le, ec=%ld\n"
+++msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%ld, ec=%ld\n"
++
++ #: src/lsz.c:2278
++ #, c-format
++ msgid "calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n"
++-msgstr "calc_blklen: Blockl?nge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
+++msgstr "calc_blklen: Blocklänge %d, ok %ld, fehlgeschlagen %ld -> %lu\n"
++
++ #: src/lsz.c:2290
++ #, c-format
++@@ -512,7 +513,7 @@
++
++ #: src/zm.c:712
++ msgid "Garbage count exceeded"
++-msgstr "Maximale Wiederholungsanzahl ?berschritten"
+++msgstr "Maximale Wiederholungsanzahl überschritten"
++
++ #: src/zm.c:773
++ #, c-format
++@@ -526,11 +527,11 @@
++
++ #: src/lrz.c:382
++ msgid "don't have settimeofday, will not set time\n"
++-msgstr "Zeitsynchronisation nicht ausf?hrbar, settimeofday() fehlt\n"
+++msgstr "Zeitsynchronisation nicht ausführbar, settimeofday() fehlt\n"
++
++ #: src/lrz.c:386
++ msgid "not running as root (this is good!), can not set time\n"
++-msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausf?hrbar\n"
+++msgstr "Zeitsynchronisation mangels Superuserrechten nicht ausführbar\n"
++
++ #: src/lrz.c:441
++ msgid "bytes_per_error"
++@@ -542,16 +543,16 @@
++
++ #: src/lrz.c:455
++ msgid "O_SYNC not supported by the kernel"
++-msgstr "O_SYNC vom Kernel nicht unterst?tzt"
+++msgstr "O_SYNC vom Kernel nicht unterstützt"
++
++ #: src/lrz.c:497 src/lrz.c:499
++ msgid "garbage on commandline"
++-msgstr "M?ll auf der Kommandozeile"
+++msgstr "Müll auf der Kommandozeile"
++
++ #: src/lrz.c:604
++ #, c-format
++ msgid "Usage: %s [options] [filename.if.xmodem]\n"
++-msgstr "Benutzung: %s [Optionen] [Dateiname.f?r.xmodem]\n"
+++msgstr "Benutzung: %s [Optionen] [Dateiname.für.xmodem]\n"
++
++ #: src/lrz.c:605
++ msgid "Receive files with ZMODEM/YMODEM/XMODEM protocol\n"
++@@ -596,44 +597,44 @@
++ "\n"
++ "short options use the same arguments as the long ones\n"
++ msgstr ""
++-" -+, --append an existierende Dateien anh?ngen\n"
++-" -a, --ascii ASCII-?bertragung (CR/LF nach LF wandeln)\n"
++-" -b, --binary Bin?r?bertragung (keine Umwandlungen)\n"
+++" -+, --append an existierende Dateien anhängen\n"
+++" -a, --ascii ASCII-Ãœbertragung (CR/LF nach LF wandeln)\n"
+++" -b, --binary Binärübertragung (keine Umwandlungen)\n"
++ " -B, --bufsize N N Bytes puffern (auto: ganze Datei puffern)\n"
++-" -c, --with-crc 16bit CRC statt Pr?fsumme verwenden (X)\n"
++-" -C, --allow-remote-commands Ausf?hrung von Kommandos erlauben (Z)\n"
+++" -c, --with-crc 16bit CRC statt Prüfsumme verwenden (X)\n"
+++" -C, --allow-remote-commands Ausführung von Kommandos erlauben (Z)\n"
++ " -D, --null empfangene Daten nach /dev/null schreiben\n"
++ " --delay-startup N Bei Programmstart N Sek. schlafen (Debugging)\n"
++ " -e, --escape Alle Steuerzeichen escapen (Z)\n"
++-" -E, --rename Empf?nger soll Datei umbenennen falls\n"
+++" -E, --rename Empfänger soll Datei umbenennen, falls\n"
++ " Zieldatei schon existiert\n"
++ " --errors N Einen CRC-Fehler alle N Bytes erzeugen\n"
++ " -h, --help Diesen Hilfstext ausgeben\n"
++-" -m, --min-bps N ?bertragung abbrechen bei weniger als N BPS\n"
++-" -M, --min-bps-time N f?r mindestens N Sekunden (Default: 120)\n"
+++" -m, --min-bps N Ãœbertragung abbrechen bei weniger als N BPS\n"
+++" -M, --min-bps-time N für mindestens N Sekunden (Default: 120)\n"
++ " -O, --disable-timeouts Timeoutbehandlung abschalten\n"
++ " --o-sync Ausgabedatei(en) im synchron schreiben\n"
++-" -p, --protect existierende Dateien nicht ver?ndern\n"
+++" -p, --protect existierende Dateien nicht verändern\n"
++ " -q, --quiet leise, keine Ausgaben machen\n"
++-" -r, --resume unterbrochene ?bertragungen fortsetzen (Z)\n"
++-" -R, --restricted eingeschr?nkter, sichererer Modus\n"
++-" -s, --stop-at {HH:MM|+N} ?bertragung um HH:MM oder in N Sek. abbrechen\n"
+++" -r, --resume unterbrochene Ãœbertragungen fortsetzen (Z)\n"
+++" -R, --restricted eingeschränkter, sichererer Modus\n"
+++" -s, --stop-at {HH:MM|+N} Ãœbertragung um HH:MM oder in N Sek. abbrechen\n"
++ " -S, --timesync Zeit anfordern (doppelt: lokale Zeit setzen)\n"
++-" --syslog[=off] syslog an- oder ausschalten, wenn m?glich\n"
++-" -t, --timeout N Timeout auf N Zehntelsekungen setzen\n"
++-" --tcp-server Socket ?ffnen und auf Verbindung warten\n"
++-" --tcp-client ADDR:PORT Socket ?ffnen und verbindung mit ...\n"
+++" --syslog[=off] syslog an- oder ausschalten, wenn möglich\n"
+++" -t, --timeout N Timeout auf N Zehntelsekunden setzen\n"
+++" --tcp-server Socket öffnen, Verbindung abwarten (Z)\n"
+++" --tcp-client ADDR:PORT Socket öffnen, verbinden mit ... (Z)\n"
++ " -u, --keep-uppercase GROSS geschrieben Dateinamen beibehalten\n"
++-" -U, --unrestrict eingeschr?nkten Modus aufheben (falls "
+++" -U, --unrestrict eingeschränkten Modus aufheben (falls "
++ "erlaubt)\n"
++ " -v, --verbose mehr ausgeben\n"
++-" -w, --windowsize N Fenstergr??e auf N Bytes setzen (Z)\n"
+++" -w, --windowsize N Fenstergröße auf N Bytes setzen (Z)\n"
++ " -X --xmodem XMODEM-Protokoll benutzen\n"
++-" -y, --overwrite existierende Dateien ?berschreiben\n"
+++" -y, --overwrite existierende Dateien überschreiben\n"
++ " --ymodem YMODEM-Protokoll benutzen\n"
++ " -Z, --zmodem ZMODEM-Protokoll benutzen\n"
++ "\n"
++-"Kurze Optionen ben?tigen dieselben Argumente wie Lange.\n"
+++"Kurze Optionen benötigen dieselben Argumente wie die langen.\n"
++
++ #: src/lrz.c:676
++ #, c-format
++@@ -662,11 +663,11 @@
++ "%s: %s removed.\r\n"
++ msgstr ""
++ "\r\n"
++-"%s: %s gel?scht\r\n"
+++"%s: %s gelöscht\r\n"
++
++ #: src/lrz.c:856
++ msgid "Pathname fetch returned EOT"
++-msgstr "Ende der ?bertragung beim Warten auf Dateinamen"
+++msgstr "Ende der Ãœbertragung beim Warten auf Dateinamen"
++
++ #: src/lrz.c:903
++ msgid "Received dup Sector"
++@@ -682,7 +683,7 @@
++
++ #: src/lrz.c:976
++ msgid "Checksum"
++-msgstr "Pr?fsummenfehler"
+++msgstr "Prüfsummenfehler"
++
++ #: src/lrz.c:979
++ msgid "Sector number garbled"
++@@ -695,27 +696,27 @@
++ #: src/lrz.c:1005
++ #, c-format
++ msgid "Got 0%o sector header"
++-msgstr "Erhielt %02x als Sektorbest?tigung"
+++msgstr "Erhielt %02x als Sektorbestätigung"
++
++ #: src/lrz.c:1113
++ #, c-format
++ msgid "file name ends with a /, skipped: %s\n"
++-msgstr "Dateiname endet mit /, ?bersprungen: %s\n"
+++msgstr "Dateiname endet mit /, übersprungen: %s\n"
++
++ #: src/lrz.c:1127
++ #, c-format
++ msgid "zmanag=%d, Lzmanag=%d\n"
++-msgstr ""
+++msgstr "zmanag=%d, Lzmanag=%d\n"
++
++ #: src/lrz.c:1128
++ #, c-format
++ msgid "zconv=%d\n"
++-msgstr ""
+++msgstr "zconv=%d\n"
++
++ #: src/lrz.c:1192 src/lrz.c:1226
++ #, c-format
++ msgid "file exists, skipped: %s\n"
++-msgstr "Datei existiert, ?bersprungen: %s\n"
+++msgstr "Datei existiert, übersprungen: %s\n"
++
++ #: src/lrz.c:1267
++ #, c-format
++@@ -739,7 +740,7 @@
++ #: src/lrz.c:1545
++ #, c-format
++ msgid "Blocks received: %d"
++-msgstr "Bl?cke empfangen: %d"
+++msgstr "Blöcke empfangen: %d"
++
++ #: src/lrz.c:1599
++ #, c-format
++@@ -749,15 +750,15 @@
++ #: src/lrz.c:1612 src/lrz.c:1620
++ #, c-format
++ msgid "%s:\tSecurity Violation"
++-msgstr "%s:\tSicherheitsversto?"
+++msgstr "%s:\tSicherheitsverstoß"
++
++ #: src/lrz.c:1730
++ msgid "remote command execution requested"
++-msgstr "Gegenseite versucht Kommandoausf?hrung"
+++msgstr "Gegenseite versucht Kommandoausführung"
++
++ #: src/lrz.c:1737
++ msgid "not executed"
++-msgstr "nicht ausgef?hrt"
+++msgstr "nicht ausgeführt"
++
++ #: src/lrz.c:1768
++ msgid "got ZRINIT"
++@@ -765,7 +766,7 @@
++
++ #: src/lrz.c:1817
++ msgid "Skipped"
++-msgstr "?bersprungen"
+++msgstr "Ãœbersprungen"
++
++ #. too bad
++ #: src/lrz.c:2049
++@@ -785,7 +786,7 @@
++
++ #: src/lrz.c:2215
++ msgid "file close error"
++-msgstr "Fehler beim Schlie?en der Datei"
+++msgstr "Fehler beim Schließen der Datei"
++
++ #~ msgid "tcp protocol init failed\n"
++ #~ msgstr "TCP Protokoll Initialisierung fehlgeschlagen\n"
++@@ -796,17 +797,3 @@
++ #~ msgid "fgets for tcp protocol synchronization failed: "
++ #~ msgstr "fgets() bei tcp Protokoll Synchronisation fehlgeschlagen: "
++
++-#~ msgid "Transfer complete."
++-#~ msgstr "?bertragung abgeschlossen"
++-
++-#~ msgid "at"
++-#~ msgstr "um"
++-
++-#~ msgid "TIMESYNC: failed\n"
++-#~ msgstr "Zeitsynchronisation: fehlgeschlagen\n"
++-
++-#~ msgid "TIMESYNC: ok\n"
++-#~ msgstr "Zeitsynchronisation: ok\n"
++-
++-#~ msgid "Falldown to %ld blklen"
++-#~ msgstr "Blockgr??e auf %ld gesenkt"
diff --git a/patches/source/minicom/minicom.SlackBuild b/patches/source/minicom/minicom.SlackBuild
new file mode 100755
index 00000000..c245ed9f
--- /dev/null
+++ b/patches/source/minicom/minicom.SlackBuild
@@ -0,0 +1,160 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 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.
+
+
+VERSION=2.7.1
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-minicom
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# minicom
+cd $TMP
+rm -rf minicom-$VERSION
+tar xvf $CWD/minicom-$VERSION.tar.xz || exit 1
+cd minicom-$VERSION
+
+# The following command renames the internal implementation of getline
+# to g_getline as newer versions of Glibc provide an incompatible version:
+#sed -i -e "s/getline/g_&/" $(grep -lr getline *)
+
+chown -R root:root .
+find . -perm 777 -exec chmod 755 {} \;
+find . -perm 664 -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/etc
+zcat $CWD/minicom.users.gz > $PKG/etc/minicom.users.new
+printf "# Machine-generated file - use \"minicom -s\" to change parameters.\n" \
+ > $PKG/etc/minirc.dfl.new
+
+mkdir -p $PKG/usr/doc/minicom-$VERSION
+cp -a \
+ AUTHORS COPYING* ChangeLog FILE_ID.DIZ INSTALL NEWS README* TODO doc \
+ $PKG/usr/doc/minicom-$VERSION
+rm -f $PKG/usr/doc/minicom-$VERSION/doc/{ChangeLog.old,Makefile*}
+
+# 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
+
+# lzrz
+
+cd $TMP
+rm -rf lrzsz-990823
+tar xvf $CWD/lrzsz_0.12.21.orig.tar.gz || exit 1
+cd lrzsz-990823
+chown -R root:root .
+
+# Make x86_64 a valid machine type (thanks to Fred Emmott)
+zcat $CWD/config.sub-x86_64.diff.gz | patch -p1 --verbose || exit 1
+
+# Apply some of the debian patches
+zcat $CWD/lrzsz_0.12.21-5.diff.gz | patch -p1 --verbose || exit 1
+rm -f debian/patches/{206499_ymodemg.diff.unchecked,206648_dszlog.diff.unchecked}
+for i in debian/patches/* ; do patch -p1 < $i || exit 1 ; done
+
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+touch stamp-h.in # to stop autoheader from running
+touch -d yesterday aclocal.m4 # to stop automake from running
+
+make $NUMJOBS || make || exit 1
+
+cp src/lrz src/lsz $PKG/usr/bin
+chmod 0755 $PKG/usr/bin/{lrz,lsz}
+
+cp man/{lrz,lsz}.1 $PKG/usr/man/man1
+echo '.so man1/lrz.1' > $PKG/usr/man/man1/rz.1
+echo '.so man1/lsz.1' > $PKG/usr/man/man1/sz.1
+
+mkdir -p $PKG/usr/share/locale/de/LC_MESSAGES
+cat po/de.gmo > $PKG/usr/share/locale/de/LC_MESSAGES/lrzsz.mo
+
+mkdir -p $PKG/usr/doc/lrzsz-0.12.21
+cp -a \
+ AUTHORS COMPATABILITY COPYING* INSTALL NEWS README* THANKS TODO \
+ $PKG/usr/doc/lrzsz-0.12.21
+
+( cd $PKG/usr/bin
+ for i in lrb lrx rz ; do ln -s lrz $i ; done
+ for i in lsb lsx sz ; do ln -s lsz $i ; done
+ for i in rx rb ; do ln -s rz $i ; done
+ for i in sb sx ; do ln -s sz $i ; done
+)
+
+( 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
+)
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+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/minicom-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/minicom/minicom.users b/patches/source/minicom/minicom.users
new file mode 100644
index 00000000..509d86f4
--- /dev/null
+++ b/patches/source/minicom/minicom.users
@@ -0,0 +1,36 @@
+# $Id: minicom.users,v 1.1.1.1 1999/12/18 11:18:51 misiek Exp $
+# Minicom.users Access file for the minicom program.
+#
+# Format: Either just one username per line, or
+# a username followed by one or more
+# configuration-names. The name of the
+# default configuration is "dfl". The maximum
+# significant line length is 70 characters.
+#
+# Location: The minicom library directory, probably
+# /etc or /var/lib/minicom or whatever.
+#
+# Notes: If you don't install this file in the
+# specified location, everybody will have
+# access to minicom.
+#
+# This doesn't matter if minicom isn't installed
+# setuid root since access will then be based
+# on the permissions set on the serial port.
+#
+
+#
+# Who may use minicom?
+#
+# User [line] [..line]
+#
+
+# Everyone has access to all configurations.
+ALL
+
+## The rest are examples.
+## # Erik only has access to the default configuration
+## erik dfl
+##
+## # minicom has access to the default configuration, and configuration 'tty5'.
+## minicom dfl tty5
diff --git a/patches/source/minicom/slack-desc b/patches/source/minicom/slack-desc
new file mode 100644
index 00000000..4aa6302b
--- /dev/null
+++ b/patches/source/minicom/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------------------------------------------------------|
+minicom: minicom (communications package)
+minicom:
+minicom: Minicom - a full featured menu-driven communications package similar
+minicom: to the DOS program 'Telix'. Also includes sz/rz - utilities used to
+minicom: upload and download files using the Zmodem protocol.
+minicom:
+minicom: Homepage: http://alioth.debian.org/projects/minicom
+minicom:
+minicom:
+minicom:
+minicom:
diff --git a/patches/source/mkinitrd/README.initrd b/patches/source/mkinitrd/README.initrd
new file mode 100644
index 00000000..c10bb630
--- /dev/null
+++ b/patches/source/mkinitrd/README.initrd
@@ -0,0 +1,99 @@
+
+Slackware initrd mini HOWTO
+by Patrick Volkerding, volkerdi@slackware.com
+@DATE@
+
+This document describes how to create and install an initrd, which may be
+required to use some features of the kernel. Also see "man mkinitrd".
+
+1. What is an initrd?
+2. Why to I need an initrd?
+3. How do I build the initrd?
+4. Now that I've built an initrd, how do I use it?
+
+
+1. What is an initrd?
+
+Initrd stands for "initial ramdisk". An initial ramdisk is a very small
+Linux filesystem that is loaded into RAM and mounted as the kernel boots,
+and before the main root filesystem is mounted.
+
+2. Why do I need an initrd?
+
+The usual reason to use an initrd is because you need to load kernel
+modules before mounting the root partition. Usually these modules are
+required to support the filesystem used by the root partition (ext3,
+reiserfs, xfs), or perhaps the controller that the hard drive is attached
+to (SCSI, RAID, etc). Essentially, there are so many different options
+available in modern Linux kernels that it isn't practical to try to ship
+many different kernels to try to cover everyone's needs. It's a lot more
+flexible to ship a generic kernel and a set of kernel modules for it.
+
+3. How do I build the initrd?
+
+The easiest way to make the initrd is to use the mkinitrd script included
+in Slackware's mkinitrd package. We'll walk through the process of
+upgrading to the generic @KERNEL_VERSION@ Linux kernel using the packages
+found in Slackware's slackware/a/ directory.
+
+First, make sure the kernel, kernel modules, and mkinitrd package are
+installed (the current version numbers might be a little different, so
+this is just an example):
+
+ installpkg kernel-generic-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
+ installpkg kernel-modules-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
+ installpkg mkinitrd-@MKINITRD_VERSION@-@ARCH@-@BUILD@.tgz
+
+Change into the /boot directory:
+
+ cd /boot
+
+Now you'll want to run "mkinitrd". I'm using ext4 for my root
+filesystem, and since mkinitrd should figure out any other modules
+it requires, I shouldn't need to specify any others:
+
+ mkinitrd -c -k @KERNEL_VERSION@ -m ext4
+
+This should do two things. First, it will create a directory
+/boot/initrd-tree containing the initrd's filesystem. Then it will
+create an initrd (/boot/initrd.gz) from this tree. If you wanted to,
+you could make some additional changes in /boot/initrd-tree/ and
+then run mkinitrd again without options to rebuild the image. That's
+optional, though, and only advanced users will need to think about that.
+
+Here's another example: Build an initrd image using Linux @KERNEL_VERSION@
+kernel modules for a system with an ext3 root partition on /dev/sdb3:
+
+ mkinitrd -c -k @KERNEL_VERSION@ -m ext3 -f ext3 -r /dev/sdb3
+
+
+4. Now that I've built an initrd, how do I use it?
+
+Now that you've got an initrd (/boot/initrd.gz), you'll want to load
+it along with the kernel at boot time. If you use LILO for your boot
+loader you'll need to edit /etc/lilo.conf and add a line to load the
+initrd. Here's an example section of lilo.conf showing how this is
+done:
+
+# Linux bootable partition config begins
+image = /boot/vmlinuz-generic-@KERNEL_VERSION@
+ initrd = /boot/initrd.gz
+ root = /dev/sda6
+ label = @LILO_KERNEL_NAME@
+ read-only
+# Linux bootable partition config ends
+
+The initrd is loaded by the "initrd = /boot/initrd.gz" line.
+Just add the line right below the line for the kernel image you use.
+Save the file, and then run LILO again ('lilo' at the command line).
+You'll need to run lilo every time you edit lilo.conf or rebuild the
+initrd.
+
+Other bootloaders such as syslinux also support the use of an initrd.
+See the documentation for those programs for details on using an
+initrd with them.
+
+
+---------
+
+Have fun!
diff --git a/patches/source/mkinitrd/busybox-dot-config b/patches/source/mkinitrd/busybox-dot-config
new file mode 120000
index 00000000..09ac6817
--- /dev/null
+++ b/patches/source/mkinitrd/busybox-dot-config
@@ -0,0 +1 @@
+busybox-dot-config.1.20.x \ No newline at end of file
diff --git a/patches/source/mkinitrd/busybox-dot-config.1.20.x b/patches/source/mkinitrd/busybox-dot-config.1.20.x
new file mode 100644
index 00000000..93a4ea8d
--- /dev/null
+++ b/patches/source/mkinitrd/busybox-dot-config.1.20.x
@@ -0,0 +1,1024 @@
+#
+# Automatically generated make config: don't edit
+# Busybox version: 1.20.2
+# Wed Jun 8 14:48:15 2016
+#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+CONFIG_DESKTOP=y
+# CONFIG_EXTRA_COMPAT is not set
+CONFIG_INCLUDE_SUSv2=y
+# CONFIG_USE_PORTABLE_CODE is not set
+CONFIG_PLATFORM_LINUX=y
+CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_SHOW_USAGE=y
+CONFIG_FEATURE_VERBOSE_USAGE=y
+CONFIG_FEATURE_COMPRESS_USAGE=y
+CONFIG_FEATURE_INSTALLER=y
+CONFIG_INSTALL_NO_USR=y
+CONFIG_LOCALE_SUPPORT=y
+CONFIG_UNICODE_SUPPORT=y
+# CONFIG_UNICODE_USING_LOCALE is not set
+# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
+CONFIG_SUBST_WCHAR=63
+CONFIG_LAST_SUPPORTED_WCHAR=767
+# CONFIG_UNICODE_COMBINING_WCHARS is not set
+# CONFIG_UNICODE_WIDE_WCHARS is not set
+# CONFIG_UNICODE_BIDI_SUPPORT is not set
+# CONFIG_UNICODE_NEUTRAL_TABLE is not set
+# CONFIG_UNICODE_PRESERVE_BROKEN is not set
+CONFIG_LONG_OPTS=y
+CONFIG_FEATURE_DEVPTS=y
+# CONFIG_FEATURE_CLEAN_UP is not set
+CONFIG_FEATURE_UTMP=y
+CONFIG_FEATURE_WTMP=y
+CONFIG_FEATURE_PIDFILE=y
+CONFIG_FEATURE_SUID=y
+CONFIG_FEATURE_SUID_CONFIG=y
+CONFIG_FEATURE_SUID_CONFIG_QUIET=y
+# CONFIG_SELINUX is not set
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+CONFIG_FEATURE_SYSLOG=y
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+# CONFIG_STATIC is not set
+# CONFIG_PIE is not set
+# CONFIG_NOMMU is not set
+# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_FEATURE_INDIVIDUAL is not set
+# CONFIG_FEATURE_SHARED_BUSYBOX is not set
+CONFIG_LFS=y
+CONFIG_CROSS_COMPILER_PREFIX=""
+CONFIG_SYSROOT=""
+CONFIG_EXTRA_CFLAGS=""
+CONFIG_EXTRA_LDFLAGS=""
+CONFIG_EXTRA_LDLIBS=""
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+
+#
+# Installation Options ("make install" behavior)
+#
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
+# CONFIG_INSTALL_APPLET_DONT is not set
+# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
+# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
+# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
+CONFIG_PREFIX="/tmp/package-mkinitrd/usr/share/mkinitrd/initrd-tree"
+
+#
+# Busybox Library Tuning
+#
+# CONFIG_FEATURE_SYSTEMD is not set
+CONFIG_FEATURE_RTMINMAX=y
+CONFIG_PASSWORD_MINLEN=6
+CONFIG_MD5_SMALL=1
+# CONFIG_FEATURE_FAST_TOP is not set
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+CONFIG_FEATURE_USE_TERMIOS=y
+CONFIG_FEATURE_EDITING=y
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+CONFIG_FEATURE_EDITING_VI=y
+CONFIG_FEATURE_EDITING_HISTORY=64
+# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
+# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
+# CONFIG_FEATURE_REVERSE_SEARCH is not set
+CONFIG_FEATURE_TAB_COMPLETION=y
+# CONFIG_FEATURE_USERNAME_COMPLETION is not set
+CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
+CONFIG_FEATURE_EDITING_ASK_TERMINAL=y
+# CONFIG_FEATURE_NON_POSIX_CP is not set
+CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
+CONFIG_FEATURE_COPYBUF_KB=4
+# CONFIG_FEATURE_SKIP_ROOTFS is not set
+CONFIG_MONOTONIC_SYSCALL=y
+CONFIG_IOCTL_HEX2STR_ERROR=y
+# CONFIG_FEATURE_HWIB is not set
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+CONFIG_FEATURE_SEAMLESS_XZ=y
+# CONFIG_FEATURE_SEAMLESS_LZMA is not set
+CONFIG_FEATURE_SEAMLESS_BZ2=y
+CONFIG_FEATURE_SEAMLESS_GZ=y
+CONFIG_FEATURE_SEAMLESS_Z=y
+CONFIG_AR=y
+CONFIG_FEATURE_AR_LONG_FILENAMES=y
+# CONFIG_FEATURE_AR_CREATE is not set
+CONFIG_BUNZIP2=y
+CONFIG_BZIP2=y
+CONFIG_CPIO=y
+CONFIG_FEATURE_CPIO_O=y
+CONFIG_FEATURE_CPIO_P=y
+# CONFIG_DPKG is not set
+# CONFIG_DPKG_DEB is not set
+# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
+CONFIG_GUNZIP=y
+CONFIG_GZIP=y
+CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
+CONFIG_GZIP_FAST=0
+CONFIG_LZOP=y
+CONFIG_LZOP_COMPR_HIGH=y
+CONFIG_RPM2CPIO=y
+# CONFIG_RPM is not set
+CONFIG_TAR=y
+CONFIG_FEATURE_TAR_CREATE=y
+CONFIG_FEATURE_TAR_AUTODETECT=y
+CONFIG_FEATURE_TAR_FROM=y
+CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+CONFIG_FEATURE_TAR_LONG_OPTIONS=y
+# CONFIG_FEATURE_TAR_TO_COMMAND is not set
+CONFIG_FEATURE_TAR_UNAME_GNAME=y
+CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
+# CONFIG_FEATURE_TAR_SELINUX is not set
+CONFIG_UNCOMPRESS=y
+CONFIG_UNLZMA=y
+CONFIG_FEATURE_LZMA_FAST=y
+CONFIG_LZMA=y
+CONFIG_UNXZ=y
+CONFIG_XZ=y
+CONFIG_UNZIP=y
+
+#
+# Coreutils
+#
+CONFIG_BASENAME=y
+CONFIG_CAT=y
+CONFIG_DATE=y
+CONFIG_FEATURE_DATE_ISOFMT=y
+# CONFIG_FEATURE_DATE_NANO is not set
+# CONFIG_FEATURE_DATE_COMPAT is not set
+CONFIG_HOSTID=y
+CONFIG_ID=y
+# CONFIG_GROUPS is not set
+CONFIG_TEST=y
+CONFIG_FEATURE_TEST_64=y
+CONFIG_TOUCH=y
+CONFIG_FEATURE_TOUCH_SUSV3=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+CONFIG_FEATURE_TR_EQUIV=y
+CONFIG_BASE64=y
+CONFIG_WHO=y
+CONFIG_USERS=y
+CONFIG_CAL=y
+CONFIG_CATV=y
+CONFIG_CHGRP=y
+CONFIG_CHMOD=y
+CONFIG_CHOWN=y
+# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set
+CONFIG_CHROOT=y
+CONFIG_CKSUM=y
+CONFIG_COMM=y
+CONFIG_CP=y
+CONFIG_FEATURE_CP_LONG_OPTIONS=y
+CONFIG_CUT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+CONFIG_FEATURE_DD_IBS_OBS=y
+CONFIG_DF=y
+CONFIG_FEATURE_DF_FANCY=y
+CONFIG_DIRNAME=y
+CONFIG_DOS2UNIX=y
+CONFIG_UNIX2DOS=y
+CONFIG_DU=y
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+CONFIG_ECHO=y
+CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_ENV=y
+CONFIG_FEATURE_ENV_LONG_OPTIONS=y
+CONFIG_EXPAND=y
+CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
+CONFIG_EXPR=y
+CONFIG_EXPR_MATH_SUPPORT_64=y
+CONFIG_FALSE=y
+CONFIG_FOLD=y
+CONFIG_FSYNC=y
+CONFIG_HEAD=y
+CONFIG_FEATURE_FANCY_HEAD=y
+CONFIG_INSTALL=y
+CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
+CONFIG_LN=y
+CONFIG_LOGNAME=y
+CONFIG_LS=y
+CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_FEATURE_LS_USERNAME=y
+CONFIG_FEATURE_LS_COLOR=y
+CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
+CONFIG_MD5SUM=y
+CONFIG_MKDIR=y
+CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
+CONFIG_MKFIFO=y
+CONFIG_MKNOD=y
+CONFIG_MV=y
+CONFIG_FEATURE_MV_LONG_OPTIONS=y
+CONFIG_NICE=y
+CONFIG_NOHUP=y
+CONFIG_OD=y
+CONFIG_PRINTENV=y
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+CONFIG_READLINK=y
+CONFIG_FEATURE_READLINK_FOLLOW=y
+CONFIG_REALPATH=y
+CONFIG_RM=y
+CONFIG_RMDIR=y
+# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set
+CONFIG_SEQ=y
+CONFIG_SHA1SUM=y
+CONFIG_SHA256SUM=y
+CONFIG_SHA512SUM=y
+CONFIG_SLEEP=y
+CONFIG_FEATURE_FANCY_SLEEP=y
+# CONFIG_FEATURE_FLOAT_SLEEP is not set
+CONFIG_SORT=y
+CONFIG_FEATURE_SORT_BIG=y
+CONFIG_SPLIT=y
+CONFIG_FEATURE_SPLIT_FANCY=y
+CONFIG_STAT=y
+CONFIG_FEATURE_STAT_FORMAT=y
+CONFIG_STTY=y
+CONFIG_SUM=y
+CONFIG_SYNC=y
+CONFIG_TAC=y
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
+CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+CONFIG_UNEXPAND=y
+CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
+CONFIG_UNIQ=y
+CONFIG_USLEEP=y
+CONFIG_UUDECODE=y
+CONFIG_UUENCODE=y
+CONFIG_WC=y
+CONFIG_FEATURE_WC_LARGE=y
+CONFIG_WHOAMI=y
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+CONFIG_FEATURE_PRESERVE_HARDLINKS=y
+
+#
+# Common options for ls, more and telnet
+#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum, sha256sum, sha512sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+CONFIG_CHVT=y
+CONFIG_FGCONSOLE=y
+CONFIG_CLEAR=y
+CONFIG_DEALLOCVT=y
+CONFIG_DUMPKMAP=y
+CONFIG_KBD_MODE=y
+CONFIG_LOADFONT=y
+CONFIG_LOADKMAP=y
+CONFIG_OPENVT=y
+CONFIG_RESET=y
+CONFIG_RESIZE=y
+CONFIG_FEATURE_RESIZE_PRINT=y
+CONFIG_SETCONSOLE=y
+CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y
+CONFIG_SETFONT=y
+CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y
+CONFIG_DEFAULT_SETFONT_DIR="/usr/share/kbd/consolefonts"
+CONFIG_SETKEYCODES=y
+CONFIG_SETLOGCONS=y
+CONFIG_SHOWKEY=y
+
+#
+# Common options for loadfont and setfont
+#
+# CONFIG_FEATURE_LOADFONT_PSF2 is not set
+CONFIG_FEATURE_LOADFONT_RAW=y
+
+#
+# Debian Utilities
+#
+CONFIG_MKTEMP=y
+CONFIG_PIPE_PROGRESS=y
+CONFIG_RUN_PARTS=y
+CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
+CONFIG_FEATURE_RUN_PARTS_FANCY=y
+CONFIG_START_STOP_DAEMON=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+CONFIG_PATCH=y
+CONFIG_VI=y
+CONFIG_FEATURE_VI_MAX_LEN=1024
+CONFIG_FEATURE_VI_8BIT=y
+CONFIG_FEATURE_VI_COLON=y
+CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_FEATURE_VI_SEARCH=y
+# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+CONFIG_FEATURE_VI_DOT_CMD=y
+CONFIG_FEATURE_VI_READONLY=y
+CONFIG_FEATURE_VI_SETOPTS=y
+CONFIG_FEATURE_VI_SET=y
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_FEATURE_VI_ASK_TERMINAL=y
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+CONFIG_AWK=y
+CONFIG_FEATURE_AWK_LIBM=y
+CONFIG_CMP=y
+CONFIG_DIFF=y
+# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
+CONFIG_FEATURE_DIFF_DIR=y
+CONFIG_ED=y
+CONFIG_SED=y
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+CONFIG_FIND=y
+CONFIG_FEATURE_FIND_PRINT0=y
+CONFIG_FEATURE_FIND_MTIME=y
+CONFIG_FEATURE_FIND_MMIN=y
+CONFIG_FEATURE_FIND_PERM=y
+CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_FEATURE_FIND_MAXDEPTH=y
+CONFIG_FEATURE_FIND_NEWER=y
+CONFIG_FEATURE_FIND_INUM=y
+CONFIG_FEATURE_FIND_EXEC=y
+CONFIG_FEATURE_FIND_USER=y
+CONFIG_FEATURE_FIND_GROUP=y
+CONFIG_FEATURE_FIND_NOT=y
+CONFIG_FEATURE_FIND_DEPTH=y
+CONFIG_FEATURE_FIND_PAREN=y
+CONFIG_FEATURE_FIND_SIZE=y
+CONFIG_FEATURE_FIND_PRUNE=y
+# CONFIG_FEATURE_FIND_DELETE is not set
+CONFIG_FEATURE_FIND_PATH=y
+CONFIG_FEATURE_FIND_REGEX=y
+# CONFIG_FEATURE_FIND_CONTEXT is not set
+CONFIG_FEATURE_FIND_LINKS=y
+CONFIG_GREP=y
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_XARGS=y
+CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
+CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
+CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
+CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
+
+#
+# Init Utilities
+#
+# CONFIG_BOOTCHARTD is not set
+# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
+# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
+CONFIG_HALT=y
+# CONFIG_FEATURE_CALL_TELINIT is not set
+CONFIG_TELINIT_PATH=""
+CONFIG_INIT=y
+CONFIG_FEATURE_USE_INITTAB=y
+CONFIG_FEATURE_KILL_REMOVED=y
+CONFIG_FEATURE_KILL_DELAY=10
+CONFIG_FEATURE_INIT_SCTTY=y
+CONFIG_FEATURE_INIT_SYSLOG=y
+CONFIG_FEATURE_EXTRA_QUIET=y
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+# CONFIG_FEATURE_INITRD is not set
+CONFIG_INIT_TERMINAL_TYPE="linux"
+CONFIG_MESG=y
+CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
+
+#
+# Login/Password Management Utilities
+#
+CONFIG_ADD_SHELL=y
+CONFIG_REMOVE_SHELL=y
+CONFIG_FEATURE_SHADOWPASSWDS=y
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_USE_BB_SHADOW is not set
+CONFIG_USE_BB_CRYPT=y
+CONFIG_USE_BB_CRYPT_SHA=y
+CONFIG_ADDUSER=y
+# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
+CONFIG_FEATURE_CHECK_NAMES=y
+CONFIG_FIRST_SYSTEM_ID=1000
+CONFIG_LAST_SYSTEM_ID=12000
+CONFIG_ADDGROUP=y
+CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
+CONFIG_FEATURE_ADDUSER_TO_GROUP=y
+CONFIG_DELUSER=y
+CONFIG_DELGROUP=y
+CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
+CONFIG_GETTY=y
+CONFIG_LOGIN=y
+# CONFIG_LOGIN_SESSION_AS_CHILD is not set
+# CONFIG_PAM is not set
+CONFIG_LOGIN_SCRIPTS=y
+CONFIG_FEATURE_NOLOGIN=y
+# CONFIG_FEATURE_SECURETTY is not set
+CONFIG_PASSWD=y
+CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
+CONFIG_CRYPTPW=y
+CONFIG_CHPASSWD=y
+CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="s"
+CONFIG_SU=y
+CONFIG_FEATURE_SU_SYSLOG=y
+CONFIG_FEATURE_SU_CHECKS_SHELLS=y
+CONFIG_SULOGIN=y
+CONFIG_VLOCK=y
+
+#
+# Linux Ext2 FS Progs
+#
+CONFIG_CHATTR=y
+CONFIG_FSCK=y
+CONFIG_LSATTR=y
+CONFIG_TUNE2FS=y
+
+#
+# Linux Module Utilities
+#
+CONFIG_MODINFO=y
+# CONFIG_MODPROBE_SMALL is not set
+# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
+# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
+CONFIG_INSMOD=y
+CONFIG_RMMOD=y
+CONFIG_LSMOD=y
+CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
+CONFIG_MODPROBE=y
+CONFIG_FEATURE_MODPROBE_BLACKLIST=y
+CONFIG_DEPMOD=y
+
+#
+# Options common to multiple modutils
+#
+# CONFIG_FEATURE_2_4_MODULES is not set
+# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
+# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
+# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
+# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+CONFIG_FEATURE_MODUTILS_ALIAS=y
+CONFIG_FEATURE_MODUTILS_SYMBOLS=y
+CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
+CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
+
+#
+# Linux System Utilities
+#
+CONFIG_BLOCKDEV=y
+CONFIG_MDEV=y
+CONFIG_FEATURE_MDEV_CONF=y
+CONFIG_FEATURE_MDEV_RENAME=y
+CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
+CONFIG_FEATURE_MDEV_EXEC=y
+CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
+CONFIG_REV=y
+CONFIG_ACPID=y
+CONFIG_FEATURE_ACPID_COMPAT=y
+CONFIG_BLKID=y
+CONFIG_FEATURE_BLKID_TYPE=y
+CONFIG_DMESG=y
+CONFIG_FEATURE_DMESG_PRETTY=y
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+CONFIG_FDFLUSH=y
+CONFIG_FDFORMAT=y
+CONFIG_FDISK=y
+# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+CONFIG_FEATURE_OSF_LABEL=y
+CONFIG_FEATURE_GPT_LABEL=y
+CONFIG_FEATURE_FDISK_ADVANCED=y
+CONFIG_FINDFS=y
+# CONFIG_FLOCK is not set
+CONFIG_FREERAMDISK=y
+CONFIG_FSCK_MINIX=y
+# CONFIG_MKFS_EXT2 is not set
+CONFIG_MKFS_MINIX=y
+CONFIG_FEATURE_MINIX2=y
+# CONFIG_MKFS_REISER is not set
+CONFIG_MKFS_VFAT=y
+CONFIG_GETOPT=y
+CONFIG_FEATURE_GETOPT_LONG=y
+CONFIG_HEXDUMP=y
+CONFIG_FEATURE_HEXDUMP_REVERSE=y
+CONFIG_HD=y
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
+CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+CONFIG_IPCRM=y
+CONFIG_IPCS=y
+CONFIG_LOSETUP=y
+CONFIG_LSPCI=y
+CONFIG_LSUSB=y
+CONFIG_MKSWAP=y
+CONFIG_FEATURE_MKSWAP_UUID=y
+CONFIG_MORE=y
+CONFIG_MOUNT=y
+CONFIG_FEATURE_MOUNT_FAKE=y
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+CONFIG_FEATURE_MOUNT_HELPERS=y
+CONFIG_FEATURE_MOUNT_LABEL=y
+CONFIG_FEATURE_MOUNT_NFS=y
+CONFIG_FEATURE_MOUNT_CIFS=y
+CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_FEATURE_MOUNT_FSTAB=y
+CONFIG_PIVOT_ROOT=y
+CONFIG_RDATE=y
+CONFIG_RDEV=y
+CONFIG_READPROFILE=y
+CONFIG_RTCWAKE=y
+CONFIG_SCRIPT=y
+CONFIG_SCRIPTREPLAY=y
+CONFIG_SETARCH=y
+CONFIG_SWAPONOFF=y
+CONFIG_FEATURE_SWAPON_PRI=y
+CONFIG_SWITCH_ROOT=y
+CONFIG_UMOUNT=y
+CONFIG_FEATURE_UMOUNT_ALL=y
+
+#
+# Common options for mount/umount
+#
+CONFIG_FEATURE_MOUNT_LOOP=y
+CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
+CONFIG_FEATURE_MTAB_SUPPORT=y
+CONFIG_VOLUMEID=y
+
+#
+# Filesystem/Volume identification
+#
+CONFIG_FEATURE_VOLUMEID_EXT=y
+# CONFIG_FEATURE_VOLUMEID_BTRFS is not set
+CONFIG_FEATURE_VOLUMEID_REISERFS=y
+CONFIG_FEATURE_VOLUMEID_FAT=y
+CONFIG_FEATURE_VOLUMEID_HFS=y
+CONFIG_FEATURE_VOLUMEID_JFS=y
+CONFIG_FEATURE_VOLUMEID_XFS=y
+CONFIG_FEATURE_VOLUMEID_NTFS=y
+CONFIG_FEATURE_VOLUMEID_ISO9660=y
+CONFIG_FEATURE_VOLUMEID_UDF=y
+CONFIG_FEATURE_VOLUMEID_LUKS=y
+CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
+CONFIG_FEATURE_VOLUMEID_CRAMFS=y
+CONFIG_FEATURE_VOLUMEID_ROMFS=y
+CONFIG_FEATURE_VOLUMEID_SYSV=y
+# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set
+CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_CONSPY is not set
+CONFIG_LESS=y
+CONFIG_FEATURE_LESS_MAXLINES=9999999
+CONFIG_FEATURE_LESS_BRACKETS=y
+CONFIG_FEATURE_LESS_FLAGS=y
+CONFIG_FEATURE_LESS_MARKS=y
+CONFIG_FEATURE_LESS_REGEXP=y
+CONFIG_FEATURE_LESS_WINCH=y
+CONFIG_FEATURE_LESS_ASK_TERMINAL=y
+CONFIG_FEATURE_LESS_DASHCMD=y
+CONFIG_FEATURE_LESS_LINENUMS=y
+# CONFIG_NANDWRITE is not set
+# CONFIG_NANDDUMP is not set
+CONFIG_SETSERIAL=y
+# CONFIG_UBIATTACH is not set
+# CONFIG_UBIDETACH is not set
+# CONFIG_UBIMKVOL is not set
+# CONFIG_UBIRMVOL is not set
+# CONFIG_UBIRSVOL is not set
+# CONFIG_UBIUPDATEVOL is not set
+CONFIG_ADJTIMEX=y
+CONFIG_BBCONFIG=y
+CONFIG_FEATURE_COMPRESS_BBCONFIG=y
+CONFIG_BEEP=y
+CONFIG_FEATURE_BEEP_FREQ=4000
+CONFIG_FEATURE_BEEP_LENGTH_MS=30
+CONFIG_CHAT=y
+CONFIG_FEATURE_CHAT_NOFAIL=y
+# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
+CONFIG_FEATURE_CHAT_IMPLICIT_CR=y
+# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set
+# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
+# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
+# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
+CONFIG_CHRT=y
+CONFIG_CROND=y
+CONFIG_FEATURE_CROND_D=y
+# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
+CONFIG_CRONTAB=y
+CONFIG_DC=y
+CONFIG_FEATURE_DC_LIBM=y
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+CONFIG_DEVMEM=y
+CONFIG_EJECT=y
+CONFIG_FEATURE_EJECT_SCSI=y
+CONFIG_FBSPLASH=y
+# CONFIG_FLASHCP is not set
+CONFIG_FLASH_LOCK=y
+CONFIG_FLASH_UNLOCK=y
+CONFIG_FLASH_ERASEALL=y
+CONFIG_IONICE=y
+CONFIG_INOTIFYD=y
+CONFIG_LAST=y
+CONFIG_FEATURE_LAST_SMALL=y
+# CONFIG_FEATURE_LAST_FANCY is not set
+CONFIG_HDPARM=y
+CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
+CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y
+CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y
+CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y
+CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y
+CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
+CONFIG_MAKEDEVS=y
+# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
+CONFIG_FEATURE_MAKEDEVS_TABLE=y
+# CONFIG_MAN is not set
+# CONFIG_MICROCOM is not set
+CONFIG_MOUNTPOINT=y
+CONFIG_MT=y
+CONFIG_RAIDAUTORUN=y
+CONFIG_READAHEAD=y
+# CONFIG_RFKILL is not set
+CONFIG_RUNLEVEL=y
+CONFIG_RX=y
+CONFIG_SETSID=y
+CONFIG_STRINGS=y
+CONFIG_TASKSET=y
+CONFIG_FEATURE_TASKSET_FANCY=y
+CONFIG_TIME=y
+CONFIG_TIMEOUT=y
+CONFIG_TTYSIZE=y
+CONFIG_VOLNAME=y
+# CONFIG_WALL is not set
+CONFIG_WATCHDOG=y
+
+#
+# Networking Utilities
+#
+CONFIG_NAMEIF=y
+# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
+CONFIG_NBDCLIENT=y
+CONFIG_NC=y
+CONFIG_NC_SERVER=y
+CONFIG_NC_EXTRA=y
+# CONFIG_NC_110_COMPAT is not set
+CONFIG_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING=y
+# CONFIG_WHOIS is not set
+CONFIG_FEATURE_IPV6=y
+CONFIG_FEATURE_UNIX_LOCAL=y
+CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+CONFIG_ARP=y
+CONFIG_ARPING=y
+CONFIG_BRCTL=y
+# CONFIG_FEATURE_BRCTL_FANCY is not set
+# CONFIG_FEATURE_BRCTL_SHOW is not set
+CONFIG_DNSD=y
+CONFIG_ETHER_WAKE=y
+CONFIG_FAKEIDENTD=y
+CONFIG_FTPD=y
+CONFIG_FEATURE_FTP_WRITE=y
+CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y
+CONFIG_FTPGET=y
+CONFIG_FTPPUT=y
+CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
+CONFIG_HOSTNAME=y
+# CONFIG_HTTPD is not set
+# CONFIG_FEATURE_HTTPD_RANGES is not set
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+# CONFIG_FEATURE_HTTPD_CGI is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+# CONFIG_FEATURE_HTTPD_PROXY is not set
+# CONFIG_FEATURE_HTTPD_GZIP is not set
+CONFIG_IFCONFIG=y
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+CONFIG_FEATURE_IFCONFIG_SLIP=y
+CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
+CONFIG_FEATURE_IFCONFIG_HW=y
+CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
+CONFIG_IFENSLAVE=y
+CONFIG_IFPLUGD=y
+CONFIG_IFUPDOWN=y
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+CONFIG_FEATURE_IFUPDOWN_IP=y
+CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
+# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+CONFIG_FEATURE_IFUPDOWN_IPV6=y
+CONFIG_FEATURE_IFUPDOWN_MAPPING=y
+CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
+# CONFIG_INETD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
+# CONFIG_FEATURE_INETD_RPC is not set
+CONFIG_IP=y
+CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_FEATURE_IP_LINK=y
+CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_FEATURE_IP_TUNNEL=y
+CONFIG_FEATURE_IP_RULE=y
+CONFIG_FEATURE_IP_SHORT_FORMS=y
+# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
+CONFIG_IPADDR=y
+CONFIG_IPLINK=y
+CONFIG_IPROUTE=y
+CONFIG_IPTUNNEL=y
+CONFIG_IPRULE=y
+CONFIG_IPCALC=y
+CONFIG_FEATURE_IPCALC_FANCY=y
+CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
+CONFIG_NETSTAT=y
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+CONFIG_FEATURE_NETSTAT_PRG=y
+CONFIG_NSLOOKUP=y
+# CONFIG_NTPD is not set
+# CONFIG_FEATURE_NTPD_SERVER is not set
+CONFIG_PSCAN=y
+CONFIG_ROUTE=y
+CONFIG_SLATTACH=y
+CONFIG_TCPSVD=y
+CONFIG_TELNET=y
+CONFIG_FEATURE_TELNET_TTYPE=y
+CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+CONFIG_TELNETD=y
+CONFIG_FEATURE_TELNETD_STANDALONE=y
+# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
+CONFIG_TFTP=y
+# CONFIG_TFTPD is not set
+
+#
+# Common options for tftp/tftpd
+#
+CONFIG_FEATURE_TFTP_GET=y
+CONFIG_FEATURE_TFTP_PUT=y
+CONFIG_FEATURE_TFTP_BLOCKSIZE=y
+CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
+CONFIG_TFTP_DEBUG=y
+CONFIG_TRACEROUTE=y
+CONFIG_TRACEROUTE6=y
+# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
+# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
+# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
+CONFIG_TUNCTL=y
+CONFIG_FEATURE_TUNCTL_UG=y
+CONFIG_UDHCPC6=y
+# CONFIG_UDHCPD is not set
+# CONFIG_DHCPRELAY is not set
+# CONFIG_DUMPLEASES is not set
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
+CONFIG_DHCPD_LEASES_FILE=""
+# CONFIG_UDHCPC is not set
+# CONFIG_FEATURE_UDHCPC_ARPING is not set
+# CONFIG_FEATURE_UDHCP_PORT is not set
+CONFIG_UDHCP_DEBUG=0
+# CONFIG_FEATURE_UDHCP_RFC3397 is not set
+# CONFIG_FEATURE_UDHCP_8021Q is not set
+CONFIG_UDHCPC_DEFAULT_SCRIPT=""
+CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0
+CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
+CONFIG_UDPSVD=y
+CONFIG_VCONFIG=y
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_FEATURE_WGET_TIMEOUT=y
+CONFIG_ZCIP=y
+
+#
+# Print Utilities
+#
+# CONFIG_LPD is not set
+CONFIG_LPR=y
+# CONFIG_LPQ is not set
+
+#
+# Mail Utilities
+#
+CONFIG_MAKEMIME=y
+CONFIG_FEATURE_MIME_CHARSET="us-ascii"
+CONFIG_POPMAILDIR=y
+CONFIG_FEATURE_POPMAILDIR_DELIVERY=y
+CONFIG_REFORMIME=y
+CONFIG_FEATURE_REFORMIME_COMPAT=y
+# CONFIG_SENDMAIL is not set
+
+#
+# Process Utilities
+#
+CONFIG_IOSTAT=y
+CONFIG_LSOF=y
+CONFIG_MPSTAT=y
+CONFIG_NMETER=y
+CONFIG_PMAP=y
+CONFIG_POWERTOP=y
+# CONFIG_PSTREE is not set
+# CONFIG_PWDX is not set
+# CONFIG_SMEMCAP is not set
+CONFIG_UPTIME=y
+# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
+CONFIG_FREE=y
+CONFIG_FUSER=y
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+CONFIG_KILLALL5=y
+CONFIG_PGREP=y
+CONFIG_PIDOF=y
+CONFIG_FEATURE_PIDOF_SINGLE=y
+CONFIG_FEATURE_PIDOF_OMIT=y
+CONFIG_PKILL=y
+CONFIG_PS=y
+# CONFIG_FEATURE_PS_WIDE is not set
+# CONFIG_FEATURE_PS_LONG is not set
+CONFIG_FEATURE_PS_TIME=y
+CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
+# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
+CONFIG_RENICE=y
+CONFIG_BB_SYSCTL=y
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
+CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
+CONFIG_FEATURE_TOP_SMP_CPU=y
+CONFIG_FEATURE_TOP_DECIMALS=y
+CONFIG_FEATURE_TOP_SMP_PROCESS=y
+CONFIG_FEATURE_TOPMEM=y
+CONFIG_FEATURE_SHOW_THREADS=y
+CONFIG_WATCH=y
+
+#
+# Runit Utilities
+#
+CONFIG_RUNSV=y
+CONFIG_RUNSVDIR=y
+CONFIG_FEATURE_RUNSVDIR_LOG=y
+CONFIG_SV=y
+CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service"
+CONFIG_SVLOGD=y
+CONFIG_CHPST=y
+CONFIG_SETUIDGID=y
+CONFIG_ENVUIDGID=y
+CONFIG_ENVDIR=y
+CONFIG_SOFTLIMIT=y
+# CONFIG_CHCON is not set
+# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
+# CONFIG_GETENFORCE is not set
+# CONFIG_GETSEBOOL is not set
+# CONFIG_LOAD_POLICY is not set
+# CONFIG_MATCHPATHCON is not set
+# CONFIG_RESTORECON is not set
+# CONFIG_RUNCON is not set
+# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
+# CONFIG_SELINUXENABLED is not set
+# CONFIG_SETENFORCE is not set
+# CONFIG_SETFILES is not set
+# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+# CONFIG_SETSEBOOL is not set
+# CONFIG_SESTATUS is not set
+
+#
+# Shells
+#
+CONFIG_ASH=y
+CONFIG_ASH_BASH_COMPAT=y
+# CONFIG_ASH_IDLE_TIMEOUT is not set
+CONFIG_ASH_JOB_CONTROL=y
+CONFIG_ASH_ALIAS=y
+CONFIG_ASH_GETOPTS=y
+CONFIG_ASH_BUILTIN_ECHO=y
+CONFIG_ASH_BUILTIN_PRINTF=y
+CONFIG_ASH_BUILTIN_TEST=y
+CONFIG_ASH_CMDCMD=y
+CONFIG_ASH_MAIL=y
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+CONFIG_ASH_RANDOM_SUPPORT=y
+CONFIG_ASH_EXPAND_PRMT=y
+CONFIG_CTTYHACK=y
+# CONFIG_HUSH is not set
+# CONFIG_HUSH_BASH_COMPAT is not set
+# CONFIG_HUSH_BRACE_EXPANSION is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_INTERACTIVE is not set
+# CONFIG_HUSH_SAVEHISTORY is not set
+# CONFIG_HUSH_JOB is not set
+# CONFIG_HUSH_TICK is not set
+# CONFIG_HUSH_IF is not set
+# CONFIG_HUSH_LOOPS is not set
+# CONFIG_HUSH_CASE is not set
+# CONFIG_HUSH_FUNCTIONS is not set
+# CONFIG_HUSH_LOCAL is not set
+# CONFIG_HUSH_RANDOM_SUPPORT is not set
+# CONFIG_HUSH_EXPORT_N is not set
+# CONFIG_HUSH_MODE_X is not set
+# CONFIG_MSH is not set
+CONFIG_FEATURE_SH_IS_ASH=y
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_FEATURE_SH_IS_NONE is not set
+# CONFIG_FEATURE_BASH_IS_ASH is not set
+# CONFIG_FEATURE_BASH_IS_HUSH is not set
+CONFIG_FEATURE_BASH_IS_NONE=y
+CONFIG_SH_MATH_SUPPORT=y
+CONFIG_SH_MATH_SUPPORT_64=y
+CONFIG_FEATURE_SH_EXTRA_QUIET=y
+# CONFIG_FEATURE_SH_STANDALONE is not set
+# CONFIG_FEATURE_SH_NOFORK is not set
+CONFIG_FEATURE_SH_HISTFILESIZE=y
+
+#
+# System Logging Utilities
+#
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+# CONFIG_FEATURE_SYSLOGD_DUP is not set
+# CONFIG_FEATURE_SYSLOGD_CFG is not set
+CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_KLOGD=y
+CONFIG_FEATURE_KLOGD_KLOGCTL=y
+CONFIG_LOGGER=y
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch
new file mode 100644
index 00000000..456fb08e
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-kernel_ver.patch
@@ -0,0 +1,25 @@
+--- busybox-1.20.2/libbb/kernel_version.c
++++ busybox-1.20.2-kernel_ver/libbb/kernel_version.c
+@@ -20,18 +20,15 @@
+ int FAST_FUNC get_linux_version_code(void)
+ {
+ struct utsname name;
+- char *s;
++ char *s, *t;
+ int i, r;
+
+- if (uname(&name) == -1) {
+- bb_perror_msg("can't get system information");
+- return 0;
+- }
+-
++ uname(&name); /* never fails */
+ s = name.release;
+ r = 0;
+ for (i = 0; i < 3; i++) {
+- r = r * 256 + atoi(strtok(s, "."));
++ t = strtok(s, ".");
++ r = r * 256 + (t ? atoi(t) : 0);
+ s = NULL;
+ }
+ return r;
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch
new file mode 100644
index 00000000..17fc0b1c
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-ntpd.patch
@@ -0,0 +1,11 @@
+--- busybox-1.20.2/networking/ntpd.c
++++ busybox-1.20.2-ntpd/networking/ntpd.c
+@@ -1840,7 +1840,7 @@ recv_and_process_client_pkt(void /*int f
+
+ /* Build a reply packet */
+ memset(&msg, 0, sizeof(msg));
+- msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM;
++ msg.m_status = G.stratum < MAXSTRAT ? (G.ntp_status & LI_MASK) : LI_ALARM;
+ msg.m_status |= (query_status & VERSION_MASK);
+ msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
+ MODE_SERVER : MODE_SYM_PAS;
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch
new file mode 100644
index 00000000..f39250c8
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-pkg-config-selinux.patch
@@ -0,0 +1,67 @@
+From b1cec5003b73080a8aa7ea277621bf1c71c3e8d6 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 20 Oct 2012 15:01:26 -0400
+Subject: [PATCH] build system: use pkg-config to look up selinux libs
+
+Newer versions of libselinux has started linking against more libs.
+Rather than continuing hardcoding things, switch to using pkg-config
+to query for its dependencies.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ Makefile | 1 +
+ Makefile.flags | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index fccde4a..3a0a5e1 100644
+--- a/Makefile
++++ b/Makefile
+@@ -297,6 +297,7 @@ NM = $(CROSS_COMPILE)nm
+ STRIP = $(CROSS_COMPILE)strip
+ OBJCOPY = $(CROSS_COMPILE)objcopy
+ OBJDUMP = $(CROSS_COMPILE)objdump
++PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
+ AWK = awk
+ GENKSYMS = scripts/genksyms/genksyms
+ DEPMOD = /sbin/depmod
+diff --git a/Makefile.flags b/Makefile.flags
+index c43c8dc..15dcc1f 100644
+--- a/Makefile.flags
++++ b/Makefile.flags
+@@ -74,6 +74,12 @@ ARCH_FPIC ?= -fpic
+ ARCH_FPIE ?= -fpie
+ ARCH_PIE ?= -pie
+
++# Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES))
++define pkg_check_modules
++$(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2))
++$(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2))
++endef
++
+ ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
+ # on i386: 14% smaller libbusybox.so
+ # (code itself is 9% bigger, we save on relocs/PLT/GOT)
+@@ -85,6 +91,7 @@ endif
+
+ ifeq ($(CONFIG_STATIC),y)
+ CFLAGS_busybox += -static
++PKG_CONFIG_FLAGS += --static
+ endif
+
+ ifeq ($(CONFIG_PIE),y)
+@@ -127,7 +134,10 @@ LDLIBS += pam pam_misc pthread
+ endif
+
+ ifeq ($(CONFIG_SELINUX),y)
+-LDLIBS += selinux sepol
++SELINUX_PC_MODULES = libselinux libsepol
++$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
++CPPFLAGS += $(SELINUX_CFLAGS)
++LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
+ endif
+
+ ifeq ($(CONFIG_EFENCE),y)
+--
+1.7.12
+
diff --git a/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch
new file mode 100644
index 00000000..7b185008
--- /dev/null
+++ b/patches/source/mkinitrd/fixes-1.20.2/busybox-1.20.2-sys-resource.patch
@@ -0,0 +1,123 @@
+From 5a5dfcad6ba96d12d68bd7b39279215a8fee70d3 Mon Sep 17 00:00:00 2001
+From: Tias Guns <tias@ulyssis.org>
+Date: Sun, 10 Jun 2012 14:19:01 +0200
+Subject: [PATCH] inetd: fix build failure in Android
+
+Signed-off-by: Tias Guns <tias@ulyssis.org>
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+(cherry picked from commit 64f763b42a43cbf36e401690ff6767c25575e520)
+---
+ networking/inetd.c | 1 +
+ 1 file changed, 1 insertion(+)
+--
+1.7.12
+
+From 246ea72843d5b7e9d4cd902dc5e9d71359196303 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Thu, 5 Jul 2012 23:19:09 -0400
+Subject: [PATCH] include sys/resource.h where needed
+
+We use functions from sys/resource.h in misc applets, but don't include
+the header. This breaks building with newer glibc versions, so add the
+include where needed.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+(cherry picked from commit c5fe9f7b723f949457263ef8e22ab807d5b549ce)
+---
+ loginutils/passwd.c | 1 +
+ miscutils/time.c | 1 +
+ networking/inetd.c | 1 +
+ networking/ntpd.c | 1 +
+ networking/ntpd_simple.c | 1 +
+ runit/chpst.c | 1 +
+ shell/shell_common.c | 1 +
+ 7 files changed, 7 insertions(+)
+
+diff --git a/loginutils/passwd.c b/loginutils/passwd.c
+index b83db00..a7006f0 100644
+--- a/loginutils/passwd.c
++++ b/loginutils/passwd.c
+@@ -15,6 +15,7 @@
+
+ #include "libbb.h"
+ #include <syslog.h>
++#include <sys/resource.h> /* setrlimit */
+
+ static void nuke_str(char *str)
+ {
+diff --git a/miscutils/time.c b/miscutils/time.c
+index 945f15f..ffed386 100644
+--- a/miscutils/time.c
++++ b/miscutils/time.c
+@@ -16,6 +16,7 @@
+ //usage: "\n -v Verbose"
+
+ #include "libbb.h"
++#include <sys/resource.h> /* getrusage */
+
+ /* Information on the resources used by a child process. */
+ typedef struct {
+diff --git a/networking/inetd.c b/networking/inetd.c
+index 1308d74..00baf69 100644
+--- a/networking/inetd.c
++++ b/networking/inetd.c
+@@ -165,6 +165,8 @@
+ //usage: "\n (default: 0 - disabled)"
+
+ #include <syslog.h>
++#include <sys/resource.h> /* setrlimit */
++#include <sys/socket.h> /* un.h may need this */
+ #include <sys/un.h>
+
+ #include "libbb.h"
+diff --git a/networking/ntpd.c b/networking/ntpd.c
+index 603801e..b885215 100644
+--- a/networking/ntpd.c
++++ b/networking/ntpd.c
+@@ -46,6 +46,7 @@
+ #include "libbb.h"
+ #include <math.h>
+ #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
++#include <sys/resource.h> /* setpriority */
+ #include <sys/timex.h>
+ #ifndef IPTOS_LOWDELAY
+ # define IPTOS_LOWDELAY 0x10
+diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c
+index 4ad44e4..1b7c66b 100644
+--- a/networking/ntpd_simple.c
++++ b/networking/ntpd_simple.c
+@@ -7,6 +7,7 @@
+ */
+ #include "libbb.h"
+ #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
++#include <sys/resource.h> /* setpriority */
+ #ifndef IPTOS_LOWDELAY
+ # define IPTOS_LOWDELAY 0x10
+ #endif
+diff --git a/runit/chpst.c b/runit/chpst.c
+index ac296ba..ed72c8b 100644
+--- a/runit/chpst.c
++++ b/runit/chpst.c
+@@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ //usage: "\n a SIGXCPU after N seconds"
+
+ #include "libbb.h"
++#include <sys/resource.h> /* getrlimit */
+
+ /*
+ Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit.
+diff --git a/shell/shell_common.c b/shell/shell_common.c
+index 51c92d6..780e27e 100644
+--- a/shell/shell_common.c
++++ b/shell/shell_common.c
+@@ -18,6 +18,7 @@
+ */
+ #include "libbb.h"
+ #include "shell_common.h"
++#include <sys/resource.h> /* getrlimit */
+
+ const char defifsvar[] ALIGN1 = "IFS= \t\n";
+
+--
+1.7.12
+
diff --git a/patches/source/mkinitrd/init b/patches/source/mkinitrd/init
new file mode 100755
index 00000000..7122dbc3
--- /dev/null
+++ b/patches/source/mkinitrd/init
@@ -0,0 +1,350 @@
+#!/bin/ash
+#
+# /init: init script to load kernel modules from an initramfs
+# This requires that your kernel supports initramfs!!!
+#
+# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA
+# Copyright 2007, 2008, 2009, 2010, 2012 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.
+#
+##################################################################################
+# With a generic kernel, you need to load the modules needed to mount the
+# root partition. This might mean a SCSI, RAID, or other drive controller
+# module, as well as the module to support the root filesystem. Once the
+# root partition is mounted all the other modules will be available so you
+# don't need to load them here.
+#
+# Config files used by this script:
+#
+# /rootdev Contains the name of the root device, such as: /dev/hda1
+#
+# /rootfs Contains the root filesystem type, such as: xfs
+#
+# /initrd-name Contains the name of the initrd file.
+#
+# /resumedev Contains the name of the device to resume from hibernation.
+#
+# /luksdev Contains colon separated list of luks encrypted devices to
+# be unlocked.
+#
+# /lukstrim Contains colon separated list of luks encrypted devices to
+# pass '--allow-discards' when unlocking
+#
+# /lukskey Contains the path to a LUKS key-file for automatic unlock
+# Format: LABEL=<partition_label>:/path/to/file
+# UUID=<partition_uuid>:/path/to/file
+#
+# /wait-for-root Contains a number - the init script will wait this amount
+# of seconds before creating device nodes.
+#
+# /keymap Contains the name for a custom keyboard map
+#
+# Optional:
+#
+# /load_kernel_modules
+# A script that uses modprobe to load the desired modules.
+#
+# There's an example in here. To actually use it, you'll
+# need to make it executable:
+#
+# chmod 755 load_kernel_modules
+##################################################################################
+# Changelog
+# 10-Dec-2012 <mozes@slackware.com>
+# * Added support for the official Kernel parameters to select root filesystem
+# type ('rootfstype') and pause before attempting to mount the root filesystem
+# ('rootdelay'). The original parameters may continue to be used.
+##################################################################################
+
+INITRD=$(cat /initrd-name)
+ROOTDEV=$(cat /rootdev)
+ROOTFS=$(cat /rootfs)
+LUKSDEV=$(cat /luksdev)
+LUKSTRIM=$(cat /lukstrim 2>/dev/null)
+LUKSKEY=$(cat /lukskey)
+RESUMEDEV=$(cat /resumedev)
+WAIT=$(cat /wait-for-root)
+KEYMAP=$(cat /keymap)
+INIT=/sbin/init
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+
+# Mount /proc and /sys:
+mount -n proc /proc -t proc
+mount -n sysfs /sys -t sysfs
+mount -n tmpfs /run -t tmpfs -o mode=0755,size=32M,nodev,nosuid,noexec
+
+if grep devtmpfs /proc/filesystems 1>/dev/null 2>/dev/null ; then
+ DEVTMPFS=1
+ mount -n devtmpfs /dev -t devtmpfs -o size=8M
+fi
+
+# Parse command line
+for ARG in $(cat /proc/cmdline); do
+ case $ARG in
+ 0|1|2|3|4|5|6|S|s|single)
+ RUNLEVEL=$ARG
+ ;;
+ init=*)
+ INIT=$(echo $ARG | cut -f2 -d=)
+ ;;
+ luksdev=/dev/*)
+ LUKSDEV=$(echo $ARG | cut -f2 -d=)
+ ;;
+ lukskey=*)
+ LUKSKEY=$(echo $ARG | cut -f2- -d=)
+ ;;
+ rescue)
+ RESCUE=1
+ ;;
+ resume=*)
+ RESUMEDEV=$(echo $ARG | cut -f2- -d=)
+ ;;
+ root=/dev/*)
+ ROOTDEV=$(echo $ARG | cut -f2 -d=)
+ ;;
+ root=LABEL=*)
+ ROOTDEV=$(echo $ARG | cut -f2- -d=)
+ ;;
+ root=UUID=*)
+ ROOTDEV=$(echo $ARG | cut -f2- -d=)
+ ;;
+ rootfs=*|rootfstype=*)
+ ROOTFS=$(echo $ARG | cut -f2 -d=)
+ ;;
+ waitforroot=*|rootdelay=*)
+ WAIT=$(echo $ARG | cut -f2 -d=)
+ ;;
+ esac
+done
+
+# If udevd is available, use it to generate block devices
+# else use mdev to read sysfs and generate the needed devices
+if [ -x /sbin/udevd -a -x /sbin/udevadm ]; then
+ /sbin/udevd --daemon --resolve-names=never
+ /sbin/udevadm trigger --subsystem-match=block --action=add
+ /sbin/udevadm settle --timeout=10
+else
+ [ "$DEVTMPFS" != "1" ] && mdev -s
+fi
+
+# Load kernel modules (ideally this was already done by udev):
+if [ ! -d /lib/modules/$(uname -r) ]; then
+ echo "No kernel modules found for Linux $(uname -r)."
+elif [ -x ./load_kernel_modules ]; then # use load_kernel_modules script:
+ echo "${INITRD}: Loading kernel modules from initrd image:"
+ . ./load_kernel_modules
+else # load modules (if any) in order:
+ if ls /lib/modules/$(uname -r)/*.*o 1> /dev/null 2> /dev/null ; then
+ echo "${INITRD}: Loading kernel modules from initrd image:"
+ for module in /lib/modules/$(uname -r)/*.*o ; do
+ /sbin/modprobe $module
+ done
+ unset module
+ fi
+fi
+
+# Sometimes the devices need extra time to be available.
+# A root filesystem on USB is a good example of that.
+sleep $WAIT
+
+# Load a custom keyboard mapping:
+if [ -n "$KEYMAP" ]; then
+ echo "${INITRD}: Loading '$KEYMAP' keyboard mapping:"
+ tar xzOf /etc/keymaps.tar.gz ${KEYMAP}.bmap | loadkmap
+fi
+
+if [ "$RESCUE" = "" ]; then
+ # Initialize RAID:
+ if [ -x /sbin/mdadm ]; then
+ # If /etc/mdadm.conf is present, udev should DTRT on its own;
+ # If not, we'll make one and go from there:
+ if [ ! -r /etc/mdadm.conf ]; then
+ /sbin/mdadm -E -s >/etc/mdadm.conf
+ /sbin/mdadm -S -s
+ /sbin/mdadm -A -s
+ # This seems to make the kernel see partitions more reliably:
+ fdisk -l /dev/md* 1> /dev/null 2> /dev/null
+ fi
+ fi
+
+ # Unlock any encrypted partitions necessary to access the
+ # root filesystem, such as encrypted LVM Physical volumes, disk
+ # partitions or mdadm arrays.
+ # Unavailable devices such as LVM Logical Volumes will need to be
+ # deferred until they become available after the vgscan.
+
+ if [ -x /sbin/cryptsetup ]; then
+
+ # Determine if we have to use a LUKS keyfile:
+ if [ ! -z "$LUKSKEY" ]; then
+ mkdir /mountkey
+ KEYPART=$(echo $LUKSKEY |cut -f1 -d:)
+ KEYNAME=$(echo $KEYPART |cut -f2 -d=)
+ LUKSPATH="/mountkey$(echo $LUKSKEY |cut -f2 -d:)"
+ # Catch possible mount failure:
+ if blkid |grep "TYPE=\"vfat\"" |grep $KEYNAME 1>/dev/null 2>&1 ; then
+ MOUNTOPTS="-t vfat -o shortname=mixed"
+ else
+ MOUNTOPTS="-t auto"
+ fi
+ mount $MOUNTOPTS $(findfs $KEYPART) /mountkey 2>/dev/null
+ # Check if we can actually use this file:
+ if [ ! -f $LUKSPATH ]; then
+ LUKSKEY=""
+ else
+ echo ">>> Using LUKS key file: '$LUKSKEY'"
+ LUKSKEY="-d $LUKSPATH"
+ fi
+ fi
+
+ LUKSLIST_DEFERRED=""
+ LUKSLIST=$(echo $LUKSDEV | tr -s ':' ' ')
+ for LUKSDEV in $LUKSLIST ; do
+ if /sbin/cryptsetup isLuks ${LUKSDEV} 1>/dev/null 2>/dev/null ; then
+ if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
+ CRYPTDEV="$ROOTDEV"
+ else
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ fi
+ if echo $LUKSTRIM | grep -wq $LUKSDEV 2>/dev/null ; then
+ LUKSOPTS="--allow-discards"
+ else
+ LUKSOPTS=""
+ fi
+ if [ -z "${LUKSOPTS}" ]; then
+ echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV':"
+ else
+ echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV' with '$LUKSOPTS':"
+ fi
+ /sbin/cryptsetup ${LUKSOPTS} ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1
+ if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
+ ROOTDEV="/dev/mapper/$CRYPTDEV"
+ fi
+ else
+ LUKSLIST_DEFERRED="${LUKSLIST_DEFERRED} ${LUKSDEV}"
+ fi
+ done
+ fi
+
+ # Initialize LVM:
+ if [ -x /sbin/vgchange ]; then
+ mkdir -p /var/lock/lvm # this avoids useless warnings
+ /sbin/vgchange -ay --ignorelockingfailure 2>/dev/null
+ /sbin/udevadm settle --timeout=10
+ fi
+
+ # Unlock any LUKS encrypted devices that were deferred above but have now
+ # become available due to the vgscan (i.e. filesystems on LVM Logical Volumes)
+
+ if [ -x /sbin/cryptsetup -a -n "${LUKSLIST_DEFERRED}" ]; then
+ for LUKSDEV in ${LUKSLIST_DEFERRED} ; do
+ if /sbin/cryptsetup isLuks ${LUKSDEV} 1>/dev/null 2>/dev/null ; then
+ if echo $ROOTDEV | grep -q "LABEL=" || echo $ROOTDEV | grep -q "UUID=" ; then
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ elif [ "x$ROOTDEV" = "x$(basename $ROOTDEV)" ]; then
+ CRYPTDEV="$ROOTDEV"
+ else
+ CRYPTDEV="luks$(basename $LUKSDEV)"
+ fi
+ echo "Unlocking LUKS encrypted device '${LUKSDEV}' as luks mapped device '$CRYPTDEV':"
+ /sbin/cryptsetup ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1
+ if [ "$ROOTDEV" = "$LUKSDEV" -o "$ROOTDEV" = "$CRYPTDEV" ] ; then
+ ROOTDEV="/dev/mapper/$CRYPTDEV"
+ fi
+ else
+ echo "LUKS device '${LUKSDEV}' unavailable for unlocking!"
+ fi
+ done
+ /sbin/udevadm settle --timeout=10
+ fi
+
+ # Scan for btrfs multi-device filesystems:
+ if [ -x /sbin/btrfs ]; then
+ /sbin/btrfs device scan
+ fi
+
+ # Find root device if a label or UUID was given:
+ if echo $ROOTDEV | grep -q "LABEL=" || \
+ echo $ROOTDEV | grep -q "UUID=" ; then
+ ROOTDEV=$(findfs $ROOTDEV)
+ fi
+
+ # Clean up after LUKS unlock using a keyfile:
+ if grep -q mountkey /proc/mounts 2>/dev/null ; then
+ umount -l /mountkey
+ rmdir /mountkey 2>/dev/null
+ fi
+
+ # Resume state from swap
+ if [ "$RESUMEDEV" != "" ]; then
+ # Find resume device if a label or UUID was given:
+ if echo $RESUMEDEV | grep -q "LABEL=" || \
+ echo $RESUMEDEV | grep -q "UUID=" ; then
+ RESUMEDEV=$(findfs $RESUMEDEV)
+ elif ls -l $RESUMEDEV | grep -q "^l" ; then
+ RESUMEDEV=$(readlink -f $RESUMEDEV)
+ fi
+ echo "Trying to resume from $RESUMEDEV"
+ RESMAJMIN=$(ls -l $RESUMEDEV | tr , : | awk '{ print $5$6 }')
+ echo $RESMAJMIN > /sys/power/resume
+ fi
+
+ # Switch to real root partition:
+ /sbin/udevadm settle --timeout=10
+ echo 0x0100 > /proc/sys/kernel/real-root-dev
+ mount -o ro -t $ROOTFS $ROOTDEV /mnt
+
+ if [ ! -r /mnt/sbin/init ]; then
+ echo "ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead."
+ echo " You can try to fix it. Type 'exit' when things are done."
+ echo
+ /bin/sh
+ fi
+else
+ echo
+ echo "RESCUE mode"
+ echo
+ echo " You can try to fix or rescue your system now. If you want"
+ echo " to boot into your fixed system, mount your root filesystem"
+ echo " read-only under /mnt:"
+ echo
+ echo " # mount -o ro -t filesystem root_device /mnt"
+ echo
+ echo " Type 'exit' when things are done."
+ echo
+ /bin/sh
+fi
+
+# Need to make sure OPTIONS+="db_persist" exists for all dm devices
+# That should be handled in /sbin/mkinitrd now
+/sbin/udevadm info --cleanup-db
+/sbin/udevadm control --exit
+
+unset ERR
+mount -o move /proc /mnt/proc
+mount -o move /sys /mnt/sys
+mount -o move /run /mnt/run
+
+[ "$DEVTMPFS" = "1" ] && mount -o move /dev /mnt/dev
+echo "${INITRD}: exiting"
+exec switch_root /mnt $INIT $RUNLEVEL
diff --git a/patches/source/mkinitrd/mkinitrd b/patches/source/mkinitrd/mkinitrd
new file mode 100644
index 00000000..ed8f3247
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd
@@ -0,0 +1,740 @@
+#!/bin/sh
+# Copyright 2004 Slackware Linux, Inc., Concord, CA, USA
+# Copyright 2004 Patrick J. Volkerding, Concord, CA, USA
+# Copyright 2007, 2008, 2009, 2010, 2011, 2015, 2016, 2017 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.
+
+# Modified by Robby Workman <rworkman@slackware.com> 26 November 2007
+# to add support for mkinitrd.conf - No additional license terms added
+# Modified by Alan Hicks <alan@slackware.com> 27 November 2007 to enable
+# passing arguments to kernel modules - No additional license terms added
+# volkerdi - feel free to remove these :)
+# Modified by Eric Hameleers <alien@slackware.com> 3 April 2008
+# to add support custom keymaps - No additional license terms added
+# Modified by Patrick Volkerding <volkerdi@slackware.com> 17 Dec 2008
+# Added support to bail out if kernel modules are requested for a kernel
+# version that is not installed (thanks to Eric Hameleers), be more
+# verbose about showing modules added to the initrd (thanks to
+# Ellington Santos), and if "mount" returns /dev/root as the root device,
+# use readlink to resolve the device pointed to by the /dev/root
+# symlink, changed modprobe to use --ignore-install to avoid catching
+# custom "install" lines and causing /sbin/modprobe to be copied to the
+# initrd (thanks to Ken Milmore).
+# Of course, license terms remain unchanged.
+# Modified by Eric Hameleers <alien@slackware.com> 3 March 2010
+# Add lukskey option (-K). Automatically add kernel modules listed in
+# load-kernel-modules if that file is executable.
+# Yada yada yada.
+# Modified by Patrick Volkerding <volkerdi@slackware.com> 21 August 2012
+# Add Btrfs multi-device filesystem support option (-B).
+# Modified by Robby Workman <rworkman@slackware.com> 08 March 2017
+# to add support for TRIM on LUKS root devs
+# Modified by Patrick Volkerding <volkerdi@slackware.com> 29 June 2017
+# Add support for prepending a microcode update archive (-P).
+
+MKINITRD_VERSION=1.4.10
+
+# Don't include these things from /lib/udev/ in the initrd image
+LIBUDEV_BLACKLIST="\
+ ipod-set-info \
+ iphone-set-info \
+ check-mtp-device \
+ check-ptp-camera \
+ udev-configure-printer \
+ rules.d/60-openobex.rules \
+ rules.d/85-regulatory.rules \
+ "
+
+print_usage() {
+ cat << EOF
+Usage: mkinitrd [OPTION]
+
+mkinitrd creates an initial ramdisk (actually an initramfs cpio+gzip
+archive) used to load kernel modules that are needed to mount the
+root filesystem, or other modules that might be needed before the
+root filesystem is available. Other binaries may be added to the
+initrd, and the script is easy to modify. Be creative. :-)
+
+ -F Use the contents of /etc/mkinitrd.conf (optional)
+ If this is used in conjunction with any other options passed
+ on the command line, the command-line options will override
+ the config file options. See mkinitrd.conf(5) for details.
+ -c Clear the existing initrd tree first
+ -f Filesystem to use for root partition (must be used with -r)
+ --help Display this message
+ -h Device to resume from hibernation. Needs to be the name of
+ the swap partition holding the hibernation image.
+ -k Kernel version to use
+ -l Custom keymap to load. Like, 'nl' or 'de-latin1-nodeadkeys'
+ -m A colon (:) delimited list of kernel modules to load.
+ Additional options may be added to use when loading the
+ kernel modules (but in this case the entire list must be
+ wrapped with double quotes). Any dependencies of requested
+ modules will also be added to the initrd.
+ -o Output image (default /boot/initrd.gz)
+ -r Root partition device (must be used with -f)
+ -s Initrd source tree (default /boot/initrd-tree/)
+ -u Include udev in the initrd
+ -w Time to wait until all disks are detected
+ -C A colon (:) delimited list of luks encrypted block devices to be
+ unlocked by the initrd using cryptsetup. All devices that must
+ be unlocked in order to access the root filesystem must be
+ specified. (Use with '-r' parameter).
+ -T A colon (:) delimited list of luks encrypted block devices to be
+ passed the "--allow-discards" option when unlocked by the initrd
+ using cryptsetup. This has the effect of allowing TRIM on SSD drives.
+ Be sure your SSD supports this feature (correctly) before enabling
+ it. See fstrim(8) for more information.
+ -L Add support for LVM partitions
+ -K Use a USB key (fat-formatted) to unlock the root LUKS volume
+ The parameter value is filename of a keyfile, as well as the label
+ (or uuid) of the partition this file is on. This way, you can unlock
+ your computer automatically if you have a USB stick with your LUKS
+ key inserted at boot. A passphrase will still be asked if the LUKS
+ key can not be found.
+ For example, if your USB thumb drive has a FAT partition with label
+ "TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks",
+ then you need to pass: -K LABEL=TRAVELSTICK:/keys/alien.luks
+ -B Add /sbin/btrfs to enable scanning for a root filesystem that is
+ part of a Btrfs multi-device filesystem.
+ -M Add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd
+ -P Prepend the output image with the microcode CPIO archive given in arguments.
+ -R Add support for RAID partitions
+ -V Display version number
+
+A simple example: Build an initrd for a reiserfs root partition:
+
+ mkinitrd -c -m reiserfs
+
+Another example: Build an initrd image using Linux 2.6.35.4-smp kernel
+modules for a system with an ext4 root partition on /dev/sdb3:
+
+ mkinitrd -c -k 2.6.35.4-smp -m mbcache:jbd:ext4 -f ext4 -r /dev/sdb3
+
+Note that if you are already logged in with /dev/sdb3 as your /
+partition, and it is running ext4, this command works just the same:
+
+ mkinitrd -c -m ext4
+
+If run without options, mkinitrd will rebuild an initrd image using
+the contents of the $SOURCE_TREE directory, or, if that directory
+does not exist it will be created and populated, and then mkinitrd
+will exit.
+
+EOF
+}
+
+create_new_source_tree() {
+ mkdir -p $SOURCE_TREE
+ # Make sure a kernel module directory exists:
+ mkdir -p $SOURCE_TREE/lib/modules/${KERNEL_VERSION}
+ # Add the initrd-tree skeleton:
+ ( cd $SOURCE_TREE ; tar xzf /usr/share/mkinitrd/initrd-tree.tar.gz )
+ # Make sure we have any block devices that might be needed:
+
+ SLOPPY_DEV_LIST=$(cat /proc/partitions)
+ for device in $SLOPPY_DEV_LIST ; do
+ if [ ! -r $SOURCE_TREE/dev/$device ]; then
+ if [ -b /dev/$device ]; then
+ if [ -L /dev/$device ]; then
+ cp -a --parents $(readlink -e /dev/$device) $SOURCE_TREE
+ fi
+ cp -a --parents /dev/$device $SOURCE_TREE
+ fi
+ fi
+ done
+}
+
+clear_source_tree() {
+ if [ -d "$SOURCE_TREE" ]; then
+ rm -rf $SOURCE_TREE
+ fi
+}
+
+build_initrd_image() {
+ # Make sure we have any block devices that might be needed:
+ SLOPPY_DEV_LIST=$(cat /proc/partitions)
+ for device in $SLOPPY_DEV_LIST ; do
+ if [ ! -r $SOURCE_TREE/dev/$device ]; then
+ if [ -b /dev/$device ]; then
+ if [ -L /dev/$device ]; then
+ cp -a --parents $(readlink -e /dev/$device) $SOURCE_TREE
+ fi
+ cp -a --parents /dev/$device $SOURCE_TREE
+ fi
+ fi
+ done
+ # Use the output image name written in the initrd-tree if present:
+ if [ ! -z "$(cat $SOURCE_TREE/initrd-name)" ]; then
+ OUTPUT_IMAGE=$(cat $SOURCE_TREE/initrd-name)
+ if [ "$OUTPUT_IMAGE" = "$(basename $OUTPUT_IMAGE)" ]; then
+ OUTPUT_IMAGE=/boot/$OUTPUT_IMAGE
+ fi
+ mkdir -p $(dirname $OUTPUT_IMAGE)
+ fi
+ # Wrap the initrd as an initramfs image and move it into place:
+ ( cd $SOURCE_TREE
+ rm -f $OUTPUT_IMAGE
+ find . | cpio -o -H newc | gzip -9c > $OUTPUT_IMAGE
+ )
+
+ if [ ! -z "${MICROCODE_ARCH}" ] ; then
+ cat ${MICROCODE_ARCH} ${OUTPUT_IMAGE} > ${OUTPUT_IMAGE}.2
+ mv ${OUTPUT_IMAGE}.2 ${OUTPUT_IMAGE}
+ fi
+ echo "$OUTPUT_IMAGE created."
+ echo "Be sure to run lilo again if you use it."
+}
+
+badconf_file() {
+ # This won't really help with what's *wrong* with the file,
+ # but it will at least give them a clue that there's a problem
+ echo "/etc/mkinitrd.conf is bad or does not exist."
+ echo "If the file does not exist, do not pass -F to mkinitrd."
+ exit 1
+}
+
+
+unify_libs() {
+ awk '/=. \// { print $3 }' | sort -u
+}
+
+copy_libs() {
+ # First copy the essential glibc files:
+ find /lib /lib64 -name "ld-*so*" -o -name "libnss_files*so*" -o -name "libnss_compat*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
+
+ # Then copy all remaining libs our initrd files link against:
+ COUNT=1
+ PRFX=$(tempfile --prefix ldd-)
+ TMPFILE=${PRFX}${COUNT}
+
+ find $SOURCE_TREE -type f -exec ldd {} 2>/dev/null \; | unify_libs > $TMPFILE
+ while [ "$COUNT" != "0" ]; do
+ COUNT=$((COUNT+1))
+ for i in $(cat ${TMPFILE}) ; do
+ ldd $i 2>/dev/null
+ done | unify_libs > ${PRFX}${COUNT}
+ if [ $(cat $TMPFILE ${PRFX}${COUNT} | sort |uniq -u | wc -l) -eq 0 ]; then
+ COUNT=0
+ else
+ TMPFILE=${PRFX}${COUNT}
+ fi
+ # emergency eject lever:
+ if [ "$COUNT" = "42" ]; then
+ COUNT=0
+ fi
+ done
+
+ for i in $(cat ${PRFX}* | sort -u) ; do
+ cp -P --parents ${i}* $SOURCE_TREE
+ done
+
+ (
+ cd $SOURCE_TREE
+ for i in $(find -L . -type l -exec readlink -m /{} \; 2>/dev/null ) ; do
+ cp -P --parents ${i} $SOURCE_TREE
+ done
+ )
+
+ rm ${PRFX}*
+}
+
+copy_modconf() {
+ mkdir -p $SOURCE_TREE/etc $SOURCE_TREE/lib
+ cp -a /etc/modprobe.d $SOURCE_TREE/etc
+ cp -a /lib/modprobe.d $SOURCE_TREE/lib/
+}
+
+# If --help is given, print_usage and exit:
+if echo $* | grep -wq '\--help' ; then
+ print_usage
+ exit 0
+fi
+
+# If -V given, print version and exit:
+if echo $* | grep -wq '\-V' ; then
+ echo "mkinitrd version $MKINITRD_VERSION"
+ exit 0
+fi
+
+# Default values if these aren't previously set.
+# Might be set from config file or by -s and -o options too.
+SOURCE_TREE=${SOURCE_TREE:-/boot/initrd-tree}
+OUTPUT_IMAGE=${OUTPUT_IMAGE:-""}
+KERNEL_VERSION=${KERNEL_VERSION:-"$(uname -r)"}
+# The initrd requires udev to function correctly:
+UDEV=1
+
+# Default actions without options:
+if [ -z "$1" ]; then
+ # We need a sensible default for this special case:
+ OUTPUT_IMAGE=${OUTPUT_IMAGE:-/boot/initrd.gz}
+ # If the output tree doesn't exist, create it and then exit:
+ if [ ! -d $SOURCE_TREE ]; then
+ echo "Nothing found at location $SOURCE_TREE, so we will create an"
+ echo -n "initrd directory structure there... "
+ create_new_source_tree
+ echo "done."
+ echo
+ echo "Now cd to $SOURCE_TREE and install some modules in your"
+ echo "module directory (lib/modules/${KERNEL_VERSION}). Then see init"
+ echo "for more information (there are a few other files to edit)."
+ echo "Finally, run mkinitrd again once the initrd-tree is ready,"
+ echo "and $OUTPUT_IMAGE will be created from it."
+ echo
+ exit 0
+ else
+ # If the source tree does exist, the default is to build the initrd
+ # image from it and then exit:
+ build_initrd_image
+ exit 0
+ fi
+fi # default no-option actions
+
+# Parse for the use config file option first or else the other command
+# line options can not override /etc/mkinitrd.conf.
+for opt in "$@"; do
+ if [ "$opt" = "-F" ]; then
+ if [ -e /etc/mkinitrd.conf ]; then
+ . /etc/mkinitrd.conf || badconf_file
+ else
+ badconf_file
+ fi
+ fi
+done
+
+# Parse options:
+while [ ! -z "$1" ]; do
+ case $1 in
+ -c)
+ CLEAR_TREE=1
+ shift
+ ;;
+ -f)
+ ROOTFS="$2"
+ shift 2
+ ;;
+ -h)
+ RESUMEDEV="$2"
+ shift 2
+ ;;
+ -k)
+ KERNEL_VERSION="$2"
+ shift 2
+ ;;
+ -l)
+ KEYMAP="$2"
+ shift 2
+ ;;
+ -m)
+ MODULE_LIST="$2"
+ shift 2
+ ;;
+ -o)
+ # canonicalize filename:
+ OUTPUT_IMAGE="$(readlink -m $2)"
+ shift 2
+ ;;
+ -r)
+ ROOTDEV="$2"
+ shift 2
+ ;;
+ -s)
+ # canonicalize filename:
+ SOURCE_TREE="$(readlink -m $2)"
+ shift 2
+ ;;
+ -u)
+ UDEV=1
+ shift
+ ;;
+ -w)
+ WAIT="$2"
+ shift 2
+ ;;
+ -C)
+ CRYPT=1
+ LUKSDEV="$2"
+ shift 2
+ ;;
+ -K)
+ LUKSKEY="$2"
+ shift 2
+ ;;
+ -T)
+ LUKSTRIM="$2"
+ shift 2
+ ;;
+ -L)
+ LVM=1
+ shift
+ ;;
+ -B)
+ BTRFS=1
+ shift
+ ;;
+ -M)
+ MODCONF=1
+ shift
+ ;;
+ -P)
+ # canonicalize filename:
+ MICROCODE_ARCH="$(readlink -m $2)"
+ if [ ! -e "${MICROCODE_ARCH}" ] ; then
+ echo "Error, the microcode cpio archive ${MICROCODE_ARCH} does not exist."
+ exit 1
+ fi
+ shift 2
+ ;;
+
+ -R)
+ RAID=1
+ shift
+ ;;
+ *) # unknown, prevent infinite loop
+ shift
+ ;;
+ esac
+done
+
+# If kernel modules are needed but the kernel version is absent, exit now:
+if [ ! -d /lib/modules/$KERNEL_VERSION ]; then
+ echo "ERROR: No /lib/modules/$KERNEL_VERSION kernel modules tree found for kernel \"$KERNEL_VERSION\""
+ exit 1
+fi
+
+# If clearing source tree was requested, do that first
+if [ "$CLEAR_TREE" = "1" ]; then
+ clear_source_tree
+fi
+
+# If there's no $SOURCE_TREE, make one now:
+if [ ! -d "$SOURCE_TREE" ]; then
+ create_new_source_tree
+fi
+
+# If $ROOTDEV and $ROOTFS are not set, assume we want the
+# values for the currently mounted /
+# (unless we find that values are already set in the initrd-tree):
+if [ -z "$ROOTDEV" -a -z "$(cat $SOURCE_TREE/rootdev 2>/dev/null)" ]; then
+ ROOTDEV=$(mount | grep ' on / ' | cut -f 1 -d ' ')
+ if [ "$ROOTDEV" = "/dev/root" ]; then # find real root device
+ ROOTDEV="/dev/$(readlink /dev/root)"
+ fi
+fi
+if [ -z "$ROOTFS" -a -z "$(cat $SOURCE_TREE/rootfs 2>/dev/null)" ]; then
+ ROOTFS=$(mount | grep ' on / ' | cut -f 5 -d ' ')
+fi
+# If needed, write them in the initrd-tree:
+if [ ! -z "$ROOTDEV" ]; then
+ echo $ROOTDEV > $SOURCE_TREE/rootdev
+fi
+if [ ! -z "$ROOTFS" ]; then
+ echo $ROOTFS > $SOURCE_TREE/rootfs
+fi
+
+# If $WAIT is not set, assume we need only one second
+# to have all devices done
+# (unless we find that value is already set in the initrd-tree):
+if [ -z "$WAIT" -a -z "$(cat $SOURCE_TREE/wait-for-root)" ]; then
+ WAIT=1
+ # ARM devices need even more time:
+ case "$( uname -m )" in
+ arm*) WAIT=4;;
+ esac
+fi
+if [ ! -z "$WAIT" ]; then
+ echo $WAIT > $SOURCE_TREE/wait-for-root
+fi
+
+# If no OUTPUT_IMAGE was specified, read it from the SOURCE_TREE if possible:
+OUTPUT_IMAGE=${OUTPUT_IMAGE:-"$(cat $SOURCE_TREE/initrd-name)"}
+# If we still have no value, apply the default:
+OUTPUT_IMAGE=${OUTPUT_IMAGE:-"/boot/initrd.gz"}
+# Finally, write the image name into the SOURCE_TREE:
+echo "$OUTPUT_IMAGE" > $SOURCE_TREE/initrd-name
+
+# Fill /resumedev with the swap partition holding the hibernation image
+if [ ! -z "$RESUMEDEV" ]; then
+ echo $RESUMEDEV > $SOURCE_TREE/resumedev
+fi
+
+# Add custom keymap support if one was given
+if [ ! -z "$KEYMAP" ]; then
+ echo $KEYMAP > $SOURCE_TREE/keymap
+ cp /usr/share/mkinitrd/keymaps.tar.gz $SOURCE_TREE/etc/
+fi
+
+# If LUKSDEV was set in the config file, then we need to set CRYPT=1
+if [ ! -z "$LUKSDEV" ]; then
+ CRYPT=1
+fi
+
+# Check for LUKSTRIM
+if [ ! -z "$LUKSTRIM" ]; then
+ echo $LUKSTRIM > $SOURCE_TREE/lukstrim
+fi
+
+# If LUKSKEY was set in the config file, then give it a warm welcome:
+if [ ! -z "$LUKSKEY" ]; then
+ # $SOURCE_TREE/wait-for-root may have been configured earlier in the script,
+ # but we require at least 5 seconds for the USB stick to settle
+ # after insertion :
+ if [ ! -s $SOURCE_TREE/wait-for-root ] || [ $(cat $SOURCE_TREE/wait-for-root) -lt 5 ]; then
+ echo 5 > $SOURCE_TREE/wait-for-root
+ fi
+
+ # Several extra modules are needed to support a vfat formatted USB stick...
+ # assuming here we are using a western codepage.
+ # This possibly adds doublures, but we clean up the MODULE_LIST further down!
+ MODULE_LIST="${MODULE_LIST}:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:ohci-hcd:ehci-hcd:uhci-hcd:usb-storage:hid:usbhid:fat:nls_cp437:nls_iso8859-1:msdos:vfat"
+
+ # Finally, write the lukskey to the initrd-tree:
+ echo $LUKSKEY > $SOURCE_TREE/lukskey
+fi
+
+# Include RAID support in initrd
+if [ ! -z "$RAID" ]; then
+ if [ -r /sbin/mdadm -a -r /sbin/mdmon ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /sbin/mdadm $SOURCE_TREE/sbin/mdadm
+ cp /sbin/mdmon $SOURCE_TREE/sbin/mdmon
+ chmod 0755 $SOURCE_TREE/sbin/mdadm
+ chmod 0755 $SOURCE_TREE/sbin/mdmon
+ mkdir -p $SOURCE_TREE/lib/udev/rules.d
+ echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \
+ $SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules
+ if [ -r /etc/mdadm.conf ] ; then
+ cp /etc/mdadm.conf $SOURCE_TREE/etc
+ fi
+ else
+ echo "ERROR: mdadm and/or mdmon binary is missing, RAID support not installed"
+ fi
+fi
+
+# Include Btrfs support in initrd
+if [ ! -z "$BTRFS" ]; then
+ if [ -r /sbin/btrfs ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /sbin/btrfs $SOURCE_TREE/sbin/btrfs
+ chmod 0755 $SOURCE_TREE/sbin/btrfs
+ else
+ echo "ERROR: btrfs binary is missing, Btrfs support not installed"
+ fi
+fi
+
+# Include udev in initrd
+if [ ! -z "$UDEV" ]; then
+ cp /sbin/udev* $SOURCE_TREE/sbin/
+ cp -a /lib/udev $SOURCE_TREE/lib/
+ # But we don't want all of /lib/udev
+ for file in $(echo $LIBUDEV_BLACKLIST) ; do
+ # Replace with a null script (avoids error spew):
+ cat << EOF > $SOURCE_TREE/lib/udev/$file
+#!/bin/ash
+# This space is intentionally left blank
+EOF
+ done
+fi
+
+# Include LVM support in initrd
+if [ ! -z "$LVM" ]; then
+ if [ -f /sbin/lvm ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /sbin/lvm $SOURCE_TREE/sbin/lvm
+ ( cd $SOURCE_TREE/sbin
+ ln -s lvm vgchange 2>/dev/null
+ ln -s lvm vgscan 2>/dev/null )
+ else
+ echo "LVM binary is missing, LVM support isn't installed"
+ LVM=""
+ fi
+fi
+
+# Include cryptsetup (LUKS) support in initrd
+if [ ! -z "$CRYPT" ]; then
+ if [ -e /usr/sbin/cryptsetup ]; then
+ mkdir -p $SOURCE_TREE/sbin
+ cp /usr/sbin/cryptsetup $SOURCE_TREE/sbin/cryptsetup
+ if [ ! -e $SOURCE_TREE/sbin/udevadm ]; then
+ cat << EOF > $SOURCE_TREE/sbin/udevadm
+#!/bin/sh
+sleep 3
+EOF
+ chmod 0755 $SOURCE_TREE/sbin/udevadm
+ fi
+
+ # Write the underlying luks device to the initrd-tree:
+ echo $LUKSDEV > $SOURCE_TREE/luksdev
+ else
+ echo "Cryptsetup binary is missing, CRYPT support isn't installed"
+ CRYPT=""
+ fi
+fi
+
+# Include device mapper in initrd (needed for LUKS and LVM)
+if [ ! -z "$CRYPT" -o ! -z "$LVM" ]; then
+ cp /sbin/dmsetup $SOURCE_TREE/sbin/dmsetup
+ find /lib /lib64 -name "libdevmapper*so*" 2> /dev/null | xargs -I'{}' cp -P --parents '{}' $SOURCE_TREE/
+ if [ -z "${MODULE_LIST}" ] ; then
+ MODULE_LIST="dm-mod"
+ elif ! echo ${MODULE_LIST} | grep -q dm-mod ; then
+ MODULE_LIST="$MODULE_LIST:dm-mod"
+ fi
+ mkdir -p $SOURCE_TREE/lib/udev/rules.d
+ echo 'KERNEL=="dm-[0-9]*", OPTIONS+="db_persist"' > \
+ $SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules
+fi
+
+# Make module directory:
+if [ ! -d $SOURCE_TREE/lib/modules/$KERNEL_VERSION ]; then
+ mkdir -p $SOURCE_TREE/lib/modules/$KERNEL_VERSION
+fi
+
+# Copy kmod/modprobe stuff to initrd:
+for i in kmod depmod insmod lsmod modinfo modprobe rmmod ; do
+ rm -f $SOURCE_TREE/sbin/$i ;
+ cp -a /sbin/$i $SOURCE_TREE/sbin ;
+done
+
+# Make sure modules.builtin and modules.order are there (for kmod):
+cp /lib/modules/$KERNEL_VERSION/modules.{builtin,order} \
+ $SOURCE_TREE/lib/modules/$KERNEL_VERSION
+
+# If an executable $SOURCE_TREE/load_kernel_modules already exists, then
+# we assume you will want to load the kernel modules mentioned in there.
+# This means, you do not have to explicitly add those on the commandline:
+if [ -x $SOURCE_TREE/load_kernel_modules ]; then
+ MODULE_LIST="${MODULE_LIST}:$(cat $SOURCE_TREE/load_kernel_modules |grep "^modprobe" |rev |cut -d/ -f1 |rev |cut -d. -f1)"
+fi
+
+# If the module list is not empty, copy the modules into place:
+if [ ! -z "$MODULE_LIST" ]; then
+ if grep -q "#modprobe reiserfs" $SOURCE_TREE/load_kernel_modules ; then
+ rm -f $SOURCE_TREE/load_kernel_modules
+ touch $SOURCE_TREE/load_kernel_modules
+ chmod 755 $SOURCE_TREE/load_kernel_modules
+ echo "# This is a script used to load the kernel modules." >> $SOURCE_TREE/load_kernel_modules
+ echo "# To use it, chmod it 755, and then add the insmod" >> $SOURCE_TREE/load_kernel_modules
+ echo "# lines needed to load your modules, like this:" >> $SOURCE_TREE/load_kernel_modules
+ echo >> $SOURCE_TREE/load_kernel_modules
+ fi
+
+ # Sanitize the modules list first, before any further processing.
+ # The awk command eliminates doubles without changing the order:
+ MODULE_LIST=$(echo $MODULE_LIST |tr -s ':' '\n' |awk '!x[$0]++' |tr '\n' ':')
+ MODULE_LIST=$(echo ${MODULE_LIST%:}) # Weed out a trailing ':'
+
+ # Count number of modules
+ # This INDEX number gives us an easy way to find individual
+ # modules and their arguments, as well as tells us how many
+ # times to run through the list
+ if ! echo $MODULE_LIST | grep ':' > /dev/null ; then # only 1 module specified
+ INDEX=1
+ else
+ # Trim excess ':' which will screw this routine:
+ MODULE_LIST=$(echo $MODULE_LIST | tr -s ':')
+ INDEX=1
+ while [ ! "$(echo "$MODULE_LIST" | cut -f $INDEX -d ':' )" = "" ]; do
+ INDEX=$(expr $INDEX + 1)
+ done
+ INDEX=$(expr $INDEX - 1) # Don't include the null value
+ fi
+
+ # Wrap everything in a while loop
+ i=0
+ while [ $i -ne $INDEX ]; do
+ i=$(( $i + 1 ))
+
+ # FULL_MOD is the module plus any arguments (if any)
+ # MODULE is the module name
+ # ARGS is any optional arguments to be passed to the kernel
+ FULL_MOD="$(echo "$MODULE_LIST" | cut -d ':' -f $i)"
+ MODULE="$(echo "$FULL_MOD" | cut -d ' ' -f 1 )"
+ # Test for arguments
+ if echo "$FULL_MOD" | grep ' ' > /dev/null; then
+ ARGS=" $(echo "$FULL_MOD" | cut -d ' ' -f 2- )"
+ else
+ unset ARGS
+ fi
+
+ # Get MODULE deps and prepare modprobe lines
+ /sbin/modprobe --set-version $KERNEL_VERSION --show-depends --ignore-install $MODULE 2>/dev/null \
+ | grep "^insmod " | cut -f 2 -d ' ' | while read SRCMOD; do
+
+ if ! grep -Eq " $(basename $SRCMOD .ko)(\.| |$)" $SOURCE_TREE/load_kernel_modules 2>/dev/null ; then
+ LINE="$(echo "modprobe -v $(basename ${SRCMOD%%.gz} .ko)" )"
+
+ # Test to see if arguments should be passed
+ # Over-ride the previously defined LINE variable if so
+ if [ "$(basename $SRCMOD .ko)" = "$MODULE" ]; then
+ # SRCMOD and MODULE are same, ARGS can be passed
+ LINE="$LINE$ARGS"
+ fi
+
+ fi
+
+ if ! grep -qx "$LINE" $SOURCE_TREE/load_kernel_modules ; then
+ echo "$LINE" >> $SOURCE_TREE/load_kernel_modules
+ fi
+
+ # Try to add the module to the initrd-tree. This should be done
+ # even if it exists there already as we may have changed compilers
+ # or otherwise caused the modules in the initrd-tree to need
+ # replacement.
+ if cp -a --parents $SRCMOD $SOURCE_TREE 2>/dev/null; then
+ echo "OK: $SRCMOD added."
+ # If a module needs firmware, copy that too
+ /sbin/modinfo -F firmware "$SRCMOD" | sed 's/^/\/lib\/firmware\//' |
+ while read SRCFW; do
+ if cp -a --parents "$SRCFW" $SOURCE_TREE 2>/dev/null; then
+ echo "OK: $SRCFW added."
+ else
+ echo "WARNING: Could not find firmware \"$SRCFW\""
+ fi
+ done
+ else
+ echo "WARNING: Could not find module \"$SRCMOD\""
+ fi
+
+ done
+ done
+
+ # Pregenerate the module dependency information
+ depmod -a -b $SOURCE_TREE ${KERNEL_VERSION}
+
+ # Copy /{etc,lib}/modprobe.d/* if desired
+ if [ ! -z $MODCONF ]; then
+ copy_modconf
+ fi
+
+fi
+
+# Copy needed libraries
+copy_libs
+
+# Make sure all libraries have symlinks:
+/sbin/ldconfig $(readlink -f $SOURCE_TREE)/lib/ 2> /dev/null
+/sbin/ldconfig $(readlink -f $SOURCE_TREE)/lib64/ 2> /dev/null
+/sbin/ldconfig
+
+# And finally, build the initrd:
+build_initrd_image
+
diff --git a/patches/source/mkinitrd/mkinitrd.8 b/patches/source/mkinitrd/mkinitrd.8
new file mode 100644
index 00000000..64dad3f4
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.8
@@ -0,0 +1,279 @@
+.\" -*- nroff -*-
+.ds g \" empty
+.ds G \" empty
+.\" Like TP, but if specified indent is more than half
+.\" the current line-length - indent, use the default indent.
+.de Tp
+.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
+.el .TP "\\$1"
+..
+.TH MKINITRD 8 "27 March 2010" "Slackware Version 13.1"
+.SH NAME
+mkinitrd \- create or rebuilt an initrd (initial ramdisk) using initramfs (simple cpio+gzip).
+.SH SYNOPSIS
+.B mkinitrd
+[
+.B \-F
+]
+[
+.B \-c
+]
+[
+.B \-f filesystem
+]
+[
+.B \-h hibernate_partition
+]
+[
+.B \-k kernel_version
+]
+[
+.B \-m module1:module2:module3...
+]
+[
+.B \-o output_file
+]
+[
+.B \-r root_device
+]
+[
+.B \-s source_tree
+]
+[
+.B \-u
+]
+[
+.B \-w wait_time
+]
+[
+.B \-C device1:device2:device3...
+]
+[
+.B \-K luks_keyfile
+]
+[
+.B \-P microcode_archive
+]
+[
+.B \-B
+]
+[
+.B \-L
+]
+[
+.B \-R
+]
+[
+.B \-V
+]
+.SH DESCRIPTION
+.B mkinitrd
+is used to build an initial ramdisk. An initial ramdisk is a very small
+set of files that are loaded into RAM and "mounted" (as initramfs doesn't
+actually use a filesystem) as the kernel boots (before the main root
+filesystem is mounted). The usual reason to use an initrd is because
+you need to load kernel modules before mounting the root partition.
+Usually these modules are required to support the filesystem used by the
+root partition (ext3, reiserfs, xfs), or perhaps the controller that the
+hard drive is attached to (SCSI, RAID, etc). Essentially, there are so many
+different options available in modern Linux kernels that it isn't practical
+to try to ship many different kernels to try to cover everyone's needs.
+It's a lot more flexible to ship a generic kernel and a set of kernel
+modules for it.
+.SH OPTIONS
+.TP
+.B \-F
+Use the contents of /etc/mkinitrd.conf as options to mkinitrd (optional).
+If this is used in conjunction with any other options passed on the command
+line, the command-line options will override the config file options.
+.br
+See mkinitrd.conf(5) for details.
+.TP
+.B \-c
+Clear the existing initrd tree (by default in /boot/initrd-tree/) first.
+If this is not done, running mkinitrd will add additional modules to the
+existing initrd.
+.TP
+.B \-f filesystem
+Specify the filesystem to use for the root partition. If this isn't given,
+mount will usually figure it out. This option must be used together with the
+\-r option in order to be beneficial.
+.TP
+.B \--help
+Display a help summary.
+.TP
+.B \-h hibernate_partition
+Specify the swap partition holding the hibernation image.
+.TP
+.B \-k kernel version
+Use kernel modules from the specified kernel version. mkinitrd will look
+for them in /lib/modules/(kernel version).
+.TP
+.B \-l keymap
+Load an alternative keyboard mapping. All supported keyboard mappings
+can be found in /usr/share/mkinitrd/keymaps.tar.gz
+Leave the '.bmap' out when you supply this parameter. E.g. '-l nl' will
+add support for dutch keyboard mapping to the initrd.
+.TP
+.B \-m module list
+This is a list of colon-delimited modules to build into the initrd.
+Any dependencies of requested modules will also be added to the initrd.
+Additional options may be added to use when loading the kernel modules
+(but in this case the entire list must be wrapped with double quotes).
+.TP
+.B \-o output image
+The file to write the initrd to. (default: /boot/initrd.gz)
+.TP
+.B \-r root partition
+Specify the device to be used as the root partition. If this isn't given, the
+kernel default will be used (which is usually fine). This option must be used
+together with the \-f option in order to be beneficial.
+.TP
+.B \-s source tree
+The directory to use as the source for the initrd. (default: /boot/initrd-tree/)
+.TP
+.B \-u
+Include udev in the initrd.
+.TP
+.B \-w
+The -w option specifies how long to wait in seconds before assuming that all the
+drives are spun up and ready to go.
+.TP
+.B \-C device list
+A colon (:) delimited list of luks encrypted block devices to be unlocked by
+the initrd using cryptsetup. All devices that must be unlocked in order to
+access the root filesystem must be specified. e.g.
+
+ -C /dev/sda2:/dev/sda3
+
+Each unlocked device will be assigned an automatically generated luks device
+name of the form luks<device> where '<device>' will be the basename of the
+encrypted device. e.g.
+
+ /dev/mapper/lukssda2
+
+As a convenience to users, where -r specifies one of the device names listed
+on the -C option it will be automatically adjusted to use the correct luks
+device name. i.e.
+
+ "-C /dev/sda2 -r /dev/sda2" and
+ "-C /dev/sda2 -r /dev/mapper/lukssda2"
+
+are equivalent.
+.br
+(Use with '-r' option).
+.TP
+.B \-K luks_keyfile
+When using cryptsetup to encrypt your partition, you can use a keyfile instead
+of a passphrase to unlock the LUKS volume. The LUKSKEY variable holds the
+filename of a keyfile, as well as the label (or uuid) of the partition this
+file is on. This way, you can unlock your computer automatically if you have a
+USB stick with your LUKS key inserted at boot. A passphrase will still be asked
+if the LUKS key can not be found.
+.br
+For example, if your USB thumb drive has a FAT partition with label
+"TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks", then
+you need to set:
+
+ -K LABEL=TRAVELSTICK:/keys/alien.luks
+.TP
+.B \-T device list
+A colon (:) delimited list of luks encrypted block devices to be passed the
+"--allow-discards" option when unlocked by the initrd using cryptsetup, e.g.
+
+ -T /dev/sda2:/dev/sda4
+
+This has the effect of allowing TRIM on SSD drives. Be sure your SSD supports
+this feature (correctly) before enabling it. See fstrim(8) for more information.
+.TP
+.B \-P microcode_archive
+This option specifies a cpio archive containing updated microcode for your CPU.
+CPU manufacturers occasionally release such updates to fix bugs in the microcode
+currently embedded in the CPU. The microcode archive will be prepended to the
+output initrd, where the kernel will find it for early patching:
+
+ -P /boot/intel-ucode.cpio
+
+.TP
+.B \-B
+This option adds the btrfs utility to the initrd so that multi-device filesystems
+will be picked up by a scan (/sbin/btrfs device scan). This is needed if the
+root filesystem is a Btrfs multi-device filesystem.
+.TP
+.B \-L
+This option adds LVM support to the initrd, if the tools are
+available on the system.
+.TP
+.B \-R
+This option adds RAID support to the initrd, if a static mdadm binary is
+available on the system.
+.TP
+.B \-V
+Display version information and exit.
+.SH EXAMPLES
+A simple example: Build an initrd for a reiserfs root partition:
+
+ mkinitrd -c -m reiserfs
+
+Another example: Build an initrd image using Linux 2.6.33.1 kernel
+modules for a system with an ext3 root partition on /dev/sdb3:
+
+ mkinitrd -c -k 2.6.33.1 -m ext3 -f ext3 -r /dev/sdb3
+
+An example of a single encrypted partition setup:
+.br
+As a user convenience, the value for the "-r" option may also be specified as
+"/dev/sda2" in this example:
+
+ mkinitrd -c -k 2.6.33.1 \\
+ -m ext4:ehci-hcd:uhci-hcd:usbhid \\
+ -f ext4 -r /dev/mapper/lukssda2 \\
+ -C /dev/sda2 \\
+ -l uk
+
+Finally, A more complex example:
+.br
+This one is for a LVM Volume Group (rootvg) comprising of two LVM Physical
+Volumes, each of which is on a LUKS encrypted partition that will need to be
+unlocked before the root filesystem (/dev/rootvg/lvroot) can be accessed.
+
+ mkinitrd -c -k 2.6.29.6 \\
+ -m ext4:ehci-hcd:uhci-hcd:usbhid \\
+ -f ext4 -r /dev/rootvg/lvroot \\
+ -L -C /dev/sda2:/dev/sdb2 \\
+ -l uk
+
+If run without options, mkinitrd will rebuild an initrd image using
+the contents of the $SOURCE_TREE directory, or, if that directory
+does not exist it will be created and populated, and then mkinitrd
+will exit. These options are handy for building an initrd mostly
+by hand. After creating /boot/initrd-tree/, you can add modules and
+edit files by hand, and then rerun mkinitrd to create the initrd.
+
+Once the initrd is created, you'll need to tell your boot loader
+to load it. If you boot with LILO, you will need to add an initrd
+line to /etc/lilo.conf. Here's a section of lilo.conf that shows
+how to set this up:
+
+ # Linux bootable partition config begins
+ image = /boot/vmlinuz-generic-2.6.33.1
+ initrd = /boot/initrd.gz
+ root = /dev/sda3
+ label = Linux26331
+ read-only
+ # Linux bootable partition config ends
+
+Note that the line "root = /dev/sda3" is not needed if the root device
+has been configured in the initrd image.
+
+Once you've created the initrd and editing /etc/lilo.conf, you will
+need to run 'lilo' to write out the changed boot block. The next
+time you reboot the initrd should be loaded along with the kernel.
+
+Have fun!
+
+.SH SEE ALSO
+mkinitrd.conf (5)
+
+.SH AUTHOR
+Patrick J. Volkerding <volkerdi@slackware.com>
diff --git a/patches/source/mkinitrd/mkinitrd.SlackBuild b/patches/source/mkinitrd/mkinitrd.SlackBuild
new file mode 100755
index 00000000..c7529be1
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.SlackBuild
@@ -0,0 +1,146 @@
+#!/bin/sh
+
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015, 2016, 2017 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.
+
+
+VERSION=${VERSION:-1.4.10}
+BB=1.20.2
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j7}
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mkinitrd
+
+# Write a warning to stdout if the mkinitrd script has a different version:
+eval $( grep "^MKINITRD_VERSION=" $CWD/mkinitrd )
+if [ "$VERSION" != "$MKINITRD_VERSION" ]; then
+ echo "The version of this package ($VERSION) is not equal to the version of the mkinitrd script ($MKINITRD_VERSION)."
+ sleep 5
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf busybox-$BB
+tar xvf $CWD/busybox-$BB.tar.?z* || exit 1
+cd busybox-$BB
+
+if [ -d $CWD/fixes-$BB ]; then
+ for pfile in $CWD/fixes-$BB/*.patch ; do
+ patch -p1 < $pfile || exit 1
+ done
+fi
+
+chown -R root:root .
+sed -e \
+ 's#^CONFIG_PREFIX=.*#CONFIG_PREFIX="'$PKG'/usr/share/mkinitrd/initrd-tree"#' \
+ $CWD/busybox-dot-config > .config
+make oldconfig
+make $NUMJOBS || make || exit 1
+
+mkdir -p $PKG/usr/share/mkinitrd/initrd-tree/{bin,sbin}
+make install || exit 1
+rm -f $PKG/usr/share/mkinitrd/initrd-tree/linuxrc
+
+# Copying additional files:
+cp -a $CWD/mkinitrd_command_generator.sh $PKG/usr/share/mkinitrd
+chown root:root $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh
+chmod 755 $PKG/usr/share/mkinitrd/mkinitrd_command_generator.sh
+cp -a $CWD/keymaps.tar.gz $PKG/usr/share/mkinitrd
+chown root:root $PKG/usr/share/mkinitrd/keymaps.tar.gz
+chmod 644 $PKG/usr/share/mkinitrd/keymaps.tar.gz
+
+# Zip up the initrd-tree:
+( cd $PKG/usr/share/mkinitrd/initrd-tree
+ tar xf $CWD/_initrd-tree.tar.gz
+ cat $CWD/init > init
+
+ # These are useful for ARM:
+ mknod -m 644 dev/random c 1 8
+ mknod -m 644 dev/urandom c 1 9
+
+ tar czf ../initrd-tree.tar.gz .
+)
+rm -rf $PKG/usr/share/mkinitrd/initrd-tree
+
+# Add busybox docs:
+mkdir -p $PKG/usr/doc/busybox-$BB
+cp -a AUTHORS COPYING* INSTALL LICENSE README* \
+ $PKG/usr/doc/busybox-$BB
+cp -a e2fsprogs/README $PKG/usr/doc/busybox-$BB/README.e2fsprogs
+cp -a libbb/README $PKG/usr/doc/busybox-$BB/README.libbb
+cp -a shell/README $PKG/usr/doc/busybox-$BB/README.shell
+cp -a testsuite/README $PKG/usr/doc/busybox-$BB/README.testsuite
+
+mkdir -p $PKG/sbin
+cp -a $CWD/mkinitrd $PKG/sbin/mkinitrd
+chown root:root $PKG/sbin/mkinitrd
+chmod 755 $PKG/sbin/mkinitrd
+
+mkdir -p $PKG/usr/man/man{5,8}
+cat $CWD/mkinitrd.conf.5 | gzip -9c > $PKG/usr/man/man5/mkinitrd.conf.5.gz
+cat $CWD/mkinitrd.8 | gzip -9c > $PKG/usr/man/man8/mkinitrd.8.gz
+cat $CWD/mkinitrd_command_generator.8 | gzip -9c > $PKG/usr/man/man8/mkinitrd_command_generator.8.gz
+
+mkdir -p $PKG/etc
+cp -a $CWD/mkinitrd.conf.sample $PKG/etc/mkinitrd.conf.sample
+# ARM systems often need more time to find devices:
+case "$( uname -m )" in
+ arm*) sed -e 's@#WAIT="1"@#WAIT="4"@g' \
+ -i $PKG/etc/mkinitrd.conf.sample;;
+esac
+chown root:root $PKG/etc/mkinitrd.conf.sample
+chmod 644 $PKG/etc/mkinitrd.conf.sample
+
+mkdir -p $PKG/usr/doc/mkinitrd-$VERSION
+sed $CWD/README.initrd \
+ -e "s,@DATE@,$(date),g" \
+ -e "s,@KERNEL_VERSION@,$(uname -r),g" \
+ -e "s,@PACKAGE_VERSION@,$(uname -r | tr - _),g" \
+ -e "s,@LILO_KERNEL_NAME@,$(echo $(uname -r) | tr -d . | tr -d - ),g" \
+ -e "s,@MKINITRD_VERSION@,$VERSION,g" \
+ -e "s,@ARCH@,$ARCH,g" \
+ -e "s,@BUILD@,$BUILD,g" \
+ > $PKG/usr/doc/mkinitrd-$VERSION/README.initrd
+
+mkdir $PKG/boot
+ln -sf /usr/doc/mkinitrd-$VERSION/README.initrd $PKG/boot/README.initrd
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/mkinitrd-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/mkinitrd/mkinitrd.conf.5 b/patches/source/mkinitrd/mkinitrd.conf.5
new file mode 100644
index 00000000..65c18018
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.conf.5
@@ -0,0 +1,244 @@
+.\" mkinitrd.5 Robby Workman <rworkman@slackware.com>
+.\" 28 August 2010 "
+
+.TH MKINITRD.CONF 5 "27 March 2010" "Slackware 13.1"
+.SH NAME
+.B mkinitrd.conf(5)
+.SH SYNOPSIS
+.B mkinitrd.conf - optional configuration file for
+.I mkinitrd(8)
+
+.SH DESCRIPTION
+The
+.I mkinitrd.conf
+file contains options to be passed to
+.I mkinitrd(8)
+on every run if mkinitrd is executed with the -F flag.
+.br
+It is intended as a fast and easy way for the system administrator to
+pass options to mkinitrd without having to type them on each execution.
+
+Options passed to
+.I mkinitrd(8)
+on the command line will override any
+values set in the config file.
+
+.SH OPTIONS AND SYNTAX
+
+All options are in the format of OPTION="value"
+.br
+Unset variables have no effect.
+
+.TP 5
+.I SOURCE_TREE
+This is the location for the initrd's source tree.
+.br
+Defaults to "/boot/initrd-tree"
+
+.TP 5
+.I CLEAR_TREE
+This option specifies whether to clear the initrd source tree prior to
+creating the initrd.
+.br
+This requires a value of either "0" or "1" where 0=no and 1=yes
+.br
+Examples:
+.br
+CLEAR_TREE="0" # Do not clear initrd tree first
+.br
+CLEAR_TREE="1" # Clear initrd tree first
+
+It is recommended to leave this unset and pass "-c" on the command line
+when clearing the tree is desired. Clearing the tree is not desirable
+if you wish to build support for more than one kernel into the initrd
+image.
+
+.TP 5
+.I OUTPUT_IMAGE
+This is the location for the initrd image that is created.
+.br
+Defaults to "/boot/initrd.gz"
+
+.TP 5
+.I KERNEL_VERSION
+This is the kernel version for which the initrd should be created.
+.br
+Defaults to "$(uname -r)"
+
+.TP 5
+.I KEYMAP
+This is the custom keyboard map that should be loaded instead of the
+default 'us' keymap.
+.br
+The file /usr/share/mkinitrd/keymaps.tar.gz contains all possible keymaps
+to choose from (omit the '.bmap' extension in the mkinitrd command)
+.br
+Example: KEYMAP="nl"
+
+.TP 5
+.I MODULE_LIST
+This should be a colon-separated list of modules you wish to be included
+in the initrd image.
+.br
+Example: MODULE_LIST="ext3:mbcache:jbd"
+
+If you have loadtime options that you need to specify when loading kernel
+modules, those can be added here as well.
+.br
+Example: MODULE_LIST="module1:module2 option=1:module3"
+
+.TP 5
+.I LUKSDEV
+Contains a colon (:) delimited list of luks encrypted block devices to be
+unlocked by the initrd using cryptsetup. All devices that must be unlocked
+in order to access the root filesystem must be specified.
+.br
+Example: LUKSDEV="/dev/sda2:/dev/sda3"
+
+Each unlocked device will be assigned an automatically generated luks device
+name of the form luks<device> where '<device>' will be the basename of the
+encrypted device. e.g.
+
+ /dev/mapper/lukssda2
+
+As a convenience to users, if
+.I ROOTDEV
+(see below) specifies one of the device names listed in the
+.I LUKSDEV
+option, then it will be automatically adjusted to use the correct luks
+device name. i.e. when specifying
+.I "LUKSDEV=/dev/sda2"
+then
+.I "ROOTDEV=/dev/sda2"
+and
+.I "ROOTDEV=/dev/mapper/lukssda2"
+are equivalent.
+
+.TP 5
+.I LUKSKEY
+When using cryptsetup to encrypt your partition, you can use a keyfile instead
+of a passphrase to unlock the LUKS volume. The LUKSKEY variable holds the
+filename of a keyfile, as well as the label (or uuid) of the partition this
+file is on. This way, you can unlock your computer automatically if you have a
+USB stick with your LUKS key inserted at boot. A passphrase will still be asked
+if the LUKS key can not be found.
+.br
+For example, if your USB thumb drive has a FAT partition with label
+"TRAVELSTICK" and the actual keyfile is called "/keys/alien.luks", then
+you need to set:
+.br
+LUKSKEY="LABEL=TRAVELSTICK:/keys/alien.luks"
+
+.TP 5
+.I LUKSTRIM
+Contains a colon (:) delimited list of luks encrypted block devices to be
+passed the "--allow-discards" option when unlocked by the initrd using
+cryptsetup. This has the effect of allowing TRIM on SSD drives. Be sure
+your SSD supports this feature (correctly) before enabling it.
+.br
+See fstrim(8) for more information.
+.br
+Example: LUKSTRIM="/dev/sda2:/dev/sda4"
+
+.TP 5
+.I ROOTDEV
+The device on which your root filesystem is located.
+.br
+Example: ROOTDEV="/dev/sda2"
+
+If you are using cryptsetup and an encrypted root filesystem, be sure to
+read the option above for LUKSDEV or Bad Things will happen.
+
+.TP 5
+.I ROOTFS
+The filesystem type of your root filesystem
+.br
+Example: ROOTFS="ext3"
+
+.TP 5
+.I RAID
+This option adds the mdadm binary to the initrd to support RAID.
+Additional modules may be required, depending on your kernel
+configuration. If you wish to add LVM support to the initrd, then
+set this to 1; otherwise, leave it unset or set it to 0.
+.br
+Examples:
+.br
+RAID="0" # Do not add RAID support to initrd
+.br
+RAID="1" # Add RAID support to initrd
+
+.TP 5
+.I LVM
+This option adds support for LVM partitions into the initrd.
+If you wish to add LVM support to the initrd, then set this to 1;
+otherwise, leave it unset or set it to 0.
+.br
+Examples:
+.br
+LVM="0" # Do not add LVM support to initrd
+.br
+LVM="1" # Add LVM support to initrd
+
+.TP 5
+.I UDEV
+Use UDEV in the initrd.
+.br
+Examples:
+.br
+UDEV="0" # Do not use udev in the initrd
+.br
+UDEV="1" # Use udev in the initrd (this is the default)
+
+.TP 5
+.I WAIT
+This defines the time to wait, in seconds, until all disks are detected.
+.br
+This is useful for allowing extra time that might be needed for slow usb disks or systems with large amounts of storage to become ready.
+.br
+If not defined, the default is 1 second.
+
+.TP 5
+.I RESUMEDEV
+The swap partition holding your hibernation image.
+.br
+Example: RESUMEDEV="/dev/sda2"
+
+.TP 5
+.I MODCONF
+This option defines whether to copy the module-init-tools config files
+from /etc/modprobe.d/ into the initrd. This will not usually be necessary,
+but if you need certain modules to be loaded with special options, and you
+have this configured in a file in /etc/modprobe.d/, this is one way to
+accomplish the desired goal.
+.br
+Examples:
+.br
+MODCONF="0" # Do not add /etc/modprobe.d/* to the initrd
+.br
+MODCONF="1" # Add /etc/modprobe.d/* to the initrd
+
+.TP 5
+.I MICROCODE_ARCH
+This option specifies a cpio archive containing updated microcode for your CPU.
+CPU manufacturers occasionally release such updates to fix bugs in the microcode
+currently embedded in the CPU. The microcode archive will be prepended to the
+output initrd, where the kernel will find it for early patching.
+.br
+Examples:
+.br
+MICROCODE_ARCH="/boot/intel-ucode.cpio"
+
+.SH FILES
+.I /etc/mkinitrd.conf
+.br
+See /etc/mkinitrd.conf.sample
+
+.SH "SEE ALSO"
+.BR mkinitrd "(8)"
+
+.SH BUGS
+None known :-)
+
+.SH MISCELLANEOUS
+Support for mkinitrd.conf was added in mkinitrd-1.3.0
diff --git a/patches/source/mkinitrd/mkinitrd.conf.sample b/patches/source/mkinitrd/mkinitrd.conf.sample
new file mode 100644
index 00000000..70256ef3
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd.conf.sample
@@ -0,0 +1,21 @@
+# mkinitrd.conf.sample
+# See "man mkinitrd.conf" for details on the syntax of this file
+#
+#SOURCE_TREE="/boot/initrd-tree"
+#CLEAR_TREE="0"
+#OUTPUT_IMAGE="/boot/initrd.gz"
+#KERNEL_VERSION="$(uname -r)"
+#KEYMAP="us"
+#MODULE_LIST="ext4"
+#LUKSDEV="/dev/sda2"
+#LUKSTRIM="/dev/sda2" # verify support with 'hdparm -I $dev | grep TRIM'
+#LUKSKEY="LABEL=TRAVELSTICK:/keys/alienbob.luks"
+#ROOTDEV="/dev/sda1"
+#ROOTFS="ext4"
+#RESUMEDEV="/dev/sda2"
+#RAID="0"
+#LVM="0"
+#UDEV="1"
+#MODCONF="0"
+#MICROCODE_ARCH="/boot/intel-ucode.cpio"
+#WAIT="1"
diff --git a/patches/source/mkinitrd/mkinitrd_command_generator.8 b/patches/source/mkinitrd/mkinitrd_command_generator.8
new file mode 100644
index 00000000..954fab48
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd_command_generator.8
@@ -0,0 +1,187 @@
+'\" t
+.\" Title: mkinitrd_command_generator
+.\" Author: Eric Hameleers
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 2016-02-07
+.\" Manual: Slackware Tools
+.\" Source: http://www.slackware.com 1.40
+.\" Language: English
+.\"
+.TH "MKINITRD_COMMAND_GEN" "8" "2016-02-07" "http://www\&.slackware\&.com" "Slackware Tools"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+mkinitrd_command_generator \- mkinitrd the easy way
+.SH "SYNOPSIS"
+.sp
+.nf
+mkinitrd_command_generator\&.sh [ \fIoptions\fR ] [ \fIkernel_filename\fR ]
+.fi
+.SH "OPTIONS"
+.PP
+\fB\-a \fR\fB\fIadditional params\fR\fR
+.RS 4
+Additional parameters to pass to mkinitrd\&.
+.RE
+.PP
+\fB\-c | \-\-conf\fR
+.RS 4
+Show a suitable mkinitrd configuration file\&.
+.RE
+.PP
+\fB\-h | \-\-help\fR
+.RS 4
+Show this help\&.
+.RE
+.PP
+\fB\-i | \-\-interactive\fR
+.RS 4
+Navigate through menus instead of using commandline arguments\&.
+.RE
+.PP
+\fB\-\-longhelp\fR
+.RS 4
+Show more detailed information/examples\&.
+.RE
+.PP
+\fB\-k \fR\fB\fIkernelversion\fR\fR
+.RS 4
+Use specific kernel version\&.
+.RE
+.PP
+\fB\-m \fR\fB\fIadditional mods\fR\fR
+.RS 4
+Additional modules to pass to mkinitrd, separated by colons (:)\&.
+.RE
+.PP
+\fB\-l | \-\-lilo\fR
+.RS 4
+Only show lilo\&.conf section (requires a kernel_filename)\&.
+.RE
+.PP
+\fB\-r | \-\-run\fR
+.RS 4
+Only show
+\fImkinitrd\fR
+command\&.
+.RE
+.SH "DESCRIPTION"
+.sp
+This script is useful in situations where you require an initrd image to boot your computer\&.
+.sp
+For instance, when booting a kernel that does not have support for your storage or root filesystem built in (such as the Slackware \fIgeneric\fR kernels)\&.
+.sp
+When you run the script without parameters, it will examine your running system, your current kernel version and will output an example of a \fImkinitrd\fR commandline that you can use to generate an initrd image containing enough driver support to boot the computer\&.
+.sp
+You can make it more specific: when you add the filename of a kernel as parameter to the script, it will determine the kernel version from that kernel, and also give an example of the lines that you should add to your \fI/etc/lilo\&.conf\fR file\&.
+.sp
+If you want your initrd image to have a custom name instead of the default \fI/boot/initrd\&.gz\fR you can add it as another parameter to the script, as follows:
+.sp
+mkinitrd_command_generator\&.sh \-a "\-o \fI/boot/custom\&.gz\fR"
+.sp
+The arguments to the \fI\-a\fR parameter will be used as additional arguments to the \fImkinitrd\fR command\&.
+.sp
+If you need additional modules in the initrd image, apart from what the script determines, you can pass then to the script using the \fI\-m\fR parameter as follows:
+.sp
+mkinitrd_command_generator\&.sh \-m "uhci\-hcd:usbhid:hid:hid\-generic"
+.sp
+The above example adds support for USB keyboards to the initrd \- you may need that if you have encrypted your root partition and need to enter a passphrase using a USB keyboard\&.
+.sp
+Instead of copying and pasting the script\(cqs output, you can create an initrd by directly executing the output, like in this example:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$(mkinitrd_command_generator\&.sh \-\-run /boot/vmlinuz\-generic\-4\&.4\&.1)
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+That used the \fI\-r\fR or \fI\-\-run\fR switch to make the script only write the \fImkinitrd\fR commandline to the terminal\&.
+.sp
+When you want to add a section for a specific kernel to \fI/etc/lilo\&.conf\fR directly, use the \fI\-l\fR or \fI\-\-lilo\fR switch and use a command like in this example:
+.sp
+mkinitrd_command_generator\&.sh \-\-lilo /boot/vmlinuz\-generic\-smp\-4\&.4\&.1 >>/etc/lilo\&.conf
+.sp
+That command will result in the following lines being added to your \fI/etc/lilo\&.conf\fR file (example for my hardware):
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fI# Linux bootable partition config begins\fR
+\fI# initrd created with \*(Aqmkinitrd \-c \-k 4\&.4\&.1 \-m mbcache:jbd2:ext4 \-f ext4 \-r /dev/sda7 \-u \-o /boot/initrd\&.gz\fR\*(Aq
+image = /boot/vmlinuz\-generic\-4\&.4\&.1
+initrd = /boot/initrd\&.gz
+root = /dev/sda7
+label = 4\&.4\&.1
+read\-only
+\fI# Linux bootable partition config ends\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+The last two examples show how easy it is to configure your computer for the use of an initrd if you need one\&. The only thing left to do afterwards is running \fIlilo\fR\&.
+.SH "EXIT STATUS"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+\fB0\fR Success
+\fB1\fR Failure
+.fi
+.if n \{\
+.RE
+.\}
+.SH "FILES"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+/usr/share/mkinitrd/mkinitrd_command_generator\&.sh
+.fi
+.if n \{\
+.RE
+.\}
+.SH "BUGS"
+.sp
+Report bugs to Eric Hameleers <alien@slackware\&.com>
+.SH "SEE ALSO"
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+mkinitrd(1), lilo\&.conf(1)
+.fi
+.if n \{\
+.RE
+.\}
+.SH "AUTHOR"
+.PP
+\fBEric Hameleers\fR
+.RS 4
+Author.
+.RE
diff --git a/patches/source/mkinitrd/mkinitrd_command_generator.sh b/patches/source/mkinitrd/mkinitrd_command_generator.sh
new file mode 100644
index 00000000..33d9c9de
--- /dev/null
+++ b/patches/source/mkinitrd/mkinitrd_command_generator.sh
@@ -0,0 +1,872 @@
+#!/bin/sh
+# $Id: mkinitrd_command_generator.sh,v 1.45 2011/02/17 09:27:05 eha Exp eha $
+# Copyright 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2011 Eric Hameleers, Eindhoven, Netherlands
+# Contact: <alien@slackware.com>
+# Copyright 2008, 2009 PiterPUNK, Sao Paulo, SP, Brazil
+# Contact: <piterpunk@slackware.com>
+# 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.
+# -----------------------------------------------------------------------------
+#
+# Create an initrd which fits the system.
+# Take into account the use of LVM/LUKS/RAID.
+# Find out about any hardware drivers the system may need in an initrd when
+# booting from a generic lightweight kernel.
+#
+# -----------------------------------------------------------------------------
+
+# The script's revision number will be displayed in the help text:
+REV=$( echo "$Revision: 1.45 $" | cut -d' ' -f2 )
+
+# Define some essential parameter values:
+USING_LVM=""
+USING_LUKS=""
+USING_RAID=""
+MLIST=""
+REALDEV="" # The device that contains the LUKS volume
+BASEDEV="" # Lowest level device (raw block device or RAID volume)
+
+FSTAB=${FSTAB:-"/etc/fstab"} # so we can test with alternate fstab files
+
+# These are needed by -c and -i options:
+SOURCE_TREE=${SOURCE_TREE:-"/boot/initrd-tree"}
+CLEAR_TREE=${CLEAR_TREE:-1}
+KEYMAP=${KEYMAP:-"us"}
+UDEV=${UDEV:-1}
+# ARM devices need more time:
+case "$( uname -m )" in
+ arm*) WAIT_DEFAULT=4;;
+ *) WAIT_DEFAULT=1;;
+esac
+WAIT=${WAIT:-$WAIT_DEFAULT}
+
+# A basic explanation of the commandline parameters:
+basic_usage() {
+ cat <<-EOT
+
+ *** $(basename $0) revision $REV ***
+ Usage:
+ $(basename $0) [ options ] [ kernel_filename ]
+ Options:
+ -a <"additional params"> Additional parameters to pass to mkinitrd.
+ -c | --conf Show a suitable mkinitrd configuration file.
+ -h | --help Show this help.
+ -i | --interactive Navigate through menus instead of using
+ commandline arguments.
+ --longhelp Show more detailed information/examples.
+ -k <kernelversion> Use specific kernel version.
+ -m <"additional mods"> Additional modules to pass to mkinitrd,
+ separated by colons (:).
+ -l | --lilo Only show lilo.conf section
+ (requires a kernel_filename).
+ -r | --run Only show 'mkinitrd' command.
+ EOT
+}
+
+# More of a tutorial here:
+extended_usage() {
+ cat <<-EOT
+
+ This script is useful in situations where you require an initrd image
+ to boot your computer.
+ For instance, when booting a kernel that does not have support for your
+ storage or root filesystem built in (such as the Slackware 'generic'
+ kernels').
+
+ * When you run the script without parameters, it will examine your
+ running system, your current kernel version and will output an example
+ of a 'mkinitrd' commandline that you can use to generate an initrd
+ image containing enough driver support to boot the computer.
+
+ * You can make it more specific: when you add the filename of a kernel
+ as parameter to the script, it will determine the kernel version from
+ that kernel, and also give an example of the lines that you should add
+ to your '/etc/lilo.conf' file.
+
+ * If you want your initrd image to have a custom name instead of the
+ default '/boot/initrd.gz' you can add it as another parameter to the
+ script, as follows:
+
+ $(basename $0) -a "-o /boot/custom.gz"
+
+ The arguments to the '-a' parameter will be used as additional arguments
+ to the 'mkinitrd' command.
+
+ * If you need additional modules in the initrd image, apart from what
+ the script determines, you can pass then to the script using the '-m'
+ parameter as follows:
+
+ $(basename $0) -m "uhci-hcd:usbhid:hid_generic"
+
+ The above example adds support for USB keyboards to the initrd - you
+ may need that if you have encrypted your root partition and need to
+ enter a passphrase using a USB keyboard.
+
+ * Instead of copying and pasting the script's output, you can create
+ an initrd by directly executing the output, like in this example:
+
+ EOT
+
+ echo " \$($(basename $0) --run /boot/vmlinuz-generic-smp-2.6.35.11-smp)"
+
+ cat <<-EOT
+
+ That used the '-r' or '--run' switch to make the script only write
+ the 'mkinitrd' commandline to the terminal.
+
+ * When you want to add a section for a specific kernel to
+ '/etc/lilo.conf' directly, use the '-l' or '--lilo' switch and use a
+ command like in this example:
+
+ EOT
+
+ echo " $(basename $0) --lilo /boot/vmlinuz-generic-smp-2.6.35.11-smp >>/etc/lilo.conf"
+
+ cat <<-EOT
+
+ That command will result in the following lines being added to your
+ '/etc/lilo.conf' file (example for my hardware):
+
+ # Linux bootable partition config begins
+ # initrd created with 'mkinitrd -c -k 2.6.35.11-smp -m ata_generic:pata_amd:mbcache:jbd:ext3 -f ext3 -r /dev/hda7'
+ image = /boot/vmlinuz-generic-smp-2.6.35.11-smp
+ initrd = /boot/initrd.gz
+ root = /dev/hda7
+ label = 2.6.35.11-smp
+ read-only
+ # Linux bootable partition config ends
+
+ The last two examples show how easy it is to configure your computer
+ for the use of an initrd if you need one. The only thing left to do
+ afterwards is running 'lilo'.
+
+ EOT
+}
+
+# Find the device that holds the root partition:
+get_root_device() {
+ if [ -e $FSTAB ]; then
+ RD=$(cat $FSTAB |tr '\t' ' ' |grep -v '^ *#' |tr -s ' ' |grep ' / ' |cut -f1 -d' ')
+ if [ "$(echo $RD | cut -f1 -d=)" = "LABEL" -o "$(echo $RD | cut -f1 -d=)" = "UUID" ]; then
+ DKEY=$(echo $RD | cut -f1 -d=)
+ # The value can be LABEL=foo or LABEL='foo' or LABEL="foo"
+ DVAL=$(echo $RD | cut -f2 -d= | tr -d "'\042")
+ RD=$(/sbin/blkid | grep -w $DKEY | grep -w $DVAL | cut -f1 -d:)
+ fi
+ else
+ RD=$(grep -m1 "^/dev/.*[[:blank:]]/[[:blank:]]" /proc/mounts | cut -f1 -d' ')
+ fi
+ echo $RD
+}
+
+# Get the root fs information:
+get_rootfs_type() {
+ if $(type blkid 1>/dev/null 2>&1) ; then
+ blkid -s TYPE -o value $ROOTDEV
+ elif $(type vol_id 1>/dev/null 2>&1) ; then
+ vol_id $ROOTDEV | grep ID_FS_TYPE | cut -f2 -d=
+ else
+ # As a fallback, use:
+ cat $FSTAB |tr '\t' ' ' |grep -v '^ *#' |tr -s ' ' |grep ' / ' |cut -f3 -d' '
+ fi
+}
+
+# Add the module(s) needed for the root filesystem:
+add_rootfs_module() {
+ local FSMOD
+ FSMOD=$(/sbin/modprobe --set-version $KVER --show-depends ${ROOTFS} 2>/dev/null | while read LINE; do
+ echo $(basename $(echo $LINE | cut -d' ' -f2) .ko )
+ done)
+ if [ -n "$FSMOD" ]; then
+ [ -n "$MLIST" ] && echo "$MLIST:$(echo $FSMOD | tr ' ' ':')" \
+ || echo $FSMOD | tr ' ' ':'
+ fi
+}
+
+# Determine the list of kernel modules needed to support the root device:
+determine_blockdev_drivers() {
+ # Walk the /sys tree to find kernel modules that are
+ # required for our storage devices.
+ # Thanks to PiterPUNK for help with this code.
+ local MLIST
+ MLIST=$(for i in $(find /sys/block/*/ -name "device" -print0 | xargs -0 -i'{}' readlink -f '{}' | sort -u); do
+ /sbin/udevadm info --query=all --path=$i --attribute-walk | \
+ sed -ne 's/^[[:blank:]]\+DRIVER[S]*=="\([^"]\+\)"$/\1/p' | \
+ xargs -I@ /sbin/modprobe --set-version $KVER --show-depends @ \
+ 2>/dev/null | grep -v "builtin " | \
+ while read LINE ; do
+ echo $(basename $(echo $LINE | cut -d' ' -f2) .ko )
+ done
+ done)
+ MLIST=$( echo $MLIST | tr ' ' ':' )
+ echo $MLIST
+}
+
+# Search for USB keyboards:
+function add_usb_keyboard() {
+ local USBMOD
+ if cat /proc/bus/input/devices | sed -e 's/^$/\$/g' | \
+ tr "\n$" " \n" | grep -q " Phys=.*usb.* .*Handlers=.*kbd.*B:"; then
+ USBMOD="xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch"
+ [ -n "$MLIST" ] && MLIST="$MLIST:$USBMOD" \
+ || MLIST="$USBMOD"
+ fi
+ echo $MLIST
+}
+
+# Determine what USB Host Controller is in use
+function add_usb_hcd() {
+ local USBMOD
+ for i in $(ls -Ld /sys/module/*_hcd/drivers/* 2> /dev/null); do
+ if ls -L $i | grep -q "[0-9a-f]*:" ; then
+ USBMOD=$( echo $i | cut -f4 -d/ | tr "_" "-")
+ [ -n "$MLIST" ] && MLIST="$MLIST:$USBMOD" \
+ || MLIST="$USBMOD"
+ fi
+ done
+ echo $MLIST
+}
+
+# Is the root partition on a (combination of) LVM/LUKS volume?
+check_luks_lvm_raid() {
+ if $( lvdisplay -c $ROOTDEV 1>/dev/null 2>/dev/null ); then
+ # Our root partition is on a LV:
+ USING_LVM=1
+ # Search the Physical Volume of our Logical Volume:
+ MYVG=$( echo $(lvdisplay -c $ROOTDEV 2>/dev/null) | cut -d: -f2 )
+ for LINE in $(pvdisplay -c) ; do
+ VG=$(echo $LINE | cut -d: -f2)
+ [ "$VG" = "$MYVG" ] && break
+ done
+ PV=$(echo $LINE | cut -d: -f1)
+ # Check if there is a LUKS device underneath:
+ if $( cryptsetup status $PV 1>/dev/null 2>/dev/null ) ; then
+ # Our root partition's LV is on a LUKS volume:
+ USING_LUKS=1
+ REALDEV=$( cryptsetup status $PV | grep 'device: ' | tr -d ' ' | cut -d: -f2 )
+ BASEDEV=$REALDEV
+ else
+ BASEDEV=$PV
+ fi
+ elif $( cryptsetup status $ROOTDEV 1>/dev/null 2>/dev/null ) ; then
+ # Our root device is on a LUKS volume:
+ USING_LUKS=1
+ REALDEV=$( cryptsetup status $ROOTDEV | grep 'device: ' | tr -d ' ' | cut -d: -f2 )
+ ROOTDEV=$(basename $ROOTDEV)
+ # Check for LVM:
+ for LV in $(lvdisplay -c 2>/dev/null | tr -d ' ' | cut -f1 -d:) ; do
+ # Note: cryptsetup shows the real device, whereas
+ # lvdisplay requires the /dev/<myvg>/... symlink to the real device.
+ if [ "$(readlink $LV)" = "$REALDEV" ]; then
+ REALDEV=$LV
+ break
+ fi
+ done
+ if $( lvdisplay -c $REALDEV 1>/dev/null 2>/dev/null ); then
+ # Our root partition's LUKS device is on a LV:
+ USING_LVM=1
+ # Search the Physical Volume of our Logical Volume:
+ MYVG=$( echo $(lvdisplay -c $REALDEV 2>/dev/null) | cut -d: -f2 )
+ for LINE in $(pvdisplay -c) ; do
+ VG=$(echo $LINE | cut -d: -f2)
+ [ "$VG" = "$MYVG" ] && break
+ done
+ PV=$(echo $LINE | cut -d: -f1)
+ BASEDEV=$PV
+ else
+ BASEDEV=$REALDEV
+ fi
+ else
+ BASEDEV=$ROOTDEV
+ fi
+
+ # Finally, we should check if base device is
+ # a real block device or a RAID volume:
+ for MD in $(cat /proc/mdstat | grep -w active | cut -d' ' -f1) ; do
+ if [ "$BASEDEV" = "/dev/$MD" ]; then
+ USING_RAID=1
+ break
+ fi
+ done
+}
+
+# Before we start
+[ -x /bin/id ] && CMD_ID="/bin/id" || CMD_ID="/usr/bin/id"
+if [ "$($CMD_ID -u)" != "0" ]; then
+ echo "You need to be root to run $(basename $0)."
+ exit 1
+fi
+
+# Parse the commandline parameters:
+while [ ! -z "$1" ]; do
+ case $1 in
+ --longhelp)
+ basic_usage
+ extended_usage
+ exit 0
+ ;;
+ -a)
+ MKINIT_PARAMS="$2"
+ shift 2
+ ;;
+ -c|--conf)
+ [ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
+ EMIT="conf"
+ shift
+ ;;
+ -h|--help)
+ basic_usage
+ exit 0
+ ;;
+ -i|--interactive)
+ INTERACTIVE=1
+ shift
+ ;;
+ -k)
+ KVER=$2
+ shift 2
+ ;;
+ -m)
+ MKINIT_MODS=$2
+ shift 2
+ ;;
+ -l|--lilo)
+ [ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
+ EMIT="lilo"
+ shift
+ ;;
+ -L|--fromlilo)
+ FROMLILO=1
+ shift
+ ;;
+ -r|--run)
+ [ -n "$EMIT" ] && { echo "Do not mix incompatible parameters!"; exit 1; }
+ EMIT="run"
+ shift
+ ;;
+ -R|--rootdev)
+ ROOTDEV=$2
+ shift 2
+ ;;
+ -*)
+ echo "Unsupported parameter '$1'!"
+ exit 1
+ ;;
+ *) # Everything else but switches (which start with '-') follows:
+ if [ -f $1 ]; then
+ KFILE=$1
+ # Construction of KFILE's full filename:
+ KFILEPATH=$(cd $(dirname $KFILE) && pwd)
+ if [ -L $KFILE ]; then
+ KFILE=$(readlink $KFILE)
+ else
+ KFILE=$(basename $KFILE)
+ fi
+ KFILE=${KFILEPATH}/$KFILE
+ if [ -z "$(file $KFILE | grep -E 'Linux kernel x86 boot|x86 boot sector')" ]; then
+ echo "File '$KFILE' does not look like it is a kernel file!"
+ exit 1
+ fi
+ else
+ echo "File $1 not found!"
+ exit 1
+ fi
+ shift
+ ;;
+ esac
+done
+
+# Determine what to show as output (other options may have set EMIT already)
+EMIT=${EMIT:-"all"}
+
+# An EMIT value of 'lilo' requires a kernel filename as script parameter:
+if [ "$EMIT" = "lilo" ]; then
+ if [ -z "$KFILE" ]; then
+ echo "A kernel_filename is required with the '-l|--lilo' option!"
+ exit 1
+ fi
+fi
+
+# Determine kernel version to use,
+# and check if modules for this kernel are actually present:
+if [ -z "$KVER" ]; then
+ if [ -n "$KFILE" ]; then
+ KVER="$(strings $KFILE | grep '([^ ]*@[^ ]*) #' | cut -f1 -d' ')"
+ else
+ KVER="$(uname -r)"
+ fi
+fi
+if [ ! -d /lib/modules/$KVER ]; then
+ echo "Modules for kernel $KVER aren't installed."
+ exit 1
+fi
+
+# Determine whether the user passed an alternate filename for the initrd:
+if [ -n "$MKINIT_PARAMS" ]; then
+ SRCHLIST="$MKINIT_PARAMS"
+ for ELEM in $MKINIT_PARAMS ; do
+ SRCHLIST=$(echo $SRCHLIST | cut -d' ' -f2-) # cut ELEM from the list
+ if [ "$ELEM" = "-o" ]; then
+ IMGFILE=$(echo $SRCHLIST | cut -d' ' -f1)
+ break
+ fi
+ done
+fi
+IMGFILE=${IMGFILE:-"/boot/initrd.gz"}
+
+# Get information about the root device / root filesystem:
+ROOTDEV=${ROOTDEV:-$(get_root_device)}
+ROOTFS=$(get_rootfs_type)
+
+# Determine the list of kernel modules needed to support the root device:
+MLIST=$(determine_blockdev_drivers)
+
+# Check if we are running in a kvm guest with virtio block device driver
+# (add all virtio modules, we sort out the doubles later):
+if echo $MLIST | grep -q "virtio"; then
+ MLIST="$MLIST:virtio:virtio_balloon:virtio_blk:virtio_ring:virtio_pci:virtio_net"
+fi
+
+# Determine if a USB keyboard is in use and include usbhid and hid_generic
+# to module list
+MLIST=$(add_usb_keyboard)
+
+# If we use any USB module, try to determine the Host Controller
+if echo $MLIST | grep -q "usb"; then
+ MLIST=$(add_usb_hcd)
+fi
+
+# Check what combination of LUKS/LVM/RAID we have to support:
+# This sets values for USING_LUKS, USING_LVM, USING_RAID, REALDEV and BASEDEV.
+check_luks_lvm_raid
+
+# This is the interactive part:
+if [ "$INTERACTIVE" = "1" ]; then
+ if [ "$FROMLILO" != "1" ]; then
+ dialog --stdout --title "WELCOME TO MKINITRD COMMAND GENERATOR" --msgbox "\
+The main goal of this utility is to create a good initrd to \
+fit your needs. It can detect what kernel you are running, \
+what is your root device, root filesystem, if you use encryption, \
+LVM, RAID, etc. \
+\n\n\
+Usually the probed values are OK and they will be the \
+defaults in all subsequent dialogs, but maybe you want \
+to change something. \n\
+If in doubt, leave the defaults." 0 0
+
+ KVER=$( ls -d1 --indicator-style=none /lib/modules/* | \
+ awk -F/ -vVER=$KVER '{
+ if ( VER == $NF ) {
+ ONOFF="on"
+ } else {
+ ONOFF="off"
+ } ; printf("%s \"\" %s\n",$NF,ONOFF) }' | \
+ xargs dialog --stdout --title "CHOOSE KERNEL VERSION" \
+ --default-item $KVER --radiolist "\
+Please, select the kernel version you want to create this initrd for." 0 0 4 )
+ [ -z "$KVER" ] && exit 1
+
+ OLDROOTDEV=$ROOTDEV
+ ROOTDEV=$( dialog --stdout --title "SELECT ROOT DEVICE" --inputbox "\
+Enter your root device. Root device is the one where your '/' filesystem \
+is mounted." 0 0 "$ROOTDEV" )
+ [ -z "$ROOTDEV" ] && exit 1
+
+ # We need to re-check our defaults in case the user changed the default
+ # value for ROOTDEV:
+ [ "$OLDROOTDEV" != "$ROOTDEV" ] && check_luks_lvm_raid
+ ROOTFS=$(get_rootfs_type)
+
+ ROOTFS=$( dialog --stdout --title "SELECT ROOT FILESYSTEM" --inputbox "\
+Enter the type of your root filesystem." 0 0 "$ROOTFS" )
+ [ -z "$ROOTFS" ] && exit 1
+ fi
+
+ MLIST=$(add_rootfs_module)
+
+ LLR=$( dialog --stdout --title "LVM/LUKS/RAID" --checklist "\
+Do you use some of those in your root filesystem? \
+If this is the case, please select one or more options." 12 45 3 \
+"LVM" "Logical Volume Manager" $([ "$USING_LVM" = "1" ] && echo on || echo off) \
+"LUKS" "Linux Unified Key Setup" $([ "$USING_LUKS" = "1" ] && echo on || echo off) \
+"RAID" "Linux Software RAID" $([ "$USING_RAID" = "1" ] && echo on || echo off))
+
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+
+ echo $LLR | grep -q LUKS && USING_LUKS="1"
+ echo $LLR | grep -q LVM && USING_LVM="1"
+ echo $LLR | grep -q RAID && USING_RAID="1"
+
+ if [ "$USING_LUKS" = "1" ]; then
+ REALDEV=$( dialog --stdout --title "LUKS ROOT DEVICE" --inputbox "\
+Please, enter your LUKS root device:" 0 0 "$REALDEV" )
+ [ -z "$REALDEV" ] && exit 1
+ fi
+fi
+
+# Step out of the interactive loop for a moment. The next block needs to be
+# executed in all cases.
+
+# We need to 'undouble' the MLIST array. Some people report that walking the
+# /sys tree produces duplicate modules in the list.
+# The awk command elimitates doubles without changing the order:
+MLIST=$( echo $MLIST | tr ':' '\n' | awk '!x[$0]++' | tr '\n' ' ' )
+MLIST=$( echo $MLIST | tr ' ' ':' )
+MLIST=$(echo ${MLIST%:}) # To weed out a trailing ':' which was reported once.
+
+# Back to the interactive part:
+
+if [ "$INTERACTIVE" = "1" ]; then
+ MLIST=$( dialog --stdout --title "INITRD'S MODULE LIST" --inputbox "\
+The list here shows all modules needed to support your root filesystem \
+and boot from it. But you can change the list to use some alternative \
+or additional modules. If you don't know what to do, the default is safe." \
+0 0 "$MLIST" )
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+
+ EXTRA=$( dialog --stdout --title "EXTRA CONFIGURATION" --checklist "\
+Now is your chance for some additional configuration. All of these \
+configurations are optional and you can stick to the defaults." 11 72 3 \
+"KEYMAP" "Select keyboard layout (default: US)" \
+ $([ $USING_LUKS = 1 ] && echo on || echo off) \
+"RESUMEDEV" "Select device for 'suspend-to-disk' feature" off \
+"UDEV" "Use UDEV in the initrd for device configuration" $(test $UDEV -eq 1 && echo on || echo off) \
+"WAIT" "Add delay to allow detection of slow disks at boot" $(test $WAIT -gt $WAIT_DEFAULT && echo on || echo off) )
+ if [ "$?" != "0" ]; then
+ exit 1
+ fi
+
+ if echo $EXTRA | grep -q KEYMAP ; then
+ KEYMAP=$( dialog --stdout --title "KEYBOARD LAYOUT SELECTION" \
+ --cancel-label "Skip" \
+ --menu "You may select one of the following keyboard layouts. \
+If you do not select a keyboard map, 'us.map' \
+(the US keyboard layout) is the default. Use the UP/DOWN \
+arrow keys and PageUp/PageDown to scroll \
+through the whole list of choices." \
+22 55 11 \
+"qwerty/us.map" "" \
+"azerty/azerty.map" "" \
+"azerty/be-latin1.map" "" \
+"azerty/fr-latin0.map" "" \
+"azerty/fr-latin1.map" "" \
+"azerty/fr-latin9.map" "" \
+"azerty/fr-old.map" "" \
+"azerty/fr-pc.map" "" \
+"azerty/fr.map" "" \
+"azerty/wangbe.map" "" \
+"azerty/wangbe2.map" "" \
+"dvorak/ANSI-dvorak.map" "" \
+"dvorak/dvorak-l.map" "" \
+"dvorak/dvorak-r.map" "" \
+"dvorak/dvorak.map" "" \
+"dvorak/no-dvorak.map" "" \
+"fgGIod/tr_f-latin5.map" "" \
+"fgGIod/trf-fgGIod.map" "" \
+"olpc/es-olpc.map" "" \
+"olpc/pt-olpc.map" "" \
+"qwerty/bg-cp1251.map" "" \
+"qwerty/bg-cp855.map" "" \
+"qwerty/bg_bds-cp1251.map" "" \
+"qwerty/bg_bds-utf8.map" "" \
+"qwerty/bg_pho-cp1251.map" "" \
+"qwerty/bg_pho-utf8.map" "" \
+"qwerty/br-abnt.map" "" \
+"qwerty/br-abnt2.map" "" \
+"qwerty/br-latin1-abnt2.map" "" \
+"qwerty/br-latin1-us.map" "" \
+"qwerty/by-cp1251.map" "" \
+"qwerty/by.map" "" \
+"qwerty/bywin-cp1251.map" "" \
+"qwerty/cf.map" "" \
+"qwerty/cz-cp1250.map" "" \
+"qwerty/cz-lat2-prog.map" "" \
+"qwerty/cz-lat2.map" "" \
+"qwerty/cz-qwerty.map" "" \
+"qwerty/defkeymap.map" "" \
+"qwerty/defkeymap_V1.0.map" "" \
+"qwerty/dk-latin1.map" "" \
+"qwerty/dk.map" "" \
+"qwerty/emacs.map" "" \
+"qwerty/emacs2.map" "" \
+"qwerty/es-cp850.map" "" \
+"qwerty/es.map" "" \
+"qwerty/et-nodeadkeys.map" "" \
+"qwerty/et.map" "" \
+"qwerty/fi-latin1.map" "" \
+"qwerty/fi-latin9.map" "" \
+"qwerty/fi-old.map" "" \
+"qwerty/fi.map" "" \
+"qwerty/gr-pc.map" "" \
+"qwerty/gr.map" "" \
+"qwerty/hu101.map" "" \
+"qwerty/il-heb.map" "" \
+"qwerty/il-phonetic.map" "" \
+"qwerty/il.map" "" \
+"qwerty/is-latin1-us.map" "" \
+"qwerty/is-latin1.map" "" \
+"qwerty/it-ibm.map" "" \
+"qwerty/it.map" "" \
+"qwerty/it2.map" "" \
+"qwerty/jp106.map" "" \
+"qwerty/kazakh.map" "" \
+"qwerty/kyrgyz.map" "" \
+"qwerty/la-latin1.map" "" \
+"qwerty/lt.baltic.map" "" \
+"qwerty/lt.l4.map" "" \
+"qwerty/lt.map" "" \
+"qwerty/mk-cp1251.map" "" \
+"qwerty/mk-utf.map" "" \
+"qwerty/mk.map" "" \
+"qwerty/mk0.map" "" \
+"qwerty/nl.map" "" \
+"qwerty/nl2.map" "" \
+"qwerty/no-latin1.map" "" \
+"qwerty/no.map" "" \
+"qwerty/pc110.map" "" \
+"qwerty/pl.map" "" \
+"qwerty/pl1.map" "" \
+"qwerty/pl2.map" "" \
+"qwerty/pl3.map" "" \
+"qwerty/pl4.map" "" \
+"qwerty/pt-latin1.map" "" \
+"qwerty/pt-latin9.map" "" \
+"qwerty/pt.map" "" \
+"qwerty/ro.map" "" \
+"qwerty/ro_std.map" "" \
+"qwerty/ru-cp1251.map" "" \
+"qwerty/ru-ms.map" "" \
+"qwerty/ru-yawerty.map" "" \
+"qwerty/ru.map" "" \
+"qwerty/ru1.map" "" \
+"qwerty/ru2.map" "" \
+"qwerty/ru3.map" "" \
+"qwerty/ru4.map" "" \
+"qwerty/ru_win.map" "" \
+"qwerty/ruwin_alt-CP1251.map" "" \
+"qwerty/ruwin_alt-KOI8-R.map" "" \
+"qwerty/ruwin_alt-UTF-8.map" "" \
+"qwerty/ruwin_cplk-CP1251.map" "" \
+"qwerty/ruwin_cplk-KOI8-R.map" "" \
+"qwerty/ruwin_cplk-UTF-8.map" "" \
+"qwerty/ruwin_ct_sh-CP1251.map" "" \
+"qwerty/ruwin_ct_sh-KOI8-R.map" "" \
+"qwerty/ruwin_ct_sh-UTF-8.map" "" \
+"qwerty/ruwin_ctrl-CP1251.map" "" \
+"qwerty/ruwin_ctrl-KOI8-R.map" "" \
+"qwerty/ruwin_ctrl-UTF-8.map" "" \
+"qwerty/se-fi-ir209.map" "" \
+"qwerty/se-fi-lat6.map" "" \
+"qwerty/se-ir209.map" "" \
+"qwerty/se-lat6.map" "" \
+"qwerty/se-latin1.map" "" \
+"qwerty/sk-prog-qwerty.map" "" \
+"qwerty/sk-qwerty.map" "" \
+"qwerty/speakup-jfw.map" "" \
+"qwerty/speakupmap.map" "" \
+"qwerty/sr-cy.map" "" \
+"qwerty/sv-latin1.map" "" \
+"qwerty/tr_q-latin5.map" "" \
+"qwerty/tralt.map" "" \
+"qwerty/trf.map" "" \
+"qwerty/trq.map" "" \
+"qwerty/ttwin_alt-UTF-8.map.gz" "" \
+"qwerty/ttwin_cplk-UTF-8.map.gz" "" \
+"qwerty/ttwin_ct_sh-UTF-8.map.gz" "" \
+"qwerty/ttwin_ctrl-UTF-8.map.gz" "" \
+"qwerty/ua-cp1251.map.gz" "" \
+"qwerty/ua-utf-ws.map" "" \
+"qwerty/ua-utf.map" "" \
+"qwerty/ua-ws.map" "" \
+"qwerty/ua.map" "" \
+"qwerty/uk.map" "" \
+"qwerty/us-acentos.map" "" \
+"qwerty/us.map" "" \
+"qwertz/croat.map" "" \
+"qwertz/cz-us-qwertz.map" "" \
+"qwertz/cz.map" "" \
+"qwertz/de-latin1-nodeadkeys.map" "" \
+"qwertz/de-latin1.map" "" \
+"qwertz/de.map" "" \
+"qwertz/de_CH-latin1.map" "" \
+"qwertz/fr_CH-latin1.map" "" \
+"qwertz/fr_CH.map" "" \
+"qwertz/hu.map" "" \
+"qwertz/sg-latin1-lk450.map" "" \
+"qwertz/sg-latin1.map" "" \
+"qwertz/sg.map" "" \
+"qwertz/sk-prog-qwertz.map" "" \
+"qwertz/sk-qwertz.map" "" \
+"qwertz/slovene.map" "" )
+ [ -n "$KEYMAP" ] && KEYMAP=$(basename $KEYMAP .map)
+ fi
+
+ if echo $EXTRA | grep -q UDEV ; then
+ UDEV=1
+ fi
+
+ if echo $EXTRA | grep -q RESUMEDEV ; then
+ # Print information about swap partitions:
+ FREERAM=$(free -k | grep "^Mem:" | tr -s ' ' | cut -d' ' -f2)
+ SWPINFO=""
+ for SWPDEV in $(grep -w swap $FSTAB | cut -d' ' -f1) ; do
+ SWPINFO="$SWPINFO $SWPDEV Linux swap partition $(fdisk -s $SWPDEV) KB \\n"
+ [ $(fdisk -s $SWPDEV) -gt $FREERAM ] && RESUMEDEV=$SWPDEV
+ done
+ FREERAM=$(free -m | grep "^Mem:" | tr -s ' ' | cut -d' ' -f2)
+ RESUMEDEV=$( dialog --stdout --no-collapse --title "HIBERNATE RESUME DEVICE" --inputbox "\
+When using suspend-to-disk feature (hibernate), your computer's RAM is copied \
+to a swap device when it shuts down. The kernel will resume from that RAM \
+image at boot. This means that the swap partition must not be smaller than \
+the amount of RAM you have ($FREERAM MB). \n\
+$SWPINFO \n\
+Please specify a swap partition to be used for hibernation:" \
+0 0 "$RESUMEDEV")
+ [ -z "$RESUMEDEV" ] && exit 1
+ fi
+
+ if echo $EXTRA | grep -q WAIT ; then
+ WAIT=$( dialog --stdout --title "WAIT FOR ROOT DEVICE" --inputbox "\
+Some block devices are too slow to be detected properly at boot. USB storage \
+devices and some disk arrays have this 'feature'. To make your machine \
+boot properly, you can add some delay here, to wait until all your disks are \
+probed and detected. The time is in seconds:" 0 0 "$WAIT")
+ [ -z "$WAIT" ] && exit 1
+ fi
+
+ IMGFILE=$( dialog --stdout --title "INITRD IMAGE NAME" --inputbox "\
+Enter your initrd image filename." 0 0 "$IMGFILE" )
+ [ -z "$IMGFILE" ] && exit 1
+
+else
+ MLIST=$(add_rootfs_module)
+fi
+
+# Add any modules passed along on the commandline:
+if [ -n "$MKINIT_MODS" ]; then
+ [ -n "$MLIST" ] && MLIST="$MLIST:$(echo $MKINIT_MODS | tr ' ' ':')" \
+ || MLIST="$(echo $MKINIT_MODS | tr ' ' ':')"
+fi
+
+# Constructing the mkinitrd command:
+MKINIT="mkinitrd -c -k $KVER -f $ROOTFS -r $ROOTDEV"
+
+# If we have a module list, add them:
+if ! [ -z "$MLIST" -o "$MLIST" = ":" ]; then
+ MKINIT="$MKINIT -m $MLIST"
+fi
+
+# Deal with LUKS/LVM/RAID:
+if [ "$USING_LUKS" = "1" ]; then
+ MKINIT="$MKINIT -C $REALDEV"
+fi
+if [ "$USING_LVM" = "1" ]; then
+ MKINIT="$MKINIT -L"
+fi
+if [ "$USING_RAID" = "1" ]; then
+ MKINIT="$MKINIT -R"
+fi
+
+if [ -n "$RESUMEDEV" ]; then
+ # Add hibernation partition:
+ MKINIT="$MKINIT -h $RESUMEDEV"
+fi
+if [ -n "$KEYMAP" -a "$KEYMAP" != "us" ]; then
+ # Add non-us keyboard mapping:
+ MKINIT="$MKINIT -l $KEYMAP"
+fi
+if [ $UDEV -eq 1 ]; then
+ # Add UDEV support:
+ MKINIT="$MKINIT -u"
+fi
+if [ -n "$WAIT" -a $WAIT -ne $WAIT_DEFAULT ]; then
+ # Add non-default wait time:
+ MKINIT="$MKINIT -w $WAIT"
+fi
+if ! echo "$MKINIT_PARAMS" | grep -q -- '-o ' ; then
+ # Add default output filename:
+ MKINIT="$MKINIT -o $IMGFILE"
+fi
+if [ -n "$MKINIT_PARAMS" ]; then
+ # Add user-supplied additional parameters:
+ MKINIT="$MKINIT $MKINIT_PARAMS"
+fi
+
+# Notify the user:
+if [ "$EMIT" = "all" ]; then
+ cat <<-EOT
+ #
+ # $(basename $0) revision $REV
+ #
+ # This script will now make a recommendation about the command to use
+ # in case you require an initrd image to boot a kernel that does not
+ # have support for your storage or root filesystem built in
+ # (such as the Slackware 'generic' kernels').
+ # A suitable 'mkinitrd' command will be:
+
+ $MKINIT
+ EOT
+elif [ "$EMIT" = "run" ]; then
+ echo "$MKINIT"
+elif [ "$EMIT" = "conf" ]; then
+ cat <<-EOT
+ SOURCE_TREE="$SOURCE_TREE"
+ CLEAR_TREE="$CLEAR_TREE"
+ OUTPUT_IMAGE="$IMGFILE"
+ KERNEL_VERSION="$KVER"
+ KEYMAP="$KEYMAP"
+ MODULE_LIST="$(echo $MLIST | cut -f2 -d\ )"
+ LUKSDEV="$REALDEV"
+ ROOTDEV="$ROOTDEV"
+ ROOTFS="$ROOTFS"
+ RESUMEDEV="$RESUMEDEV"
+ RAID="$USING_RAID"
+ LVM="$USING_LVM"
+ UDEV="$UDEV"
+ WAIT="$WAIT"
+ EOT
+fi
+
+if [ -n "$KFILE" ]; then
+ if [ "$EMIT" = "all" ]; then
+ cat <<-EOT
+ # An entry in 'etc/lilo.conf' for kernel '$KFILE' would look like this:
+ EOT
+ fi
+ if [ "$EMIT" = "all" -o "$EMIT" = "lilo" ]; then
+ # Compensate for the syntax used for the LUKS-on-LVM case:
+ [ "$(basename $ROOTDEV)" = "$ROOTDEV" ] && BASE="/dev/mapper/" || BASE=""
+ cat <<-EOT
+ # Linux bootable partition config begins
+ # initrd created with '$MKINIT'
+ image = $KFILE
+ initrd = $IMGFILE
+ root = $BASE$ROOTDEV
+ label = $KVER
+ read-only
+ # Linux bootable partition config ends
+ EOT
+ fi
+fi
diff --git a/patches/source/mkinitrd/slack-desc b/patches/source/mkinitrd/slack-desc
new file mode 100644
index 00000000..49d1a764
--- /dev/null
+++ b/patches/source/mkinitrd/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------------------------------------------------------|
+mkinitrd: mkinitrd (make an initial ramdisk)
+mkinitrd:
+mkinitrd: mkinitrd is a script to create an initial ramdisk that is loaded at
+mkinitrd: the same time as the kernel. The initial ramdisk may be responsible
+mkinitrd: for loading kernel modules (such a filesystem or SCSI controller
+mkinitrd: module) that are needed to mount the root filesystem.
+mkinitrd:
+mkinitrd: The "initrd" is implemented as an initramfs. See the kernel
+mkinitrd: documentation for more information on this, if you are interested.
+mkinitrd:
+mkinitrd:
diff --git a/patches/source/mozilla-firefox/autoconf/autoconf-2.13-consolidated_fixes-1.patch b/patches/source/mozilla-firefox/autoconf/autoconf-2.13-consolidated_fixes-1.patch
new file mode 100644
index 00000000..5e7b2311
--- /dev/null
+++ b/patches/source/mozilla-firefox/autoconf/autoconf-2.13-consolidated_fixes-1.patch
@@ -0,0 +1,504 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2016-06-11
+Initial Package Version: 2.13
+Upstream Status: Version is historic and unmaintained.
+Origin: Found at fedora, plus fixes for LFS.
+Description: All of the patches currently used by fedora, except for
+the patch which ensures gawk is used in preference to mawk (we do not
+install mawk). For LFS: we put mktemp in /usr/bin not /bin, remove
+the install-info target because that will overwrite standards.info
+with an old version (fedora always use a DESTDIR), and change the
+man and info dirs to ${datadir}/ i.e. /usr/share (an empty /usr/info
+will otherwise be created).
+
+diff -Naur a/acgeneral.m4 b/acgeneral.m4
+--- a/acgeneral.m4 1999-01-05 13:27:37.000000000 +0000
++++ b/acgeneral.m4 2016-06-11 00:18:24.429043947 +0100
+@@ -1817,10 +1817,6 @@
+ [cat > conftest.$ac_ext <<EOF
+ [#]line __oline__ "configure"
+ #include "confdefs.h"
+-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+-extern "C" void exit(int);
+-#endif
+-])dnl
+ [$1]
+ EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+@@ -1988,12 +1984,12 @@
+ AC_MSG_CHECKING(size of $1)
+ AC_CACHE_VAL(AC_CV_NAME,
+ [AC_TRY_RUN([#include <stdio.h>
+-main()
++int main()
+ {
+ FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
++ if (!f) return(1);
+ fprintf(f, "%d\n", sizeof($1));
+- exit(0);
++ return(0);
+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
+ AC_MSG_RESULT($AC_CV_NAME)
+ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
+@@ -2160,20 +2156,38 @@
+ dnl AC_OUTPUT_MAKE_DEFS()
+ define(AC_OUTPUT_MAKE_DEFS,
+ [# Transform confdefs.h into DEFS.
+-dnl Using a here document instead of a string reduces the quoting nightmare.
+ # Protect against shell expansion while executing Makefile rules.
+ # Protect against Makefile macro expansion.
+-cat > conftest.defs <<\EOF
++#
++# If the first sed substitution is executed (which looks for macros that
++# take arguments), then we branch to the quote section. Otherwise,
++# look for a macro that doesn't take arguments.
++cat >confdef2opt.sed <<\_ACEOF
+ changequote(<<, >>)dnl
+-s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+-s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
+-s%\[%\\&%g
+-s%\]%\\&%g
+-s%\$%$$%g
++t clear
++: clear
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
++t quote
++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
++t quote
++d
++: quote
++s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
++s,\[,\\&,g
++s,\],\\&,g
++s,\$,$$,g
++p
+ changequote([, ])dnl
+-EOF
+-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+-rm -f conftest.defs
++_ACEOF
++# We use echo to avoid assuming a particular line-breaking character.
++# The extra dot is to prevent the shell from consuming trailing
++# line-breaks from the sub-command output. A line-break within
++# single-quotes doesn't work because, if this script is created in a
++# platform that uses two characters for line-breaks (e.g., DOS), tr
++# would break.
++ac_LF_and_DOT=`echo; echo .`
++DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
++rm -f confdef2opt.sed
+ ])
+
+ dnl Do the variable substitutions to create the Makefiles or whatever.
+diff -Naur a/acspecific.m4 b/acspecific.m4
+--- a/acspecific.m4 1999-01-05 13:27:52.000000000 +0000
++++ b/acspecific.m4 2016-06-11 00:18:17.533078644 +0100
+@@ -152,8 +152,41 @@
+ CXXFLAGS=
+ fi
+ fi
++
++AC_PROG_CXX_EXIT_DECLARATION
+ ])
+
++
++# AC_PROG_CXX_EXIT_DECLARATION
++# -----------------------------
++# Find a valid prototype for exit and declare it in confdefs.h.
++AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
++[for ac_declaration in \
++ ''\
++ '#include <stdlib.h>' \
++ 'extern "C" void std::exit (int) throw (); using std::exit;' \
++ 'extern "C" void std::exit (int); using std::exit;' \
++ 'extern "C" void exit (int) throw ();' \
++ 'extern "C" void exit (int);' \
++ 'void exit (int);'
++do
++ AC_TRY_COMPILE([#include <stdlib.h>
++$ac_declaration],
++ [exit (42);],
++ [],
++ [continue])
++ AC_TRY_COMPILE([$ac_declaration],
++ [exit (42);],
++ [break])
++done
++if test -n "$ac_declaration"; then
++ echo '#ifdef __cplusplus' >>confdefs.h
++ echo $ac_declaration >>confdefs.h
++ echo '#endif' >>confdefs.h
++fi
++])# AC_PROG_CXX_EXIT_DECLARATION
++
++
+ dnl Determine a Fortran 77 compiler to use. If `F77' is not already set
+ dnl in the environment, check for `g77', `f77' and `f2c', in that order.
+ dnl Set the output variable `F77' to the name of the compiler found.
+@@ -1010,7 +1043,7 @@
+ ])
+
+ AC_DEFUN(AC_FUNC_MMAP,
+-[AC_CHECK_HEADERS(unistd.h)
++[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
+ AC_CHECK_FUNCS(getpagesize)
+ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
+ [AC_TRY_RUN([
+@@ -1039,11 +1072,24 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
++
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++
+ /* This mess was copied from the GNU getpagesize.h. */
+ #ifndef HAVE_GETPAGESIZE
+-# ifdef HAVE_UNISTD_H
+-# include <unistd.h>
+-# endif
+
+ /* Assume that all systems that can run configure have sys/param.h. */
+ # ifndef HAVE_SYS_PARAM_H
+@@ -1373,6 +1419,8 @@
+ r.ru_majflt = r.ru_minflt = 0;
+ switch (fork()) {
+ case 0: /* Child. */
++ /* Unless we actually _do_ something, the kernel sometimes doesn't chalk up any system time to this process. */
++ if(fork()) { i = 123; wait(NULL); } else { i = 234; exit(0); }
+ sleep(1); /* Give up the CPU. */
+ _exit(0);
+ case -1: _exit(0); /* What can we do? */
+diff -Naur a/autoconf.sh b/autoconf.sh
+--- a/autoconf.sh 1999-01-05 13:27:53.000000000 +0000
++++ b/autoconf.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -45,20 +45,20 @@
+ esac
+
+ : ${TMPDIR=/tmp}
+-tmpout=${TMPDIR}/acout.$$
++tmpout=`/usr/bin/mktemp ${TMPDIR}/acout.XXXXXX`
+ localdir=
+ show_version=no
+
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout ; exit 0 ;;
+ --localdir=* | --l*=* )
+ localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -l | --localdir | --l*)
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ localdir="${1}"
+ shift ;;
+ --macrodir=* | --m*=* )
+@@ -66,7 +66,7 @@
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --v* )
+@@ -76,7 +76,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -86,23 +86,25 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $tmpout
+ exit 0
+ fi
+
+ case $# in
+ 0) infile=configure.in ;;
+ 1) infile="$1" ;;
+- *) echo "$usage" >&2; exit 1 ;;
++ *) echo "$usage" >&2; rm -f $tmpout; exit 1 ;;
+ esac
+
+ trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
+
+-tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
++tmpin=`/usr/bin/mktemp ${TMPDIR}/acin.XXXXXX`
++# Always set this, to avoid bogus errors from some rm's.
+ if test z$infile = z-; then
+ infile=$tmpin
+- cat > $infile
+ elif test ! -r "$infile"; then
+ echo "autoconf: ${infile}: No such file or directory" >&2
++ rm -f $tmpin $tmpout
+ exit 1
+ fi
+
+@@ -111,6 +113,8 @@
+ else
+ use_localdir=
+ fi
++# Make sure we don't leave those around - they are annoying
++trap 'rm -f $tmpin $tmpout' 0
+
+ # Use the frozen version of Autoconf if available.
+ r= f=
+@@ -118,7 +122,7 @@
+ case `$M4 --help < /dev/null 2>&1` in
+ *reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
+ *traditional*) ;;
+-*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
++*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin $tmpout; exit 1 ;;
+ esac
+
+ $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
+@@ -154,6 +158,6 @@
+ /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
+ ' >&4
+
+-rm -f $tmpout
++rm -f $tmpout $tmpin
+
+ exit $status
+diff -Naur a/autoconf.texi b/autoconf.texi
+--- a/autoconf.texi 1999-01-05 13:28:37.000000000 +0000
++++ b/autoconf.texi 2016-06-11 00:18:46.360933604 +0100
+@@ -1,7 +1,7 @@
+ \input texinfo @c -*-texinfo-*-
+ @c %**start of header
+-@setfilename autoconf.info
+-@settitle Autoconf
++@setfilename autoconf.info
++@settitle Autoconf
+ @c For double-sided printing, uncomment:
+ @c @setchapternewpage odd
+ @c %**end of header
+@@ -17,7 +17,8 @@
+ @ifinfo
+ @format
+ START-INFO-DIR-ENTRY
+-* Autoconf: (autoconf). Create source code configuration scripts.
++* Autoconf: (autoconf). Create source code configuration scripts.
++ This is a legacy version of autoconf.
+ END-INFO-DIR-ENTRY
+ @end format
+
+diff -Naur a/autoheader.sh b/autoheader.sh
+--- a/autoheader.sh 1999-01-05 13:28:39.000000000 +0000
++++ b/autoheader.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -194,9 +194,9 @@
+ # Some fgrep's have limits on the number of lines that can be in the
+ # pattern on the command line, so use a temporary file containing the
+ # pattern.
+- (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
++ (fgrep_tmp=`/usr/bin/mktemp ${TMPDIR-/tmp}/autoh$$.XXXXXX`
+ trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+- cat > $fgrep_tmp <<EOF
++ cat >> $fgrep_tmp <<EOF
+ $syms
+ EOF
+ fgrep -f $fgrep_tmp
+diff -Naur a/autoupdate.sh b/autoupdate.sh
+--- a/autoupdate.sh 1999-01-05 13:28:42.000000000 +0000
++++ b/autoupdate.sh 2016-06-11 00:23:19.151561252 +0100
+@@ -26,7 +26,7 @@
+ Usage: autoupdate [-h] [--help] [-m dir] [--macrodir=dir]
+ [--version] [template-file]"
+
+-sedtmp=/tmp/acups.$$
++sedtmp=`/usr/bin/mktemp /tmp/acups.XXXXXX`
+ # For debugging.
+ #sedtmp=/tmp/acups
+ show_version=no
+@@ -35,13 +35,13 @@
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 0 ;;
+ --macrodir=* | --m*=* )
+ AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $sedtmp; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --versio | --versi | --vers)
+@@ -51,7 +51,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -61,6 +61,7 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $sedtmp
+ exit 0
+ fi
+
+@@ -68,6 +69,7 @@
+
+ tmpout=acupo.$$
+ trap 'rm -f $sedtmp $tmpout; exit 1' 1 2 15
++trap 'rm -f $sedtmp' 0
+ case $# in
+ 0) infile=configure.in; out="> $tmpout"
+ # Make sure $infile can be read, and $tmpout has the same permissions.
+diff -Naur a/configure b/configure
+--- a/configure 1999-01-05 13:28:57.000000000 +0000
++++ b/configure 2016-06-11 00:50:57.771231914 +0100
+@@ -43,8 +43,8 @@
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++infodir='${datadir}/info'
++mandir='${datadir}/man'
+
+ # Initialize some other variables.
+ subdirs=
+diff -Naur a/Makefile.in b/Makefile.in
+--- a/Makefile.in 1999-01-05 13:27:16.000000000 +0000
++++ b/Makefile.in 2016-06-11 00:29:34.005678107 +0100
+@@ -49,7 +49,7 @@
+
+ # Directory in which to install library files.
+ datadir = @datadir@
+-acdatadir = $(datadir)/autoconf
++acdatadir = $(datadir)/autoconf-2.13
+
+ # Directory in which to install documentation info files.
+ infodir = @infodir@
+@@ -68,8 +68,8 @@
+ DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
+ Makefile.in NEWS README TODO $(M4FILES) \
+ acconfig.h acfunctions acheaders acidentifiers \
+- acmakevars acprograms autoconf.info* \
+- autoconf.sh autoconf.texi install.texi \
++ acmakevars acprograms autoconf.info* \
++ autoconf.sh autoconf.texi install.texi \
+ autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
+ config.guess config.sub configure configure.in \
+ install-sh mkinstalldirs texinfo.tex \
+@@ -106,11 +106,11 @@
+ autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+ autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+
+-info: autoconf.info @standards_info@ INSTALL
++info: autoconf.info @standards_info@ INSTALL
+
+ # Use --no-split to avoid creating filenames > 14 chars.
+-autoconf.info: autoconf.texi install.texi
+- $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
++autoconf.info: autoconf.texi install.texi
++ $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
+
+ INSTALL: install.texi
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
+@@ -121,8 +121,8 @@
+
+ dvi: autoconf.dvi @standards_dvi@
+
+-autoconf.dvi: autoconf.texi
+- $(TEXI2DVI) $(srcdir)/autoconf.texi
++autoconf.dvi: autoconf.texi
++ $(TEXI2DVI) $(srcdir)/autoconf.texi
+
+ standards.dvi: standards.texi make-stds.texi
+ $(TEXI2DVI) $(srcdir)/standards.texi
+@@ -137,35 +137,35 @@
+ cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
+
+ installdirs:
+- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
++ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir)
+
+-install: all $(M4FILES) acconfig.h installdirs install-info
++install: all $(M4FILES) acconfig.h installdirs
+ for p in $(ASCRIPTS); do \
+- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ for i in $(M4FROZEN); do \
+- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ for i in $(M4FILES) acconfig.h; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ -if test -f autoscan; then \
+- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \
+ for i in acfunctions acheaders acidentifiers acprograms \
+ acmakevars; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done; \
+ else :; fi
+
+ # Don't cd, to avoid breaking install-sh references.
+ install-info: info installdirs
+- if test -f autoconf.info; then \
++ if test -f autoconf.info; then \
+ for i in *.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
+ done; \
+ else \
+ for i in $(srcdir)/*.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ done; \
+ fi
+
+@@ -174,7 +174,7 @@
+ rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ rm -fr $(acdatadir)
+- cd $(infodir) && rm -f autoconf.info*
++ cd $(infodir) && rm -f autoconf.info*
+ if test -f standards.info || test -f $(srcdir)/standards.info; \
+ then cd $(infodir) && rm -f standards.info*; fi
+
+diff -Naur a/testsuite/autoconf.s/syntax.exp b/testsuite/autoconf.s/syntax.exp
+--- a/testsuite/autoconf.s/syntax.exp 1999-01-05 13:29:54.000000000 +0000
++++ b/testsuite/autoconf.s/syntax.exp 2016-06-11 00:18:51.996905247 +0100
+@@ -2,7 +2,7 @@
+
+ send_user "Checking for syntax errors in the specific tests...\n"
+ set script {s/^AC_DEFUN(\([^,]*\).*/\1/p}
+-set macros [exec sed -n $script $srcdir/../acspecific.m4]
++set macros [exec sed -n $script $srcdir/../acspecific.m4 | grep -v -e AC_FUNC_GETLOADAVG -e F77]
+
+ foreach mac $macros {
+ send_user "$mac\n"
diff --git a/patches/source/mozilla-firefox/autoconf/autoconf.build b/patches/source/mozilla-firefox/autoconf/autoconf.build
new file mode 100755
index 00000000..7dae1bad
--- /dev/null
+++ b/patches/source/mozilla-firefox/autoconf/autoconf.build
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# Copyright 2005-2016 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=autoconf
+VERSION=2.13
+BUILD=${BUILD:-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
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-autoconf
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf autoconf-$VERSION
+tar xvf $CWD/autoconf-$VERSION.tar.xz || exit 1
+cd autoconf-$VERSION
+
+zcat $CWD/autoconf-2.13-consolidated_fixes-1.patch.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Build a temporary copy of autoconf-2.13 only to be used to compile
+# Firefox, since it somewhat inexplicably requires this ancient version:
+
+rm -rf $TMP/autoconf-tmp
+mkdir -p $TMP/autoconf-tmp
+# This will be at the beginning of the $PATH, so protect against nonsense
+# happening in /tmp:
+chmod 700 $TMP/autoconf-tmp
+rm -rf $TMP/autoconf-tmp/*
+mkdir -p $TMP/autoconf-tmp/usr
+
+./configure \
+ --prefix=$TMP/autoconf-tmp/usr \
+ --program-suffix=-2.13 \
+ --infodir=$TMP/autoconf-tmp/usr/info \
+ --mandir=$TMP/autoconf-tmp/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install || exit 1
+
diff --git a/patches/source/mozilla-firefox/build-with-clang.diff b/patches/source/mozilla-firefox/build-with-clang.diff
new file mode 100644
index 00000000..54c0e105
--- /dev/null
+++ b/patches/source/mozilla-firefox/build-with-clang.diff
@@ -0,0 +1,13 @@
+--- ./mozilla-firefox.SlackBuild.orig 2016-11-16 12:12:10.068029005 -0600
++++ ./mozilla-firefox.SlackBuild 2016-11-16 12:41:26.774085280 -0600
+@@ -220,6 +220,10 @@
+ # needed for PGO.
+ echo ". \$topsrcdir/browser/config/mozconfig" > .mozconfig
+
++# Build using clang:
++echo "export CC=clang" >> .mozconfig
++echo "export CXX=clang++" >> .mozconfig
++
+ # Mozilla devs enforce using an objdir for building
+ # https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+ mkdir obj
diff --git a/patches/source/mozilla-firefox/firefox.moz_plugin_path.diff b/patches/source/mozilla-firefox/firefox.moz_plugin_path.diff
new file mode 100644
index 00000000..761f295a
--- /dev/null
+++ b/patches/source/mozilla-firefox/firefox.moz_plugin_path.diff
@@ -0,0 +1,17 @@
+--- ./firefox.orig 2008-05-29 15:21:18.000000000 -0500
++++ ./firefox 2008-06-17 12:19:26.000000000 -0500
+@@ -54,6 +54,14 @@
+
+ moz_libdir=/usr/local/lib/firefox-3.0
+
++# Include /usr/lib/mozilla/plugins in the plugin path:
++if [ "$MOZ_PLUGIN_PATH" ] ; then
++ MOZ_PLUGIN_PATH=$MOZ_PLUGIN_PATH:${moz_libdir}/plugins:/usr/lib/mozilla/plugins
++else
++ MOZ_PLUGIN_PATH=${moz_libdir}/plugins:/usr/lib/mozilla/plugins
++fi
++export MOZ_PLUGIN_PATH
++
+ # Use run-mozilla.sh in the current dir if it exists
+ # If not, then start resolving symlinks until we find run-mozilla.sh
+ found=0
diff --git a/patches/source/mozilla-firefox/gold/gold b/patches/source/mozilla-firefox/gold/gold
new file mode 100755
index 00000000..8c86d3b0
--- /dev/null
+++ b/patches/source/mozilla-firefox/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/patches/source/mozilla-firefox/gold/ld b/patches/source/mozilla-firefox/gold/ld
new file mode 120000
index 00000000..78a06a2a
--- /dev/null
+++ b/patches/source/mozilla-firefox/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/patches/source/mozilla-firefox/mimeTypes.rdf b/patches/source/mozilla-firefox/mimeTypes.rdf
new file mode 100644
index 00000000..f3bc7b40
--- /dev/null
+++ b/patches/source/mozilla-firefox/mimeTypes.rdf
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
+ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+ <RDF:Seq RDF:about="urn:mimetypes:root">
+ </RDF:Seq>
+ <RDF:Description RDF:about="urn:mimetypes">
+ <NC:MIME-types RDF:resource="urn:mimetypes:root"/>
+ </RDF:Description>
+ <RDF:Description RDF:about="urn:scheme:mailto"
+ NC:value="mailto">
+ <NC:handlerProp RDF:resource="urn:scheme:handler:mailto"/>
+ </RDF:Description>
+ <RDF:Description RDF:about="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"
+ NC:prettyName="Yahoo! Mail"
+ NC:uriTemplate="http://compose.mail.yahoo.com/?To=%s" />
+ <RDF:Description RDF:about="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"
+ NC:prettyName="GMail"
+ NC:uriTemplate="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" />
+ <RDF:Description RDF:about="urn:scheme:handler:mailto"
+ NC:alwaysAsk="true">
+ <NC:possibleApplication RDF:resource="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"/>
+ <NC:possibleApplication RDF:resource="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"/>
+ <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/thunderbird"/>
+ </RDF:Description>
+ <RDF:Description RDF:about="urn:handler:local:/usr/bin/thunderbird"
+ NC:prettyName="thunderbird"
+ NC:path="/usr/bin/thunderbird" />
+</RDF:RDF>
diff --git a/patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff b/patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff
new file mode 100644
index 00000000..22211304
--- /dev/null
+++ b/patches/source/mozilla-firefox/mozilla-firefox-mimeTypes-fix.diff
@@ -0,0 +1,45 @@
+diff -Nur mozilla-1.9.1.orig/browser/locales/generic/profile/mimeTypes.rdf mozilla-1.9.1/browser/locales/generic/profile/mimeTypes.rdf
+--- mozilla-1.9.1.orig/browser/locales/generic/profile/mimeTypes.rdf 2009-06-29 11:14:41.000000000 -0500
++++ mozilla-1.9.1/browser/locales/generic/profile/mimeTypes.rdf 2009-07-01 08:28:05.407353867 -0500
+@@ -1,13 +1,28 @@
+-<?xml version="1.0"?>
+-
+-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+- xmlns:NC="http://home.netscape.com/NC-rdf#"
+- xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+-
+- <Description about="urn:mimetypes">
+- <NC:MIME-types>
+- <Seq about="urn:mimetypes:root">
+- </Seq>
+- </NC:MIME-types>
+- </Description>
+-</RDF>
++<?xml version="1.0"?>
++<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
++ xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
++ <RDF:Seq RDF:about="urn:mimetypes:root">
++ </RDF:Seq>
++ <RDF:Description RDF:about="urn:mimetypes">
++ <NC:MIME-types RDF:resource="urn:mimetypes:root"/>
++ </RDF:Description>
++ <RDF:Description RDF:about="urn:scheme:mailto"
++ NC:value="mailto">
++ <NC:handlerProp RDF:resource="urn:scheme:handler:mailto"/>
++ </RDF:Description>
++ <RDF:Description RDF:about="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"
++ NC:prettyName="Yahoo! Mail"
++ NC:uriTemplate="http://compose.mail.yahoo.com/?To=%s" />
++ <RDF:Description RDF:about="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"
++ NC:prettyName="GMail"
++ NC:uriTemplate="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" />
++ <RDF:Description RDF:about="urn:scheme:handler:mailto"
++ NC:alwaysAsk="true">
++ <NC:possibleApplication RDF:resource="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"/>
++ <NC:possibleApplication RDF:resource="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"/>
++ <NC:possibleApplication RDF:resource="urn:handler:local:/usr/bin/thunderbird"/>
++ </RDF:Description>
++ <RDF:Description RDF:about="urn:handler:local:/usr/bin/thunderbird"
++ NC:prettyName="thunderbird"
++ NC:path="/usr/bin/thunderbird" />
++</RDF:RDF>
diff --git a/patches/source/mozilla-firefox/mozilla-firefox.SlackBuild b/patches/source/mozilla-firefox/mozilla-firefox.SlackBuild
new file mode 100755
index 00000000..9b0dd618
--- /dev/null
+++ b/patches/source/mozilla-firefox/mozilla-firefox.SlackBuild
@@ -0,0 +1,307 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 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.
+
+# Thanks to the folks at the Mozilla Foundation for permission to
+# distribute this, and for all the great work! :-)
+
+VERSION=$(basename $(ls firefox-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
+RELEASEVER=$(echo $VERSION | cut -f 1 -d r | cut -f 1 -d b | cut -f 1 -d e)
+BUILD=${BUILD:-1_slack14.2}
+
+# Specify this variable for a localized build.
+# For example, to build a version of Firefox with Italian support, run
+# the build script like this:
+#
+# MOZLOCALIZE=it ./mozilla-firefox.SlackBuild
+#
+MOZLOCALIZE=${MOZLOCALIZE:-}
+
+# Without LANG=C, building the Python environment may fail with:
+# "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 36: ordinal not in range(128)"
+LANG=C
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# Use PGO? Doubles the time and drive space requirements for the build,
+# but should provide a performance increase. How much depends on which
+# benchmarks you believe, but I've typically seen around 2.5%. I've also
+# seen some which say it can be negligably (a fraction of a percent) slower
+# with this enganged. The anecdotal reports usually say there's a noticable
+# improvement in overall responsiveness. Seems like a good bet if you have
+# the time and your system is able to handle it. Set the variable to
+# anything else prior to the build to compile Firefox in less time (but
+# without the possible benefits of Profile-Guided Optimization).
+#
+# NOTE: The 23.0 release fails to compile with a GLib assert error if PGO
+# is enabled, so it is being disabled by default. I can't say I ever noticed
+# a lot of difference with this anyway (other than a much, much longer compile
+# time. But pass PGO=yes to the SlackBuild if you want to try it.
+#if [ "$ARCH" = "x86_64" ]; then
+# PGO=${PGO:-yes}
+#else
+# # 32-bit systems have problems compiling with PGO, as the per-process
+# # memory requirements are too large. Possibly compiling with a 64-bit
+# # kernel could be a workaround for this, but for now we will default to
+# # using PGO only for x86_64.
+# PGO=${PGO:-no}
+#fi
+#
+# PGO is disabled by default:
+PGO=${PGO:-no}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS=""
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O1 "
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O1 "
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ OPTIMIZE=" --enable-optimize=-O1 "
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O1 "
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O1 "
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O1 "
+fi
+
+# Link using gold. This avoids running out of memory on 32-bit systems, and
+# avoids a recurring build failure with GNU ld on other systems.
+PATH="$(pwd)/gold:$PATH"
+export CC="gcc -B$(pwd)/gold"
+export CXX="g++ -B$(pwd)/gold"
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mozilla-firefox
+
+# If not specified, figure out if this is a beta or a release
+MOZVERS=${MOZVERS:-release}
+if echo $VERSION | grep -q b ; then MOZVERS=beta ; fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}
+
+# We need to use the incredibly ancient autoconf-2.13 for this :/
+( cd $CWD/autoconf ; ./autoconf.build )
+PATH=/tmp/autoconf-tmp/usr/bin:$PATH
+
+cd $TMP
+rm -rf firefox-$VERSION
+# Unpack this in a subdirectory to prevent changing permissions on /tmp:
+rm -rf firefox-unpack
+mkdir firefox-unpack
+cd firefox-unpack
+tar xvf $CWD/firefox-$VERSION.source.tar.?z* || exit 1
+mv * ..
+cd ..
+rm -rf firefox-unpack
+cd firefox-$VERSION || exit 1
+
+# Fetch localization, if requested
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1256955
+if [ ! -z $MOZLOCALIZE ]; then
+ LOC_URL="http://ftp.mozilla.org/pub/firefox/candidates/$VERSION-candidates/build1/l10n_changesets.txt"
+ LOC_COMMIT=$(wget -q -O - $LOC_URL | grep ^$MOZLOCALIZE | cut -d\ -f2)
+ hg clone https://hg.mozilla.org/l10n-central/$MOZLOCALIZE -r $LOC_COMMIT
+fi
+
+# Patch mimeTypes.rdf
+# Uncomment this if you want to use the patch; otherwise, we overwrite the
+# mimeTypes.rdf inside the package directory later
+# zcat $CWD/mozilla-firefox-mimeTypes-fix.diff.gz | patch -p1 || 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 {} \;
+
+# Our building options, in a configure-like display ;)
+OPTIONS="\
+ --enable-official-branding \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER \
+ --with-system-zlib \
+ --enable-alsa \
+ --enable-application=browser \
+ --enable-default-toolkit=cairo-gtk2 \
+ --enable-startup-notification \
+ $OPTIMIZE \
+ --enable-strip \
+ --enable-cpp-rtti \
+ --disable-accessibility \
+ --disable-crashreporter \
+ --disable-debug"
+# Complains about missing APNG support in Slackware's libpng:
+# --with-system-png \
+# This option breaks mozilla-12.0:
+# --enable-system-cairo \
+# NOTE: It probably reduces bugs to use the bundled library versions,
+# so in general we will not --enable-system-libraries.
+# But since system zlib has been used for a long time and isn't a moving
+# target, we'll leave that one as-is.
+if [ ! -z $MOZLOCALIZE ]; then
+ OPTIONS=$OPTIONS" \
+ --enable-ui-locale=$MOZLOCALIZE
+ --with-l10n-base=.."
+ # There are no dictionaries in localized builds
+ sed -i \
+ -e "/@BINPATH@\/dictionaries\/\*/d" \
+ -e "/@RESPATH@\/dictionaries\/\*/d" \
+ browser/installer/package-manifest.in || exit 1
+fi
+
+export MOZILLA_OFFICIAL="1"
+export BUILD_OFFICIAL="1"
+export MOZ_PHOENIX="1"
+export MOZ_PACKAGE_JSSHELL="1"
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export MOZ_MAKE_FLAGS="$NUMJOBS"
+
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig, we use this method for building, seems
+# needed for PGO.
+echo ". \$topsrcdir/browser/config/mozconfig" > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+
+if [ "$MOZLOCALIZE" ]; then
+ echo "mk_add_options MOZ_CO_LOCALES=\"$MOZLOCALIZE\"" >> .mozconfig
+fi
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+# https://developer.mozilla.org/en-US/docs/Building_with_Profile-Guided_Optimization
+# Thanks to ArchLinux and Gentoo for the additional hints.
+if [ "$PGO" = "yes" ]; then
+ # Do a PGO build, double time and disk space but worth it.
+ export MOZ_PGO=1
+ echo "mk_add_options PROFILE_GEN_SCRIPT='EXTRA_TEST_ARGS=10 \$(MAKE) -C \$(MOZ_OBJDIR) pgo-profile-run'" >> .mozconfig
+ export DISPLAY=:99
+ # Launch Xvfb to let the profile scripts run in a X session.
+ # Ugly note: if the build breaks you may want to do a "killall Xvfb".
+ Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 $DISPLAY &
+ dbus-launch --exit-with-session make -f client.mk build || exit 1
+ kill $! || true
+else
+ # Do a normal build
+ echo "ac_add_options --disable-tests" >> .mozconfig
+ make -f client.mk build || exit 1
+fi
+
+make -f client.mk install DESTDIR=$PKG || exit 1
+
+# We don't need these (just symlinks anyway):
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/firefox-devel-$RELEASEVER
+
+# Nor these:
+rm -rf $PKG/usr/include
+
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER
+ #mv defaults/profile/mimeTypes.rdf defaults/profile/mimeTypes.rdf.orig || exit 1
+ if [ -d defaults/profile ]; then
+ zcat $CWD/mimeTypes.rdf > defaults/profile/mimeTypes.rdf || exit 1
+ fi
+ # OK, this patch is useless on 7.x. We'll float without it and see what happens.
+ # Perhaps it won't make a difference or should be worked around elsewhere.
+ #zcat $CWD/firefox.moz_plugin_path.diff.gz \
+ # | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ # | patch -p1 --verbose --backup --suffix=.orig || exit 1
+ # Clean up if the above patch was successful:
+ #rm -f firefox.orig
+) || exit
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+mkdir -p $PKG/usr/share/applications
+cat $CWD/mozilla-firefox.desktop > $PKG/usr/share/applications/mozilla-firefox.desktop
+
+# These files/directories are usually created if Firefox is run as root,
+# which on many systems might (and possibly should) be never. Therefore, if we
+# don't see them we'll put stubs in place to prevent startup errors.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER
+ if [ -d extensions/talkback\@mozilla.org ]; then
+ if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
+ echo > extensions/talkback\@mozilla.org/chrome.manifest
+ fi
+ fi
+ if [ ! -d updates ]; then
+ mkdir -p updates/0
+ fi
+)
+
+# Need some default icons in the right place:
+for i in 16 22 24 32 48 256; do
+ install -m 0644 -D browser/branding/official/default${i}.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png
+done
+mkdir -p $PKG/usr/share/pixmaps
+( cd $PKG/usr/share/pixmaps ; ln -sf /usr/share/icons/hicolor/256x256/apps/firefox.png . )
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/firefox-$RELEASEVER/chrome/icons/default
+install -m 644 browser/branding/official/default16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/firefox-$RELEASEVER/icons/
+install -m 644 browser/branding/official/default16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/firefox-$RELEASEVER/chrome/icons/default/
+
+# Copy over the LICENSE
+install -p -c -m 644 LICENSE $PKG/usr/lib${LIBDIRSUFFIX}/firefox-$RELEASEVER/
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+if [ -z $MOZLOCALIZE ]; then
+ /sbin/makepkg -l y -c n $TMP/mozilla-firefox-$VERSION-$ARCH-$BUILD.txz
+else
+ /sbin/makepkg -l y -c n $TMP/mozilla-firefox-$VERSION-$ARCH-${BUILD}_$MOZLOCALIZE.txz
+fi
+
diff --git a/patches/source/mozilla-firefox/mozilla-firefox.desktop b/patches/source/mozilla-firefox/mozilla-firefox.desktop
new file mode 100644
index 00000000..e099dcad
--- /dev/null
+++ b/patches/source/mozilla-firefox/mozilla-firefox.desktop
@@ -0,0 +1,80 @@
+[Desktop Entry]
+Exec=firefox %u
+Icon=firefox
+Type=Application
+Categories=Network;
+Name=Firefox
+Name[bn]=ফায়ারফকà§à¦¸
+Name[eo]=Mozilo Fajrovulpo
+Name[fi]=Mozilla Firefox
+Name[pa]=ਫਾਇਰਫੋਕਸ
+Name[tg]=Рӯбоҳи оташин
+GenericName=Web Browser
+GenericName[af]=Web Blaaier
+GenericName[ar]=متصÙØ­ ويب
+GenericName[az]=Veb Səyyahı
+GenericName[bg]=Браузър
+GenericName[bn]=ওয়েব বà§à¦°à¦¾à¦‰à¦œà¦¾à¦°
+GenericName[br]=Furcher ar Gwiad
+GenericName[bs]=WWW Preglednik
+GenericName[ca]=Fullejador web
+GenericName[cs]=WWW prohlížeÄ
+GenericName[cy]=Porydd Gwe
+GenericName[da]=Browser
+GenericName[de]=Web-Browser
+GenericName[el]=ΠεÏιηγητής ΙστοÏ
+GenericName[eo]=TTT-legilo
+GenericName[es]=Navegador web
+GenericName[et]=Veebilehitseja
+GenericName[eu]=Web arakatzailea
+GenericName[fa]=مرورگر وب
+GenericName[fi]=WWW-selain
+GenericName[fo]=Alnótsfar
+GenericName[fr]=Navigateur web
+GenericName[gl]=Navegador Web
+GenericName[he]=דפדפן ×ינטרנט
+GenericName[hi]=वेब बà¥à¤°à¤¾à¤‰à¤œà¤¼à¤°
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[is]=Vafri
+GenericName[it]=Browser Web
+GenericName[ja]=ウェブブラウザ
+GenericName[ko]=웹 브ë¼ìš°ì €
+GenericName[lo]=ເວັບບຣາວເຊີ
+GenericName[lt]=Žiniatinklio naršyklė
+GenericName[lv]=Web PÄrlÅ«ks
+GenericName[mk]=ПрелиÑтувач на Интернет
+GenericName[mn]=Веб-Хөтөч
+GenericName[nb]=Nettleser
+GenericName[nds]=Nettkieker
+GenericName[nl]=Webbrowser
+GenericName[nn]=Nettlesar
+GenericName[nso]=Seinyakisi sa Web
+GenericName[pa]=ਵੈਬ à¨à¨²à¨•à¨¾à¨°à¨¾
+GenericName[pl]=PrzeglÄ…darka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator de web
+GenericName[ru]=Веб-браузер
+GenericName[se]=Fierpmádatlogan
+GenericName[sk]=Webový prehliadaÄ
+GenericName[sl]=Spletni brskalnik
+GenericName[sr]=Веб претраживач
+GenericName[sr@Latn]=Veb pretraživaÄ
+GenericName[ss]=Ibrawuza yeWeb
+GenericName[sv]=Webbläsare
+GenericName[ta]=வலை உலாவி
+GenericName[tg]=ТафÑиргари вÑб
+GenericName[th]=เว็บบราวเซอร์
+GenericName[tr]=Web Tarayıcı
+GenericName[uk]=Ðавігатор Тенет
+GenericName[uz]=Веб-браузер
+GenericName[ven]=Buronza ya Webu
+GenericName[vi]=Trình duyệt Web
+GenericName[wa]=Betchteu waibe
+GenericName[xh]=Umkhangeli zincwadi we Web
+GenericName[zh_CN]=网页æµè§ˆå™¨
+GenericName[zh_TW]=網é ç€è¦½å™¨
+GenericName[zu]=Umcingi we-Web
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
+X-KDE-StartupNotify=true
diff --git a/patches/source/mozilla-firefox/slack-desc b/patches/source/mozilla-firefox/slack-desc
new file mode 100644
index 00000000..a54bac8f
--- /dev/null
+++ b/patches/source/mozilla-firefox/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------------------------------------------------------|
+mozilla-firefox: mozilla-firefox (Mozilla Firefox Web browser)
+mozilla-firefox:
+mozilla-firefox: This project is a redesign of the Mozilla browser component written
+mozilla-firefox: using the XUL user interface language. Firefox empowers you to
+mozilla-firefox: browse faster, more safely and more efficiently than with any other
+mozilla-firefox: browser.
+mozilla-firefox:
+mozilla-firefox: Visit the Mozilla Firefox project online:
+mozilla-firefox: http://www.mozilla.org/projects/firefox/
+mozilla-firefox:
+mozilla-firefox:
diff --git a/patches/source/mozilla-nss/MPL-1.1.txt b/patches/source/mozilla-nss/MPL-1.1.txt
new file mode 100644
index 00000000..7714141d
--- /dev/null
+++ b/patches/source/mozilla-nss/MPL-1.1.txt
@@ -0,0 +1,470 @@
+ MOZILLA PUBLIC LICENSE
+ Version 1.1
+
+ ---------------
+
+1. Definitions.
+
+ 1.0.1. "Commercial Use" means distribution or otherwise making the
+ Covered Code available to a third party.
+
+ 1.1. "Contributor" means each entity that creates or contributes to
+ the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the Original
+ Code, prior Modifications used by a Contributor, and the Modifications
+ made by that particular Contributor.
+
+ 1.3. "Covered Code" means the Original Code or Modifications or the
+ combination of the Original Code and Modifications, in each case
+ including portions thereof.
+
+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
+ accepted in the software development community for the electronic
+ transfer of data.
+
+ 1.5. "Executable" means Covered Code in any form other than Source
+ Code.
+
+ 1.6. "Initial Developer" means the individual or entity identified
+ as the Initial Developer in the Source Code notice required by Exhibit
+ A.
+
+ 1.7. "Larger Work" means a work which combines Covered Code or
+ portions thereof with code not governed by the terms of this License.
+
+ 1.8. "License" means this document.
+
+ 1.8.1. "Licensable" means having the right to grant, to the maximum
+ extent possible, whether at the time of the initial grant or
+ subsequently acquired, any and all of the rights conveyed herein.
+
+ 1.9. "Modifications" means any addition to or deletion from the
+ substance or structure of either the Original Code or any previous
+ Modifications. When Covered Code is released as a series of files, a
+ Modification is:
+ A. Any addition to or deletion from the contents of a file
+ containing Original Code or previous Modifications.
+
+ B. Any new file that contains any part of the Original Code or
+ previous Modifications.
+
+ 1.10. "Original Code" means Source Code of computer software code
+ which is described in the Source Code notice required by Exhibit A as
+ Original Code, and which, at the time of its release under this
+ License is not already Covered Code governed by this License.
+
+ 1.10.1. "Patent Claims" means any patent claim(s), now owned or
+ hereafter acquired, including without limitation, method, process,
+ and apparatus claims, in any patent Licensable by grantor.
+
+ 1.11. "Source Code" means the preferred form of the Covered Code for
+ making modifications to it, including all modules it contains, plus
+ any associated interface definition files, scripts used to control
+ compilation and installation of an Executable, or source code
+ differential comparisons against either the Original Code or another
+ well known, available Covered Code of the Contributor's choice. The
+ Source Code can be in a compressed or archival form, provided the
+ appropriate decompression or de-archiving software is widely available
+ for no charge.
+
+ 1.12. "You" (or "Your") means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of, this
+ License or a future version of this License issued under Section 6.1.
+ For legal entities, "You" includes any entity which controls, is
+ controlled by, or is under common control with You. For purposes of
+ this definition, "control" means (a) the power, direct or indirect,
+ to cause the direction or management of such entity, whether by
+ contract or otherwise, or (b) ownership of more than fifty percent
+ (50%) of the outstanding shares or beneficial ownership of such
+ entity.
+
+2. Source Code License.
+
+ 2.1. The Initial Developer Grant.
+ The Initial Developer hereby grants You a world-wide, royalty-free,
+ non-exclusive license, subject to third party intellectual property
+ claims:
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Initial Developer to use, reproduce,
+ modify, display, perform, sublicense and distribute the Original
+ Code (or portions thereof) with or without Modifications, and/or
+ as part of a Larger Work; and
+
+ (b) under Patents Claims infringed by the making, using or
+ selling of Original Code, to make, have made, use, practice,
+ sell, and offer for sale, and/or otherwise dispose of the
+ Original Code (or portions thereof).
+
+ (c) the licenses granted in this Section 2.1(a) and (b) are
+ effective on the date Initial Developer first distributes
+ Original Code under the terms of this License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is
+ granted: 1) for code that You delete from the Original Code; 2)
+ separate from the Original Code; or 3) for infringements caused
+ by: i) the modification of the Original Code or ii) the
+ combination of the Original Code with other software or devices.
+
+ 2.2. Contributor Grant.
+ Subject to third party intellectual property claims, each Contributor
+ hereby grants You a world-wide, royalty-free, non-exclusive license
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Contributor, to use, reproduce, modify,
+ display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof) either on an
+ unmodified basis, with other Modifications, as Covered Code
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using, or
+ selling of Modifications made by that Contributor either alone
+ and/or in combination with its Contributor Version (or portions
+ of such combination), to make, use, sell, offer for sale, have
+ made, and/or otherwise dispose of: 1) Modifications made by that
+ Contributor (or portions thereof); and 2) the combination of
+ Modifications made by that Contributor with its Contributor
+ Version (or portions of such combination).
+
+ (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
+ effective on the date Contributor first makes Commercial Use of
+ the Covered Code.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent license is
+ granted: 1) for any code that Contributor has deleted from the
+ Contributor Version; 2) separate from the Contributor Version;
+ 3) for infringements caused by: i) third party modifications of
+ Contributor Version or ii) the combination of Modifications made
+ by that Contributor with other software (except as part of the
+ Contributor Version) or other devices; or 4) under Patent Claims
+ infringed by Covered Code in the absence of Modifications made by
+ that Contributor.
+
+3. Distribution Obligations.
+
+ 3.1. Application of License.
+ The Modifications which You create or to which You contribute are
+ governed by the terms of this License, including without limitation
+ Section 2.2. The Source Code version of Covered Code may be
+ distributed only under the terms of this License or a future version
+ of this License released under Section 6.1, and You must include a
+ copy of this License with every copy of the Source Code You
+ distribute. You may not offer or impose any terms on any Source Code
+ version that alters or restricts the applicable version of this
+ License or the recipients' rights hereunder. However, You may include
+ an additional document offering the additional rights described in
+ Section 3.5.
+
+ 3.2. Availability of Source Code.
+ Any Modification which You create or to which You contribute must be
+ made available in Source Code form under the terms of this License
+ either on the same media as an Executable version or via an accepted
+ Electronic Distribution Mechanism to anyone to whom you made an
+ Executable version available; and if made available via Electronic
+ Distribution Mechanism, must remain available for at least twelve (12)
+ months after the date it initially became available, or at least six
+ (6) months after a subsequent version of that particular Modification
+ has been made available to such recipients. You are responsible for
+ ensuring that the Source Code version remains available even if the
+ Electronic Distribution Mechanism is maintained by a third party.
+
+ 3.3. Description of Modifications.
+ You must cause all Covered Code to which You contribute to contain a
+ file documenting the changes You made to create that Covered Code and
+ the date of any change. You must include a prominent statement that
+ the Modification is derived, directly or indirectly, from Original
+ Code provided by the Initial Developer and including the name of the
+ Initial Developer in (a) the Source Code, and (b) in any notice in an
+ Executable version or related documentation in which You describe the
+ origin or ownership of the Covered Code.
+
+ 3.4. Intellectual Property Matters
+ (a) Third Party Claims.
+ If Contributor has knowledge that a license under a third party's
+ intellectual property rights is required to exercise the rights
+ granted by such Contributor under Sections 2.1 or 2.2,
+ Contributor must include a text file with the Source Code
+ distribution titled "LEGAL" which describes the claim and the
+ party making the claim in sufficient detail that a recipient will
+ know whom to contact. If Contributor obtains such knowledge after
+ the Modification is made available as described in Section 3.2,
+ Contributor shall promptly modify the LEGAL file in all copies
+ Contributor makes available thereafter and shall take other steps
+ (such as notifying appropriate mailing lists or newsgroups)
+ reasonably calculated to inform those who received the Covered
+ Code that new knowledge has been obtained.
+
+ (b) Contributor APIs.
+ If Contributor's Modifications include an application programming
+ interface and Contributor has knowledge of patent licenses which
+ are reasonably necessary to implement that API, Contributor must
+ also include this information in the LEGAL file.
+
+ (c) Representations.
+ Contributor represents that, except as disclosed pursuant to
+ Section 3.4(a) above, Contributor believes that Contributor's
+ Modifications are Contributor's original creation(s) and/or
+ Contributor has sufficient rights to grant the rights conveyed by
+ this License.
+
+ 3.5. Required Notices.
+ You must duplicate the notice in Exhibit A in each file of the Source
+ Code. If it is not possible to put such notice in a particular Source
+ Code file due to its structure, then You must include such notice in a
+ location (such as a relevant directory) where a user would be likely
+ to look for such a notice. If You created one or more Modification(s)
+ You may add your name as a Contributor to the notice described in
+ Exhibit A. You must also duplicate this License in any documentation
+ for the Source Code where You describe recipients' rights or ownership
+ rights relating to Covered Code. You may choose to offer, and to
+ charge a fee for, warranty, support, indemnity or liability
+ obligations to one or more recipients of Covered Code. However, You
+ may do so only on Your own behalf, and not on behalf of the Initial
+ Developer or any Contributor. You must make it absolutely clear than
+ any such warranty, support, indemnity or liability obligation is
+ offered by You alone, and You hereby agree to indemnify the Initial
+ Developer and every Contributor for any liability incurred by the
+ Initial Developer or such Contributor as a result of warranty,
+ support, indemnity or liability terms You offer.
+
+ 3.6. Distribution of Executable Versions.
+ You may distribute Covered Code in Executable form only if the
+ requirements of Section 3.1-3.5 have been met for that Covered Code,
+ and if You include a notice stating that the Source Code version of
+ the Covered Code is available under the terms of this License,
+ including a description of how and where You have fulfilled the
+ obligations of Section 3.2. The notice must be conspicuously included
+ in any notice in an Executable version, related documentation or
+ collateral in which You describe recipients' rights relating to the
+ Covered Code. You may distribute the Executable version of Covered
+ Code or ownership rights under a license of Your choice, which may
+ contain terms different from this License, provided that You are in
+ compliance with the terms of this License and that the license for the
+ Executable version does not attempt to limit or alter the recipient's
+ rights in the Source Code version from the rights set forth in this
+ License. If You distribute the Executable version under a different
+ license You must make it absolutely clear that any terms which differ
+ from this License are offered by You alone, not by the Initial
+ Developer or any Contributor. You hereby agree to indemnify the
+ Initial Developer and every Contributor for any liability incurred by
+ the Initial Developer or such Contributor as a result of any such
+ terms You offer.
+
+ 3.7. Larger Works.
+ You may create a Larger Work by combining Covered Code with other code
+ not governed by the terms of this License and distribute the Larger
+ Work as a single product. In such a case, You must make sure the
+ requirements of this License are fulfilled for the Covered Code.
+
+4. Inability to Comply Due to Statute or Regulation.
+
+ If it is impossible for You to comply with any of the terms of this
+ License with respect to some or all of the Covered Code due to
+ statute, judicial order, or regulation then You must: (a) comply with
+ the terms of this License to the maximum extent possible; and (b)
+ describe the limitations and the code they affect. Such description
+ must be included in the LEGAL file described in Section 3.4 and must
+ be included with all distributions of the Source Code. Except to the
+ extent prohibited by statute or regulation, such description must be
+ sufficiently detailed for a recipient of ordinary skill to be able to
+ understand it.
+
+5. Application of this License.
+
+ This License applies to code to which the Initial Developer has
+ attached the notice in Exhibit A and to related Covered Code.
+
+6. Versions of the License.
+
+ 6.1. New Versions.
+ Netscape Communications Corporation ("Netscape") may publish revised
+ and/or new versions of the License from time to time. Each version
+ will be given a distinguishing version number.
+
+ 6.2. Effect of New Versions.
+ Once Covered Code has been published under a particular version of the
+ License, You may always continue to use it under the terms of that
+ version. You may also choose to use such Covered Code under the terms
+ of any subsequent version of the License published by Netscape. No one
+ other than Netscape has the right to modify the terms applicable to
+ Covered Code created under this License.
+
+ 6.3. Derivative Works.
+ If You create or use a modified version of this License (which you may
+ only do in order to apply it to code which is not already Covered Code
+ governed by this License), You must (a) rename Your license so that
+ the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
+ "MPL", "NPL" or any confusingly similar phrase do not appear in your
+ license (except to note that your license differs from this License)
+ and (b) otherwise make it clear that Your version of the license
+ contains terms which differ from the Mozilla Public License and
+ Netscape Public License. (Filling in the name of the Initial
+ Developer, Original Code or Contributor in the notice described in
+ Exhibit A shall not of themselves be deemed to be modifications of
+ this License.)
+
+7. DISCLAIMER OF WARRANTY.
+
+ COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
+ DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
+ IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
+ YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
+ COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
+ OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
+ ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+8. TERMINATION.
+
+ 8.1. This License and the rights granted hereunder will terminate
+ automatically if You fail to comply with terms herein and fail to cure
+ such breach within 30 days of becoming aware of the breach. All
+ sublicenses to the Covered Code which are properly granted shall
+ survive any termination of this License. Provisions which, by their
+ nature, must remain in effect beyond the termination of this License
+ shall survive.
+
+ 8.2. If You initiate litigation by asserting a patent infringement
+ claim (excluding declatory judgment actions) against Initial Developer
+ or a Contributor (the Initial Developer or Contributor against whom
+ You file such action is referred to as "Participant") alleging that:
+
+ (a) such Participant's Contributor Version directly or indirectly
+ infringes any patent, then any and all rights granted by such
+ Participant to You under Sections 2.1 and/or 2.2 of this License
+ shall, upon 60 days notice from Participant terminate prospectively,
+ unless if within 60 days after receipt of notice You either: (i)
+ agree in writing to pay Participant a mutually agreeable reasonable
+ royalty for Your past and future use of Modifications made by such
+ Participant, or (ii) withdraw Your litigation claim with respect to
+ the Contributor Version against such Participant. If within 60 days
+ of notice, a reasonable royalty and payment arrangement are not
+ mutually agreed upon in writing by the parties or the litigation claim
+ is not withdrawn, the rights granted by Participant to You under
+ Sections 2.1 and/or 2.2 automatically terminate at the expiration of
+ the 60 day notice period specified above.
+
+ (b) any software, hardware, or device, other than such Participant's
+ Contributor Version, directly or indirectly infringes any patent, then
+ any rights granted to You by such Participant under Sections 2.1(b)
+ and 2.2(b) are revoked effective as of the date You first made, used,
+ sold, distributed, or had made, Modifications made by that
+ Participant.
+
+ 8.3. If You assert a patent infringement claim against Participant
+ alleging that such Participant's Contributor Version directly or
+ indirectly infringes any patent where such claim is resolved (such as
+ by license or settlement) prior to the initiation of patent
+ infringement litigation, then the reasonable value of the licenses
+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
+ into account in determining the amount or value of any payment or
+ license.
+
+ 8.4. In the event of termination under Sections 8.1 or 8.2 above,
+ all end user license agreements (excluding distributors and resellers)
+ which have been validly granted by You or any distributor hereunder
+ prior to termination shall survive termination.
+
+9. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
+ DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
+ OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
+ ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
+ CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
+ WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
+ COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
+ INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
+ LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
+ RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
+ PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
+ EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
+ THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
+
+10. U.S. GOVERNMENT END USERS.
+
+ The Covered Code is a "commercial item," as that term is defined in
+ 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+ software" and "commercial computer software documentation," as such
+ terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
+ C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
+ all U.S. Government End Users acquire Covered Code with only those
+ rights set forth herein.
+
+11. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. This License shall be governed by
+ California law provisions (except to the extent applicable law, if
+ any, provides otherwise), excluding its conflict-of-law provisions.
+ With respect to disputes in which at least one party is a citizen of,
+ or an entity chartered or registered to do business in the United
+ States of America, any litigation relating to this License shall be
+ subject to the jurisdiction of the Federal Courts of the Northern
+ District of California, with venue lying in Santa Clara County,
+ California, with the losing party responsible for costs, including
+ without limitation, court costs and reasonable attorneys' fees and
+ expenses. The application of the United Nations Convention on
+ Contracts for the International Sale of Goods is expressly excluded.
+ Any law or regulation which provides that the language of a contract
+ shall be construed against the drafter shall not apply to this
+ License.
+
+12. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or indirectly,
+ out of its utilization of rights under this License and You agree to
+ work with Initial Developer and Contributors to distribute such
+ responsibility on an equitable basis. Nothing herein is intended or
+ shall be deemed to constitute any admission of liability.
+
+13. MULTIPLE-LICENSED CODE.
+
+ Initial Developer may designate portions of the Covered Code as
+ "Multiple-Licensed". "Multiple-Licensed" means that the Initial
+ Developer permits you to utilize portions of the Covered Code under
+ Your choice of the NPL or the alternative licenses, if any, specified
+ by the Initial Developer in the file described in Exhibit A.
+
+EXHIBIT A -Mozilla Public License.
+
+ ``The contents of this file are subject to the Mozilla Public License
+ Version 1.1 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at
+ http://www.mozilla.org/MPL/
+
+ Software distributed under the License is distributed on an "AS IS"
+ basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ License for the specific language governing rights and limitations
+ under the License.
+
+ The Original Code is ______________________________________.
+
+ The Initial Developer of the Original Code is ________________________.
+ Portions created by ______________________ are Copyright (C) ______
+ _______________________. All Rights Reserved.
+
+ Contributor(s): ______________________________________.
+
+ Alternatively, the contents of this file may be used under the terms
+ of the _____ license (the "[___] License"), in which case the
+ provisions of [______] License are applicable instead of those
+ above. If you wish to allow use of your version of this file only
+ under the terms of the [____] License and not to allow others to use
+ your version of this file under the MPL, indicate your decision by
+ deleting the provisions above and replace them with the notice and
+ other provisions required by the [___] License. If you do not delete
+ the provisions above, a recipient may use your version of this file
+ under either the MPL or the [___] License."
+
+ [NOTE: The text of this Exhibit A may differ slightly from the text of
+ the notices in the Source Code files of the Original Code. You should
+ use the text of this Exhibit A rather than the text found in the
+ Original Code Source Code for Your Modifications.]
+
diff --git a/patches/source/mozilla-nss/faq.html b/patches/source/mozilla-nss/faq.html
new file mode 100644
index 00000000..176fe8f8
--- /dev/null
+++ b/patches/source/mozilla-nss/faq.html
@@ -0,0 +1,364 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel="top" title="Home" href="http://www.mozilla.org/">
+<link rel="stylesheet" type="text/css" href="../../../../css/print.css" media="print">
+<link rel="stylesheet" type="text/css" href="../../../../css/base/content.css" media="all">
+<link rel="stylesheet" type="text/css" href="../../../../css/cavendish/content.css" title="Cavendish" media="screen">
+<link rel="stylesheet" type="text/css" href="../../../../css/base/template.css" media="screen">
+<link rel="stylesheet" type="text/css" href="../../../../css/cavendish/template.css" title="Cavendish" media="screen">
+<link rel="icon" href="../../../../images/mozilla-16.png" type="image/png">
+
+<TITLE>NSS FAQ</TITLE>
+<script src="../../../../__utm.js" type="text/javascript"></script>
+</head>
+<body id="www-mozilla-org" class="secondLevel sectionDevelopers">
+<div id="container">
+<p class="skipLink"><a href="#mainContent" accesskey="2">Skip to main content</a></p>
+<div id="header">
+<h1><a href="/" title="Return to home page" accesskey="1">Mozilla</a></h1>
+<ul>
+<li id="menu_aboutus"><a href="../../../../about/" title="Learn more about Mozilla">About</a></li>
+<li id="menu_foundation"><a href="../../../../foundation/" title="Information about the non-profit Mozilla Foundation">Foundation</a></li>
+<li id="menu_contribute"><a href="../../../../contribute/" title="Find out how to get involved with Mozilla">Contribute</a></li>
+<li id="menu_community"><a href="../../../../community/" title="List of community sites and other resources">Community</a></li>
+<li id="menu_developers"><a href="../../../../developer/" title="Resources and links for developers">Developers</a></li>
+<li id="menu_projects"><a href="../../../../projects/" title="Projects being created by the Mozilla community">Projects</a></li>
+</ul>
+<form id="searchbox_002443141534113389537:ysdmevkkknw" action="http://www.google.com/cse" title="mozilla.org Search">
+<div>
+<label for="q" title="Search mozilla.org's sites">search mozilla:</label>
+<input type="hidden" name="cx" value="002443141534113389537:ysdmevkkknw">
+<input type="hidden" name="cof" value="FORID:0">
+<input type="text" id="q" name="q" accesskey="s" size="30">
+<input type="submit" id="submit" value="Go">
+</div>
+</form>
+</div>
+<hr class="hide">
+<div id="mBody">
+<div id="side">
+
+<ul id="nav">
+<li><a title="Roadmap" href="../../../../roadmap.html"><strong> Roadmap</strong></a></li>
+<li><a title="Projects" href="../../../../projects/"><strong> Projects</strong></a></li>
+<li><a title="For developers" href="../../../../developer/"><strong> Coding</strong></a>
+<ul>
+<li><a title="Module Owners" href="../../../../owners.html"> Module Owners</a></li>
+<li><a title="Hacking" href="../../../../hacking/"> Hacking</a></li>
+<li><a title="Get the Source" href="http://developer.mozilla.org/en/docs/Download_Mozilla_Source_Code"> Get the Source</a></li>
+<li><a title="Building Mozilla" href="http://developer.mozilla.org/en/docs/Build_Documentation"> Build It</a></li>
+</ul>
+</li>
+<li><a title="Testing" href="http://quality.mozilla.org/"><strong> Testing</strong></a>
+<ul>
+<li><a title="Downloads of mozilla.org software releases" href="../../../../download.html"> Releases</a></li>
+<li><a title="Latest mozilla builds for testers" href="../../../../developer/#builds"> Nightly Builds</a></li>
+<li><a title="For testers to report bugs" href="https://bugzilla.mozilla.org/"> Report A Problem</a></li>
+</ul>
+</li>
+<li><a title="Tools for mozilla developers" href="../../../../tools.html"><strong> Tools</strong></a>
+<ul>
+<li><a title="Bug tracking system for mozilla testers." href="https://bugzilla.mozilla.org/"> Bugzilla</a></li>
+<li><a title="Latest status of mozilla builds" href="http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox"> Tinderbox</a></li>
+<li><a title="Latest checkins" href="http://bonsai.mozilla.org/cvsqueryform.cgi"> Bonsai</a></li>
+<li><a title="Source cross reference" href="http://mxr.mozilla.org/"> MXR</a></li>
+</ul>
+</li>
+<li><a title="Frequently Asked Questions." href="../../../../faq.html"><strong> FAQs</strong></a></li>
+</ul>
+
+</div>
+<hr class="hide">
+<div id="mainContent">
+
+
+
+
+<center>
+<h2>NSS FAQ</h2>
+<i><FONT SIZE="-1">
+
+Newsgroup:
+<A HREF="news://news.mozilla.org/mozilla.dev.tech.crypto">mozilla.dev.tech.crypto</A>
+
+</FONT></i>
+</center>
+
+<p>
+<hr>
+<p>
+
+<a href="#Q1">General Questions</a>
+
+<ul>
+<li>
+<a href="#Q1.1">What is Network Security Services (NSS)?</a></li>
+<li>
+<a href="#Q1.2">What can I do with NSS? Is NSS appropriate for my application?</a></li>
+<li>
+<a href="#q1.2a">How does NSS compare to OpenSSL?</a></li>
+<li>
+<a href="#q1.3">How does NSS compare to SSLRef?</a></li>
+<li>
+<a href="#q1.4">What platforms and development environments are supported?</a></li>
+<li>
+<a href="#q1.5">What cryptography standards are supported?</a></li>
+<li>
+<a href="#q1.7">What is the relationship between NSS and PSM?</a></li>
+<li>
+<a href="#q1.7">Where can I get the source?</a></li>
+<li>
+<a href="#q1.8">How much does it cost?</a></li>
+</ul>
+
+<a href="#Q2">Developer Questions</a>
+<ul>
+<li>
+<a href="#q2.1">What hardware accelerators are supported?</a></li>
+<li>
+<a href="#q2.2">How do I integrate smart cards into my application using
+NSS?</a></li>
+<li>
+<a href="#q2.3">How is NSS compatible with other Netscape products?</a></li>
+<li>
+<a href="#q2.4">Does NSS require Netscape Portable Runtime (NSPR)?</a></li>
+<li>
+<a href="#q2.5">Can I use NSS even if my application protocol isn't HTTP?</a></li>
+<li>
+<a href="#q2.6">How long does it take to integrate NSS into my application?</a></li>
+<li>
+<a href="#q2.6">How can I learn more about SSL?</a></li>
+</ul>
+
+<a href="#Q3">Licensing Questions</a>
+<ul>
+<li>
+<a href="#q3.1">How is NSS licensed?</a>
+<li>
+<a href="#q3.2">Is NSS available outside the United States?</a></li>
+</ul>
+<h2>
+ <a NAME="Q1"><hr WIDTH="100%"></a>General Questions</h2>
+<a NAME="Q1.1"></a><H4>What is Network Security Services (NSS)?</h4>
+<P>NSS is set of libraries, APIs, utilities, and documentation designed
+to support cross-platform development of security-enabled client and
+server applications. It provides a complete open-source implementation
+of the crypto libraries used by Netscape and other companies in the
+Netscape 6 browser, server products from iPlanet E-Commerce Solutions, the
+Gateway Connected Touch Pad with Instant AOL, and other products.
+
+<p>For an
+overview of NSS, see <a href="overview.html">Overview of NSS</a>. For detailed information
+on the open-source NSS project, see <a href="index.html">NSS Project Page</a>.
+
+<br>
+<a NAME="Q1.2"></a><H4>What can I do with NSS? Is NSS appropriate for
+my application?</h4>
+<P>If you want add support for SSL, S/MIME, or other Internet security standards
+to your application, you can use Network Security Services (NSS) to do so. Because
+NSS provides complete support for all versions of SSL and TLS, it is particularly well-suited
+for applications that need to communicate with the many clients and servers
+that already support the SSL protocol.
+<p>The PKCS #11 interface included in NSS means that your application can
+use <a href="#q2.1">hardware accelerators</a> on the server and <a href="#q2.2">smart
+cards</a> for two-factor authentication.
+<br>
+
+ <a NAME="q1.2a"></a><H4>How does NSS compare to OpenSSL?</h4>
+
+<a href="http://www.openssl.org/">OpenSSL</a> is an open source project that implements server-side SSL,
+TLS, and a general-purpose cryptography library. It does not support PKCS #11. It is based on
+the SSLeay library developed by Eric A. Young and Tim J. Hudson. OpenSSL is widely used in
+Apache servers and is licensed under an Apache-style licence.
+
+<p>NSS supports both server and client applications as well as PKCS #11 and S/MIME. To permit its use
+in as many contexts as possible,
+NSS is triple-licensed under the <a href="../../../../MPL/">Mozilla Public License</a>, the
+<a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>,
+and the <a href="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public License</a>.
+You may choose to use the code either under the terms of the MPL or the GPL or the LGPL.
+
+<a NAME="q1.3"></a><H4>How does NSS compare to SSLRef?</h4>
+SSLRef was an early reference implementation of the SSL protocol. It contains
+bugs that were never fixed, doesn't support TLS or or the
+new 56-bit export cipher suites, and does not contain the fix to the
+Bleichenbacher attack on PKCS#1.
+
+<p>Netscape no longer maintains SSLRef or makes it available. It was built as
+an example of an SSL implementation, not for creating production applications.
+
+<p>NSS was designed from the ground up for use by commercial developers.
+It provides a complete software development kit
+that uses the same architecture used to support security features in many client
+and server products from Netscape and other companies.
+
+<a NAME="q1.4"></a><H4>What platforms and development environments are supported?</h4>
+<P>iPlanet E-Commerce Solutions has certified NSS 3.1 on 18 platforms, including AIX 4.3, HP-UX 11.0,
+Red Hat Linux 6.0, Solaris (2.6 or later), Windows NT (4.0 or later), and
+Windows 2000. Other contributors are in the process of certifying additional platforms.
+The NSS 3.1 API requires C or C++ development environments.
+
+<p>For the latest NSS release notes and detailed platform information, see
+<a href="release_notes_31.html">NSS 3.1 Release Notes</a>.
+
+<a NAME="q1.5"></a><H4>What cryptography standards does NSS support?</h4>
+<P>NSS supports <a HREF="../../../docs/jargon.html#SSL">SSL v2 and v3</a>,
+ <a HREF="../../../../docs/jargon.html#TLS">TLS</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS5">PKCS #5</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS7">PKCS #7</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS11">PKCS #11</a>,
+ <a HREF="../../../../docs/jargon.html#PKCS12">PKCS #12</a>,
+ <a HREF="../../../../docs/jargon.html#SMIME">S/MIME</a>, and
+ <a HREF="../../../../docs/jargon.html#X.509">X.509 v3</a> certificates.
+For complete details,
+see <a href="nss-3.11/nss-3.11-algorithms.html">
+Encryption Technologies</a>.
+
+<a NAME="q1.6"></a><H4>What is the relationship between NSS and PSM?</H4>
+
+Personal Security Manager (PSM) is built on top of NSS. It consists of libraries
+and a daemon designed to support cross-platform development of security-enabled
+client applications. The PSM binary provides a client module
+that performs cryptographic operations on behalf of applications.
+Netscape Personal Security Manager ships with Netscape 6 and the Gateway Connected Touch Pad with Instant AOL,
+and is also available for use with Communicagotr 4.7x.
+
+<p>For more information about the PSM open-source project, see <a href="../psm">Personal Security Manager</a>.
+
+<a NAME="q1.7"></a><H4>Where can I get the source code?</H4>
+
+For instructions on how to check out and build the NSS 3.1 source code, see
+<a href="buildnss_31.html">Build Instructions for NSS 3.1.</a> The source code may also
+be downloaded as a tar file from
+<a href="ftp://ftp.mozilla.org/pub/mozilla.org/security/">ftp://ftp.mozilla.org/pub/mozilla.org/security/</a>.
+
+<a NAME="q1.8"></a><H4>How much does it cost?</H4>
+
+NSS source code and binaries (when they become available) are completely free. No license fees,
+no royalty fees, no subscription fees.
+
+
+<a NAME="Q2"><h2>
+<hr WIDTH="100%"></a>Developer Questions</h2>
+
+<a NAME="q2.1"></a><H4>What hardware accelerators are supported?</h4>
+<P>NSS supports the PKCS #11 interface for hardware acceleration. Since leading accelerator vendors such as
+Chrysalis-IT, nCipher, and Rainbow Technologies also support this interface, NSS-enabled applications
+can support a wide variety of hardware accelerators.
+<a NAME="q2.2"></a><H4>How do I integrate smart cards into my application using
+NSS?</h4>
+<P>NSS supports the PKCS #11 interface for smart card integration. Applications that use the PKCS #11
+interface provided by NSS will therefore support smart cards from leading vendors such as
+ActiveCard, Litronic, and SecureID Technologies that also support the PKCS #11 interface.
+
+<a NAME="q2.3"></a><H4>How is NSS compatible with other Netscape products?</h4>
+<P>NSS provides tight integration with other Netscape products in two ways.
+First, by using NSS to implement SSL and TLS, you can support SSL communications
+with all products from Netscape and all other vendors
+that support SSL<FONT color="#CC0000"> and TLS.</FONT> Second, NSS makes it easy
+to share certificates between Netscape client and server products
+and your application.
+
+<a NAME="q2.4"></a><H4>Does NSS require Netscape Portable Runtime (NSPR)?</h4>
+<P>To provide cross-platform support, NSS utilizes Netscape Portable Runtime
+(NSPR) libraries as a portability interface and implementation that
+provides consistent cross-platform semantics for network I/O and threading
+models. You can use NSPR throughout your application or
+only in the portion that calls into NSS. Netscape strongly recommends that
+multithreaded applications use the NSPR or native OS threading model. (In
+recent NSPR releases, the NSPR threading model is compatible with the native
+threading model if the OS has native threads.) Alternatively, you can adapt
+the open-source NSPR implementation to be compatible with your existing
+application's threading models. More information about NSPR may be found at
+<a href="http://www.mozilla.org/projects/nspr/">Netscape Portable Runtime</a>.
+<br>
+
+<a NAME="q2.5"></a><H4>Can I use NSS even if my application protocol isn't
+HTTP?</h4>
+<P>Yes, SSL independent of application protocols. It works with common
+Internet standard application protocols (HTTP, POP3, FTP, SMTP, etc.) as
+well as custom application protocols using TCP/IP.
+
+<br>
+<a NAME="q2.6"></a><H4>How long does it take to integrate NSS into my application?</h4>
+<P>The integration effort depends on an number of factors, such as developer
+skill set, application complexity, and the level of security required for
+your application. NSS includes detailed documentation of the SSL API and
+sample code that demonstrates basic SSL functionality (setting up an encrypted
+session, server authentication, and client authentication) to help jump start the
+integration process. However, there is little or no documentation currently
+available for the rest of the NSS API. If your application requires sophisticated
+certificate management, smart card support, or hardware acceleration, your
+integration effort will be more extensive.
+
+<a NAME="q2.7"></a><H4> Where can I download the NSS tools?</h4>
+
+Currently, you must download the NSS source and build it to create binary files for the NSS tools.
+For more information, see <A HREF="tools/">NSS Tools</A>.
+
+
+<a NAME="q2.8"></a><H4>How can I learn more about SSL?</h4>
+
+NSS provides extensive documentation related to SSL, including high-level introductions,
+detailed API documentation, sample code for simple client and server
+applications, the original SSL 3.0 specification, and
+information on debugging SSL applications. For details, see the
+<a href="ssl/">SSL/TLS Project Page</a>. For information about the NSS tools, including those used
+for debugging SSL applications, see <a href="http://www.mozilla.org/projects/security/pki/nss/tools/">
+NSS Security Tools</a>.
+
+<a NAME="Q3"><h2>
+<hr WIDTH="100%"></a>Licensing Questions</h2>
+<H4><a NAME="q3.1"></a>How is NSS licensed?</h4>
+<P>NSS is triple-licensed under the <a href="../../../../MPL/">Mozilla Public License</a>, the
+<a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License</a>,
+and the <a href="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public License</a>.
+For more details, see the <a href="http://www.mozilla.org/crypto-faq.html#1-3">Mozilla Crypto FAQ</a>.
+
+<a NAME="q3.2"></a><H4>Is NSS available outside the United States?</h4>
+<P>Yes; see
+<a href="buildnss_31.html">Build Instructions for NSS 3.1.</a> and
+<a href="ftp://ftp.mozilla.org/pub/mozilla.org/security/">ftp://ftp.mozilla.org/pub/mozilla.org/security/</a>.
+However, NSS source code is subject to the U.S. Export
+Administration Regulations and other U.S. law, and may not be exported or
+re-exported to certain
+countries (currently Cuba, Iran, Libya, North Korea, Sudan and Syria) or
+to persons or entities prohibited from receiving U.S. exports (including
+those (a) on the Bureau of Industry and Security Denied Parties List or
+Entity List, (b) on the Office of Foreign Assets Control list of Specially
+Designated Nationals and Blocked Persons, and (c) involved with missile
+technology or nuclear, chemical or biological weapons).
+
+<p>For more information about U.S. export controls on encryption software,
+see the <a href="http://www.mozilla.org/crypto-faq.html">Mozilla Crypto FAQ</a>.
+
+
+
+
+
+<hr class="hide">
+</div>
+</div>
+<div id="footer">
+<ul>
+<li><a href="../../../../support/">Support Options</a></li>
+<li><a href="../../../../security/">Security Center</a></li>
+<li><a href="../../../../privacy-policy.html">Privacy Policy</a></li>
+<li><a href="../../../../contact/">Contact Us</a></li>
+</ul>
+<p class="affiliates">International Affiliates: <a href="http://www.mozilla-europe.org/">Mozilla Europe</a> - <a
+href="http://mozilla.jp/">Mozilla Japan</a> - <a href="http://www.mozillaonline.com/">Mozilla China</a></p>
+<p class="copyright">
+Portions of this content are &copy; 1998&#8211;2009 by individual mozilla.org contributors<br>
+Content available under a Creative Commons <a href="http://www.mozilla.org/foundation/licensing/website-content.html">license</a></p>
+<p>
+<span>Last modified July 12, 2007</span>
+<span><a href="http://bonsai-www.mozilla.org/cvslog.cgi?file=mozilla-org/html/projects/security/pki/nss/faq.html&amp;rev=&amp;root=/www/">Document History</a></span>
+<span><a href="https://doctor.mozilla.org/?action=edit&amp;file=mozilla-org/html/projects/security/pki/nss/faq.html">Edit this Page</a></span> <span>(or <a href="/contribute/writing/cvs">via CVS</a>)</span>
+</p>
+</div>
+</div>
+</body>
+</html>
diff --git a/patches/source/mozilla-nss/gpl-2.0.txt b/patches/source/mozilla-nss/gpl-2.0.txt
new file mode 100644
index 00000000..d511905c
--- /dev/null
+++ b/patches/source/mozilla-nss/gpl-2.0.txt
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/patches/source/mozilla-nss/lgpl-2.1.txt b/patches/source/mozilla-nss/lgpl-2.1.txt
new file mode 100644
index 00000000..602bfc94
--- /dev/null
+++ b/patches/source/mozilla-nss/lgpl-2.1.txt
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/patches/source/mozilla-nss/mozilla-nss.SlackBuild b/patches/source/mozilla-nss/mozilla-nss.SlackBuild
new file mode 100755
index 00000000..9d6bb909
--- /dev/null
+++ b/patches/source/mozilla-nss/mozilla-nss.SlackBuild
@@ -0,0 +1,186 @@
+#!/bin/sh
+# Copyright 2005, 2006, 2008, 2009, 2010, 2012 Eric Hameleers, Eindhoven, NL
+# Copyright 2013, 2014, 2015, 2017 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.
+# -----------------------------------------------------------------------------
+
+PKGNAM=mozilla-nss
+SRCNAM=nss
+VERSION=${VERSION:-3.31.1}
+NSPR=${NSPR:-4.16}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ export USE_64=1
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Seems parallel build does not work with this.
+#NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf nss-${VERSION}
+rm -rf nspr-${NSPR}
+tar xvf $CWD/nss-$VERSION.tar.?z* || exit 1
+cd nss-$VERSION
+tar xvf $CWD/nspr-$NSPR.tar.?z* || exit 1
+mv nspr*/nspr .
+
+# -Werror is problematic with gcc7:
+sed -i "s|\ -Werror| |" nss/coreconf/Werror.mk || exit 1
+
+# 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 {} \;
+
+echo Building ...
+export LDFLAGS="-lz"
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export BUILD_OPT=1
+export NSDISTMODE="copy"
+export NSS_USE_SYSTEM_SQLITE=1
+export NSS_ENABLE_ECC=1
+cd nss
+ # Seems parallel build does not work with this.
+ #make $NUMJOBS nss_build_all export
+ make nss_build_all export || exit 1
+cd -
+
+# Install all the needed stuff to the package dir:
+mkdir -p $PKG/usr/{bin,lib${LIBDIRSUFFIX},include/{nss,nspr}}
+cd dist/$(uname -s)*
+ cp -pL bin/{certutil,cmsutil,crlutil,modutil,pk12util,shlibsign,signtool,signver,ssltap} $PKG/usr/bin/
+ cp -pL lib/* $PKG/usr/lib${LIBDIRSUFFIX}/
+ chmod 755 $PKG/usr/lib${LIBDIRSUFFIX}/*.so*
+ cp -rL include/* $PKG/usr/include/nspr/
+ cp -rpL ../public/nss/*.h $PKG/usr/include/nss/
+ # Remove some things we do not need:
+ rm -f $PKG/usr/bin/*.so
+ rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.a
+ rm -rf $PKG/usr/include/nspr/md
+ cp -L lib/libcrmf.a $PKG/usr/lib${LIBDIRSUFFIX}/ # yes, put this one back
+cd -
+
+cd nss/cmd/smimetools
+ cp -a smime $PKG/usr/bin/
+ chmod 0755 $PKG/usr/bin/smime
+ sed -i -e 's#/usr/local/bin#/usr/bin#g' $PKG/usr/bin/smime
+cd -
+
+# Install nspr-config:
+cat nspr/$(uname -s)*/config/nspr-config | sed -e "s,prefix=/usr/local,prefix=/usr,g" | sed -e "s,libdir=\${exec_prefix}/lib,libdir=\${exec_prefix}/lib${LIBDIRSUFFIX},g" > $PKG/usr/bin/nspr-config
+chmod 755 $PKG/usr/bin/nspr-config
+
+# Install nss-config:
+sed -e "s,@prefix@,/usr,g" \
+ -e "s,@MOD_MAJOR_VERSION@,$(printf $VERSION | cut -d. -f1),g" \
+ -e "s,@MOD_MINOR_VERSION@,$(printf $VERSION | cut -d. -f2),g" \
+ -e "s,@MOD_PATCH_VERSION@,$(printf $VERSION | cut -d. -f3),g" \
+ $CWD/nss-config.in > $PKG/usr/bin/nss-config
+chmod 755 $PKG/usr/bin/nss-config
+
+# Provide pkg-config files:
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+cat <<EOT > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/mozilla-nss.pc
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=/usr/lib${LIBDIRSUFFIX}
+includedir=\${prefix}/include/nss
+
+Name: NSS
+Description: Network Security Services
+Version: $VERSION
+Requires: nspr >= $NSPR sqlite3
+Libs: -L\${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3 -lnssutil3
+Cflags: -I\${includedir}
+EOT
+cat <<EOT > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/mozilla-nspr.pc
+prefix=/usr
+exec_prefix=\${prefix}
+libdir=/usr/lib${LIBDIRSUFFIX}
+includedir=\${prefix}/include/nspr
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: $NSPR
+Libs: -L\${libdir} -lplds4 -lplc4 -lnspr4
+Cflags: -I\${includedir}
+EOT
+
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+ ln -s mozilla-nspr.pc nspr.pc
+ ln -s mozilla-nss.pc nss.pc
+)
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ $CWD/MPL-1.1.txt $CWD/gpl-2.0.txt $CWD/lgpl-2.1.txt \
+ $CWD/faq.html \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION
+
+# 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 $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/patches/source/mozilla-nss/nss-config.in b/patches/source/mozilla-nss/nss-config.in
new file mode 100644
index 00000000..f8f893e7
--- /dev/null
+++ b/patches/source/mozilla-nss/nss-config.in
@@ -0,0 +1,145 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@MOD_MAJOR_VERSION@
+minor_version=@MOD_MINOR_VERSION@
+patch_version=@MOD_PATCH_VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--includedir[=DIR]]
+ [--libdir[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Dynamic Libraries:
+ nss
+ nssutil
+ ssl
+ smime
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_smime=yes
+lib_nss=yes
+lib_nssutil=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
+ includedir=$optarg
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
+ libdir=$optarg
+ ;;
+ --libdir)
+ echo_libdir=yes
+ ;;
+ --version)
+ echo ${major_version}.${minor_version}.${patch_version}
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ ssl)
+ lib_ssl=yes
+ ;;
+ smime)
+ lib_smime=yes
+ ;;
+ nss)
+ lib_nss=yes
+ ;;
+ nssutil)
+ lib_nssutil=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+ exec_prefix=`pkg-config --variable=exec_prefix nss`
+fi
+if test -z "$includedir"; then
+ includedir=`pkg-config --variable=includedir nss`
+fi
+if test -z "$libdir"; then
+ libdir=`pkg-config --variable=libdir nss`
+fi
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+ echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+ echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+ echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+ libdirs="-Wl,-rpath-link,$libdir -L$libdir"
+ if test -n "$lib_ssl"; then
+ libdirs="$libdirs -lssl${major_version}"
+ fi
+ if test -n "$lib_smime"; then
+ libdirs="$libdirs -lsmime${major_version}"
+ fi
+ if test -n "$lib_nss"; then
+ libdirs="$libdirs -lnss${major_version}"
+ fi
+ if test -n "$lib_nssutil"; then
+ libdirs="$libdirs -lnssutil${major_version}"
+ fi
+ echo $libdirs
+fi
+
diff --git a/patches/source/mozilla-nss/slack-desc b/patches/source/mozilla-nss/slack-desc
new file mode 100644
index 00000000..7a23daaf
--- /dev/null
+++ b/patches/source/mozilla-nss/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------------------------------------------------------|
+mozilla-nss: mozilla-nss (Network Security Services)
+mozilla-nss:
+mozilla-nss: Network Security Services (NSS) is a set of libraries designed to
+mozilla-nss: support cross-platform development of security-enabled client and
+mozilla-nss: server applications. Applications built with NSS can support
+mozilla-nss: SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME,
+mozilla-nss: X.509 v3 certificates, and other security standards.
+mozilla-nss:
+mozilla-nss:
+mozilla-nss: Read http://www.mozilla.org/projects/security/pki/nss/overview.html
+mozilla-nss:
diff --git a/patches/source/mozilla-thunderbird/autoconf/autoconf-2.13-consolidated_fixes-1.patch b/patches/source/mozilla-thunderbird/autoconf/autoconf-2.13-consolidated_fixes-1.patch
new file mode 100644
index 00000000..5e7b2311
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/autoconf/autoconf-2.13-consolidated_fixes-1.patch
@@ -0,0 +1,504 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2016-06-11
+Initial Package Version: 2.13
+Upstream Status: Version is historic and unmaintained.
+Origin: Found at fedora, plus fixes for LFS.
+Description: All of the patches currently used by fedora, except for
+the patch which ensures gawk is used in preference to mawk (we do not
+install mawk). For LFS: we put mktemp in /usr/bin not /bin, remove
+the install-info target because that will overwrite standards.info
+with an old version (fedora always use a DESTDIR), and change the
+man and info dirs to ${datadir}/ i.e. /usr/share (an empty /usr/info
+will otherwise be created).
+
+diff -Naur a/acgeneral.m4 b/acgeneral.m4
+--- a/acgeneral.m4 1999-01-05 13:27:37.000000000 +0000
++++ b/acgeneral.m4 2016-06-11 00:18:24.429043947 +0100
+@@ -1817,10 +1817,6 @@
+ [cat > conftest.$ac_ext <<EOF
+ [#]line __oline__ "configure"
+ #include "confdefs.h"
+-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+-extern "C" void exit(int);
+-#endif
+-])dnl
+ [$1]
+ EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+@@ -1988,12 +1984,12 @@
+ AC_MSG_CHECKING(size of $1)
+ AC_CACHE_VAL(AC_CV_NAME,
+ [AC_TRY_RUN([#include <stdio.h>
+-main()
++int main()
+ {
+ FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
++ if (!f) return(1);
+ fprintf(f, "%d\n", sizeof($1));
+- exit(0);
++ return(0);
+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
+ AC_MSG_RESULT($AC_CV_NAME)
+ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
+@@ -2160,20 +2156,38 @@
+ dnl AC_OUTPUT_MAKE_DEFS()
+ define(AC_OUTPUT_MAKE_DEFS,
+ [# Transform confdefs.h into DEFS.
+-dnl Using a here document instead of a string reduces the quoting nightmare.
+ # Protect against shell expansion while executing Makefile rules.
+ # Protect against Makefile macro expansion.
+-cat > conftest.defs <<\EOF
++#
++# If the first sed substitution is executed (which looks for macros that
++# take arguments), then we branch to the quote section. Otherwise,
++# look for a macro that doesn't take arguments.
++cat >confdef2opt.sed <<\_ACEOF
+ changequote(<<, >>)dnl
+-s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+-s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
+-s%\[%\\&%g
+-s%\]%\\&%g
+-s%\$%$$%g
++t clear
++: clear
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
++t quote
++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
++t quote
++d
++: quote
++s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
++s,\[,\\&,g
++s,\],\\&,g
++s,\$,$$,g
++p
+ changequote([, ])dnl
+-EOF
+-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+-rm -f conftest.defs
++_ACEOF
++# We use echo to avoid assuming a particular line-breaking character.
++# The extra dot is to prevent the shell from consuming trailing
++# line-breaks from the sub-command output. A line-break within
++# single-quotes doesn't work because, if this script is created in a
++# platform that uses two characters for line-breaks (e.g., DOS), tr
++# would break.
++ac_LF_and_DOT=`echo; echo .`
++DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
++rm -f confdef2opt.sed
+ ])
+
+ dnl Do the variable substitutions to create the Makefiles or whatever.
+diff -Naur a/acspecific.m4 b/acspecific.m4
+--- a/acspecific.m4 1999-01-05 13:27:52.000000000 +0000
++++ b/acspecific.m4 2016-06-11 00:18:17.533078644 +0100
+@@ -152,8 +152,41 @@
+ CXXFLAGS=
+ fi
+ fi
++
++AC_PROG_CXX_EXIT_DECLARATION
+ ])
+
++
++# AC_PROG_CXX_EXIT_DECLARATION
++# -----------------------------
++# Find a valid prototype for exit and declare it in confdefs.h.
++AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
++[for ac_declaration in \
++ ''\
++ '#include <stdlib.h>' \
++ 'extern "C" void std::exit (int) throw (); using std::exit;' \
++ 'extern "C" void std::exit (int); using std::exit;' \
++ 'extern "C" void exit (int) throw ();' \
++ 'extern "C" void exit (int);' \
++ 'void exit (int);'
++do
++ AC_TRY_COMPILE([#include <stdlib.h>
++$ac_declaration],
++ [exit (42);],
++ [],
++ [continue])
++ AC_TRY_COMPILE([$ac_declaration],
++ [exit (42);],
++ [break])
++done
++if test -n "$ac_declaration"; then
++ echo '#ifdef __cplusplus' >>confdefs.h
++ echo $ac_declaration >>confdefs.h
++ echo '#endif' >>confdefs.h
++fi
++])# AC_PROG_CXX_EXIT_DECLARATION
++
++
+ dnl Determine a Fortran 77 compiler to use. If `F77' is not already set
+ dnl in the environment, check for `g77', `f77' and `f2c', in that order.
+ dnl Set the output variable `F77' to the name of the compiler found.
+@@ -1010,7 +1043,7 @@
+ ])
+
+ AC_DEFUN(AC_FUNC_MMAP,
+-[AC_CHECK_HEADERS(unistd.h)
++[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
+ AC_CHECK_FUNCS(getpagesize)
+ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
+ [AC_TRY_RUN([
+@@ -1039,11 +1072,24 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
++
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++
+ /* This mess was copied from the GNU getpagesize.h. */
+ #ifndef HAVE_GETPAGESIZE
+-# ifdef HAVE_UNISTD_H
+-# include <unistd.h>
+-# endif
+
+ /* Assume that all systems that can run configure have sys/param.h. */
+ # ifndef HAVE_SYS_PARAM_H
+@@ -1373,6 +1419,8 @@
+ r.ru_majflt = r.ru_minflt = 0;
+ switch (fork()) {
+ case 0: /* Child. */
++ /* Unless we actually _do_ something, the kernel sometimes doesn't chalk up any system time to this process. */
++ if(fork()) { i = 123; wait(NULL); } else { i = 234; exit(0); }
+ sleep(1); /* Give up the CPU. */
+ _exit(0);
+ case -1: _exit(0); /* What can we do? */
+diff -Naur a/autoconf.sh b/autoconf.sh
+--- a/autoconf.sh 1999-01-05 13:27:53.000000000 +0000
++++ b/autoconf.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -45,20 +45,20 @@
+ esac
+
+ : ${TMPDIR=/tmp}
+-tmpout=${TMPDIR}/acout.$$
++tmpout=`/usr/bin/mktemp ${TMPDIR}/acout.XXXXXX`
+ localdir=
+ show_version=no
+
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout ; exit 0 ;;
+ --localdir=* | --l*=* )
+ localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -l | --localdir | --l*)
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ localdir="${1}"
+ shift ;;
+ --macrodir=* | --m*=* )
+@@ -66,7 +66,7 @@
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --v* )
+@@ -76,7 +76,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -86,23 +86,25 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $tmpout
+ exit 0
+ fi
+
+ case $# in
+ 0) infile=configure.in ;;
+ 1) infile="$1" ;;
+- *) echo "$usage" >&2; exit 1 ;;
++ *) echo "$usage" >&2; rm -f $tmpout; exit 1 ;;
+ esac
+
+ trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
+
+-tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
++tmpin=`/usr/bin/mktemp ${TMPDIR}/acin.XXXXXX`
++# Always set this, to avoid bogus errors from some rm's.
+ if test z$infile = z-; then
+ infile=$tmpin
+- cat > $infile
+ elif test ! -r "$infile"; then
+ echo "autoconf: ${infile}: No such file or directory" >&2
++ rm -f $tmpin $tmpout
+ exit 1
+ fi
+
+@@ -111,6 +113,8 @@
+ else
+ use_localdir=
+ fi
++# Make sure we don't leave those around - they are annoying
++trap 'rm -f $tmpin $tmpout' 0
+
+ # Use the frozen version of Autoconf if available.
+ r= f=
+@@ -118,7 +122,7 @@
+ case `$M4 --help < /dev/null 2>&1` in
+ *reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
+ *traditional*) ;;
+-*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
++*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin $tmpout; exit 1 ;;
+ esac
+
+ $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
+@@ -154,6 +158,6 @@
+ /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
+ ' >&4
+
+-rm -f $tmpout
++rm -f $tmpout $tmpin
+
+ exit $status
+diff -Naur a/autoconf.texi b/autoconf.texi
+--- a/autoconf.texi 1999-01-05 13:28:37.000000000 +0000
++++ b/autoconf.texi 2016-06-11 00:18:46.360933604 +0100
+@@ -1,7 +1,7 @@
+ \input texinfo @c -*-texinfo-*-
+ @c %**start of header
+-@setfilename autoconf.info
+-@settitle Autoconf
++@setfilename autoconf.info
++@settitle Autoconf
+ @c For double-sided printing, uncomment:
+ @c @setchapternewpage odd
+ @c %**end of header
+@@ -17,7 +17,8 @@
+ @ifinfo
+ @format
+ START-INFO-DIR-ENTRY
+-* Autoconf: (autoconf). Create source code configuration scripts.
++* Autoconf: (autoconf). Create source code configuration scripts.
++ This is a legacy version of autoconf.
+ END-INFO-DIR-ENTRY
+ @end format
+
+diff -Naur a/autoheader.sh b/autoheader.sh
+--- a/autoheader.sh 1999-01-05 13:28:39.000000000 +0000
++++ b/autoheader.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -194,9 +194,9 @@
+ # Some fgrep's have limits on the number of lines that can be in the
+ # pattern on the command line, so use a temporary file containing the
+ # pattern.
+- (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
++ (fgrep_tmp=`/usr/bin/mktemp ${TMPDIR-/tmp}/autoh$$.XXXXXX`
+ trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+- cat > $fgrep_tmp <<EOF
++ cat >> $fgrep_tmp <<EOF
+ $syms
+ EOF
+ fgrep -f $fgrep_tmp
+diff -Naur a/autoupdate.sh b/autoupdate.sh
+--- a/autoupdate.sh 1999-01-05 13:28:42.000000000 +0000
++++ b/autoupdate.sh 2016-06-11 00:23:19.151561252 +0100
+@@ -26,7 +26,7 @@
+ Usage: autoupdate [-h] [--help] [-m dir] [--macrodir=dir]
+ [--version] [template-file]"
+
+-sedtmp=/tmp/acups.$$
++sedtmp=`/usr/bin/mktemp /tmp/acups.XXXXXX`
+ # For debugging.
+ #sedtmp=/tmp/acups
+ show_version=no
+@@ -35,13 +35,13 @@
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 0 ;;
+ --macrodir=* | --m*=* )
+ AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $sedtmp; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --versio | --versi | --vers)
+@@ -51,7 +51,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -61,6 +61,7 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $sedtmp
+ exit 0
+ fi
+
+@@ -68,6 +69,7 @@
+
+ tmpout=acupo.$$
+ trap 'rm -f $sedtmp $tmpout; exit 1' 1 2 15
++trap 'rm -f $sedtmp' 0
+ case $# in
+ 0) infile=configure.in; out="> $tmpout"
+ # Make sure $infile can be read, and $tmpout has the same permissions.
+diff -Naur a/configure b/configure
+--- a/configure 1999-01-05 13:28:57.000000000 +0000
++++ b/configure 2016-06-11 00:50:57.771231914 +0100
+@@ -43,8 +43,8 @@
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++infodir='${datadir}/info'
++mandir='${datadir}/man'
+
+ # Initialize some other variables.
+ subdirs=
+diff -Naur a/Makefile.in b/Makefile.in
+--- a/Makefile.in 1999-01-05 13:27:16.000000000 +0000
++++ b/Makefile.in 2016-06-11 00:29:34.005678107 +0100
+@@ -49,7 +49,7 @@
+
+ # Directory in which to install library files.
+ datadir = @datadir@
+-acdatadir = $(datadir)/autoconf
++acdatadir = $(datadir)/autoconf-2.13
+
+ # Directory in which to install documentation info files.
+ infodir = @infodir@
+@@ -68,8 +68,8 @@
+ DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
+ Makefile.in NEWS README TODO $(M4FILES) \
+ acconfig.h acfunctions acheaders acidentifiers \
+- acmakevars acprograms autoconf.info* \
+- autoconf.sh autoconf.texi install.texi \
++ acmakevars acprograms autoconf.info* \
++ autoconf.sh autoconf.texi install.texi \
+ autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
+ config.guess config.sub configure configure.in \
+ install-sh mkinstalldirs texinfo.tex \
+@@ -106,11 +106,11 @@
+ autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+ autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+
+-info: autoconf.info @standards_info@ INSTALL
++info: autoconf.info @standards_info@ INSTALL
+
+ # Use --no-split to avoid creating filenames > 14 chars.
+-autoconf.info: autoconf.texi install.texi
+- $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
++autoconf.info: autoconf.texi install.texi
++ $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
+
+ INSTALL: install.texi
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
+@@ -121,8 +121,8 @@
+
+ dvi: autoconf.dvi @standards_dvi@
+
+-autoconf.dvi: autoconf.texi
+- $(TEXI2DVI) $(srcdir)/autoconf.texi
++autoconf.dvi: autoconf.texi
++ $(TEXI2DVI) $(srcdir)/autoconf.texi
+
+ standards.dvi: standards.texi make-stds.texi
+ $(TEXI2DVI) $(srcdir)/standards.texi
+@@ -137,35 +137,35 @@
+ cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
+
+ installdirs:
+- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
++ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir)
+
+-install: all $(M4FILES) acconfig.h installdirs install-info
++install: all $(M4FILES) acconfig.h installdirs
+ for p in $(ASCRIPTS); do \
+- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ for i in $(M4FROZEN); do \
+- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ for i in $(M4FILES) acconfig.h; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ -if test -f autoscan; then \
+- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \
+ for i in acfunctions acheaders acidentifiers acprograms \
+ acmakevars; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done; \
+ else :; fi
+
+ # Don't cd, to avoid breaking install-sh references.
+ install-info: info installdirs
+- if test -f autoconf.info; then \
++ if test -f autoconf.info; then \
+ for i in *.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
+ done; \
+ else \
+ for i in $(srcdir)/*.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ done; \
+ fi
+
+@@ -174,7 +174,7 @@
+ rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ rm -fr $(acdatadir)
+- cd $(infodir) && rm -f autoconf.info*
++ cd $(infodir) && rm -f autoconf.info*
+ if test -f standards.info || test -f $(srcdir)/standards.info; \
+ then cd $(infodir) && rm -f standards.info*; fi
+
+diff -Naur a/testsuite/autoconf.s/syntax.exp b/testsuite/autoconf.s/syntax.exp
+--- a/testsuite/autoconf.s/syntax.exp 1999-01-05 13:29:54.000000000 +0000
++++ b/testsuite/autoconf.s/syntax.exp 2016-06-11 00:18:51.996905247 +0100
+@@ -2,7 +2,7 @@
+
+ send_user "Checking for syntax errors in the specific tests...\n"
+ set script {s/^AC_DEFUN(\([^,]*\).*/\1/p}
+-set macros [exec sed -n $script $srcdir/../acspecific.m4]
++set macros [exec sed -n $script $srcdir/../acspecific.m4 | grep -v -e AC_FUNC_GETLOADAVG -e F77]
+
+ foreach mac $macros {
+ send_user "$mac\n"
diff --git a/patches/source/mozilla-thunderbird/autoconf/autoconf.build b/patches/source/mozilla-thunderbird/autoconf/autoconf.build
new file mode 100755
index 00000000..7dae1bad
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/autoconf/autoconf.build
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# Copyright 2005-2016 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=autoconf
+VERSION=2.13
+BUILD=${BUILD:-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
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-autoconf
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf autoconf-$VERSION
+tar xvf $CWD/autoconf-$VERSION.tar.xz || exit 1
+cd autoconf-$VERSION
+
+zcat $CWD/autoconf-2.13-consolidated_fixes-1.patch.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Build a temporary copy of autoconf-2.13 only to be used to compile
+# Firefox, since it somewhat inexplicably requires this ancient version:
+
+rm -rf $TMP/autoconf-tmp
+mkdir -p $TMP/autoconf-tmp
+# This will be at the beginning of the $PATH, so protect against nonsense
+# happening in /tmp:
+chmod 700 $TMP/autoconf-tmp
+rm -rf $TMP/autoconf-tmp/*
+mkdir -p $TMP/autoconf-tmp/usr
+
+./configure \
+ --prefix=$TMP/autoconf-tmp/usr \
+ --program-suffix=-2.13 \
+ --infodir=$TMP/autoconf-tmp/usr/info \
+ --mandir=$TMP/autoconf-tmp/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install || exit 1
+
diff --git a/patches/source/mozilla-thunderbird/gold/gold b/patches/source/mozilla-thunderbird/gold/gold
new file mode 100755
index 00000000..8c86d3b0
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/patches/source/mozilla-thunderbird/gold/ld b/patches/source/mozilla-thunderbird/gold/ld
new file mode 120000
index 00000000..78a06a2a
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch b/patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch
new file mode 100644
index 00000000..7309b55a
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/mozilla-firefox.xpcom_arm.patch
@@ -0,0 +1,18 @@
+--- a/xpcom/glue/objs.mk
++++ a/xpcom/glue/objs.mk
+@@ -71,13 +71,13 @@ XPCOM_GLUENS_SRC_LCPPSRCS = \
+ SSE.cpp \
+ unused.cpp \
+ nsProxyRelease.cpp \
+ nsTextFormatter.cpp \
+ GenericFactory.cpp \
+ FileUtils.cpp \
+ $(NULL)
+
+-ifeq (arm,$(TARGET_CPU))
++ifneq (,$(filter arm%,$(TARGET_CPU)))
+ XPCOM_GLUENS_SRC_LCPPSRCS += arm.cpp
+ endif
+
+ XPCOM_GLUENS_SRC_CPPSRCS = $(addprefix $(topsrcdir)/xpcom/glue/,$(XPCOM_GLUENS_SRC_LCPPSRCS))
+
diff --git a/patches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild b/patches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
new file mode 100755
index 00000000..eb88ecd4
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/mozilla-thunderbird.SlackBuild
@@ -0,0 +1,247 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2014, 2016, 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 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+# Thanks to the folks at the Mozilla Foundation for permission to
+# distribute this, and for all the great work! :-)
+
+VERSION=$(basename $(ls thunderbird-*.tar.?z* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)
+RELEASEVER=$(echo $VERSION | cut -f 1 -d e | cut -f 1 -d b)
+BUILD=${BUILD:-1_slack14.2}
+
+# Specify this variable for a localized build.
+# For example, to build a version of Thunderbird with Italian support, run
+# the build script like this:
+#
+# MOZLOCALIZE=it ./mozilla-firefox.SlackBuild
+#
+MOZLOCALIZE=${MOZLOCALIZE:-}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=armv7hl ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS=""
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-fPIC"
+ LIBDIRSUFFIX="64"
+ OPTIMIZE=" --enable-optimize=-O2 "
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+else
+ SLKCFLAGS=""
+ LIBDIRSUFFIX=""
+ OPTIMIZE=" --enable-optimize=-O2 "
+fi
+
+# Link using gold. This avoids running out of memory on 32-bit systems, and
+# avoids a recurring build failure with GNU ld on other systems.
+PATH="$(pwd)/gold:$PATH"
+export CC="gcc -B$(pwd)/gold"
+export CXX="g++ -B$(pwd)/gold"
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-mozilla-thunderbird
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr/lib${LIBDIRSUFFIX}
+
+# We need to use the incredibly ancient autoconf-2.13 for this :/
+( cd $CWD/autoconf ; ./autoconf.build )
+PATH=/tmp/autoconf-tmp/usr/bin:$PATH
+
+cd $TMP
+rm -rf thunderbird-$VERSION
+# Unpack this in a subdirectory to prevent changing permissions on /tmp:
+rm -rf thunderbird-unpack
+mkdir thunderbird-unpack
+cd thunderbird-unpack
+tar xvf $CWD/thunderbird-$VERSION.source.tar.?z* || exit 1
+mv * ..
+cd ..
+rm -rf thunderbird-unpack
+cd thunderbird-$VERSION || exit 1
+
+# Fetch localization, if requested:
+if [ ! -z $MOZLOCALIZE ]; then
+ LOC_TAG="THUNDERBIRD_$( echo $VERSION | tr \. _ )_RELEASE"
+ rm -f $LOC_TAG.tar.bz2
+ wget https://hg.mozilla.org/releases/l10n/mozilla-release/$MOZLOCALIZE/archive/$LOC_TAG.tar.bz2
+ tar xvf $LOC_TAG.tar.bz2
+ mv $MOZLOCALIZE-$LOC_TAG $MOZLOCALIZE
+fi
+
+# Arch-dependent patches:
+case "$ARCH" in
+ armv7hl) ARCH_CONFIG="--with-arch=armv7-a --with-float-abi=hard --with-fpu=vfpv3-d16 --disable-elf-hack"
+ # Make firefox compile on ARM platforms lacking neon support:
+ zcat $CWD/mozilla-firefox.xpcom_arm.patch.gz | patch -p1 --verbose || exit 1
+ ;;
+ *) ARCH_CONFIG=" "
+ ;;
+esac
+
+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 {} \;
+
+# Our building options, in a configure-like display ;)
+OPTIONS="\
+ --enable-official-branding \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/thunderbird-$RELEASEVER \
+ --with-system-zlib \
+ --enable-alsa \
+ --enable-application=mail \
+ --enable-calendar \
+ --enable-default-toolkit=cairo-gtk2 \
+ --enable-startup-notification \
+ --enable-ldap \
+ $OPTIMIZE \
+ --enable-strip \
+ --enable-cpp-rtti \
+ --disable-accessibility \
+ --disable-crashreporter \
+ --disable-debug \
+ --disable-tests \
+ --host=$ARCH-slackware-linux \
+ --target=$ARCH-slackware-linux"
+ # Complains about missing APNG support in Slackware's libpng:
+ #--with-system-png \
+ # Broken with 12.0:
+ #--enable-system-cairo \
+if [ ! -z $MOZLOCALIZE ]; then
+ OPTIONS=$OPTIONS" \
+ --enable-ui-locale=$MOZLOCALIZE
+ --with-l10n-base=.."
+ # There are no dictionaries in localized builds
+ sed -i \
+ -e "/@BINPATH@\/dictionaries\/\*/d" \
+ -e "/@RESPATH@\/dictionaries\/\*/d" \
+ mail/installer/package-manifest.in || exit 1
+fi
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export MOZ_PHOENIX=1
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export MOZ_MAKE_FLAGS="$NUMJOBS"
+
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig:
+echo > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+# This directory is also needed or the build will fail:
+mkdir -p mozilla/obj
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+make -f client.mk build || exit 1
+make -f client.mk install DESTDIR=$PKG || exit 1
+
+# We don't need these (just symlinks anyway):
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-devel-$RELEASEVER
+
+# Nor these:
+rm -rf $PKG/usr/include
+
+# Thunderbird 3.x cruft?
+# If we still need something like this (and you know what we need :), let me know.
+#( cd $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$VERSION
+# cp -a defaults/profile/mimeTypes.rdf defaults/profile/mimeTypes.rdf.orig
+# zcat $CWD/mimeTypes.rdf > defaults/profile/mimeTypes.rdf || exit 1
+#) || exit 1
+
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+mkdir -p $PKG/usr/share/applications
+cat $CWD/mozilla-thunderbird.desktop > $PKG/usr/share/applications/mozilla-thunderbird.desktop
+mkdir -p $PKG/usr/share/pixmaps
+cat $CWD/thunderbird.png > $PKG/usr/share/pixmaps/thunderbird.png
+
+# These files/directories are usually created if Thunderbird is run as root,
+# which on many systems might (and possibly should) be never. Therefore, if we
+# don't see them we'll put stubs in place to prevent startup errors.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$RELEASEVER
+ if [ -d extensions/talkback\@mozilla.org ]; then
+ if [ ! -r extensions/talkback\@mozilla.org/chrome.manifest ]; then
+ echo > extensions/talkback\@mozilla.org/chrome.manifest
+ fi
+ fi
+ if [ ! -d updates ]; then
+ mkdir -p updates/0
+ fi
+)
+
+# Need some default icons in the right place:
+for i in 16 22 24 32 48 256; do
+ install -m 0644 -D other-licenses/branding/thunderbird/mailicon${i}.png \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/thunderbird.png
+done
+mkdir -p $PKG/usr/share/pixmaps
+( cd $PKG/usr/share/pixmaps ; ln -sf /usr/share/icons/hicolor/256x256/apps/thunderbird . )
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/chrome/icons/default
+install -m 644 other-licenses/branding/thunderbird/mailicon16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/icons/
+install -m 644 other-licenses/branding/thunderbird/mailicon16.png \
+ $PKG/usr/lib$LIBDIRSUFFIX/thunderbird-$RELEASEVER/chrome/icons/default/
+
+# Copy over the LICENSE
+install -p -c -m 644 LICENSE $PKG/usr/lib${LIBDIRSUFFIX}/thunderbird-$RELEASEVER/
+
+mkdir $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+if [ -z $MOZLOCALIZE ]; then
+ /sbin/makepkg -l y -c n $TMP/mozilla-thunderbird-$VERSION-$ARCH-$BUILD.txz
+else
+ /sbin/makepkg -l y -c n $TMP/mozilla-thunderbird-$VERSION-$ARCH-${BUILD}_$MOZLOCALIZE.txz
+fi
diff --git a/patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop b/patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop
new file mode 100644
index 00000000..0f85ecbe
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/mozilla-thunderbird.desktop
@@ -0,0 +1,84 @@
+[Desktop Entry]
+Encoding=UTF-8
+Exec=thunderbird
+Icon=/usr/share/pixmaps/thunderbird.png
+Type=Application
+Categories=Application;Network;
+Name=Thunderbird
+Name[bn]=থাণà§à¦¡à¦¾à¦°à¦¬à¦¾à¦°à§à¦¡
+Name[eo]=Mozilo Tondrobirdo
+Name[fi]=Mozilla Thunderbird
+Name[pa]=ਥੰਡਰਬਰਡ
+Name[tg]=Паррандаи бало
+GenericName=Mail Client
+GenericName[af]=Pos Kliënt
+GenericName[ar]=البريد الألكتروني
+GenericName[az]=Poçt Alıcısı
+GenericName[be]=Паштовы кліент
+GenericName[bg]=ПощенÑки клиент
+GenericName[bn]=ইমেইল কà§à¦²à¦¾à§Ÿà§‡à¦¨à§à¦Ÿ
+GenericName[br]=Arval postel
+GenericName[bs]=Program za Äitanje elektronske poÅ¡te
+GenericName[ca]=Client de correu electrònic
+GenericName[cs]=Klient pro Ätení elektronické poÅ¡ty
+GenericName[cy]=Dibynnydd Ebost
+GenericName[da]=E-mail-klient
+GenericName[de]=E-Mail-Programm
+GenericName[el]=Πελάτης mail
+GenericName[eo]=Legi kaj sendi retpoÅton
+GenericName[es]=Cliente de correo electrónico
+GenericName[et]=Meiliklient
+GenericName[eu]=Posta bezeroa
+GenericName[fa]=کارگیر پست الکترونیکی
+GenericName[fi]=Sähköpostiohjelma
+GenericName[fo]=Postforrit
+GenericName[fr]=Logiciel de messagerie électronique
+GenericName[ga]=Cliant Ríomhphoist
+GenericName[gl]=Cliente de correo
+GenericName[he]=תוכנית דו×ר
+GenericName[hi]=डाकिया
+GenericName[hr]=Program za Äitanje elektronske poÅ¡te
+GenericName[hu]=Levelezőprogram
+GenericName[id]=Klien Mail
+GenericName[is]=Póstforrit
+GenericName[it]=Programma di posta elettronica
+GenericName[ja]=メールクライアント
+GenericName[ko]=편지를 주고 받는 프로그램
+GenericName[lo]=ໄຄà»à»€àº­àº±àº™àºˆàº»àº”ຫມາàºà»€àº­à»€àº¥àº±àºà»‚ຕນິàº
+GenericName[lt]=Pašto klientas
+GenericName[lv]=Pasta Klients
+GenericName[mk]=Програма за електронÑка пошта
+GenericName[mn]=Э-Захиа-Програм
+GenericName[mt]=Klijent tal-imejl
+GenericName[nb]=E-postklient
+GenericName[nds]=Mailprogramm
+GenericName[nl]=E-mailclient
+GenericName[nn]=Lesing og sending av e-post
+GenericName[nso]=Moreki wa Poso
+GenericName[oc]=Programari de correu electrònic
+GenericName[pa]=ਪੱਤਰ ਕਲਾਂਇਟ
+GenericName[pl]=Program do wysyłania i odbierania poczty elektronicznej
+GenericName[pt]=Client de E-mail
+GenericName[pt_BR]=Cliente de E-mail
+GenericName[ro]=Program de poştă electronică
+GenericName[ru]=Клиент Ñлектронной почты
+GenericName[se]=Boastaprográmma
+GenericName[sk]=Klient elektronickej pošty
+GenericName[sl]=Program za e-pošto
+GenericName[sr]=Програм за e-пошту
+GenericName[sr@Latn]=Program za e-poštu
+GenericName[ss]=Likhasimende leliposi
+GenericName[sv]=E-postklient
+GenericName[ta]=அஞà¯à®šà®²à¯ உறà¯à®ªà¯à®ªà®¿à®©à®°à¯
+GenericName[tg]=Коргири почтаи Ñллектроникӣ
+GenericName[th]=ไคลเอนต์จดหมายอิเล็à¸à¸—รอนิà¸à¸ªà¹Œ
+GenericName[tr]=Posta Ä°stemcisi
+GenericName[uk]=Клієнт електронної пошти
+GenericName[uz]=Хат-хабар клиенти
+GenericName[ven]=Mushumisani na poso
+GenericName[wa]=Cliyint d' emilaedje
+GenericName[xh]=Umxhasi Weposi
+GenericName[zh_CN]=邮件程åº
+GenericName[zh_TW]=郵件處ç†ç¨‹å¼
+GenericName[zu]=Umxhasi weposi
+X-KDE-StartupNotify=true
diff --git a/patches/source/mozilla-thunderbird/slack-desc b/patches/source/mozilla-thunderbird/slack-desc
new file mode 100644
index 00000000..353b2225
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/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------------------------------------------------------|
+mozilla-thunderbird: mozilla-thunderbird (Mozilla Thunderbird mail application)
+mozilla-thunderbird:
+mozilla-thunderbird: Mozilla Thunderbird is a redesign of the Mozilla mail component
+mozilla-thunderbird: written using the XUL user interface language. Thunderbird makes
+mozilla-thunderbird: emailing safer, faster, and easier than ever before with the
+mozilla-thunderbird: industry's best implementations of features such as intelligent spam
+mozilla-thunderbird: filters, built-in RSS reader, quick search, and much more.
+mozilla-thunderbird:
+mozilla-thunderbird: Visit the Mozilla Thunderbird project online:
+mozilla-thunderbird: http://www.mozilla.org/projects/thunderbird/
+mozilla-thunderbird:
diff --git a/patches/source/mozilla-thunderbird/thunderbird.png b/patches/source/mozilla-thunderbird/thunderbird.png
new file mode 100644
index 00000000..61a37d70
--- /dev/null
+++ b/patches/source/mozilla-thunderbird/thunderbird.png
Binary files differ
diff --git a/patches/source/nasm/nasm.SlackBuild b/patches/source/nasm/nasm.SlackBuild
new file mode 100755
index 00000000..9f4d8325
--- /dev/null
+++ b/patches/source/nasm/nasm.SlackBuild
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 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.
+
+
+PKGNAM=nasm
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-nasm
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf nasm-$VERSION
+tar xvf $CWD/nasm-$VERSION.tar.?z* || exit 1
+cd nasm-$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 \
+ --mandir=/usr/man \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make || exit 1
+( cd doc
+ make nasmdoc.txt
+ mkdir -p $PKG/usr/doc/nasm-$VERSION
+ cp nasmdoc.txt $PKG/usr/doc/nasm-$VERSION
+)
+make install INSTALLROOT=$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/nasm-$VERSION
+cp -a \
+ AUTHORS CHANGES COPYING* INSTALL LICENSE README* TODO \
+ $PKG/usr/doc/nasm-$VERSION
+
+gzip -9 $PKG/usr/man/man?/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/nasm-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/nasm/slack-desc b/patches/source/nasm/slack-desc
new file mode 100644
index 00000000..f289814b
--- /dev/null
+++ b/patches/source/nasm/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------------------------------------------------------|
+nasm: nasm (NASM assembler)
+nasm:
+nasm: NASM is the Netwide Assembler, a free portable assembler for the Intel
+nasm: 80x86 microprocessor series, using primarily the traditional Intel
+nasm: instruction mnemonics and syntax.
+nasm:
+nasm: NASM was written by Simon Tatham and Julian Hall.
+nasm:
+nasm: Homepage: http://www.nasm.us
+nasm:
+nasm:
diff --git a/patches/source/network-manager-applet/doinst.sh b/patches/source/network-manager-applet/doinst.sh
new file mode 100644
index 00000000..96ae4b32
--- /dev/null
+++ b/patches/source/network-manager-applet/doinst.sh
@@ -0,0 +1,16 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications 1>/dev/null 2> /dev/null
+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 1>/dev/null 2> /dev/null
+ fi
+fi
+
+if [ -e usr/share/glib-2.0/schemas ]; then
+ if [ -x /usr/bin/glib-compile-schemas ]; then
+ /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas >/dev/null 2>&1
+ fi
+fi
+
diff --git a/patches/source/network-manager-applet/network-manager-applet.SlackBuild b/patches/source/network-manager-applet/network-manager-applet.SlackBuild
new file mode 100755
index 00000000..804c3976
--- /dev/null
+++ b/patches/source/network-manager-applet/network-manager-applet.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Slackware build script for network-manager-applet
+
+# Copyright 2010, 2011, 2014 Robby Workman, Northport, Alabama, 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=network-manager-applet
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --enable-more-warnings=no \
+ --without-team \
+ --without-selinux \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# 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 || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTING COPYING* ChangeLog 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/network-manager-applet/slack-desc b/patches/source/network-manager-applet/slack-desc
new file mode 100644
index 00000000..ad8c8f7d
--- /dev/null
+++ b/patches/source/network-manager-applet/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------------------------------------------------------|
+network-manager-applet: network-manager-applet (NetworkManager Applet)
+network-manager-applet:
+network-manager-applet: nm-applet is a gui frontend for NetworkManager.
+network-manager-applet:
+network-manager-applet:
+network-manager-applet:
+network-manager-applet:
+network-manager-applet:
+network-manager-applet:
+network-manager-applet:
+network-manager-applet:
diff --git a/patches/source/ntp/doinst.sh b/patches/source/ntp/doinst.sh
new file mode 100644
index 00000000..bc542990
--- /dev/null
+++ b/patches/source/ntp/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...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+config etc/ntp.conf.new
+config etc/ntp/ntp.keys.new
+if [ -r etc/rc.d/rc.ntpd -a -r etc/rc.d/rc.ntpd.new ]; then
+ chmod --reference=etc/rc.d/rc.ntpd etc/rc.d/rc.ntpd.new
+fi
+mv etc/rc.d/rc.ntpd.new etc/rc.d/rc.ntpd
diff --git a/patches/source/ntp/ntp.SlackBuild b/patches/source/ntp/ntp.SlackBuild
new file mode 100755
index 00000000..ae20783b
--- /dev/null
+++ b/patches/source/ntp/ntp.SlackBuild
@@ -0,0 +1,158 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 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=ntp
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-ntp
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ntp-${VERSION}*
+tar xvf $CWD/ntp-${VERSION}*.tar.?z* || exit 1
+cd ntp-${VERSION}* || exit 1
+
+zcat $CWD/ntp.nano.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 2777 -o -perm 2755 -o -perm 2775 \) \
+ -exec chmod u+rwx,g-sw,g+rx,o-w,o+rx {} \; -o \
+ \( -perm 777 -o -perm 775 -o -perm 774 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod u+rwx,g-sw,g+rx,o-w,o+rx {} \; -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 \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --bindir=/usr/sbin \
+ --sbindir=/usr/sbin \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/ntp-$VERSION \
+ --htmldir=/usr/doc/ntp-$VERSION \
+ --enable-ipv6 \
+ --with-crypto \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make -i install DESTDIR=$PKG || exit 1
+
+# Since the Makefile's install pays no heed to the --bindir settings,
+# we'll move things to where they've always been ourselves:
+mv $PKG/usr/bin/* $PKG/usr/sbin
+rmdir $PKG/usr/bin
+
+# This might only be an empty directory:
+rmdir $PKG/usr/lib/pkgconfig
+
+# This should be empty. Try to remove it, and error out if it's not actually empty:
+rmdir $PKG/usr/libexec || exit 1
+
+mkdir -p $PKG/etc/ntp
+cat $CWD/ntp.conf > $PKG/etc/ntp.conf.new
+cat $CWD/ntp.keys > $PKG/etc/ntp/ntp.keys.new
+chmod 600 $PKG/etc/ntp/ntp.keys.new
+touch $PKG/etc/ntp/step-tickers
+
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.ntpd > $PKG/etc/rc.d/rc.ntpd.new
+
+mv $PKG/usr/doc/ntp-$VERSION/*.html $PKG/usr/doc/ntp-$VERSION/html || exit 1
+cp -a \
+ COPYRIGHT NEWS README* TODO WHERE-TO-START \
+ *.y2kfixes clockstuff conf scripts \
+ $PKG/usr/doc/ntp-$VERSION
+mkdir $PKG/usr/doc/ntp-$VERSION/util
+cp -a util/README $PKG/usr/doc/ntp-$VERSION/util
+mkdir $PKG/usr/doc/ntp-$VERSION/ntpdate
+cp -a ntpdate/README $PKG/usr/doc/ntp-$VERSION/ntpdate
+( cd $PKG/usr/doc/ntp-$VERSION
+ find . -name ".deps*" -exec rm -rf "{}" \; 2> /dev/null
+)
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# 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
+
+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/ntp-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/ntp/ntp.conf b/patches/source/ntp/ntp.conf
new file mode 100644
index 00000000..1844fb91
--- /dev/null
+++ b/patches/source/ntp/ntp.conf
@@ -0,0 +1,72 @@
+# Sample /etc/ntp.conf: Configuration file for ntpd.
+#
+# Undisciplined Local Clock. This is a fake driver intended for backup
+# and when no outside source of synchronized time is available. The
+# default stratum is usually 3, but in this case we elect to use stratum
+# 0. Since the server line does not have the prefer keyword, this driver
+# is never used for synchronization, unless no other other
+# synchronization source is available. In case the local host is
+# controlled by some external source, such as an external oscillator or
+# another protocol, the prefer keyword would cause the local host to
+# disregard all other synchronization sources, unless the kernel
+# modifications are in use and declare an unsynchronized condition.
+#
+server 127.127.1.0 # local clock
+fudge 127.127.1.0 stratum 10
+
+#
+# NTP server (list one or more) to synchronize with:
+#server 0.pool.ntp.org iburst
+#server 1.pool.ntp.org iburst
+#server 2.pool.ntp.org iburst
+#server 3.pool.ntp.org iburst
+
+#
+# Drift file. Put this in a directory which the daemon can write to.
+# No symbolic links allowed, either, since the daemon updates the file
+# by creating a temporary in the same directory and then rename()'ing
+# it to the file.
+#
+driftfile /etc/ntp/drift
+
+#
+# Uncomment to use a multicast NTP server on the local subnet:
+#multicastclient 224.0.1.1 # listen on default 224.0.1.1
+# Set an optional compensation for broadcast packet delay:
+#broadcastdelay 0.008
+
+#
+# Keys file. If you want to diddle your server at run time, make a
+# keys file (mode 600 for sure) and define the key number to be
+# used for making requests.
+# PLEASE DO NOT USE THE DEFAULT VALUES HERE. Pick your own, or remote
+# systems might be able to reset your clock at will.
+#
+#keys /etc/ntp/keys
+#trustedkey 65535
+#requestkey 65535
+#controlkey 65535
+
+#
+# Don't serve time or stats to anyone else by default (more secure)
+restrict default limited kod nomodify notrap nopeer noquery
+restrict -6 default limited kod nomodify notrap nopeer noquery
+
+#
+# Use these lines instead if you do want to serve time and stats to
+# other machines on the network:
+#restrict default limited kod nomodify notrap nopeer
+#restrict -6 default limited kod nomodify notrap nopeer
+
+#
+# Disable the ntpdc -c monlist command, which is insecure and can be used
+# to cause a denial of service attack (CVE-2013-5211). Future versions of
+# NTP will remove this command.
+# (this feature was disabled by default with ntpd 4.2.7p230)
+disable monitor
+
+#
+# Trust ourselves. :-)
+restrict 127.0.0.1
+restrict ::1
+
diff --git a/patches/source/ntp/ntp.keys b/patches/source/ntp/ntp.keys
new file mode 100644
index 00000000..1c3fbd2c
--- /dev/null
+++ b/patches/source/ntp/ntp.keys
@@ -0,0 +1,2 @@
+65535 M akey
+1 M pass
diff --git a/patches/source/ntp/ntp.nano.diff b/patches/source/ntp/ntp.nano.diff
new file mode 100644
index 00000000..0ff361ce
--- /dev/null
+++ b/patches/source/ntp/ntp.nano.diff
@@ -0,0 +1,17 @@
+--- ./include/ntp_syscall.h.orig 2009-12-09 01:36:37.000000000 -0600
++++ ./include/ntp_syscall.h 2010-04-21 23:38:30.000000000 -0500
+@@ -14,6 +14,14 @@
+ # include <sys/timex.h>
+ #endif
+
++#if defined(ADJ_NANO) && !defined(MOD_NANO)
++#define MOD_NANO ADJ_NANO
++#endif
++
++#if defined(ADJ_TAI) && !defined(MOD_TAI)
++#define MOD_TAI ADJ_TAI
++#endif
++
+ #ifndef NTP_SYSCALLS_LIBC
+ #ifdef NTP_SYSCALLS_STD
+ # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t))
diff --git a/patches/source/ntp/rc.ntpd b/patches/source/ntp/rc.ntpd
new file mode 100644
index 00000000..7cf3d50b
--- /dev/null
+++ b/patches/source/ntp/rc.ntpd
@@ -0,0 +1,56 @@
+#!/bin/sh
+# Start/stop/restart ntpd.
+
+# Start ntpd:
+ntpd_start() {
+ CMDLINE="/usr/sbin/ntpd -g"
+ echo -n "Starting NTP daemon: $CMDLINE"
+ $CMDLINE -p /var/run/ntpd.pid
+ echo
+}
+
+# Stop ntpd:
+ntpd_stop() {
+ echo -n "Stopping NTP daemon..."
+ if [ -r /var/run/ntpd.pid ]; then
+ kill -HUP $(cat /var/run/ntpd.pid)
+ rm -f /var/run/ntpd.pid
+ else
+ killall -HUP -q ntpd
+ fi
+ echo
+}
+
+# Restart ntpd:
+ntpd_restart() {
+ ntpd_stop
+ sleep 1
+ ntpd_start
+}
+
+# Check if ntpd is running
+ntpd_status() {
+ if [ -e /var/run/ntpd.pid ]; then
+ echo "ntpd is running."
+ else
+ echo "ntpd is stopped."
+ exit 1
+ fi
+}
+
+case "$1" in
+'start')
+ ntpd_start
+ ;;
+'stop')
+ ntpd_stop
+ ;;
+'restart')
+ ntpd_restart
+ ;;
+'status')
+ ntpd_status
+ ;;
+*)
+ echo "usage $0 start|stop|restart|status"
+esac
diff --git a/patches/source/ntp/slack-desc b/patches/source/ntp/slack-desc
new file mode 100644
index 00000000..6319e888
--- /dev/null
+++ b/patches/source/ntp/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------------------------------------------------------|
+ntp: ntp (Network Time Protocol daemon)
+ntp:
+ntp: The Network Time Protocol (NTP) is used to synchronize the time of a
+ntp: computer client or server to another server or reference time source,
+ntp: such as a radio or satellite receiver or modem. It provides client
+ntp: accuracies typically within a millisecond on LANs and up to a few tens
+ntp: of milliseconds on WANs relative to a primary server synchronized to
+ntp: Coordinated Universal Time (UTC) via a Global Positioning Service
+ntp: (GPS) receiver, for example.
+ntp:
+ntp:
diff --git a/patches/source/openexr/openexr.CVE-2017-9110-to-9116.patch b/patches/source/openexr/openexr.CVE-2017-9110-to-9116.patch
new file mode 100644
index 00000000..98c03a99
--- /dev/null
+++ b/patches/source/openexr/openexr.CVE-2017-9110-to-9116.patch
@@ -0,0 +1,82 @@
+--- a/IlmImf/ImfDwaCompressor.cpp
++++ b/IlmImf/ImfDwaCompressor.cpp
+@@ -2377,7 +2377,12 @@ DwaCompressor::uncompress
+
+ const char *dataPtr = inPtr + NUM_SIZES_SINGLE * sizeof(Int64);
+
+- if (inSize < headerSize + compressedSize)
++ /* Both the sum and individual sizes are checked in case of overflow. */
++ if (inSize < (headerSize + compressedSize) ||
++ inSize < unknownCompressedSize ||
++ inSize < acCompressedSize ||
++ inSize < dcCompressedSize ||
++ inSize < rleCompressedSize)
+ {
+ throw Iex::InputExc("Error uncompressing DWA data"
+ "(truncated file).");
+diff --git a/IlmImf/ImfHuf.cpp b/IlmImf/ImfHuf.cpp
+index a375d05..97909a5 100644
+--- a/IlmImf/ImfHuf.cpp
++++ b/IlmImf/ImfHuf.cpp
+@@ -822,7 +822,7 @@ hufEncode // return: output size (in bits)
+ }
+
+
+-#define getCode(po, rlc, c, lc, in, out, oe) \
++#define getCode(po, rlc, c, lc, in, out, ob, oe)\
+ { \
+ if (po == rlc) \
+ { \
+@@ -835,6 +835,8 @@ hufEncode // return: output size (in bits)
+ \
+ if (out + cs > oe) \
+ tooMuchData(); \
++ else if (out - 1 < ob) \
++ notEnoughData(); \
+ \
+ unsigned short s = out[-1]; \
+ \
+@@ -895,7 +897,7 @@ hufDecode
+ //
+
+ lc -= pl.len;
+- getCode (pl.lit, rlc, c, lc, in, out, oe);
++ getCode (pl.lit, rlc, c, lc, in, out, outb, oe);
+ }
+ else
+ {
+@@ -925,7 +927,7 @@ hufDecode
+ //
+
+ lc -= l;
+- getCode (pl.p[j], rlc, c, lc, in, out, oe);
++ getCode (pl.p[j], rlc, c, lc, in, out, outb, oe);
+ break;
+ }
+ }
+@@ -952,7 +954,7 @@ hufDecode
+ if (pl.len)
+ {
+ lc -= pl.len;
+- getCode (pl.lit, rlc, c, lc, in, out, oe);
++ getCode (pl.lit, rlc, c, lc, in, out, outb, oe);
+ }
+ else
+ {
+diff --git a/IlmImf/ImfPizCompressor.cpp b/IlmImf/ImfPizCompressor.cpp
+index 46c6fba..8b3ee38 100644
+--- a/IlmImf/ImfPizCompressor.cpp
++++ b/IlmImf/ImfPizCompressor.cpp
+@@ -573,6 +573,12 @@ PizCompressor::uncompress (const char *inPtr,
+ int length;
+ Xdr::read <CharPtrIO> (inPtr, length);
+
++ if (length > inSize)
++ {
++ throw InputExc ("Error in header for PIZ-compressed data "
++ "(invalid array length).");
++ }
++
+ hufUncompress (inPtr, length, _tmpBuffer, tmpBufferEnd - _tmpBuffer);
+
+ //
diff --git a/patches/source/openexr/openexr.SlackBuild b/patches/source/openexr/openexr.SlackBuild
new file mode 100755
index 00000000..7932f0d4
--- /dev/null
+++ b/patches/source/openexr/openexr.SlackBuild
@@ -0,0 +1,113 @@
+#!/bin/sh
+
+# Copyright 2007, 2013, 2014 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2008, 2009, 2010, 2014, 2017 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.
+
+# Modified by Robby Workman <rworkman@slackware.com>
+
+
+PKGNAM=openexr
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:--j7}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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 || 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 {} \;
+
+# Patch security issues:
+zcat $CWD/openexr.CVE-2017-9110-to-9116.patch.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL LICENSE NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+mv $PKG/usr/share/doc/OpenEXR-$VERSION/*.pdf $PKG/usr/doc/$PKGNAM-$VERSION/
+rm -rf $PKG/usr/share/doc
+
+# 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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/openexr/slack-desc b/patches/source/openexr/slack-desc
new file mode 100644
index 00000000..cf0b46a6
--- /dev/null
+++ b/patches/source/openexr/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------------------------------------------------------|
+openexr: openexr (HDR Image File Format & Library)
+openexr:
+openexr: OpenEXR is an image file format and library developed by Industrial
+openexr: Light & Magic, and later released to the public. It provides support
+openexr: for high dynamic range and a 16-bit floating point "half" data type
+openexr: which is compatible with the half data type in the Cg programming
+openexr: language.
+openexr:
+openexr: Homepage: http://www.openexr.org/
+openexr:
+openexr:
diff --git a/patches/source/openjpeg/openjpeg.SlackBuild b/patches/source/openjpeg/openjpeg.SlackBuild
new file mode 100755
index 00000000..7be4e4f1
--- /dev/null
+++ b/patches/source/openjpeg/openjpeg.SlackBuild
@@ -0,0 +1,121 @@
+#!/bin/sh
+
+# Slackware build script for openjpeg
+
+# Copyright 2008-2014 Heinz Wiesinger, Amsterdam, The Netherlands
+# Copyright 2014, 2017 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=openjpeg
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-openjpeg
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf openjpeg-$VERSION
+tar xvf $CWD/openjpeg-$VERSION.tar.?z* || exit 1
+cd openjpeg-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/openjpeg2_remove-thirdparty.patch.gz | patch -p1 --verbose || exit 1
+
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_C_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DOPENJPEG_INSTALL_LIB_DIR="lib$LIBDIRSUFFIX" \
+ -DOPENJPEG_INSTALL_MAN_DIR="man/" \
+ -DOPENJPEG_INSTALL_DOC_DIR="doc/openjpeg-$VERSION/" \
+ -DOPENJPEG_INSTALL_SHARE_DIR="share/openjpeg" \
+ -DBUILD_JPWL:BOOL=ON \
+ -DBUILD_MJ2:BOOL=ON \
+ -DBUILD_JPIP:BOOL=ON \
+ -DBUILD_JP3D:BOOL=ON \
+ .. || exit 1
+
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd -
+
+# Some libs require the openjpeg.h used for openmj2.
+# This version is pretty much the old version from openjpeg 1.5
+mkdir -p $PKG/usr/include/openmj2-2.1
+install -m 644 src/lib/openmj2/openjpeg.h $PKG/usr/include/openmj2-2.1/
+
+mkdir -p $PKG/usr/man
+cp -r doc/man/* $PKG/usr/man/
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/usr/doc/openjpeg-$VERSION
+cp -a AUTHORS* CHANGES* INSTALL* LICENSE* NEWS* README* THANKS* \
+ $PKG/usr/doc/openjpeg-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/openjpeg-$VERSION-$ARCH-$BUILD.txz
diff --git a/patches/source/openjpeg/openjpeg2_remove-thirdparty.patch b/patches/source/openjpeg/openjpeg2_remove-thirdparty.patch
new file mode 100644
index 00000000..6987fc24
--- /dev/null
+++ b/patches/source/openjpeg/openjpeg2_remove-thirdparty.patch
@@ -0,0 +1,11 @@
+diff -rupN openjpeg-2.1.1/CMakeLists.txt openjpeg-2.1.1-new/CMakeLists.txt
+--- openjpeg-2.1.1/CMakeLists.txt 2016-07-05 16:54:17.000000000 +0200
++++ openjpeg-2.1.1-new/CMakeLists.txt 2016-07-06 09:38:26.083029127 +0200
+@@ -270,7 +270,6 @@ if(BUILD_CODEC OR BUILD_MJ2)
+ # OFF: It will only build 3rd party libs if they are not found on the system
+ # ON: 3rd party libs will ALWAYS be build, and used
+ option(BUILD_THIRDPARTY "Build the thirdparty executables if it is needed" OFF)
+- add_subdirectory(thirdparty)
+ add_subdirectory(src/bin)
+ endif ()
+ add_subdirectory(wrapping)
diff --git a/patches/source/openjpeg/slack-desc b/patches/source/openjpeg/slack-desc
new file mode 100644
index 00000000..7c0b6ef5
--- /dev/null
+++ b/patches/source/openjpeg/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------------------------------------------------------|
+openjpeg: openjpeg (JPEG2000 Codec)
+openjpeg:
+openjpeg: The OpenJPEG library is an open-source JPEG 2000 codec.
+openjpeg:
+openjpeg: Homepage: http://www.openjpeg.org
+openjpeg:
+openjpeg:
+openjpeg:
+openjpeg:
+openjpeg:
+openjpeg:
diff --git a/patches/source/openssh/doinst.sh b/patches/source/openssh/doinst.sh
new file mode 100644
index 00000000..73ce6283
--- /dev/null
+++ b/patches/source/openssh/doinst.sh
@@ -0,0 +1,49 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ touch -r ${NEW} ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+config etc/ssh/ssh_config.new
+config etc/ssh/sshd_config.new
+preserve_perms etc/rc.d/rc.sshd.new
+if [ -e etc/rc.d/rc.sshd.new ]; then
+ mv etc/rc.d/rc.sshd.new etc/rc.d/rc.sshd
+fi
+
+# If the sshd user/group/shadow don't exist, add them:
+
+if ! grep -q "^sshd:" etc/passwd ; then
+ echo "sshd:x:33:33:sshd:/:" >> etc/passwd
+fi
+
+if ! grep -q "^sshd:" etc/group ; then
+ echo "sshd::33:sshd" >> etc/group
+fi
+
+if ! grep -q "^sshd:" etc/shadow ; then
+ echo "sshd:*:9797:0:::::" >> etc/shadow
+fi
+
+# Add a btmp file to store login failure if one doesn't exist:
+if [ ! -r var/log/btmp ]; then
+ ( cd var/log ; umask 077 ; touch btmp )
+fi
+
diff --git a/patches/source/openssh/openssh-7.4p1-libwrap.diff b/patches/source/openssh/openssh-7.4p1-libwrap.diff
new file mode 100644
index 00000000..d1025e43
--- /dev/null
+++ b/patches/source/openssh/openssh-7.4p1-libwrap.diff
@@ -0,0 +1,137 @@
+--- ./configure.ac.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./configure.ac 2016-12-23 12:58:04.200707728 -0600
+@@ -1467,6 +1467,62 @@
+ ]
+ )
+
++# Check whether user wants TCP wrappers support
++TCPW_MSG="no"
++AC_ARG_WITH([tcp-wrappers],
++ [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)],
++ [
++ if test "x$withval" != "xno" ; then
++ saved_LIBS="$LIBS"
++ saved_LDFLAGS="$LDFLAGS"
++ saved_CPPFLAGS="$CPPFLAGS"
++ if test -n "${withval}" && \
++ test "x${withval}" != "xyes"; then
++ if test -d "${withval}/lib"; then
++ if test -n "${need_dash_r}"; then
++ LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
++ else
++ LDFLAGS="-L${withval}/lib ${LDFLAGS}"
++ fi
++ else
++ if test -n "${need_dash_r}"; then
++ LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
++ else
++ LDFLAGS="-L${withval} ${LDFLAGS}"
++ fi
++ fi
++ if test -d "${withval}/include"; then
++ CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
++ else
++ CPPFLAGS="-I${withval} ${CPPFLAGS}"
++ fi
++ fi
++ LIBS="-lwrap -lnsl $LIBS"
++ AC_MSG_CHECKING([for libwrap])
++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
++#include <sys/types.h>
++#include <sys/socket.h>
++#include <netinet/in.h>
++#include <tcpd.h>
++int deny_severity = 0, allow_severity = 0;
++ ]], [[
++ hosts_access(0);
++ ]])], [
++ AC_MSG_RESULT([yes])
++ AC_DEFINE([LIBWRAP], [1],
++ [Define if you want
++ TCP Wrappers support])
++ SSHDLIBS="$SSHDLIBS -lwrap -lnsl"
++ TCPW_MSG="yes"
++ ], [
++ AC_MSG_ERROR([*** libwrap missing])
++
++ ])
++ LIBS="$saved_LIBS"
++ fi
++ ]
++)
++
+ # Check whether user wants to use ldns
+ LDNS_MSG="no"
+ AC_ARG_WITH(ldns,
+@@ -5081,6 +5137,7 @@
+ echo " SELinux support: $SELINUX_MSG"
+ echo " Smartcard support: $SCARD_MSG"
+ echo " S/KEY support: $SKEY_MSG"
++echo " TCP Wrappers support: $TCPW_MSG"
+ echo " MD5 password support: $MD5_MSG"
+ echo " libedit support: $LIBEDIT_MSG"
+ echo " Solaris process contract support: $SPC_MSG"
+--- ./sshd.c.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./sshd.c 2016-12-23 12:58:40.847710372 -0600
+@@ -123,6 +123,13 @@
+ #include "version.h"
+ #include "ssherr.h"
+
++#ifdef LIBWRAP
++#include <tcpd.h>
++#include <syslog.h>
++int allow_severity;
++int deny_severity;
++#endif /* LIBWRAP */
++
+ /* Re-exec fds */
+ #define REEXEC_DEVCRYPTO_RESERVED_FD (STDERR_FILENO + 1)
+ #define REEXEC_STARTUP_PIPE_FD (STDERR_FILENO + 2)
+@@ -1971,6 +1978,24 @@
+ #ifdef SSH_AUDIT_EVENTS
+ audit_connection_from(remote_ip, remote_port);
+ #endif
++#ifdef LIBWRAP
++ allow_severity = options.log_facility|LOG_INFO;
++ deny_severity = options.log_facility|LOG_WARNING;
++ /* Check whether logins are denied from this host. */
++ if (packet_connection_is_on_socket()) {
++ struct request_info req;
++
++ request_init(&req, RQ_DAEMON, __progname, RQ_FILE, sock_in, 0);
++ fromhost(&req);
++
++ if (!hosts_access(&req)) {
++ debug("Connection refused by tcp wrapper");
++ refuse(&req);
++ /* NOTREACHED */
++ fatal("libwrap refuse returns");
++ }
++ }
++#endif /* LIBWRAP */
+
+ /* Log the connection. */
+ laddr = get_local_ipaddr(sock_in);
+--- ./sshd.8.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./sshd.8 2016-12-23 12:58:04.208707729 -0600
+@@ -825,6 +825,12 @@
+ This file should be writable only by the user, and need not be
+ readable by anyone else.
+ .Pp
++.It Pa /etc/hosts.allow
++.It Pa /etc/hosts.deny
++Access controls that should be enforced by tcp-wrappers are defined here.
++Further details are described in
++.Xr hosts_access 5 .
++.Pp
+ .It Pa /etc/hosts.equiv
+ This file is for host-based authentication (see
+ .Xr ssh 1 ) .
+@@ -929,6 +935,7 @@
+ .Xr ssh-keygen 1 ,
+ .Xr ssh-keyscan 1 ,
+ .Xr chroot 2 ,
++.Xr hosts_access 5 ,
+ .Xr login.conf 5 ,
+ .Xr moduli 5 ,
+ .Xr sshd_config 5 ,
diff --git a/patches/source/openssh/openssh.CVE-2017-15906.patch b/patches/source/openssh/openssh.CVE-2017-15906.patch
new file mode 100644
index 00000000..fdb963f7
--- /dev/null
+++ b/patches/source/openssh/openssh.CVE-2017-15906.patch
@@ -0,0 +1,19 @@
+--- ./sftp-server.c.orig 2016-12-18 22:59:41.000000000 -0600
++++ ./sftp-server.c 2018-03-07 19:18:19.275984210 -0600
+@@ -1,4 +1,4 @@
+-/* $OpenBSD: sftp-server.c,v 1.110 2016/09/12 01:22:38 deraadt Exp $ */
++/* $OpenBSD: sftp-server.c,v 1.111 2017/04/04 00:24:56 djm Exp $ */
+ /*
+ * Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
+ *
+@@ -691,8 +691,8 @@
+ logit("open \"%s\" flags %s mode 0%o",
+ name, string_from_portable(pflags), mode);
+ if (readonly &&
+- ((flags & O_ACCMODE) == O_WRONLY ||
+- (flags & O_ACCMODE) == O_RDWR)) {
++ ((flags & O_ACCMODE) != O_RDONLY ||
++ (flags & (O_CREAT|O_TRUNC)) != 0)) {
+ verbose("Refusing open request in read-only mode");
+ status = SSH2_FX_PERMISSION_DENIED;
+ } else {
diff --git a/patches/source/openssh/openssh.SlackBuild b/patches/source/openssh/openssh.SlackBuild
new file mode 100755
index 00000000..49777ced
--- /dev/null
+++ b/patches/source/openssh/openssh.SlackBuild
@@ -0,0 +1,169 @@
+#!/bin/sh
+
+# Copyright 2000 BSDi, Inc. Concord, CA, USA
+# Copyright 2001, 2002, 2003, 2004 Slackware Linux, Inc. Concord, CA, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 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.
+
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-openssh
+
+VERSION=${VERSION:-$(echo openssh-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+NUMJOBS=${NUMJOBS:--j6}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+else
+ SLKCFLAGS="-O2"
+fi
+
+# Clean target location:
+rm -rf $PKG
+mkdir -p $PKG
+
+# Prepare the framework and extract the package:
+cd $TMP
+rm -rf $PKG openssh-$VERSION
+tar xvf $CWD/openssh-$VERSION.tar.gz || tar xvf $CWD/openssh-$VERSION.tar.?z* || exit 1
+cd openssh-$VERSION
+chown -R root:root .
+
+zcat $CWD/openssh.CVE-2017-15906.patch.gz | patch -p1 --verbose || exit 1
+
+# Restore support for tcpwrappers:
+zcat $CWD/openssh-7.4p1-libwrap.diff.gz | patch -p1 --verbose || exit 1
+autoreconf -vif
+
+# Compile package:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --sysconfdir=/etc/ssh \
+ --without-pam \
+ --with-md5-passwords \
+ --with-tcp-wrappers \
+ --with-default-path=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin \
+ --with-privsep-path=/var/empty \
+ --with-privsep-user=sshd \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+
+# Install the package:
+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
+
+# 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
+
+# Install directory used with PrivilegeSeparation option:
+mkdir -p $PKG/var/empty
+chmod 755 $PKG/var/empty
+
+# Install docs:
+mkdir -p $PKG/usr/doc/openssh-$VERSION
+cp -a \
+ CREDITS ChangeLog INSTALL LICENCE OVERVIEW \
+ README README.privsep README.smartcard RFC.nroff TODO WARNING.RNG \
+ $PKG/usr/doc/openssh-$VERSION
+chmod 644 $PKG/usr/doc/openssh-$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/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# Install also 'ssh-copy-id' and its manpage from contrib:
+( cd contrib
+ cp -a ssh-copy-id $PKG/usr/bin/ssh-copy-id
+ chmod 755 $PKG/usr/bin/ssh-copy-id
+ cat ssh-copy-id.1 | gzip -9c > $PKG/usr/man/man1/ssh-copy-id.1.gz
+)
+
+( cd $PKG
+
+ # Ditch the new host keys, since these have to be uniquely prepared on each machine:
+ rm -f etc/ssh/ssh_host_dsa_key
+ rm -f etc/ssh/ssh_host_dsa_key.pub
+ rm -f etc/ssh/ssh_host_rsa_key
+ rm -f etc/ssh/ssh_host_rsa_key.pub
+ rm -f etc/ssh/ssh_host_key
+ rm -f etc/ssh/ssh_host_key.pub
+
+ # Set up the config script installation:
+ mv etc/ssh/ssh_config etc/ssh/ssh_config.new
+ mv etc/ssh/sshd_config etc/ssh/sshd_config.new
+
+ # Add the init script:
+ mkdir -p etc/rc.d
+ cat $CWD/rc.sshd > etc/rc.d/rc.sshd.new
+ chmod 755 etc/rc.d/rc.sshd.new
+
+ # Copy runtime installation files:
+ mkdir -p install
+ zcat $CWD/doinst.sh.gz > install/doinst.sh
+ cat $CWD/slack-desc > install/slack-desc
+)
+
+# Create the package itself:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/openssh-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/openssh/rc.sshd b/patches/source/openssh/rc.sshd
new file mode 100644
index 00000000..2da2ab30
--- /dev/null
+++ b/patches/source/openssh/rc.sshd
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Start/stop/restart the secure shell server:
+
+sshd_start() {
+ # Create host keys if needed.
+ if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
+ /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
+ fi
+ if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
+ /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
+ fi
+ if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then
+ /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -N ''
+ fi
+ if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then
+ /usr/bin/ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''
+ fi
+ # Catch any new host key types not yet created above:
+ /usr/bin/ssh-keygen -A
+ # Start the sshd daemon:
+ /usr/sbin/sshd
+}
+
+sshd_stop() {
+ killall sshd
+}
+
+sshd_restart() {
+ if [ -r /var/run/sshd.pid ]; then
+ echo "WARNING: killing listener process only. To kill every sshd process, you must"
+ echo " use 'rc.sshd stop'. 'rc.sshd restart' kills only the parent sshd to"
+ echo " allow an admin logged in through sshd to use 'rc.sshd restart' without"
+ echo " being cut off. If sshd has been upgraded, new connections will now"
+ echo " use the new version, which should be a safe enough approach."
+ kill `cat /var/run/sshd.pid`
+ else
+ echo "WARNING: There does not appear to be a parent instance of sshd running."
+ echo " If you really want to kill all running instances of sshd (including"
+ echo " any sessions currently in use), run '/etc/rc.d/rc.sshd stop' instead."
+ exit 1
+ fi
+ sleep 1
+ sshd_start
+}
+
+case "$1" in
+'start')
+ sshd_start
+ ;;
+'stop')
+ sshd_stop
+ ;;
+'restart')
+ sshd_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
+
diff --git a/patches/source/openssh/slack-desc b/patches/source/openssh/slack-desc
new file mode 100644
index 00000000..04277a72
--- /dev/null
+++ b/patches/source/openssh/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------------------------------------------------------|
+openssh: openssh (Secure Shell daemon and clients)
+openssh:
+openssh: ssh (Secure Shell) is a program for logging into a remote machine and
+openssh: for executing commands on a remote machine. It is intended to replace
+openssh: rlogin and rsh, and provide secure encrypted communications between
+openssh: two untrusted hosts over an insecure network. sshd (SSH Daemon) is
+openssh: the daemon program for ssh. OpenSSH is based on the last free version
+openssh: of Tatu Ylonen's SSH, further enhanced and cleaned up by Aaron
+openssh: Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt, and
+openssh: Dug Song. It has a homepage at http://www.openssh.com/
+openssh:
diff --git a/patches/source/openssl/certwatch b/patches/source/openssl/certwatch
new file mode 100644
index 00000000..d52dc3dc
--- /dev/null
+++ b/patches/source/openssl/certwatch
@@ -0,0 +1,130 @@
+#!/bin/sh
+#
+# Will check all certificates stored in $CERTDIR for their expiration date,
+# and will display (if optional "stdout" argument is given), or mail a warning
+# message to $MAILADDR (if script is executed without any parameter
+# - unattended mode suitable for cron execution) for each particular certificate
+# that is about to expire in time less to, or equal to $DAYS after this script
+# has been executed, or if it has already expired.
+# This stupid script (C) 2006,2007 Jan Rafaj
+
+########################## CONFIGURATION SECTION BEGIN #########################
+# Note: all settings are mandatory
+# Warning will be sent if a certificate expires in time <= days given here
+DAYS=7
+# E-mail address where to send warnings
+MAILADDR=root
+# Directory with certificates to check
+CERTDIR=/etc/ssl/certs
+# Directory where to keep state files if this script isnt executed with "stdout"
+STATEDIR=/var/run
+########################### CONFIGURATION SECTION END ##########################
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+DAY_IN_SECS=$((60*60*24))
+DATE_CURRENT=$(date '+%s')
+
+usage()
+{
+ echo "Usage: $0 [stdout]"
+ echo
+ echo "Detailed description and configuration is embedded within the script."
+ exit 0
+}
+
+message()
+{
+ cat << EOF
+ WARNING: certificate $certfile
+ is about to expire in time equal to or less than $DAYS days from now on,
+ or has already expired - it might be a good idea to obtain/create new one.
+
+EOF
+}
+
+message_mail()
+{
+ message
+ cat << EOF
+ NOTE: This message is being sent only once.
+
+ A lock-file
+ $STATEDIR/certwatch-mailwarning-sent-$certfilebase
+ has been created, which will prevent this script from mailing you again
+ upon its subsequent executions by crond. You dont need to care about it;
+ the file will be auto-deleted as soon as you'll prolong your certificate.
+EOF
+}
+
+unset stdout
+case $# in
+ 0) ;;
+ 1) if [ "$1" = "-h" -o "$1" == "--help" ]; then
+ usage
+ elif [ "$1" = "stdout" ]; then
+ stdout=1
+ else
+ usage
+ fi
+ ;;
+ *) usage ;;
+esac
+
+for dir in $STATEDIR $CERTDIR ; do
+ if [ ! -d $dir ]; then
+ echo "ERROR: directory $dir does not exist"
+ exit 1
+ fi
+done
+for binary in basename date find grep mail openssl touch ; do
+ if [ ! \( -x /usr/bin/$binary -o -x /bin/$binary \) ]; then
+ echo "ERROR: /usr/bin/$binary not found"
+ exit 1
+ fi
+done
+
+find $CERTDIR -type f -maxdepth 1 | while read certfile ; do
+ if [ "$certfile" != "/etc/ssl/certs/ca-certificates.crt" ]; then
+ certfilebase="$(basename "$certfile")"
+ inform=PEM
+ echo "$certfile" | grep -q -i '\.net$'
+ if [ $? -eq 0 ]; then
+ # This is based purely on filename extension, so may give false results.
+ # But lets assume noone uses NET format certs today, ok?
+ continue
+ fi
+ echo "$certfile" | grep -q -i '\.der$'
+ if [ $? -eq 0 -o "$(file "$certfile" | egrep '(ASCII|PEM)')" == "" ]; then
+ inform=DER
+ fi
+ # We wont use '-checkend' since it is not properly documented (as of
+ # OpenSSL 0.9.8e).
+ DATE_CERT_EXPIRES=$(openssl x509 -in "$certfile" -inform $inform -noout -enddate | sed 's/^notAfter=//')
+ DATE_CERT_EXPIRES=$(date -d"$DATE_CERT_EXPIRES" +%s)
+ if [ $(($DATE_CERT_EXPIRES - $DATE_CURRENT)) -le $(($DAYS * $DAY_IN_SECS)) ]
+ then
+ if [ $stdout ]; then
+ message
+ else
+ if [ ! -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ subject="$0: certificate $certfile expiration warning"
+ message_mail | mail -r "certwatch@$HOSTNAME" \
+ -s "$subject" \
+ $MAILADDR 2>/dev/null
+ # echo "Mail about expiring certificate $certfile sent to $MAILADDR."
+ # echo "If you need to send it again, please remove lock-file"
+ # echo "$STATEDIR/certwatch-mailwarning-sent-$certfilebase ."
+ # echo
+ fi
+ touch $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ else
+ if [ ! $stdout ]; then
+ if [ -f $STATEDIR/certwatch-mailwarning-sent-"$certfilebase" ]; then
+ rm $STATEDIR/certwatch-mailwarning-sent-"$certfilebase"
+ fi
+ fi
+ fi
+ fi
+done
+
diff --git a/patches/source/openssl/doinst.sh-openssl b/patches/source/openssl/doinst.sh-openssl
new file mode 100644
index 00000000..8fcf3d1c
--- /dev/null
+++ b/patches/source/openssl/doinst.sh-openssl
@@ -0,0 +1,26 @@
+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 there is a known buggy certwatch script with no local
+# modifications, just replace it:
+if [ "$(md5sum etc/cron.daily/certwatch 2> /dev/null)" = "32556321806f1850d56cb2ef8384b7a1 etc/cron.daily/certwatch" ]; then
+ cat etc/cron.daily/certwatch.new > etc/cron.daily/certwatch
+ touch -r etc/cron.daily/certwatch.new etc/cron.daily/certwatch
+fi
+
+config etc/ssl/openssl.cnf.new
+config etc/cron.daily/certwatch.new
+
+# Rehash certificates if the package is upgraded on a running system:
+if [ -x /usr/bin/c_rehash ]; then
+ /usr/bin/c_rehash 1> /dev/null 2> /dev/null
+fi
diff --git a/patches/source/openssl/doinst.sh-openssl-solibs b/patches/source/openssl/doinst.sh-openssl-solibs
new file mode 100644
index 00000000..ed4fdfac
--- /dev/null
+++ b/patches/source/openssl/doinst.sh-openssl-solibs
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/ssl/openssl.cnf.new
diff --git a/patches/source/openssl/openssl.SlackBuild b/patches/source/openssl/openssl.SlackBuild
new file mode 100755
index 00000000..a5e4e59b
--- /dev/null
+++ b/patches/source/openssl/openssl.SlackBuild
@@ -0,0 +1,223 @@
+#!/bin/sh
+
+# Copyright 2000 BSDi, Inc. Concord, CA, USA
+# Copyright 2001, 2002 Slackware Linux, Inc. Concord, CA, USA
+# Copyright 2005, 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.
+
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+PKG1=$TMP/package-openssl
+PKG2=$TMP/package-ossllibs
+NAME1=openssl-$VERSION-$ARCH-$BUILD
+NAME2=openssl-solibs-$VERSION-$ARCH-$BUILD
+
+# Parallel build doesn't link properly.
+#NUMJOBS=${NUMJOBS:--j6}
+
+# So that ls has the right field counts for parsing...
+export LC_ALL=C
+
+cd $TMP
+rm -rf $PKG1 $PKG2 openssl-$VERSION
+
+tar xvf $CWD/openssl-$VERSION.tar.gz || exit 1
+cd openssl-$VERSION
+
+# Fix pod syntax errors which are fatal wih a newer perl:
+find . -name "*.pod" -exec sed -i "s/^\=item \([0-9]\)\(\ \|$\)/\=item C<\1>/g" {} \;
+
+# Use .so.1, not .so.1.0.0:
+sed -i "s/soname=\$\$SHLIB\$\$SHLIB_SOVER\$\$SHLIB_SUFFIX/soname=\$\$SHLIB.1/g" Makefile.shared
+
+if [ "$ARCH" = "i586" ]; then
+ # Build with -march=i586 -mtune=i686:
+ sed -i "/linux-elf/s/fomit-frame-pointer/fomit-frame-pointer -march=i586 -mtune=i686/g" Configure
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ # Build with -march=i686 -mtune=i686:
+ sed -i "/linux-elf/s/fomit-frame-pointer/fomit-frame-pointer -march=i686 -mtune=i686/g" Configure
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+fi
+
+# OpenSSL has a (nasty?) habit of bumping the internal version number with
+# every release. This wouldn't be so bad, but some applications are so
+# paranoid that they won't run against a different OpenSSL version than
+# what they were compiled against, whether or not the ABI has changed.
+#
+# So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.0.2e unless ABI
+# breakage forces it to change. Yes, we're finally using this old trick. :)
+sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x1000205fL (1.0.2e) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x1000205fL/g" crypto/opensslv.h || exit 1
+
+chown -R root:root .
+mkdir -p $PKG1/usr/doc/openssl-$VERSION
+cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE doc $PKG1/usr/doc/openssl-$VERSION
+find $PKG1/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG1/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+
+# 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 $PKG1/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+fi
+
+# These are the known patent issues with OpenSSL:
+# name # expires
+# MDC-2: 4,908,861 2007-03-13, not included.
+# IDEA: 5,214,703 2010-05-25, not included.
+# RC5: 5,724,428 2015-03-03, not included.
+#
+# Although all of the above are expired, it's still probably
+# not a good idea to include them as there are better
+# algorithms to use.
+
+./config \
+ --prefix=/usr \
+ --openssldir=/etc/ssl \
+ no-mdc2 \
+ no-idea \
+ no-rc5 \
+ no-sse2 \
+ no-ssl2 \
+ no-weak-ssl-ciphers \
+ shared
+
+make $NUMJOBS depend || make depend || exit 1
+
+make $NUMJOBS || make || exit 1
+
+make install INSTALL_PREFIX=$PKG1 || exit 1
+
+# Make the .so.? library symlinks:
+( cd $PKG1/usr/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.* )
+
+# Move libraries, as they might be needed by programs that bring a network
+# mounted /usr online:
+
+mkdir $PKG1/lib${LIBDIRSUFFIX}
+( cd $PKG1/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# Add a cron script to warn root if a certificate is going to expire soon:
+mkdir -p $PKG1/etc/cron.daily
+zcat $CWD/certwatch.gz > $PKG1/etc/cron.daily/certwatch.new
+chmod 755 $PKG1/etc/cron.daily/certwatch.new
+
+mv $PKG1/etc/ssl/openssl.cnf $PKG1/etc/ssl/openssl.cnf.new
+
+( cd $PKG1
+ 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
+)
+
+mv $PKG1/etc/ssl/man $PKG1/usr
+( cd $PKG1/usr/man/man1 ; mv passwd.1 ssl_passwd.1 )
+( cd $PKG1/usr/man/man3 ; mv rand.3 ssl_rand.3 )
+( cd $PKG1/usr/man/man3 ; mv err.3 ssl_err.3 )
+# Compress and symlink the man pages:
+if [ -d $PKG1/usr/man ]; then
+ ( cd $PKG1/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
+
+# If there's an openssl0 directory, then build openssl-0 shared libraries for
+# compatibility with programs linked to those:
+if [ -d $CWD/openssl0 ]; then
+ ( cd $CWD/openssl0
+ ./openssl0.build || exit 1
+ ) || exit 1
+ # Don't put these in the openssl package... openssl-solibs is enough.
+ #mkdir -p $PKG1/lib${LIBDIRSUFFIX}
+ #cp -a $TMP/package-openssl0/usr/lib/lib*.so.?.?.? $PKG1/lib${LIBDIRSUFFIX}
+ #( cd $PKG1/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? )
+ mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+ cp -a $TMP/package-openssl0/usr/lib/lib*.so.?.?.? $PKG2/lib${LIBDIRSUFFIX}
+ ( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? )
+fi
+
+cd $PKG1
+chmod 755 usr/lib${LIBDIRSUFFIX}/pkgconfig
+sed -i -e "s#lib\$#lib${LIBDIRSUFFIX}#" usr/lib${LIBDIRSUFFIX}/pkgconfig/*.pc
+mkdir -p install
+zcat $CWD/doinst.sh-openssl.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME1}.txz
+
+# Make runtime package:
+mkdir -p $PKG2/lib${LIBDIRSUFFIX}
+( cd lib${LIBDIRSUFFIX} ; cp -a lib*.so.* $PKG2/lib${LIBDIRSUFFIX} )
+( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l * )
+mkdir -p $PKG2/etc
+( cd $PKG2/etc ; cp -a $PKG1/etc/ssl . )
+mkdir -p $PKG2/usr/doc/openssl-$VERSION
+( cd $TMP/openssl-$VERSION
+ cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \
+ LICENSE NEWS README README.ENGINE $PKG2/usr/doc/openssl-$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 $PKG2/usr/doc/*-$VERSION)
+ cat CHANGES | head -n 2000 > $DOCSDIR/CHANGES
+ touch -r CHANGES $DOCSDIR/CHANGES
+ fi
+)
+
+find $PKG2/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \;
+find $PKG2/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \;
+cd $PKG2
+mkdir -p install
+zcat $CWD/doinst.sh-openssl-solibs.gz > install/doinst.sh
+cat $CWD/slack-desc.openssl-solibs > install/slack-desc
+/sbin/makepkg -l y -c n $TMP/${NAME2}.txz
diff --git a/patches/source/openssl/slack-desc.openssl b/patches/source/openssl/slack-desc.openssl
new file mode 100644
index 00000000..57227c04
--- /dev/null
+++ b/patches/source/openssl/slack-desc.openssl
@@ -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------------------------------------------------------|
+openssl: openssl (Secure Sockets Layer toolkit)
+openssl:
+openssl: The OpenSSL certificate management tool and the shared libraries that
+openssl: provide various encryption and decryption algorithms and protocols.
+openssl:
+openssl: This product includes software developed by the OpenSSL Project for
+openssl: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl: includes cryptographic software written by Eric Young
+openssl: (eay@cryptsoft.com). This product includes software written by Tim
+openssl: Hudson (tjh@cryptsoft.com).
+openssl:
diff --git a/patches/source/openssl/slack-desc.openssl-solibs b/patches/source/openssl/slack-desc.openssl-solibs
new file mode 100644
index 00000000..58609e68
--- /dev/null
+++ b/patches/source/openssl/slack-desc.openssl-solibs
@@ -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------------------------------------------------------|
+openssl-solibs: openssl-solibs (OpenSSL shared libraries)
+openssl-solibs:
+openssl-solibs: These shared libraries provide encryption routines required by
+openssl-solibs: programs such as openssh, bind, sendmail, and many others.
+openssl-solibs:
+openssl-solibs: This product includes software developed by the OpenSSL Project for
+openssl-solibs: use in the OpenSSL Toolkit (http://www.openssl.org). This product
+openssl-solibs: includes cryptographic software written by Eric Young
+openssl-solibs: (eay@cryptsoft.com). This product includes software written by Tim
+openssl-solibs: Hudson (tjh@cryptsoft.com).
+openssl-solibs:
diff --git a/patches/source/openvpn/README b/patches/source/openvpn/README
new file mode 100644
index 00000000..cf2c6602
--- /dev/null
+++ b/patches/source/openvpn/README
@@ -0,0 +1,26 @@
+OpenVPN is a full-featured SSL VPN which can accomodate a wide
+range of configurations, including remote access, site-to-site VPNs,
+WiFi security, and enterprise-scale remote access with load
+balancing, failover, and fine-grained access-controls.
+
+OpenVPN implements OSI layer 2 or 3 secure network extension using the
+industry standard SSL/TLS protocol, supports flexible client
+authentication methods based on certificates, smart cards, and/or
+2-factor authentication, and allows user or group-specific access
+control policies using firewall rules applied to the VPN virtual
+interface.
+
+This build of OpenVPN depends upon having openssl (not just
+openssl-solibs) and lzo installed on your computer.
+
+Please note that there is no default config file for OpenVPN. This is
+by design. OpenVPN can technically use any config file in any location.
+However, this script does create an /etc/openvpn/ directory with certs/
+and keys/ subdirectories. Feel free to place config files, keys, and
+certificates in these directories. certs/ and keys/ are owned by user
+root and group nobody and are not world readable nor writable.
+Additionally, they are not writable by group nobody. It is recommended
+that you run openvpn nobody:nobody, but you may use another
+non-privilaged user and group at your option. Just change the
+permissions on these permissions to reflect that if you do.
+
diff --git a/patches/source/openvpn/doinst.sh b/patches/source/openvpn/doinst.sh
new file mode 100644
index 00000000..4b9b133a
--- /dev/null
+++ b/patches/source/openvpn/doinst.sh
@@ -0,0 +1,25 @@
+#!/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...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+preserve_perms etc/rc.d/rc.openvpn.new
+
diff --git a/patches/source/openvpn/openvpn.SlackBuild b/patches/source/openvpn/openvpn.SlackBuild
new file mode 100755
index 00000000..91e67fd7
--- /dev/null
+++ b/patches/source/openvpn/openvpn.SlackBuild
@@ -0,0 +1,169 @@
+#!/bin/bash
+
+# Copyright 2006, Alan Hicks, Lizella, GA
+# Copyright 2008, 2009, 2010, 2011, 2013, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=openvpn
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$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 || exit 1
+
+# Fix ownership and permissions inside the source tarball.
+# It's appalling how many projects have 777 permissions or
+# even suid, sgid, and sticky bits set on things.
+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" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc/openvpn \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/openvpn-${VERSION} \
+ --enable-lzo \
+ --enable-iproute2 \
+ --disable-plugin-auth-pam \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install-strip DESTDIR=$PKG || exit 1
+
+# Create a decent config directory. openvpn doesn't have one by
+# default, nor does it have a single config file.
+mkdir -p $PKG/etc/openvpn/{certs,keys}
+chown root:nobody $PKG/etc/openvpn/{certs,keys}
+chmod 750 $PKG/etc/openvpn/{certs,keys}
+
+# Install a startup script:
+mkdir -p $PKG/etc/rc.d
+cp -a $CWD/rc.openvpn $PKG/etc/rc.d/rc.openvpn.new
+chmod 644 $PKG/etc/rc.d/rc.openvpn.new
+chown root:root $PKG/etc/rc.d/rc.openvpn.new
+
+# Let folks know about the other configs, if they haven't found them.
+# They might even find the documentation there useful. ;-)
+cat << EOF > $PKG/etc/openvpn/README.TXT
+One or more OpenVPN config files should be installed in this directory
+as files ending in ".conf" (i.e. client.conf, server.conf, etc.).
+
+Have a look in sample-config-files for some more examples of how to
+configure OpenVPN.
+
+To start OpenVPN, use this command as root:
+sh /etc/rc.d/rc.openvpn start
+
+To make OpenVPN start automatically at boot, change the script permissions:
+chmod 755 /etc/rc.d/rc.openvpn
+
+See "man openvpn" and the other docs for more information.
+EOF
+
+# Add a link, too:
+( cd $PKG/etc/openvpn
+ ln -sf /usr/doc/$PKGNAM-$VERSION/sample-config-files .
+)
+
+if [ -d $PKG/usr/man ]; then
+( 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
+)
+fi
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a AUTHORS COPYING* COPYRIGHT* INSTALL* \
+ NEWS PORTS README* sample/sample-config-files sample/sample-keys sample/sample-scripts \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Install a reasonably generic sample config file:
+# (put this in with the other samples)
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
+cp -a $CWD/slackware.conf $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
+chown root:root $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files/slackware.conf
+chmod 644 $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files/slackware.conf
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/openvpn/openvpn.url b/patches/source/openvpn/openvpn.url
new file mode 100644
index 00000000..4c476d87
--- /dev/null
+++ b/patches/source/openvpn/openvpn.url
@@ -0,0 +1,2 @@
+https://swupdate.openvpn.org/community/releases/openvpn-2.4.6.tar.xz
+https://swupdate.openvpn.org/community/releases/openvpn-2.4.6.tar.xz.asc
diff --git a/patches/source/openvpn/rc.openvpn b/patches/source/openvpn/rc.openvpn
new file mode 100644
index 00000000..86f31922
--- /dev/null
+++ b/patches/source/openvpn/rc.openvpn
@@ -0,0 +1,111 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.openvpn
+#
+# Start/stop/restart the openvpn daemon.
+#
+# By default, this script will start/stop/restart a daemon for every *.conf
+# file found in /etc/openvpn.
+#
+# To work with a single connection, add the name of the config file:
+# /etc/rc.d/rc.openvpn start configfile.conf
+#
+# You may also use a config file not found in /etc/openvpn by providing a
+# complete path:
+# /etc/rc.d/rc.openvpn start /path/to/some/other/configfile.conf
+#
+# The name of a config file provided with a complete path should not match
+# the name of any config file present in the /etc/openvpn directory.
+
+ovpn_start() {
+ if [ -x /usr/sbin/openvpn ]; then
+ if [ -z "$1" ]; then # start OpenVPN for all config files:
+ if /bin/ls /etc/openvpn/*.conf 1> /dev/null 2> /dev/null ; then
+ for config in /etc/openvpn/*.conf ; do
+ echo "Starting OpenVPN: /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $config).pid --user nobody --group nobody --config $config"
+ /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $config).pid --user nobody --group nobody --config $config
+ done
+ else
+ echo "Unable to start OpenVPN - no .conf files found in /etc/openvpn/."
+ fi
+ else # start OpenVPN for one config file:
+ if [ -r "$1" ]; then
+ echo "Starting OpenVPN: /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $1).pid --user nobody --group nobody --config $1"
+ /usr/sbin/openvpn --daemon --writepid /run/openvpn/$(basename $1).pid --user nobody --group nobody --config $1
+ else # config file is missing:
+ echo "Error starting OpenVPN: config file $1 is missing."
+ fi
+ fi
+ fi
+}
+
+ovpn_stop() {
+ # Note: OpenVPN has a bad habit of leaving stale pid files around when exiting.
+ # Maybe it would be better to just use killall unless called for one config?
+ if [ -z "$1" ]; then # stop OpenVPN for all pid files:
+ if /bin/ls /run/openvpn/*.pid 1> /dev/null 2> /dev/null ; then
+ for pid in /run/openvpn/*.pid ; do
+ echo "Stopping OpenVPN for pid file $pid..."
+ kill $(cat $pid)
+ rm -f $pid
+ done
+ else
+ echo "Warning: no pid files found in /run/openvpn/. Using killall to stop any OpenVPN processes."
+ killall openvpn
+ fi
+ else # stop OpenVPN for one config file:
+ if [ -r /run/openvpn/$(basename ${1}).pid ]; then
+ echo "Stopping OpenVPN for config file ${1}..."
+ kill $(cat /run/openvpn/$(basename ${1}).pid)
+ rm -f /run/openvpn/$(basename ${1}).pid
+ else
+ echo "Error stopping OpenVPN: no such pid file /run/openvpn/$(basename ${1}).pid"
+ fi
+ fi
+}
+
+ovpn_restart() {
+ if [ ! -z "$1" ]; then # restart for all config files:
+ ovpn_stop
+ sleep 2
+ ovpn_start
+ else # restart for one config file only:
+ ovpn_stop $1
+ sleep 2
+ ovpn_start $1
+ fi
+}
+
+ovpn_status() {
+ if /bin/ls /run/openvpn/*.pid 1> /dev/null 2> /dev/null ; then
+ echo "Currently running OpenVPN processes according to .pid files in /run/openvpn:"
+ for pid in /run/openvpn/*.pid ; do
+ echo " $(basename $pid) ($(cat $pid))"
+ done
+ else
+ echo "No .pid files found in /run/openvpn."
+ fi
+}
+
+# Create PID directory if it doesn't exist:
+if [ ! -d /run/openvpn ]; then
+ mkdir -p /run/openvpn
+fi
+
+case "$1" in
+'start')
+ ovpn_start $2
+ ;;
+'stop')
+ ovpn_stop $2
+ ;;
+'restart')
+ ovpn_restart $2
+ ;;
+'status')
+ ovpn_status
+ ;;
+*)
+ echo "Usage: $0 {start|stop|restart}"
+esac
+
diff --git a/patches/source/openvpn/slack-desc b/patches/source/openvpn/slack-desc
new file mode 100644
index 00000000..7ffd6167
--- /dev/null
+++ b/patches/source/openvpn/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------------------------------------------------------|
+openvpn: openvpn (secure IP tunnel daemon)
+openvpn:
+openvpn: OpenVPN is a full-featured SSL VPN which can accommodate a wide range
+openvpn: of configurations, including remote access, site-to-site VPNs, WiFi
+openvpn: security, and enterprise-scale remote access with load balancing,
+openvpn: failover, and fine-grained access-controls.
+openvpn:
+openvpn: OpenVPN's home on the net is: http://openvpn.net
+openvpn:
+openvpn:
+openvpn:
diff --git a/patches/source/openvpn/slackware.conf b/patches/source/openvpn/slackware.conf
new file mode 100644
index 00000000..4314b544
--- /dev/null
+++ b/patches/source/openvpn/slackware.conf
@@ -0,0 +1,178 @@
+# openvpn.conf.sample
+#
+# This is a sample configuration file for OpenVPN.
+# Not all options are listed here; you can find good documentation
+# about all of the options in OpenVPN's manual page - openvpn(8).
+#
+# You can make a P-t-P connection by creating a shared key,
+# copying this key to other hosts in your network, and changing
+# the IP addresses in this file.
+#
+# Commented options are provided for some typical configurations
+
+# Change the "search" path to /etc/openvpn
+# All files referenced in this configuration will be relative to
+# whatever directory is specified here - we default to /etc/openvpn
+cd /etc/openvpn
+
+# If running as a server, which local IP address should OpenVPN
+# listen on? Specify this as either a hostname or IP address. If
+# this is left blank, OpenVPN will default to listening on all
+# interfaces.
+#local a.b.c.d
+
+# This option defines the IP or DNS name of the other side of your VPN
+# connection. This option is needed if you are making client or P-t-P
+# connections. If you are the server, use "local" instead. This may
+# be specified as a domain name or IP address.
+#remote vpn.server.org
+
+# This option defins the protocol to use. Valid options are:
+# udp, tcp-server, or tcp-client. Default is udp, and generally
+# speaking, tcp is a bad idea.
+proto udp
+
+# This option defines the port on which your server will be listening
+# or trying to connect. The default is 1194
+port 1194
+
+# This option defines whether to use LZO compression.
+# If enabled, it must be enabled at both ends of the VPN connection.
+#comp-lzo
+
+# Debug level (default 1)
+#verb 3
+
+# VPN logfile location
+# If you don't specify a location here, logging will be done through
+# syslogd and write to /var/log/messages
+log-append /var/log/openvpn.log
+
+# If you want to use OpenVPN as a daemon, uncomment this line.
+# Generally speaking, servers should run OpenVPN as a daemon
+# and clients should not.
+#daemon
+
+# Device type to use, you can choose between tun or tap.
+# TUN is the most common option. If you have multiple connections,
+# it is a good idea to bind each connection to a separate TUN/TAP
+# interface using tunX/tapX, where X is the number of each interface.
+dev tun
+
+# This option prevents OpenVPN from closing and re-opening the tun/tap
+# device every time it receives a SIGUSR1 signal
+#persist-tun
+
+# This is similar to the previous option, but it prevents OpenVPN from
+# re-reading the key files every time
+#persist-key
+
+# If you are using a client-server architecture, you need to specify the
+# role of your computer in your VPN network. To use one of these options,
+# you need to configure TLS options too.
+#
+# To use the "server" option, you must specify a network subnet such
+# as 172.16.1.0 255.255.255.0. The first number is the network, the
+# second is the netmask. OpenVPN will take the first available IP
+# for itself (in our example, 172.16.1.1) and the rest will be
+# given to connecting clients dynamically.
+#
+# Leave these commented out if you are using OpenVPN in bridging mode.
+#
+#server 10.1.2.0 255.255.255.0
+#client
+
+# This option defines a file with IP address to client mapping.
+# This is useful in general, and necessary if clients use persist-tun.
+#ifconfig-pool-persist ips.txt
+
+# Enable this option if you want clients connected to this VPN to be
+# able to talk directly to each other
+#client-to-client
+
+# This option defines the directory in which configuration files for clients
+# will reside. With individual files you can make each client get different
+# options using "push" parameters
+#client-config-dir ccd
+
+# If you are using P-t-P, you need to specify the IP addresses at both ends
+# of your VPN connection. The IP addresses are reversed at the other side.
+#
+# You can use this to specify client IP addresses in ccd files (on server)
+# or directly in client configuration
+#ifconfig 10.1.2.1 10.1.2.2
+
+# You can set routes to specific networks. In the sample below, "vpn_gateway"
+# is an internal OpenVPN alias to your VPN gateway - leave it as is.
+# This will enable you to talk with the networks behind your VPN server.
+# Multiple routes can be specified.
+#
+# +------------+ <eth>-<tun> <tun>-<eth> +------------+
+# | Network1 |---| VPN1 |--[10.1.2.0/24]--| VPN2 |---| Network2 |
+# +------------+ +------+ +------+ +------------+
+# 192.168.0.0/24 192.168.2.0/24
+#
+# The sample below shows how VPN1 server can reach Network2
+#route 192.168.2.0 255.255.255.0 vpn_gateway
+
+# You can send clients many network configuration options using the
+# "push" directive and sending commands.
+# Multiple "push" directives can be used. You should only put global
+# "push" directives here. You can "push" different options to
+# different clients in per-client configuration files. See
+# "client-config-dir" above.
+#
+# Using the same network configuration that you see above, the route statment
+# here allows VPN2 to reach Network1
+#push "route-delay 2 600"
+#push "route 192.168.2.0 255.255.255.0 vpn_gateway"
+#push "persist-key"
+
+# This option sets the encryption algorithm to use in the VPN connection.
+# Available options are:
+# DES-CBC, RC2-CBC, DES-EDE-CBC, DES-EDE3-CBC,
+# DESX-CBC, BF-CBC, RC2-40-CBC, CAST5-CBC,
+# RC2-64-CBC, AES-128-CBC, AES-192-CBC and AES-256-CBC
+cipher BF-CBC
+
+# Shared Key Connection
+# ---------------------
+# Secret is one shared key between the hosts that want to connect through VPNs.
+# Without secret or TLS options, your data will not be encrypted.
+#
+# To generate an encryption key do:
+# openvpn --genkey --secret /etc/openvpn/keys/shared.key
+#
+# Do the above on one host and copy it to the others
+secret keys/shared.key
+
+# TLS Connections
+# ---------------
+# TLS must be used if you use option "server" or "client"
+# The basic idea there is: You have one Certificate Authority, and all
+# machines in your VPN network need to have individual certificates and
+# keys signed by Certificate Authority. This means each client can
+# have its own key, making it easier to revoke a key without copying
+# a shared secret key to every client.
+#
+# Inside the /usr/doc/openvpn-$VERSION documentation directory, you can
+# find "easy-rsa" scripts to make certificate and key management easier.
+
+# Certificate Authority file
+# This file must be identical on all hosts that connect to your VPN
+#ca certs/ca.crt
+
+# If you are the server, you need to specify some Diffie Hellman parameters.
+# OpenVPN provides some sample .pem files in documentation directory
+#dh my-dh.pem
+
+# Certificate and Key signed by Certificate Authority
+# Each machine needs to have their own unique certificate
+#cert certs/machine.cert
+#key keys/machine.key
+
+# To prevent some DoS attacks we can add another authentication layer in the
+# TLS control channel. This needs to be enabled at both ends to work
+# client uses the value 1; server uses the value 0
+#tls-auth keys/shared.key 0
+
diff --git a/patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch b/patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch
new file mode 100644
index 00000000..c8257479
--- /dev/null
+++ b/patches/source/patch/0001-Refuse-to-apply-ed-scripts-by-default.patch
@@ -0,0 +1,178 @@
+From 5046e5605cf7420d9a11de49bd9fe4851a4ca1d2 Mon Sep 17 00:00:00 2001
+From: Saleem Rashid <dev@saleemrashid.com>
+Date: Thu, 5 Apr 2018 22:48:25 +0100
+Subject: [PATCH] Refuse to apply ed scripts by default
+
+* src/patch.c, src/pch.c: Warn that ed scripts are potentially
+dangerous, unless patch is invoked with --force
+* tests/dangerous-ed-scripts: New test case
+* tests/crlf-handling, tests/need-filename: Add -f to patch invokation to
+avoid ed scripts warning
+
+This fixes an issue where ed scripts could be included in a patch, executing
+arbitrary shell commands without the user's knowledge.
+
+Original bug report:
+https://savannah.gnu.org/bugs/index.php?53566
+---
+ src/patch.c | 13 +++++++++++--
+ src/pch.c | 11 +++++++++++
+ tests/Makefile.am | 1 +
+ tests/crlf-handling | 4 ++--
+ tests/dangerous-ed-scripts | 36 ++++++++++++++++++++++++++++++++++++
+ tests/need-filename | 2 +-
+ 6 files changed, 62 insertions(+), 5 deletions(-)
+ create mode 100644 tests/dangerous-ed-scripts
+
+diff --git a/src/patch.c b/src/patch.c
+index 0fe6d72..e14a9c4 100644
+--- a/src/patch.c
++++ b/src/patch.c
+@@ -781,7 +781,7 @@ static char const *const option_help[] =
+ " -l --ignore-whitespace Ignore white space changes between patch and input.",
+ "",
+ " -c --context Interpret the patch as a context difference.",
+-" -e --ed Interpret the patch as an ed script.",
++" -e --ed Interpret the patch as a potentially dangerous ed script. This could allow arbitrary command execution!",
+ " -n --normal Interpret the patch as a normal difference.",
+ " -u --unified Interpret the patch as a unified difference.",
+ "",
+@@ -825,7 +825,7 @@ static char const *const option_help[] =
+ "Miscellaneous options:",
+ "",
+ " -t --batch Ask no questions; skip bad-Prereq patches; assume reversed.",
+-" -f --force Like -t, but ignore bad-Prereq patches, and assume unreversed.",
++" -f --force Like -t, but ignore bad-Prereq patches, apply potentially dangerous ed scripts, and assume unreversed.",
+ " -s --quiet --silent Work silently unless an error occurs.",
+ " --verbose Output extra information about the work being done.",
+ " --dry-run Do not actually change any files; just print what would happen.",
+@@ -1068,6 +1068,15 @@ get_some_switches (void)
+ }
+ }
+
++ if (! force && diff_type == ED_DIFF)
++ {
++ ask ("Apply potentially dangerous ed script? This could allow arbitrary command execution! [n] ");
++ if (*buf != 'y')
++ {
++ fatal ("Refusing to apply potentially dangerous ed script.");
++ }
++ }
++
+ /* Process any filename args. */
+ if (optind < Argc)
+ {
+diff --git a/src/pch.c b/src/pch.c
+index bc6278c..ab34dd4 100644
+--- a/src/pch.c
++++ b/src/pch.c
+@@ -1001,6 +1001,17 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
+ instat = st[i];
+ }
+
++ if (! force && retval == ED_DIFF)
++ {
++ ask ("Apply potentially dangerous ed script? This could allow arbitrary command execution! [n] ");
++ if (*buf != 'y')
++ {
++ if (verbosity != SILENT)
++ say ("Skipping potentially dangerous ed script.\n");
++ skip_rest_of_patch = true;
++ }
++ }
++
+ return retval;
+ }
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 6b6df63..d888804 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -30,6 +30,7 @@ TESTS = \
+ create-directory \
+ criss-cross \
+ crlf-handling \
++ dangerous-ed-scripts \
+ dash-o-append \
+ deep-directories \
+ empty-files \
+diff --git a/tests/crlf-handling b/tests/crlf-handling
+index c192cac..f9e654e 100644
+--- a/tests/crlf-handling
++++ b/tests/crlf-handling
+@@ -46,7 +46,7 @@ if ! have_ed ; then
+ else
+ diff -e a b > ab.ed | lf2crlf > ab.ed
+ echo 1 > c
+- ncheck 'patch c < ab.ed'
++ ncheck 'patch -f c < ab.ed'
+ fi
+
+ # ==============================================================
+@@ -95,7 +95,7 @@ if ! have_ed ; then
+ else
+ diff -e a b > ab.diff
+ cp a c
+- ncheck 'patch c < ab.diff'
++ ncheck 'patch -f c < ab.diff'
+ fi
+
+ check 'cat -ve c' <<EOF
+diff --git a/tests/dangerous-ed-scripts b/tests/dangerous-ed-scripts
+new file mode 100644
+index 0000000..3465d4e
+--- /dev/null
++++ b/tests/dangerous-ed-scripts
+@@ -0,0 +1,36 @@
++# Copyright (C) 2018 Free Software Foundation, Inc.
++#
++# Copying and distribution of this file, with or without modification,
++# in any medium, are permitted without royalty provided the copyright
++# notice and this notice are preserved.
++
++. $srcdir/test-lib.sh
++
++require cat
++use_local_patch
++use_tmpdir
++
++# ==============================================================
++# Test for arbitrary command execution found in CVE-2018-0492 patch.
++# GNU patch bug report can be found at http://savannah.gnu.org/bugs/index.php?53566
++
++cat > beep.patch <<EOF
++--- /dev/null 2018-13-37 13:37:37.000000000 +0100
+++++ b/beep.c 2018-13-37 13:38:38.000000000 +0100
++1337a
++1,112d
++!id>~/pwn.lol;beep # 13-21 12:53:21.000000000 +0100
++.
++EOF
++
++check 'patch < beep.patch; echo "Status: $?"' <<EOF
++Apply potentially dangerous ed script? This could allow arbitrary command execution! [n]
++Skipping potentially dangerous ed script.
++Status: 1
++EOF
++
++check 'patch -e; echo "Status: $?"' <<EOF
++Apply potentially dangerous ed script? This could allow arbitrary command execution! [n] $PATCH: **** Refusing to apply potentially dangerous ed script.
++
++Status: 2
++EOF
+diff --git a/tests/need-filename b/tests/need-filename
+index 8b92848..c15951f 100644
+--- a/tests/need-filename
++++ b/tests/need-filename
+@@ -61,7 +61,7 @@ EOF
+
+ rm -f f
+ touch f
+- ncheck 'patch f < e.diff'
++ ncheck 'patch -f f < e.diff'
+
+ check 'cat f' <<EOF
+ one
+--
+2.16.3
+
diff --git a/patches/source/patch/patch.SlackBuild b/patches/source/patch/patch.SlackBuild
new file mode 100755
index 00000000..f74a1089
--- /dev/null
+++ b/patches/source/patch/patch.SlackBuild
@@ -0,0 +1,131 @@
+#!/bin/sh
+
+# Copyright 2005-2009, 2010, 2012, 2015, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=patch
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-patch
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+cd $TMP
+rm -rf patch-${VERSION}
+tar xvf $CWD/patch-${VERSION}.tar.?z || exit 1
+cd patch-${VERSION} || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Patch CVE-2018-1000156, arbitrary shell command execution by (obsolete)
+# ed patch format:
+zcat $CWD/0001-Refuse-to-apply-ed-scripts-by-default.patch.gz | patch -p1 --verbose || exit 1
+
+# This avoids failure in tests/ expecting an old automake:
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make -j4 || make || exit 1
+make install DESTDIR=$PKG
+
+# Strip everything for good measure:
+( 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 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
+
+mkdir -p $PKG/usr/doc/patch-${VERSION}
+cp -a \
+ AUTHORS COPYING* NEWS README* \
+ $PKG/usr/doc/patch-${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/*-$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
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/patch-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/patch/slack-desc b/patches/source/patch/slack-desc
new file mode 100644
index 00000000..4603b715
--- /dev/null
+++ b/patches/source/patch/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------------------------------------------------------|
+patch: patch (apply a diff file to an original file or files)
+patch:
+patch: Patch is a utility used to apply diffs (or patches) to files, which
+patch: are usually source code.
+patch:
+patch: Larry Wall wrote the original version of patch. Paul Eggert removed
+patch: patch's arbitrary limits; added support for binary files, setting
+patch: file times, and deleting files; and made it conform better to POSIX.
+patch: Other contributors include Wayne Davison, who added unidiff support,
+patch: and David MacKenzie, who added configuration and backup support.
+patch:
diff --git a/patches/source/php/doinst.sh b/patches/source/php/doinst.sh
new file mode 100644
index 00000000..a6f584ed
--- /dev/null
+++ b/patches/source/php/doinst.sh
@@ -0,0 +1,30 @@
+if [ ! -r etc/httpd/mod_php.conf ]; then
+ cp -a etc/httpd/mod_php.conf.example etc/httpd/mod_php.conf
+elif [ "`cat etc/httpd/mod_php.conf 2> /dev/null`" = "" ]; then
+ cp -a etc/httpd/mod_php.conf.example etc/httpd/mod_php.conf
+fi
+
+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.php-fpm.new:
+if [ -e etc/rc.d/rc.php-fpm ]; then
+ cp -a etc/rc.d/rc.php-fpm etc/rc.d/rc.php-fpm.new.incoming
+ cat etc/rc.d/rc.php-fpm.new > etc/rc.d/rc.php-fpm.new.incoming
+ mv etc/rc.d/rc.php-fpm.new.incoming etc/rc.d/rc.php-fpm.new
+fi
+config etc/rc.d/rc.php-fpm.new
+cp -a etc/php.ini-production etc/php.ini.new
+config etc/php.ini.new
+cp -a etc/php-fpm.conf.default etc/php-fpm.conf.new
+config etc/php-fpm.conf.new
+cp -a etc/php-fpm.conf.default etc/php-fpm.conf.new
+config etc/php-fpm.conf.new
diff --git a/patches/source/php/fetch-php.sh b/patches/source/php/fetch-php.sh
new file mode 100755
index 00000000..19c45c74
--- /dev/null
+++ b/patches/source/php/fetch-php.sh
@@ -0,0 +1,2 @@
+lftpget http://us.php.net/distributions/php-5.6.36.tar.xz.asc
+lftpget http://us.php.net/distributions/php-5.6.36.tar.xz
diff --git a/patches/source/php/mod_php.conf.example b/patches/source/php/mod_php.conf.example
new file mode 100644
index 00000000..670eb713
--- /dev/null
+++ b/patches/source/php/mod_php.conf.example
@@ -0,0 +1,29 @@
+#
+# mod_php - PHP Hypertext Preprocessor module
+#
+
+# Load the PHP module:
+LoadModule php5_module lib/httpd/modules/libphp5.so
+
+# Tell Apache to feed all *.php files through PHP. If you'd like to
+# parse PHP embedded in files with different extensions, comment out
+# these lines and see the example below.
+<FilesMatch \.php$>
+ SetHandler application/x-httpd-php
+</FilesMatch>
+
+# Tell Apache to feed all *.php, *.html, and *.htm files through
+# the PHP module. Add or subtract extensions here as desired. Please
+# note that running pages through PHP for no reason can be both slow
+# and insecure, so be sure to know what you're doing. It's a convenient
+# shortcut, but probably isn't suitible for high-traffic sites if you
+# write any of your pages in straight HTML.
+#<FilesMatch "\.(php|html|htm)$">
+# SetHandler application/x-httpd-php
+#</FilesMatch>
+
+# This will display PHP files in colored syntax form. Use with caution.
+#<FilesMatch "\.phps$">
+# SetHandler application/x-httpd-php-source
+#</FilesMatch>
+
diff --git a/patches/source/php/php-fpm.conf.diff b/patches/source/php/php-fpm.conf.diff
new file mode 100644
index 00000000..38d0f9c6
--- /dev/null
+++ b/patches/source/php/php-fpm.conf.diff
@@ -0,0 +1,28 @@
+--- ./sapi/fpm/php-fpm.conf.in.orig 2012-05-20 19:47:53.000000000 +0200
++++ ./sapi/fpm/php-fpm.conf.in 2012-05-21 09:16:32.646276661 +0200
+@@ -12,7 +12,7 @@
+ ; Relative path can also be used. They will be prefixed by:
+ ; - the global prefix if it's been set (-p arguement)
+ ; - @prefix@ otherwise
+-;include=etc/fpm.d/*.conf
++;include=etc/php-fpm.d/*.conf
+
+ ;;;;;;;;;;;;;;;;;;
+ ; Global Options ;
+@@ -22,14 +22,14 @@
+ ; Pid file
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: none
+-;pid = run/php-fpm.pid
++pid = run/php-fpm.pid
+
+ ; Error log file
+ ; If it's set to "syslog", log is sent to syslogd instead of being written
+ ; in a local file.
+ ; Note: the default prefix is @EXPANDED_LOCALSTATEDIR@
+ ; Default Value: log/php-fpm.log
+-;error_log = log/php-fpm.log
++error_log = log/php-fpm.log
+
+ ; syslog_facility is used to specify what type of program is logging the
+ ; message. This lets syslogd specify that messages from different facilities
diff --git a/patches/source/php/php.SlackBuild b/patches/source/php/php.SlackBuild
new file mode 100755
index 00000000..f10b53eb
--- /dev/null
+++ b/patches/source/php/php.SlackBuild
@@ -0,0 +1,312 @@
+#!/bin/sh
+
+# Build and package mod_php on Slackware.
+# by: David Cantrell <david@slackware.com>
+# Modified for PHP 4-5 by volkerdi@slackware.com
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015 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.
+
+
+VERSION=${VERSION:-$(echo php-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+ALPINE=2.20
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-php/
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+# we need to compile alpine to get c-client.a for IMAP support:
+IMAPLIBDIR=/usr/local/lib${LIBDIRSUFFIX}/c-client
+if [ -r $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a ]; then
+ echo "Using IMAP library:"
+ ls -l $IMAPLIBDIR/lib${LIBDIRSUFFIX}/c-client.a
+ sleep 5
+else
+ ( cd $CWD/../alpine ; ./alpine.SlackBuild || exit 1 ) || exit 1
+ ( cd $TMP/alpine-${ALPINE}/imap/c-client
+ strip -g c-client.a
+ mkdir -p $IMAPLIBDIR/lib${LIBDIRSUFFIX}
+ cp c-client.a $IMAPLIBDIR/lib${LIBDIRSUFFIX}
+ mkdir -p $IMAPLIBDIR/include
+ cp *.h $IMAPLIBDIR/include
+ )
+fi
+
+mkdir -p $PKG/etc/httpd
+mkdir -p $PKG/etc/php.d
+# A trick from DaMouse to enable building php into $PKG.
+# We'll remove this later on.
+cat /etc/httpd/original/httpd.conf > $PKG/etc/httpd/httpd.conf
+if [ ! -e /etc/httpd/original/httpd.conf ]; then
+ echo "FATAL: no /etc/httpd/original/httpd.conf found."
+ exit 1
+fi
+
+cd $TMP
+rm -rf php-$VERSION
+tar xvf $CWD/php-$VERSION.tar.xz || exit 1
+cd php-$VERSION
+
+# cleanup:
+find . -name "*.orig" -delete
+
+# Add missing(?) PEAR modules back:
+if [ -d php-$VERSION/pear/packages ]; then
+ ( cd php-$VERSION/pear/packages
+ cp -a $CWD/pear/*.bz2 . 2> /dev/null
+ bzip2 -d *.bz2 2> /dev/null
+ )
+fi
+
+if [ "$ARCH" = "s390" ]; then
+ zcat $CWD/php.configure.s390.diff.gz | patch -p1 || exit
+fi
+
+# Fixup perms/owners:
+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 {} \;
+
+find . -name "*.h" -exec chmod 644 {} \;
+
+# Sometimes they ship a few of these:
+find . -name "*.orig" -exec rm {} \;
+
+# Patch ini files:
+zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/php.ini-development.diff.gz | patch -p1 --verbose php.ini-production || exit 1
+zcat $CWD/php-fpm.conf.diff.gz | patch -p1 --verbose || exit 1
+
+# Install the build folder into /usr/lib$LIBDIRSUFFIX/php/build
+# and adapt phpize accordingly:
+sed -i "s|build$|php/build|" scripts/Makefile.frag
+sed -i "s|build\"$|php/build\"|" scripts/phpize.in
+
+# Generic "kitchen sink" configure function, with as many things as possible (and
+# maybe then some ;-) compiled as shared extensions:
+EXTENSION_DIR=/usr/lib${LIBDIRSUFFIX}/php/extensions \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-libdir=lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --datarootdir=/usr/share \
+ --datadir=/usr/share \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --with-apxs2=/usr/bin/apxs \
+ --enable-fpm \
+ --with-fpm-user=apache \
+ --with-fpm-group=apache \
+ --enable-maintainer-zts \
+ --enable-pcntl \
+ --enable-mbregex \
+ --enable-tokenizer=shared \
+ --with-config-file-scan-dir=/etc/php.d \
+ --with-config-file-path=/etc \
+ --enable-mod_charset \
+ --with-layout=PHP \
+ --disable-sigchild \
+ --enable-xml \
+ --with-libxml-dir=/usr \
+ --enable-simplexml \
+ --enable-xmlreader=shared \
+ --enable-dom=shared \
+ --enable-filter \
+ --disable-debug \
+ --with-openssl=shared \
+ --with-pcre-regex=/usr \
+ --with-zlib=shared,/usr \
+ --enable-bcmath=shared \
+ --with-bz2=shared,/usr \
+ --enable-calendar=shared \
+ --enable-ctype=shared \
+ --with-curl=shared \
+ --with-mcrypt=/usr \
+ --enable-dba=shared \
+ --with-gdbm=/usr \
+ --with-db4=/usr \
+ --enable-exif=shared \
+ --enable-ftp=shared \
+ --with-gd=shared \
+ --with-jpeg-dir=/usr \
+ --with-png-dir=/usr \
+ --with-vpx-dir=/usr \
+ --with-zlib-dir=/usr \
+ --with-xpm-dir=/usr \
+ --with-freetype-dir=/usr \
+ --with-t1lib=/usr \
+ --enable-gd-native-ttf \
+ --with-gettext=shared,/usr \
+ --with-gmp=shared,/usr \
+ --with-iconv=shared \
+ --with-imap-ssl=/usr \
+ --with-imap=$IMAPLIBDIR \
+ --with-ldap=shared \
+ --enable-mbstring=shared \
+ --enable-hash \
+ --with-mysql=shared,mysqlnd \
+ --with-mysqli=shared,mysqlnd \
+ --with-mysql-sock=/var/run/mysql/mysql.sock \
+ --with-iodbc=shared,/usr \
+ --enable-pdo=shared \
+ --with-pdo-mysql=shared,mysqlnd \
+ --with-pdo-sqlite=shared,/usr \
+ --with-pdo-odbc=shared,iODBC,/usr \
+ --with-pspell=shared,/usr \
+ --with-enchant=shared,/usr \
+ --enable-shmop=shared \
+ --with-snmp=shared,/usr \
+ --enable-soap=shared \
+ --enable-sockets \
+ --with-sqlite3=shared \
+ --with-regex=php \
+ --enable-sysvmsg \
+ --enable-sysvsem \
+ --enable-sysvshm \
+ --enable-wddx=shared \
+ --with-xsl=shared,/usr \
+ --enable-zip=shared \
+ --with-tsrm-pthreads \
+ --enable-intl=shared \
+ --enable-opcache \
+ --enable-shared=yes \
+ --enable-static=no \
+ --with-gnu-ld \
+ --with-pic \
+ --enable-phpdbg \
+ --build=$ARCH-slackware-linux
+
+# I am told this option is worse than nothing. :-)
+# --enable-safe-mode
+#
+# I would recommend *against* and will take no responbility for turning on
+# "safe" mode.
+
+make $NUMJOBS || make || exit 1
+make install INSTALL_ROOT=$PKG || exit 1
+
+mkdir -p $PKG/etc/{rc.d,php-fpm.d}
+cp sapi/fpm/init.d.php-fpm $PKG/etc/rc.d/rc.php-fpm.new
+chmod 644 $PKG/etc/rc.d/rc.php-fpm.new
+
+# PHP (used to) install Pear with some strange permissions.
+chmod 755 $PKG/usr/bin/pear
+
+# PHP sometimes puts junk in the root directory:
+( cd $PKG
+ rm -rf .channels .depdb .depdblock .filemap .lock .registry
+)
+
+# We do not package static extension libraries:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/php/extensions/*.a
+
+# Fix $PKG/usr/lib/php perms:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/php
+ 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 {} \;
+)
+
+mkdir -p $PKG/usr/doc/php-$VERSION
+cp -a \
+ CODING_STANDARDS CREDITS EXTENSIONS INSTALL LICENSE NEWS README* TODO* UPGRADING* \
+ sapi/cgi/README.FastCGI \
+ $PKG/usr/doc/php-$VERSION
+chown -R root:root $PKG/usr/doc/php-$VERSION
+chmod 644 $PKG/usr/doc/php-$VERSION/UPGRADING*
+
+mkdir -p $PKG/etc/httpd
+cat $CWD/mod_php.conf.example | sed -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" \
+ > $PKG/etc/httpd/mod_php.conf.example
+chmod 644 $PKG/etc/httpd/*
+chown root:root $PKG/etc/httpd/*
+
+cp -a php.ini-development php.ini-production $PKG/etc
+chmod 755 $PKG/etc/php.d $PKG/etc/php-fpm.d $PKG/etc/httpd
+chown root:root $PKG/etc/*
+
+# This can go now.
+rm -f $PKG/etc/httpd/httpd*
+
+# Session directory for PHP:
+mkdir -p $PKG/var/lib/php
+chmod 770 $PKG/var/lib/php
+chown root:apache $PKG/var/lib/php
+
+# Strip ELF objects.
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+#if [ -d "$IMAPLIBDIR" ]; then
+# ( cd $IMAPLIBDIR && rm -rf * )
+# rmdir $IMAPLIBDIR
+#fi
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/php-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/php/php.ini-development.diff b/patches/source/php/php.ini-development.diff
new file mode 100644
index 00000000..ffa7c0c9
--- /dev/null
+++ b/patches/source/php/php.ini-development.diff
@@ -0,0 +1,61 @@
+--- ./php.ini-development.orig 2012-07-18 01:19:16.000000000 -0500
++++ ./php.ini-development 2012-08-08 20:06:33.512546116 -0500
+@@ -859,6 +859,49 @@
+ ; If you only provide the name of the extension, PHP will look for it in its
+ ; default extension directory.
+ ;
++
++; These are the extensions that are available for use on this PHP build.
++; If you do NOT need any of these extensions, you should comment them out.
++; That will probably increase both your security and performance.
++
++extension=bcmath.so
++extension=bz2.so
++extension=calendar.so
++extension=ctype.so
++extension=curl.so
++extension=dba.so
++extension=dom.so
++extension=enchant.so
++extension=exif.so
++extension=ftp.so
++extension=gd.so
++extension=gettext.so
++extension=gmp.so
++extension=iconv.so
++extension=intl.so
++extension=ldap.so
++extension=mbstring.so
++extension=mysql.so
++extension=mysqli.so
++extension=odbc.so
++extension=openssl.so
++zend_extension=opcache.so
++extension=pdo.so
++extension=pdo_mysql.so
++extension=pdo_sqlite.so
++extension=pdo_odbc.so
++extension=pspell.so
++extension=shmop.so
++extension=snmp.so
++extension=soap.so
++extension=sqlite3.so
++extension=tokenizer.so
++extension=wddx.so
++extension=xmlreader.so
++extension=xsl.so
++extension=zip.so
++extension=zlib.so
++
+ ; Windows Extensions
+ ; Note that ODBC support is built in, so no dll is needed for it.
+ ; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
+@@ -1391,7 +1431,7 @@
+ ; where MODE is the octal representation of the mode. Note that this
+ ; does not overwrite the process's umask.
+ ; http://php.net/session.save-path
+-;session.save_path = "/tmp"
++session.save_path = "/var/lib/php"
+
+ ; Whether to use cookies.
+ ; http://php.net/session.use-cookies
diff --git a/patches/source/php/slack-desc b/patches/source/php/slack-desc
new file mode 100644
index 00000000..fe14da6d
--- /dev/null
+++ b/patches/source/php/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------------------------------------------------------|
+php: php (HTML-embedded scripting language)
+php:
+php: PHP is an HTML-embedded scripting language. It shares syntax
+php: characteristics with C, Java, and Perl. The primary objective behind
+php: this language is to make a fast and easy-to-use scripting language
+php: for dynamic web sites.
+php:
+php: More information can be found online at http://www.php.net/
+php:
+php:
+php:
diff --git a/patches/source/pidgin/doinst.sh b/patches/source/pidgin/doinst.sh
new file mode 100644
index 00000000..1f8ff67d
--- /dev/null
+++ b/patches/source/pidgin/doinst.sh
@@ -0,0 +1,10 @@
+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/pidgin/fix-gmain_h-compile-error.diff b/patches/source/pidgin/fix-gmain_h-compile-error.diff
new file mode 100644
index 00000000..1e313cde
--- /dev/null
+++ b/patches/source/pidgin/fix-gmain_h-compile-error.diff
@@ -0,0 +1,17 @@
+Since glib-2.32, this is a common error:
+ In file included from rsa_nss.c:27:0:
+ /usr/include/glib-2.0/glib/gmain.h:21:2: error: #error "Only <glib.h> can be included directly."
+Let's fix it :)
+
+diff -Nur pidgin-encryption-3.1.orig/rsa_nss.c pidgin-encryption-3.1/rsa_nss.c
+--- pidgin-encryption-3.1.orig/rsa_nss.c 2010-04-25 20:53:46.000000000 -0500
++++ pidgin-encryption-3.1/rsa_nss.c 2012-05-01 22:58:18.033710803 -0500
+@@ -24,7 +24,7 @@
+ #include <debug.h>
+ #include <gtkdialogs.h>
+
+-#include "glib/gmain.h"
++#include <glib.h>
+
+ #include <string.h>
+ #include <assert.h>
diff --git a/patches/source/pidgin/pidgin.SlackBuild b/patches/source/pidgin/pidgin.SlackBuild
new file mode 100755
index 00000000..bf97c19d
--- /dev/null
+++ b/patches/source/pidgin/pidgin.SlackBuild
@@ -0,0 +1,231 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 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=pidgin
+VERSION=${VERSION:-$(echo $PKGNAM-2.*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+PIDGINENC=${PIDGINENC:-3.1}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j6 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-${PKGNAM}
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ ARCHQUADLET=""
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET="-gnueabi"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ ARCHQUADLET=""
+fi
+
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 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 {} \;
+
+#autoreconf --force --install
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --enable-dot=no \
+ --disable-schemas-install \
+ --enable-dbus \
+ --enable-gnutls=no \
+ --enable-nss=yes \
+ --with-nss-includes="$(pkg-config --variable=includedir nss)" \
+ --with-nss-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --with-nspr-includes="$(pkg-config --variable=includedir nspr)" \
+ --with-nspr-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --with-system-ssl-certs=/etc/ssl/certs \
+ --disable-vv \
+ --enable-gtkspell \
+ --enable-cyrus-sasl \
+ --enable-perl \
+ --disable-meanwhile \
+ --disable-avahi \
+ --disable-nm \
+ --with-gstreamer=1.0 \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
+
+# Fix install location:
+grep -lr -- "lib/perl" . | xargs sed -i 's?lib/perl?lib'"$LIBDIRSUFFIX"'/perl?g'
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Fix misplaced items:
+eval $(perl '-V:installvendorlib')
+eval $(perl '-V:privlib')
+VENDORPERL="$(echo $installvendorlib)"
+
+mkdir -vpm755 $PKG/$VENDORPERL/
+find $PKG -type f -name perllocal.pod -exec mv -fv {} $PKG/$VENDORPERL/Pidgin.pod \;
+# Fix install location for 64bit:
+sed -i 's?/lib/perl?/lib'"$LIBDIRSUFFIX"'/perl?g' $PKG/$VENDORPERL/Pidgin.pod
+mkdir -p $PKG/usr/man/man3
+find $PKG/usr/share/man -type f -name *.3 -exec mv -fv {} $PKG/usr/man/man3 \;
+rm -rf $PKG/usr/share/man
+rm -r $PKG$privlib
+# This is empty:
+rmdir $PKG/usr/lib$LIBDIRSUFFIX/perl[0-9]*/$ARCH-linux-thread-multi/
+
+# In case of unwanted junk dirs on 64-bit... this may fail, but doesn't hurt:
+rmdir $PKG/usr/lib/perl[0-9]*/$ARCH-linux-thread-multi/
+rmdir $PKG/usr/lib/perl[0-9]*
+rmdir $PKG/usr/lib
+
+# This removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%/share/man%/man%g" \
+ -e "s%$PKG%%g" \
+ -e "s%\.1$%\.1\.gz%g" \
+ -e "s%\.2$%\.2\.gz%g" \
+ -e "s%\.3$%\.3\.gz%g" \
+ -e "s%\.3pm$%\.3pm\.gz%g" \
+ -e "s%\.4$%\.4\.gz%g" \
+ -e "s%\.5$%\.5\.gz%g" \
+ -e "s%\.6$%\.6\.gz%g" \
+ -e "s%\.7$%\.7\.gz%g" \
+ -e "s%\.8$%\.8\.gz%g" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+### add pidgin-encryption
+( cd $TMP
+ rm -rf pidgin-encryption-$PIDGINENC
+ tar xvf $CWD/pidgin-encryption-$PIDGINENC.tar.gz || exit 1
+ cd pidgin-encryption-$PIDGINENC
+ zcat $CWD/fix-gmain_h-compile-error.diff.gz | patch -p1 --verbose || exit 1
+ PIDGIN_CFLAGS="-I${PKG}/usr/include/pidgin" \
+ PIDGIN_LIBS="-L${PKG}/usr/lib${LIBDIRSUFFIX}" \
+ PURPLE_CFLAGS="-I${PKG}/usr/include/libpurple" \
+ PURPLE_LIBS="-L${PKG}/usr/lib${LIBDIRSUFFIX}" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --disable-static \
+ --with-nss-includes="$(pkg-config --variable=includedir nss)" \
+ --with-nss-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --with-nspr-includes="$(pkg-config --variable=includedir nspr)" \
+ --with-nspr-libs=/usr/lib${LIBDIRSUFFIX}/ \
+ --program-prefix="" \
+ --program-suffix="" \
+ --build=$ARCH-slackware-linux$ARCHQUADLET || exit 1
+
+ # Fix install location:
+ grep -lr -- "lib/perl" . | xargs sed -i 's?lib/perl?lib'"$LIBDIRSUFFIX"'/perl?g'
+
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+) || exit 1
+### end add pidgin-encryption
+
+# 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 *.*
+ )
+ done
+ )
+fi
+
+# Compress info files, if any:
+if [ -d $PKG/usr/info ]; then
+ ( cd $PKG/usr/info
+ rm -f dir
+ gzip -9 *
+ )
+fi
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING COPYRIGHT HACKING INSTALL NEWS PLUGIN_HOWTO README* doc \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+( cd $PKG/usr/doc/${PKGNAM}-$VERSION/doc
+ rm -f Makefile* *.dox *.1 *.in
+)
+
+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/pidgin/slack-desc b/patches/source/pidgin/slack-desc
new file mode 100644
index 00000000..a9aabca1
--- /dev/null
+++ b/patches/source/pidgin/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------------------------------------------------------|
+pidgin: pidgin (GTK+ instant messaging program)
+pidgin:
+pidgin: Pidgin allows you to talk to anyone using a variety of messaging
+pidgin: protocols, including AIM (Oscar and TOC), ICQ, IRC, Yahoo!, MSN
+pidgin: Messenger, Jabber, Gadu-Gadu, Napster, and Zephyr. These protocols
+pidgin: are implemented using a modular, easy to use design. To use a
+pidgin: protocol, just load the plugin for it.
+pidgin:
+pidgin: For more info, see: http://www.pidgin.im
+pidgin:
+pidgin:
diff --git a/patches/source/pkg-config/doinst.sh b/patches/source/pkg-config/doinst.sh
new file mode 100644
index 00000000..06ebcafc
--- /dev/null
+++ b/patches/source/pkg-config/doinst.sh
@@ -0,0 +1,9 @@
+# Break the /usr/share/pkgconfig symlinks, if it exists.
+# Then move the .pc files to the standard location.
+if [ -L usr/share/pkgconfig ]; then
+ rm usr/share/pkgconfig
+ mkdir -p usr/share/pkgconfig
+ grep usr/share/pkgconfig var/log/packages/* | grep '\.pc$' | cut -f 2 -d : | cut -f 4 -d / | while read movefile ; do
+ mv usr/lib/pkgconfig/$movefile usr/share/pkgconfig 1> /dev/null 2> /dev/null
+ done
+fi
diff --git a/patches/source/pkg-config/pkg-config.SlackBuild b/patches/source/pkg-config/pkg-config.SlackBuild
new file mode 100755
index 00000000..a2d0e640
--- /dev/null
+++ b/patches/source/pkg-config/pkg-config.SlackBuild
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 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.
+
+PKGNAM=pkg-config
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-pkg-config
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+cd $TMP
+rm -rf pkg-config-$VERSION
+tar xvf $CWD/pkg-config-$VERSION.tar.?z* || exit 1
+cd pkg-config-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/pkg-config-$VERSION \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/etc/profile.d/
+for script in $(ls $CWD/scripts/*) ; do
+ cat ${script} | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#g" \
+ > $PKG/etc/profile.d/$(basename ${script})
+done
+chown root:root $PKG/etc/profile.d/*
+chmod 755 $PKG/etc/profile.d/*
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/usr/doc/pkg-config-$VERSION
+cp -a \
+ AUTHORS* COPYING* NEWS* README* \
+ $PKG/usr/doc/pkg-config-$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
+zcat $CWD/doinst.sh.gz | sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#g" \
+ > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $TMP/package-pkg-config
+/sbin/makepkg -l y -c n $TMP/pkg-config-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/pkg-config/scripts/pkgconfig.csh b/patches/source/pkg-config/scripts/pkgconfig.csh
new file mode 100755
index 00000000..da9a45a6
--- /dev/null
+++ b/patches/source/pkg-config/scripts/pkgconfig.csh
@@ -0,0 +1,6 @@
+#!/bin/csh
+if ( $?PKG_CONFIG_PATH ) then
+ setenv PKG_CONFIG_PATH ${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
+else
+ setenv PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
+endif
diff --git a/patches/source/pkg-config/scripts/pkgconfig.sh b/patches/source/pkg-config/scripts/pkgconfig.sh
new file mode 100755
index 00000000..96e07c4f
--- /dev/null
+++ b/patches/source/pkg-config/scripts/pkgconfig.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ ! "$PKG_CONFIG_PATH" = "" ]; then
+ PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig
+else
+ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig
+fi
+export PKG_CONFIG_PATH
diff --git a/patches/source/pkg-config/slack-desc b/patches/source/pkg-config/slack-desc
new file mode 100644
index 00000000..52f57e1b
--- /dev/null
+++ b/patches/source/pkg-config/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------------------------------------------------------|
+pkg-config: pkg-config (system for managing library compile/link flags)
+pkg-config:
+pkg-config: pkg-config is a system for managing library compile/link flags
+pkg-config: that works with automake and autoconf. It replaces the ubiquitous
+pkg-config: *-config scripts you may have seen with a single tool. See the man
+pkg-config: page that comes with pkg-config for full documentation.
+pkg-config:
+pkg-config:
+pkg-config:
+pkg-config:
+pkg-config:
diff --git a/patches/source/procps-ng/procps-ng.SlackBuild b/patches/source/procps-ng/procps-ng.SlackBuild
new file mode 100755
index 00000000..f99bedf8
--- /dev/null
+++ b/patches/source/procps-ng/procps-ng.SlackBuild
@@ -0,0 +1,251 @@
+#!/bin/sh
+
+# Copyright 2005-2016 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=procps-ng
+VERSION=${VERSION:-3.3.15}
+PSMISCVER=${PSMISCVER:-22.21}
+PROCINFONGVER=${PROCINFONGVER:-2.0.304}
+PROCINFOVER=${PROCINFOVER:-18}
+BUILD=${BUILD:-1_slack14.2}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+tar xvf $CWD/psmisc-$PSMISCVER.tar.xz || exit 1
+tar xvf $CWD/procinfo-ng-$PROCINFONGVER.tar.xz || exit 1
+tar xvf $CWD/procinfo-$PROCINFOVER.tar.xz || exit 1
+chown -R root:root .
+
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/ \
+ --bindir=/bin \
+ --sbindir=/sbin \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --datarootdir=/usr/share \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --enable-static=no \
+ --disable-silent-rules \
+ --disable-rpath \
+ --enable-watch8bit \
+ --enable-skill \
+ --enable-sigwinch \
+ --enable-w-from \
+ --disable-kill \
+ --without-systemd \
+ --disable-modern-top \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Move the shared library to $PKG/lib${LIBDIRSUFFIX}:
+mkdir -p $PKG/lib${LIBDIRSUFFIX}
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in lib*.so.?.* ; do
+ mv $file ../../lib${LIBDIRSUFFIX}
+ ln -sf ../../lib${LIBDIRSUFFIX}/$file .
+ done
+ cp -a lib*.so.? ../../lib${LIBDIRSUFFIX}
+)
+
+# Remove .la file(s):
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+# It seems that upstream has shuffled the location of many tools with the
+# 3.3.11 release. To me, this just doesn't make sense to break any existing
+# scripts that might be using an absolute path, or to move tools that might
+# be needed before /usr is mounted into /usr. So, we will make sure that
+# everything is moved back to where the Slackware locations have always been.
+# These tools belong in /bin:
+mkdir -p $PKG/bin
+for file in free killall ps ; do
+ find $PKG -name $file -exec mv "{}" $PKG/bin \;
+done
+# These tools belong in /sbin:
+mkdir -p $PKG/sbin
+for file in pidof sysctl ; do
+ find $PKG -name $file -exec mv "{}" $PKG/sbin \;
+done
+mkdir -p $PKG/usr/bin
+# These tools belong in /usr/bin:
+for file in fuser lsdev peekfd pgrep pkill pmap procinfo prtstat pstree pwdx skill slabtop snice socklist tload top uptime vmstat w watch ; do
+ find $PKG -name $file -exec mv "{}" $PKG/usr/bin \;
+done
+# These symlinks belong in /bin:
+rm -f $PKG/bin/pidof
+ln -sf /sbin/pidof $PKG/bin/pidof
+# These symlinks belong in /usr/bin:
+rm -f $PKG/usr/bin/free $PKG/usr/bin/pidof $PKG/usr/bin/ps
+ln -sf /bin/free $PKG/usr/bin/free
+ln -sf /sbin/pidof $PKG/usr/bin/pidof
+ln -sf /bin/ps $PKG/usr/bin/ps
+
+# Create /etc/sysctl.d:
+mkdir -p $PKG/etc/sysctl.d
+
+cd psmisc-$PSMISCVER || exit 1
+
+# Fix fuser -s:
+zcat $CWD/psmisc.3638cc55b4d08851faba46635d737b24d016665b.diff.gz | patch -p1 --verbose || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/psmisc-$PSMISCVER \
+ --disable-silent-rules \
+ --disable-rpath \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Move "killall" to the traditional location:
+mv $PKG/usr/bin/killall $PKG/bin
+ln -s /bin/killall $PKG/usr/bin/killall
+
+mkdir -p $PKG/usr/doc/psmisc-$PSMISCVER
+cp -a ChangeLog COPYING* NEWS README* $PKG/usr/doc/psmisc-$PSMISCVER
+
+# 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=$PKG/usr/doc/psmisc-$PSMISCVER
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+cd ../procinfo-ng-$PROCINFONGVER || exit 1
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/procinfo-ng-$PROCINFONGVER \
+ --enable-maintainer-mode \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/procinfo-ng-$PROCINFONGVER
+cp -a GPL-2.txt LGPL-2.1.txt LICENSE.txt COPYING* README* $PKG/usr/doc/procinfo-ng-$PROCINFONGVER
+
+# Now install a couple of scripts from the original procinfo package.
+cd ../procinfo-$PROCINFOVER || exit 1
+install -m 0755 lsdev.pl $PKG/usr/bin/lsdev
+install -m 0755 socklist.pl $PKG/usr/bin/socklist
+install -m 0644 lsdev.8 socklist.8 $PKG/usr/man/man8
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Back to the procps-ng main source directory...
+cd ..
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog COPYING* 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=$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
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/procps-ng/psmisc.3638cc55b4d08851faba46635d737b24d016665b.diff b/patches/source/procps-ng/psmisc.3638cc55b4d08851faba46635d737b24d016665b.diff
new file mode 100644
index 00000000..d930f6f2
--- /dev/null
+++ b/patches/source/procps-ng/psmisc.3638cc55b4d08851faba46635d737b24d016665b.diff
@@ -0,0 +1,25 @@
+diff --git a/ChangeLog b/ChangeLog
+index fd1cccf..e5f784c 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,7 @@
++Changes in 22.22
++================
++ * Fixed typo in fuser which has -M on Debian #740275
++
+ Changes in 22.21
+ ================
+ * Missing comma in fuser(1) added Debian #702391
+diff --git a/src/fuser.c b/src/fuser.c
+index b485f65..389b302 100644
+--- a/src/fuser.c
++++ b/src/fuser.c
+@@ -1174,7 +1174,7 @@ int main(int argc, char *argv[])
+ usage(_("No process specification given"));
+
+ /* Check if -M flag was used and if so check mounts */
+- if (opts * OPT_ISMOUNTPOINT) {
++ if (opts & OPT_ISMOUNTPOINT) {
+ check_mountpoints(&mounts, &names_head, &names_tail);
+ }
+
diff --git a/patches/source/procps-ng/slack-desc b/patches/source/procps-ng/slack-desc
new file mode 100644
index 00000000..0573fcb0
--- /dev/null
+++ b/patches/source/procps-ng/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+procps-ng: procps-ng (utilities for displaying process information)
+procps-ng:
+procps-ng: The procps-ng package provides the classic set of utilities used to
+procps-ng: display information about the processes currently running on the
+procps-ng: machine.
+procps-ng:
+procps-ng: Homepage: http://sourceforge.net/projects/procps-ng/
+procps-ng:
+procps-ng:
+procps-ng:
+procps-ng:
diff --git a/patches/source/proftpd/doinst.sh b/patches/source/proftpd/doinst.sh
new file mode 100644
index 00000000..37fe02dd
--- /dev/null
+++ b/patches/source/proftpd/doinst.sh
@@ -0,0 +1,18 @@
+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/ftpusers.new
+config etc/proftpd.conf.new
+
+# Remove any old proftpd files:
+rm -f var/run/proftpd/proftpd*
+
diff --git a/patches/source/proftpd/etc/ftpusers b/patches/source/proftpd/etc/ftpusers
new file mode 100644
index 00000000..d08f2a1f
--- /dev/null
+++ b/patches/source/proftpd/etc/ftpusers
@@ -0,0 +1,22 @@
+#
+# ftpusers This file describes the names of the users that may
+# _*NOT*_ log into the system via the FTP server.
+# This usually includes "root", "uucp", "news" and the
+# like, because those users have too much power to be
+# allowed to do "just" FTP...
+#
+#
+# Version: @(#)/etc/ftpusers 3.00 02/25/2001 volkerdi
+#
+# Original Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
+#
+# The entire line gets matched, so no comments or extra characters on
+# lines containing a username.
+#
+# To enable anonymous FTP, remove the "ftp" user:
+ftp
+root
+uucp
+news
+
+# End of ftpusers.
diff --git a/patches/source/proftpd/etc/proftpd.conf b/patches/source/proftpd/etc/proftpd.conf
new file mode 100644
index 00000000..ffb0df3f
--- /dev/null
+++ b/patches/source/proftpd/etc/proftpd.conf
@@ -0,0 +1,74 @@
+# This is a basic ProFTPD configuration file.
+# It establishes a single server and a single anonymous login.
+# It assumes that you have a user/group "nobody" and "ftp"
+# for normal/anonymous operation.
+
+ServerName "ProFTPD Default Installation"
+#ServerType standalone
+ServerType inetd
+DefaultServer on
+
+# Port 21 is the standard FTP port.
+Port 21
+# Umask 022 is a good standard umask to prevent new dirs and files
+# from being group and world writable.
+Umask 022
+
+# To prevent DoS attacks, set the maximum number of child processes
+# to 30. If you need to allow more than 30 concurrent connections
+# at once, simply increase this value. Note that this ONLY works
+# in standalone mode, in inetd mode you should use an inetd server
+# that allows you to limit maximum number of processes per service
+# (such as xinetd)
+MaxInstances 30
+
+# Set the user and group that the server normally runs at.
+User nobody
+Group nogroup
+
+# This next option is required for NIS or NIS+ to work properly:
+#PersistentPasswd off
+
+SystemLog /var/log/proftpd.log
+TransferLog /var/log/xferlog
+
+# Normally, we want files to be overwriteable.
+<Directory /*>
+ AllowOverwrite on
+</Directory>
+
+# A basic anonymous FTP server configuration.
+# To enable this, remove the user ftp from /etc/ftpusers.
+<Anonymous ~ftp>
+ RequireValidShell off
+ User ftp
+ Group ftp
+ # We want clients to be able to login with "anonymous" as well as "ftp"
+ UserAlias anonymous ftp
+
+ # Limit the maximum number of anonymous logins
+ MaxClients 50
+
+ # We want 'welcome.msg' displayed at login, and '.message' displayed
+ # in each newly chdired directory.
+ DisplayLogin welcome.msg
+ DisplayChdir .message
+
+ # Limit WRITE everywhere in the anonymous chroot
+ <Limit WRITE>
+ DenyAll
+ </Limit>
+
+ # An upload directory that allows storing files but not retrieving
+ # or creating directories.
+# <Directory incoming/*>
+# <Limit READ>
+# DenyAll
+# </Limit>
+#
+# <Limit STOR>
+# AllowAll
+# </Limit>
+# </Directory>
+
+</Anonymous>
diff --git a/patches/source/proftpd/proftpd.SlackBuild b/patches/source/proftpd/proftpd.SlackBuild
new file mode 100755
index 00000000..436360c3
--- /dev/null
+++ b/patches/source/proftpd/proftpd.SlackBuild
@@ -0,0 +1,139 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 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.
+
+
+VERSION=1.3.5e
+DIRVER=1.3.5e
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+PROFTPD_MODS="mod_radius:mod_ban:mod_readme:mod_ratio:mod_tls:mod_wrap:mod_ctrls_admin:mod_quotatab:mod_quotatab_file"
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-proftpd
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf proftpd-$VERSION
+tar xvf $CWD/proftpd-$VERSION.tar.?z* || exit 1
+cd proftpd-$DIRVER || 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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --enable-autoshadow \
+ --enable-ctrls \
+ --enable-dso \
+ --enable-ipv6 \
+ --enable-nls \
+ --localstatedir=/var/run \
+ --with-modules="${PROFTPD_MODS}" \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# With no library to link against, these are useless:
+rm -rf $PKG/usr/include
+rm -f $PKG/etc/*
+rmdir $PKG/usr/libexec 2> /dev/null
+
+cat $CWD/etc/proftpd.conf > $PKG/etc/proftpd.conf.new
+cat $CWD/etc/ftpusers > $PKG/etc/ftpusers.new
+mkdir -p $PKG/home/ftp
+
+# Directory used by mod_ban:
+mkdir -p $PKG/var/db/proftpd
+chown nobody:nogroup $PKG/var/db/proftpd
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+mkdir -p $PKG/usr/doc/proftpd-$VERSION
+cp -a COPYING* CREDITS INSTALL NEWS README* \
+ contrib/README.mod_wrap contrib/README.ratio \
+ $PKG/usr/doc/proftpd-$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/proftpd-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+cp -a contrib/README $PKG/usr/doc/proftpd-$VERSION/README.contrib
+cp -a doc sample-configurations $PKG/usr/doc/proftpd-$VERSION
+# Bloat removal:
+( cd $PKG/usr/doc
+ find . -name "*.sgml" -exec rm {} \;
+ find . -name "*.pdf" -exec rm {} \;
+)
+rmdir $PKG/usr/share/locale
+rmdir $PKG/usr/share
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/proftpd-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/proftpd/slack-desc b/patches/source/proftpd/slack-desc
new file mode 100644
index 00000000..5ed80ca9
--- /dev/null
+++ b/patches/source/proftpd/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------------------------------------------------------|
+proftpd: proftpd (FTP server daemon)
+proftpd:
+proftpd: ProFTPD is the Professional File Transfer Protocol (FTP) server
+proftpd: daemon. ProFTPD grew out of the desire to have a secure and
+proftpd: configurable FTP server, and out of a significant admiration of the
+proftpd: Apache web server.
+proftpd:
+proftpd:
+proftpd:
+proftpd:
+proftpd:
diff --git a/patches/source/python/python.SlackBuild b/patches/source/python/python.SlackBuild
new file mode 100755
index 00000000..921a3dc8
--- /dev/null
+++ b/patches/source/python/python.SlackBuild
@@ -0,0 +1,167 @@
+#!/bin/bash
+
+# Copyright 2008, 2009, 2012, 2013, 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=python
+SRCNAM=Python
+VERSION=$(echo $SRCNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+BRANCH_VERSION=$(echo $VERSION | cut -f 1,2 -d . )
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+# Don't set any SLKCFLAGS here, or OPT="$SLKCFLAGS" before the ./configure.
+# Python gets the compile options right without any help.
+if [ "$ARCH" = "i586" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ LIBDIRSUFFIX=""
+fi
+
+# Location for Python site-packages:
+SITEPK=$PKG/usr/lib${LIBDIRSUFFIX}/${PKGNAM}${BRANCH_VERSION}/site-packages
+# same as above without $PKG
+TOOLSDIR=/usr/lib${LIBDIRSUFFIX}/${PKGNAM}${BRANCH_VERSION}/site-packages
+
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xf $CWD/$SRCNAM-$VERSION.tar.xz || exit 1
+cd $SRCNAM-$VERSION
+
+zcat $CWD/python.readline.set_pre_input_hook.diff.gz | patch -p1 --verbose || exit 1
+# We don't want a large libpython*.a:
+zcat $CWD/python.no-static-library.diff.gz | patch -p1 --verbose || exit 1
+
+if [ "$ARCH" = "x86_64" ]; then
+ # Install to lib64 instead of lib and
+ # Python must report /usr/lib64/python2.7/site-packages as python_lib_dir:
+ zcat $CWD/python.x86_64.diff.gz | patch -p1 --verbose || exit 1
+fi
+
+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 \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/python-$VERSION \
+ --with-threads \
+ --enable-ipv6 \
+ --enable-shared \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Install some python-demo files:
+mkdir -p $PKG/usr/doc/python-$VERSION
+cp -a Demo $PKG/usr/doc/python-$VERSION
+
+# We'll install the python-tools under site-packages:
+mkdir -p $SITEPK
+cp -a Tools/* $SITEPK
+
+mkdir -p $PKG/usr/doc/python-$VERSION
+mv $SITEPK/README $PKG/usr/doc/python-$VERSION/README.python-tools
+( cd $PKG/usr/doc/python-$VERSION
+ ln -sf $TOOLSDIR Tools
+)
+# Make a few useful symlinks:
+mkdir -p $PKG/usr/bin
+( cd $PKG/usr/bin
+ ln -sf $TOOLSDIR/pynche/pynche pynche
+ ln -sf $TOOLSDIR/i18n/msgfmt.py .
+ ln -sf $TOOLSDIR/i18n/pygettext.py .
+)
+
+# Install docs:
+mkdir -p $PKG/usr/doc/python-$VERSION/Documentation
+cp -a README LICENSE $PKG/usr/doc/python-$VERSION
+cp -a Misc $PKG/usr/doc/python-$VERSION
+tar xf $CWD/python-$VERSION-docs-text.tar.?z*
+mv python-${VERSION}-docs-text/* $PKG/usr/doc/python-$VERSION/Documentation
+chown -R root:root $PKG/usr/doc/python-$VERSION
+
+# Fix possible incorrect permissions:
+( cd $PKG
+ find . -type d -exec chmod 755 "{}" \;
+ find . -perm 640 -exec chmod 644 "{}" \;
+ find . -perm 750 -exec chmod 755 "{}" \;
+)
+
+
+( cd $PKG/usr/bin
+ rm -f python
+ ln -sf python${BRANCH_VERSION} python
+)
+
+( 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
+)
+
+( 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
+)
+
+( cd $PKG/usr/man
+ if [ -r python${BRANCH_VERSION}.1.gz ] ; then
+ ln -sf python${BRANCH_VERSION}.1.gz python.1.gz
+ fi
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/python-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/python/python.no-static-library.diff b/patches/source/python/python.no-static-library.diff
new file mode 100644
index 00000000..96209897
--- /dev/null
+++ b/patches/source/python/python.no-static-library.diff
@@ -0,0 +1,49 @@
+--- ./Makefile.pre.in.orig 2012-04-09 18:07:33.000000000 -0500
++++ ./Makefile.pre.in 2012-05-09 13:38:24.913226185 -0500
+@@ -396,7 +396,7 @@
+
+
+ # Build the interpreter
+-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY)
++$(BUILDPYTHON): Modules/python.o $(LDLIBRARY)
+ $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
+ Modules/python.o \
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+@@ -412,18 +412,6 @@
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
+ esac
+
+-# Build static library
+-# avoid long command lines, same as LIBRARY_OBJS
+-$(LIBRARY): $(LIBRARY_OBJS)
+- -rm -f $@
+- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
+- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
+- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
+- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
+- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
+- $(AR) $(ARFLAGS) $@ $(MODOBJS)
+- $(RANLIB) $@
+-
+ libpython$(VERSION).so: $(LIBRARY_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+@@ -1008,18 +996,6 @@
+ else true; \
+ fi; \
+ done
+- @if test -d $(LIBRARY); then :; else \
+- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+- if test "$(SO)" = .dll; then \
+- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+- else \
+- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- fi; \
+- else \
+- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+- fi; \
+- fi
+ $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
+ $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
+ $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
diff --git a/patches/source/python/python.readline.set_pre_input_hook.diff b/patches/source/python/python.readline.set_pre_input_hook.diff
new file mode 100644
index 00000000..8af4b4be
--- /dev/null
+++ b/patches/source/python/python.readline.set_pre_input_hook.diff
@@ -0,0 +1,12 @@
+--- ./Modules/readline.c.orig 2008-11-04 14:43:31.000000000 -0600
++++ ./Modules/readline.c 2009-06-09 14:23:16.000000000 -0500
+@@ -11,6 +11,9 @@
+ #include <errno.h>
+ #include <sys/time.h>
+
++/* This seems to be needed for set_pre_input_hook to work */
++#define HAVE_RL_PRE_INPUT_HOOK 1
++
+ #if defined(HAVE_SETLOCALE)
+ /* GNU readline() mistakenly sets the LC_CTYPE locale.
+ * This is evil. Only the user or the app's main() should do this!
diff --git a/patches/source/python/python.x86_64.diff b/patches/source/python/python.x86_64.diff
new file mode 100644
index 00000000..55cdf499
--- /dev/null
+++ b/patches/source/python/python.x86_64.diff
@@ -0,0 +1,174 @@
+--- ./Makefile.pre.in.orig 2016-12-17 14:05:06.000000000 -0600
++++ ./Makefile.pre.in 2016-12-28 13:17:09.089663880 -0600
+@@ -111,7 +111,7 @@
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/lib
++SCRIPTDIR= $(prefix)/lib64
+
+ # Detailed destination directories
+ BINLIBDEST= $(LIBDIR)/python$(VERSION)
+--- ./Lib/sysconfig.py.orig 2016-12-17 14:05:06.000000000 -0600
++++ ./Lib/sysconfig.py 2016-12-28 13:17:09.086663880 -0600
+@@ -7,20 +7,20 @@
+
+ _INSTALL_SCHEMES = {
+ 'posix_prefix': {
+- 'stdlib': '{base}/lib/python{py_version_short}',
+- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+- 'purelib': '{base}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
++ 'stdlib': '{base}/lib64/python{py_version_short}',
++ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
++ 'purelib': '{base}/lib64/python{py_version_short}/site-packages',
++ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
+ 'include': '{base}/include/python{py_version_short}',
+ 'platinclude': '{platbase}/include/python{py_version_short}',
+ 'scripts': '{base}/bin',
+ 'data': '{base}',
+ },
+ 'posix_home': {
+- 'stdlib': '{base}/lib/python',
+- 'platstdlib': '{base}/lib/python',
+- 'purelib': '{base}/lib/python',
+- 'platlib': '{base}/lib/python',
++ 'stdlib': '{base}/lib64/python',
++ 'platstdlib': '{base}/lib64/python',
++ 'purelib': '{base}/lib64/python',
++ 'platlib': '{base}/lib64/python',
+ 'include': '{base}/include/python',
+ 'platinclude': '{base}/include/python',
+ 'scripts': '{base}/bin',
+@@ -65,10 +65,10 @@
+ 'data' : '{userbase}',
+ },
+ 'posix_user': {
+- 'stdlib': '{userbase}/lib/python{py_version_short}',
+- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
+- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
++ 'stdlib': '{userbase}/lib64/python{py_version_short}',
++ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
++ 'purelib': '{userbase}/lib64/python{py_version_short}/site-packages',
++ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
+ 'include': '{userbase}/include/python{py_version_short}',
+ 'scripts': '{userbase}/bin',
+ 'data' : '{userbase}',
+--- ./Lib/site.py.orig 2016-12-17 14:05:06.000000000 -0600
++++ ./Lib/site.py 2016-12-28 13:19:06.612662631 -0600
+@@ -288,13 +288,13 @@
+ if sys.platform in ('os2emx', 'riscos'):
+ sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
+ elif os.sep == '/':
+- sitepackages.append(os.path.join(prefix, "lib",
++ sitepackages.append(os.path.join(prefix, "lib64",
+ "python" + sys.version[:3],
+ "site-packages"))
+- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
++ sitepackages.append(os.path.join(prefix, "lib64", "site-python"))
+ else:
+ sitepackages.append(prefix)
+- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
++ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
+ return sitepackages
+
+ def addsitepackages(known_paths):
+--- ./Lib/distutils/command/install.py.orig 2016-12-17 14:05:05.000000000 -0600
++++ ./Lib/distutils/command/install.py 2016-12-28 13:17:09.079663880 -0600
+@@ -41,15 +41,15 @@
+
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'purelib': '$base/lib64/python$py_version_short/site-packages',
++ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+ 'unix_home': {
+- 'purelib': '$base/lib/python',
+- 'platlib': '$base/lib/python',
++ 'purelib': '$base/lib64/python',
++ 'platlib': '$base/lib64/python',
+ 'headers': '$base/include/python/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+--- ./Lib/distutils/sysconfig.py.orig 2016-12-17 14:05:05.000000000 -0600
++++ ./Lib/distutils/sysconfig.py 2016-12-28 13:17:09.081663880 -0600
+@@ -120,7 +120,7 @@
+
+ if os.name == "posix":
+ libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ "lib64", "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+--- ./Modules/getpath.c.orig 2016-12-17 14:05:07.000000000 -0600
++++ ./Modules/getpath.c 2016-12-28 13:17:09.093663880 -0600
+@@ -108,7 +108,7 @@
+ static char exec_prefix[MAXPATHLEN+1];
+ static char progpath[MAXPATHLEN+1];
+ static char *module_search_path = NULL;
+-static char lib_python[] = "lib/python" VERSION;
++static char lib_python[] = "lib64/python" VERSION;
+
+ static void
+ reduce(char *dir)
+@@ -520,7 +520,7 @@
+ }
+ else
+ strncpy(zip_path, PREFIX, MAXPATHLEN);
+- joinpath(zip_path, "lib/python00.zip");
++ joinpath(zip_path, "lib64/python00.zip");
+ bufsz = strlen(zip_path); /* Replace "00" with version */
+ zip_path[bufsz - 6] = VERSION[0];
+ zip_path[bufsz - 5] = VERSION[2];
+@@ -530,7 +530,7 @@
+ fprintf(stderr,
+ "Could not find platform dependent libraries <exec_prefix>\n");
+ strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
+- joinpath(exec_prefix, "lib/lib-dynload");
++ joinpath(exec_prefix, "lib64/lib-dynload");
+ }
+ /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
+
+--- ./setup.py.orig 2016-12-17 14:05:07.000000000 -0600
++++ ./setup.py 2016-12-28 13:17:09.097663880 -0600
+@@ -456,7 +456,7 @@
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+ if not cross_compiling:
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ if cross_compiling:
+ self.add_gcc_paths()
+@@ -782,11 +782,11 @@
+ elif curses_library:
+ readline_libs.append(curses_library)
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ ['/usr/lib64/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=['/usr/lib64/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
+@@ -821,8 +821,8 @@
+ if krb5_h:
+ ssl_incs += krb5_h
+ ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+- ['/usr/local/ssl/lib',
+- '/usr/contrib/ssl/lib/'
++ ['/usr/local/ssl/lib64',
++ '/usr/contrib/ssl/lib64/'
+ ] )
+
+ if (ssl_incs is not None and
diff --git a/patches/source/python/slack-desc b/patches/source/python/slack-desc
new file mode 100644
index 00000000..569c3c5b
--- /dev/null
+++ b/patches/source/python/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------------------------------------------------------|
+python: python (object-oriented interpreted programming language)
+python:
+python: Python is an interpreted, interactive, object-oriented programming
+python: language that combines remarkable power with very clear syntax.
+python: Python's basic power can be extended with your own modules written in
+python: C or C++. Python is also adaptable as an extension language for
+python: existing applications.
+python:
+python:
+python:
+python:
diff --git a/patches/source/rpcbind/0001-man-rpcibind.8-Clarify-state-file-usage-and-history.patch b/patches/source/rpcbind/0001-man-rpcibind.8-Clarify-state-file-usage-and-history.patch
new file mode 100644
index 00000000..9ea5870d
--- /dev/null
+++ b/patches/source/rpcbind/0001-man-rpcibind.8-Clarify-state-file-usage-and-history.patch
@@ -0,0 +1,39 @@
+From a89ba6d07832cb62a86601971380fda7130c6826 Mon Sep 17 00:00:00 2001
+From: "Patrick J. Volkerding" <volkerdi@slackware.com>
+Date: Mon, 17 Jul 2017 23:09:36 -0500
+Subject: [PATCH 1/2] man/rpcibind.8: Clarify state file usage and history
+
+---
+ man/rpcbind.8 | 13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/man/rpcbind.8 b/man/rpcbind.8
+index af6200f..bdfb1c8 100644
+--- a/man/rpcbind.8
++++ b/man/rpcbind.8
+@@ -132,11 +132,20 @@ to connect to services from a privileged port.
+ .It Fl w
+ Cause
+ .Nm
+-to do a "warm start" by read a state file when
++to do a "warm start" by attempting to read *.xdr state files from the
++state directory
++.%T /var/run/rpcbind
++when
+ .Nm
+-starts up. The state file is created when
++starts up. The state files are created when
+ .Nm
+ terminates.
++.Pp
++This allows for restarting
++.Nm
++without the need to restart all RPC services that have previously registered.
++The state files serve a similar purpose to the files created/restored by the
++pmap_dump and pmap_set utilities distributed with the old portmap server package.
+ .El
+ .Sh NOTES
+ All RPC servers must be restarted if
+--
+2.13.2
+
diff --git a/patches/source/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch b/patches/source/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch
new file mode 100644
index 00000000..060614cc
--- /dev/null
+++ b/patches/source/rpcbind/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch
@@ -0,0 +1,218 @@
+From 7ea36eeece56b59f98e469934e4c20b4da043346 Mon Sep 17 00:00:00 2001
+From: Doran Moppert <dmoppert@redhat.com>
+Date: Thu, 11 May 2017 11:42:54 -0400
+Subject: [PATCH 2/6] rpcbind: pair all svc_getargs() calls with svc_freeargs()
+ to avoid memory leak
+
+This patch is to address CVE-2017-8779 "rpcbomb" in rpcbind, discussed
+at [1], [2], [3]. The last link suggests this issue is actually a bug
+in rpcbind, which led me here.
+
+The leak caused by the reproducer at [4] appears to come from
+rpcb_service_4(), in the case where svc_getargs() returns false and the
+function had an early return, rather than passing through the cleanup
+path at done:, as would otherwise occur.
+
+It also addresses a couple of other locations where the same fault seems
+to exist, though I haven't been able to exercise those. I hope someone
+more intimate with rpc(3) can confirm my understanding is correct, and
+that I haven't introduced any new bugs.
+
+Without this patch, using the reproducer (and variants) repeatedly
+against rpcbind with a numBytes argument of 1_000_000_000, /proc/$(pidof
+rpcbind)/status reports VmSize increase of 976564 kB each call, and
+VmRSS increase of around 260 kB every 33 calls - the specific numbers
+are probably an artifact of my rhel/glibc version. With the patch,
+there is a small (~50 kB) VmSize increase with the first message, but
+thereafter both VmSize and VmRSS remain steady.
+
+[1]: http://seclists.org/oss-sec/2017/q2/209
+[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1448124
+[3]: https://sourceware.org/ml/libc-alpha/2017-05/msg00129.html
+[4]: https://github.com/guidovranken/rpcbomb/
+
+Signed-off-by: Doran Moppert <dmoppert@redhat.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/pmap_svc.c | 56 +++++++++++++++++++++++++++++++++++++++++++++---------
+ src/rpcb_svc.c | 2 +-
+ src/rpcb_svc_4.c | 2 +-
+ src/rpcb_svc_com.c | 8 ++++++++
+ 4 files changed, 57 insertions(+), 11 deletions(-)
+
+diff --git a/src/pmap_svc.c b/src/pmap_svc.c
+index 4c744fe..e926cdc 100644
+--- a/src/pmap_svc.c
++++ b/src/pmap_svc.c
+@@ -175,6 +175,7 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+ long ans;
+ uid_t uid;
+ char uidbuf[32];
++ int rc = TRUE;
+
+ /*
+ * Can't use getpwnam here. We might end up calling ourselves
+@@ -194,7 +195,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+ svcerr_decode(xprt);
+- return (FALSE);
++ rc = FALSE;
++ goto done;
+ }
+ #ifdef RPCBIND_DEBUG
+ if (debugging)
+@@ -205,7 +207,8 @@ pmapproc_change(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt, unsigned long
+
+ if (!check_access(xprt, op, reg.pm_prog, PMAPVERS)) {
+ svcerr_weakauth(xprt);
+- return (FALSE);
++ rc = (FALSE);
++ goto done;
+ }
+
+ rpcbreg.r_prog = reg.pm_prog;
+@@ -258,7 +261,16 @@ done_change:
+ rpcbs_set(RPCBVERS_2_STAT, ans);
+ else
+ rpcbs_unset(RPCBVERS_2_STAT, ans);
+- return (TRUE);
++done:
++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++ if (debugging) {
++ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
++ if (doabort) {
++ rpcbind_abort();
++ }
++ }
++ }
++ return (rc);
+ }
+
+ /* ARGSUSED */
+@@ -272,15 +284,18 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ #ifdef RPCBIND_DEBUG
+ char *uaddr;
+ #endif
++ int rc = TRUE;
+
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
+ svcerr_decode(xprt);
+- return (FALSE);
++ rc = FALSE;
++ goto done;
+ }
+
+ if (!check_access(xprt, PMAPPROC_GETPORT, reg.pm_prog, PMAPVERS)) {
+ svcerr_weakauth(xprt);
+- return FALSE;
++ rc = FALSE;
++ goto done;
+ }
+
+ #ifdef RPCBIND_DEBUG
+@@ -330,21 +345,34 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ pmap_ipprot2netid(reg.pm_prot) ?: "<unknown>",
+ port ? udptrans : "");
+
+- return (TRUE);
++done:
++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++ if (debugging) {
++ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
++ if (doabort) {
++ rpcbind_abort();
++ }
++ }
++ }
++ return (rc);
+ }
+
+ /* ARGSUSED */
+ static bool_t
+ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ {
++ int rc = TRUE;
++
+ if (!svc_getargs(xprt, (xdrproc_t)xdr_void, NULL)) {
+ svcerr_decode(xprt);
+- return (FALSE);
++ rc = FALSE;
++ goto done;
+ }
+
+ if (!check_access(xprt, PMAPPROC_DUMP, 0, PMAPVERS)) {
+ svcerr_weakauth(xprt);
+- return FALSE;
++ rc = FALSE;
++ goto done;
+ }
+
+ if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist_ptr,
+@@ -354,7 +382,17 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ rpcbind_abort();
+ }
+ }
+- return (TRUE);
++
++done:
++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) {
++ if (debugging) {
++ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
++ if (doabort) {
++ rpcbind_abort();
++ }
++ }
++ }
++ return (rc);
+ }
+
+ int pmap_netid2ipprot(const char *netid)
+diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c
+index 709e3fb..091f530 100644
+--- a/src/rpcb_svc.c
++++ b/src/rpcb_svc.c
+@@ -166,7 +166,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
+ svcerr_decode(transp);
+ if (debugging)
+ (void) xlog(LOG_DEBUG, "rpcbind: could not decode");
+- return;
++ goto done;
+ }
+
+ if (rqstp->rq_proc == RPCBPROC_SET
+diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c
+index 5094879..eebbbbe 100644
+--- a/src/rpcb_svc_4.c
++++ b/src/rpcb_svc_4.c
+@@ -218,7 +218,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
+ svcerr_decode(transp);
+ if (debugging)
+ (void) xlog(LOG_DEBUG, "rpcbind: could not decode\n");
+- return;
++ goto done;
+ }
+
+ if (rqstp->rq_proc == RPCBPROC_SET
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 5862c26..cb63afd 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -927,6 +927,14 @@ error:
+ if (call_msg.rm_xid != 0)
+ (void) free_slot_by_xid(call_msg.rm_xid);
+ out:
++ if (!svc_freeargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
++ if (debugging) {
++ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
++ if (doabort) {
++ rpcbind_abort();
++ }
++ }
++ }
+ if (local_uaddr)
+ free(local_uaddr);
+ if (buf_alloc)
+--
+2.13.0
+
diff --git a/patches/source/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch b/patches/source/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch
new file mode 100644
index 00000000..6cf885ac
--- /dev/null
+++ b/patches/source/rpcbind/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch
@@ -0,0 +1,29 @@
+From c49a7ea639eb700823e174fd605bbbe183e229aa Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Wed, 17 May 2017 10:52:25 -0400
+Subject: [PATCH 3/6] pmapproc_dump: Fixed typo in memory leak patch
+
+commit 7ea36eee introduce a typo that caused
+NIS (aka ypbind) to fail.
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/pmap_svc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pmap_svc.c b/src/pmap_svc.c
+index e926cdc..26c31d0 100644
+--- a/src/pmap_svc.c
++++ b/src/pmap_svc.c
+@@ -384,7 +384,7 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+ }
+
+ done:
+- if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)NULL)) {
++ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) {
+ if (debugging) {
+ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
+ if (doabort) {
+--
+2.13.0
+
diff --git a/patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch b/patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch
new file mode 100644
index 00000000..f7c30794
--- /dev/null
+++ b/patches/source/rpcbind/0004-rpcbind-fix-building-without-enable-debug.patch
@@ -0,0 +1,69 @@
+From c0e38c9fd1b2c6785af90c86b26a07724c2488e8 Mon Sep 17 00:00:00 2001
+From: Nick Alcock <nick.alcock@oracle.com>
+Date: Thu, 25 May 2017 12:45:35 -0400
+Subject: [PATCH 4/6] rpcbind: fix building without --enable-debug
+
+All if (debugging) stanzas and their accompanying xlog()s and aborts
+should be within #ifdef RPCBIND_DEBUG.
+
+Fixes a compilation failure due to non-inclusion of <syslog.h> in the
+non-debugging case.
+
+Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/pmap_svc.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/pmap_svc.c b/src/pmap_svc.c
+index 26c31d0..a53dd5f 100644
+--- a/src/pmap_svc.c
++++ b/src/pmap_svc.c
+@@ -263,12 +263,14 @@ done_change:
+ rpcbs_unset(RPCBVERS_2_STAT, ans);
+ done:
+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++#ifdef RPCBIND_DEBUG
+ if (debugging) {
+ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
+ if (doabort) {
+ rpcbind_abort();
+ }
+ }
++#endif
+ }
+ return (rc);
+ }
+@@ -347,12 +349,14 @@ pmapproc_getport(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+
+ done:
+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_pmap, (char *)&reg)) {
++#ifdef RPCBIND_DEBUG
+ if (debugging) {
+ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
+ if (doabort) {
+ rpcbind_abort();
+ }
+ }
++#endif
+ }
+ return (rc);
+ }
+@@ -385,12 +389,14 @@ pmapproc_dump(struct svc_req *rqstp /*__unused*/, SVCXPRT *xprt)
+
+ done:
+ if (!svc_freeargs(xprt, (xdrproc_t) xdr_void, (char *)NULL)) {
++#ifdef RPCBIND_DEBUG
+ if (debugging) {
+ (void) xlog(LOG_DEBUG, "unable to free arguments\n");
+ if (doabort) {
+ rpcbind_abort();
+ }
+ }
++#endif
+ }
+ return (rc);
+ }
+--
+2.13.0
+
diff --git a/patches/source/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch b/patches/source/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch
new file mode 100644
index 00000000..ff42c9e4
--- /dev/null
+++ b/patches/source/rpcbind/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch
@@ -0,0 +1,96 @@
+From 7c7590ad536c0e24bef790cb1e65702fc54db566 Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Tue, 30 May 2017 11:27:22 -0400
+Subject: [PATCH 5/6] rpcbproc_callit_com: Stop freeing a static pointer
+
+commit 7ea36ee introduced a svc_freeargs() call
+that ended up freeing static pointer.
+
+It turns out the allocations for the rmt_args
+is not necessary . The xdr routines (xdr_bytes) will
+handle the memory management and the largest
+possible message size is UDPMSGSIZE (due to UDP only)
+which is smaller than RPC_BUF_MAX
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/rpcb_svc_com.c | 39 ++++++---------------------------------
+ 1 file changed, 6 insertions(+), 33 deletions(-)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index cb63afd..1fc2229 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -612,9 +612,9 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ struct netconfig *nconf;
+ struct netbuf *caller;
+ struct r_rmtcall_args a;
+- char *buf_alloc = NULL, *outbufp;
++ char *outbufp;
+ char *outbuf_alloc = NULL;
+- char buf[RPC_BUF_MAX], outbuf[RPC_BUF_MAX];
++ char outbuf[RPC_BUF_MAX];
+ struct netbuf *na = (struct netbuf *) NULL;
+ struct rpc_msg call_msg;
+ int outlen;
+@@ -635,36 +635,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ }
+ if (si.si_socktype != SOCK_DGRAM)
+ return; /* Only datagram type accepted */
+- sendsz = __rpc_get_t_size(si.si_af, si.si_proto, UDPMSGSIZE);
+- if (sendsz == 0) { /* data transfer not supported */
+- if (reply_type == RPCBPROC_INDIRECT)
+- svcerr_systemerr(transp);
+- return;
+- }
+- /*
+- * Should be multiple of 4 for XDR.
+- */
+- sendsz = ((sendsz + 3) / 4) * 4;
+- if (sendsz > RPC_BUF_MAX) {
+-#ifdef notyet
+- buf_alloc = alloca(sendsz); /* not in IDR2? */
+-#else
+- buf_alloc = malloc(sendsz);
+-#endif /* notyet */
+- if (buf_alloc == NULL) {
+- if (debugging)
+- xlog(LOG_DEBUG,
+- "rpcbproc_callit_com: No Memory!\n");
+- if (reply_type == RPCBPROC_INDIRECT)
+- svcerr_systemerr(transp);
+- return;
+- }
+- a.rmt_args.args = buf_alloc;
+- } else {
+- a.rmt_args.args = buf;
+- }
++ sendsz = UDPMSGSIZE;
+
+ call_msg.rm_xid = 0; /* For error checking purposes */
++ memset(&a, 0, sizeof(a)); /* Zero out the input buffer */
+ if (!svc_getargs(transp, (xdrproc_t) xdr_rmtcall_args, (char *) &a)) {
+ if (reply_type == RPCBPROC_INDIRECT)
+ svcerr_decode(transp);
+@@ -704,7 +678,8 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ if (rbl == (rpcblist_ptr)NULL) {
+ #ifdef RPCBIND_DEBUG
+ if (debugging)
+- xlog(LOG_DEBUG, "not found\n");
++ xlog(LOG_DEBUG, "prog %lu vers %lu: not found\n",
++ a.rmt_prog, a.rmt_vers);
+ #endif
+ if (reply_type == RPCBPROC_INDIRECT)
+ svcerr_noprog(transp);
+@@ -937,8 +912,6 @@ out:
+ }
+ if (local_uaddr)
+ free(local_uaddr);
+- if (buf_alloc)
+- free(buf_alloc);
+ if (outbuf_alloc)
+ free(outbuf_alloc);
+ if (na) {
+--
+2.13.2
+
diff --git a/patches/source/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch b/patches/source/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch
new file mode 100644
index 00000000..1a0aa6cf
--- /dev/null
+++ b/patches/source/rpcbind/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch
@@ -0,0 +1,96 @@
+From 1e2ddd4ebd7a9266e6070f275fa35752752fdfd6 Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Tue, 30 May 2017 11:29:58 -0400
+Subject: [PATCH 6/6] rpcbproc_callit_com: No need to allocate output buffer
+
+Now that sendz is a fixed size (UDPMSGSIZE) which
+is small then RPC_BUF_MAX, no need to check the
+sendz size.
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/rpcb_svc_com.c | 33 +++++----------------------------
+ 1 file changed, 5 insertions(+), 28 deletions(-)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 1fc2229..d36b090 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -612,8 +612,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ struct netconfig *nconf;
+ struct netbuf *caller;
+ struct r_rmtcall_args a;
+- char *outbufp;
+- char *outbuf_alloc = NULL;
+ char outbuf[RPC_BUF_MAX];
+ struct netbuf *na = (struct netbuf *) NULL;
+ struct rpc_msg call_msg;
+@@ -674,7 +672,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+
+ rpcbs_rmtcall(versnum - 2, reply_type, a.rmt_prog, a.rmt_vers,
+ a.rmt_proc, transp->xp_netid, rbl);
+-
+ if (rbl == (rpcblist_ptr)NULL) {
+ #ifdef RPCBIND_DEBUG
+ if (debugging)
+@@ -793,24 +790,10 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ call_msg.rm_call.cb_rpcvers = RPC_MSG_VERSION;
+ call_msg.rm_call.cb_prog = a.rmt_prog;
+ call_msg.rm_call.cb_vers = a.rmt_vers;
+- if (sendsz > RPC_BUF_MAX) {
+-#ifdef notyet
+- outbuf_alloc = alloca(sendsz); /* not in IDR2? */
+-#else
+- outbuf_alloc = malloc(sendsz);
+-#endif /* notyet */
+- if (outbuf_alloc == NULL) {
+- if (reply_type == RPCBPROC_INDIRECT)
+- svcerr_systemerr(transp);
+- if (debugging)
+- xlog(LOG_DEBUG,
+- "rpcbproc_callit_com: No memory!\n");
+- goto error;
+- }
+- xdrmem_create(&outxdr, outbuf_alloc, sendsz, XDR_ENCODE);
+- } else {
+- xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE);
+- }
++
++ memset(outbuf, '\0', sendsz); /* Zero out the output buffer */
++ xdrmem_create(&outxdr, outbuf, sendsz, XDR_ENCODE);
++
+ if (!xdr_callhdr(&outxdr, &call_msg)) {
+ if (reply_type == RPCBPROC_INDIRECT)
+ svcerr_systemerr(transp);
+@@ -875,10 +858,6 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ goto error;
+ }
+ outlen = (int) XDR_GETPOS(&outxdr);
+- if (outbuf_alloc)
+- outbufp = outbuf_alloc;
+- else
+- outbufp = outbuf;
+
+ na = uaddr2taddr(nconf, local_uaddr);
+ if (!na) {
+@@ -887,7 +866,7 @@ rpcbproc_callit_com(struct svc_req *rqstp, SVCXPRT *transp,
+ goto error;
+ }
+
+- if (sendto(fd, outbufp, outlen, 0, (struct sockaddr *)na->buf, na->len)
++ if (sendto(fd, outbuf, outlen, 0, (struct sockaddr *)na->buf, na->len)
+ != outlen) {
+ if (debugging)
+ xlog(LOG_DEBUG,
+@@ -912,8 +891,6 @@ out:
+ }
+ if (local_uaddr)
+ free(local_uaddr);
+- if (outbuf_alloc)
+- free(outbuf_alloc);
+ if (na) {
+ free(na->buf);
+ free(na);
+--
+2.13.2
+
diff --git a/patches/source/rpcbind/01.rpcbind-manpage-statefile-explanation.patch b/patches/source/rpcbind/01.rpcbind-manpage-statefile-explanation.patch
new file mode 100644
index 00000000..946dd1bd
--- /dev/null
+++ b/patches/source/rpcbind/01.rpcbind-manpage-statefile-explanation.patch
@@ -0,0 +1,25 @@
+--- rpcbind-0.2.3/man/rpcbind.8 2015-04-27 16:07:43.000000000 +0200
++++ rpcbind-0.2.3/man/rpcbind.8 2015-09-22 16:25:40.000000000 +0200
+@@ -132,11 +132,20 @@
+ .It Fl w
+ Cause
+ .Nm
+-to do a "warm start" by read a state file when
++to do a "warm start" by attempting to read *.xdr state files from the
++state directory
++.%T /var/state/rpcbind
++when
+ .Nm
+-starts up. The state file is created when
++starts up. The state files are created when
+ .Nm
+ terminates.
++.Pp
++This allows for restarting
++.Nm
++without the need to restart all RPC services that have previously registered.
++The state file serves similar purpose like the file created/restored by
++pmap_dump and pmap_set utilities, distributed with old portmap server package.
+ .El
+ .Sh NOTES
+ All RPC servers must be restarted if
diff --git a/patches/source/rpcbind/doinst.sh b/patches/source/rpcbind/doinst.sh
new file mode 100644
index 00000000..5f7dfaf5
--- /dev/null
+++ b/patches/source/rpcbind/doinst.sh
@@ -0,0 +1,24 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+preserve_perms etc/rc.d/rc.rpc.new
diff --git a/patches/source/rpcbind/rc.rpc b/patches/source/rpcbind/rc.rpc
new file mode 100644
index 00000000..c850c556
--- /dev/null
+++ b/patches/source/rpcbind/rc.rpc
@@ -0,0 +1,64 @@
+#!/bin/sh
+# rc.rpc: start/stop/restart RPC daemons needed to use NFS.
+#
+# You must run these daemons in order to mount NFS partitions
+# (unless you use the mount option '-o nolock', which can
+# corrupt files and is not generally recommended unless you
+# are mounting the partition(s) as read-only).
+#
+# To run an NFS server, starting these is mandatory.
+#
+
+rpc_start() {
+ if [ -x /sbin/rpcbind -a -x /sbin/rpc.statd ]; then
+ if ! ps axc | grep -q rpcbind ; then
+ echo "Starting RPC portmapper: /sbin/rpcbind -l $1"
+ /sbin/rpcbind -l $1
+ fi
+ if ! ps axc | grep -q rpc.statd ; then
+ echo "Starting RPC NSM (Network Status Monitor): /sbin/rpc.statd"
+ /sbin/rpc.statd
+ fi
+ else
+ echo "WARNING: Cannot start RPC daemons needed for NFS. One or more of"
+ echo " these required daemons is not executable or is not present"
+ echo " on your system:"
+ echo
+ echo " /sbin/rpcbind or /sbin/rpc.statd"
+ echo
+ fi
+}
+
+rpc_stop() {
+ killall rpc.statd 2> /dev/null
+ sleep 1
+ killall rpcbind 2> /dev/null
+ sleep 1
+ killall -9 rpc.statd 2> /dev/null # make sure :)
+ sleep 1
+ killall -9 rpcbind 2> /dev/null # make sure :)
+ sleep 1
+}
+
+rpc_restart() {
+ rpc_stop
+ rpc_start
+}
+
+case "$1" in
+'start')
+ # Warm restart by default (see "man rpcbind" for details about the -w option)
+ rpc_start -w
+ ;;
+'cold_start') # Start without -w option
+ rpc_start
+ ;;
+'stop')
+ rpc_stop
+ ;;
+'restart')
+ rpc_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac
diff --git a/patches/source/rpcbind/rpcbind.SlackBuild b/patches/source/rpcbind/rpcbind.SlackBuild
new file mode 100755
index 00000000..894c7dbd
--- /dev/null
+++ b/patches/source/rpcbind/rpcbind.SlackBuild
@@ -0,0 +1,155 @@
+#!/bin/sh
+
+# Copyright 2015, 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.
+
+
+PKGNAM=rpcbind
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+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 || exit 1
+
+# CVE-2017-8779
+zcat $CWD/0002-rpcbind-pair-all-svc_getargs-calls-with-svc_freeargs.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0003-pmapproc_dump-Fixed-typo-in-memory-leak-patch.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0004-rpcbind-fix-building-without-enable-debug.patch.gz | patch -p1 --verbose || exit 1
+
+# Fixes from git master
+zcat $CWD/0005-rpcbproc_callit_com-Stop-freeing-a-static-pointer.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0006-rpcbproc_callit_com-No-need-to-allocate-output-buffe.patch.gz | patch -p1 --verbose || exit 1
+
+zcat $CWD/0001-man-rpcibind.8-Clarify-state-file-usage-and-history.patch | patch -p1 --verbose || exit 1
+zcat $CWD/rpcbind.lwrap.needs.lnsl.diff.gz | patch -p1 --verbose || exit 1
+
+# This is needed after the libwrap patch above:
+autoreconf -vif || exit 1
+./autogen.sh
+
+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 \
+ --bindir=/sbin \
+ --libdir=/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --enable-libwrap \
+ --enable-warmstarts \
+ --with-statedir=/var/run/rpcbind \
+ --with-rpcuser=rpc \
+ --with-nss-modules="files" \
+ --without-systemdsystemunitdir \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Make state directory (not really needed as rpcbind does this on startup)
+mkdir -p $PKG/var/run/rpcbind
+chown rpc:root $PKG/var/run/rpcbind
+
+# Install init script:
+mkdir -p $PKG/etc/rc.d
+zcat $CWD/rc.rpc.gz > $PKG/etc/rc.d/rc.rpc.new
+
+# Strip binaries:
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+)
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS COPYING* NEWS README* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+mkdir -p $PKG/install
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/rpcbind/rpcbind.lwrap.needs.lnsl.diff b/patches/source/rpcbind/rpcbind.lwrap.needs.lnsl.diff
new file mode 100644
index 00000000..43f2bdf8
--- /dev/null
+++ b/patches/source/rpcbind/rpcbind.lwrap.needs.lnsl.diff
@@ -0,0 +1,14 @@
+--- ./configure.ac.orig 2015-04-27 09:07:43.000000000 -0500
++++ ./configure.ac 2015-12-14 13:34:54.592931654 -0600
+@@ -52,6 +52,11 @@
+ fi
+ AM_CONDITIONAL(SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
+
++AC_SEARCH_LIBS(yp_get_default_domain, nsl)
++AC_MSG_CHECKING([for hosts_access in -lwrap])
++saved_LIBS="$LIBS"
++LIBS="$saved_LIBS -lwrap"
++
+ AS_IF([test x$enable_libwrap = xyes], [
+ AC_CHECK_LIB([wrap], [hosts_access], ,
+ AC_MSG_ERROR([libwrap support requested but unable to find libwrap]))
diff --git a/patches/source/rpcbind/slack-desc b/patches/source/rpcbind/slack-desc
new file mode 100644
index 00000000..70adeb78
--- /dev/null
+++ b/patches/source/rpcbind/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------------------------------------------------------|
+rpcbind: rpcbind (a daemon to manage RPC connections)
+rpcbind:
+rpcbind: This is a network daemon used to manage connections to RPC services.
+rpcbind: It is meant as a replacement for the 'rpc.portmap' server from the
+rpcbind: 'portmap' package. Daemons that offer RPC services (such as the
+rpcbind: daemons for NFS) tell the rpcbind on what port they listen.
+rpcbind: RPC network port numbers may change each time the system is booted.
+rpcbind:
+rpcbind: This package is required to use NFS or other RPC services.
+rpcbind:
+rpcbind: Homepage: http://sourceforge.net/projects/rpcbind/
diff --git a/patches/source/rsync/rsync.SlackBuild b/patches/source/rsync/rsync.SlackBuild
new file mode 100755
index 00000000..bb774f9e
--- /dev/null
+++ b/patches/source/rsync/rsync.SlackBuild
@@ -0,0 +1,110 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2018 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=rsync
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-rsync
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf rsync-$VERSION
+tar xvf $CWD/rsync-$VERSION.tar.?z || exit 1
+cd rsync-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit
+
+mv $PKG/usr/share/man $PKG/usr
+rmdir $PKG/usr/share
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+mkdir -p $PKG/usr/doc/rsync-$VERSION/popt
+cp -a \
+ COPYING* INSTALL NEWS README* TODO tech_report.tex \
+ support \
+ $PKG/usr/doc/rsync-$VERSION
+( cd popt
+ cp -a CHANGES COPYING README README.rsync $PKG/usr/doc/rsync-$VERSION/popt
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/rsync-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/rsync/slack-desc b/patches/source/rsync/slack-desc
new file mode 100644
index 00000000..7e3b7089
--- /dev/null
+++ b/patches/source/rsync/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------------------------------------------------------|
+rsync: rsync (remote file sync)
+rsync:
+rsync: rsync is a replacement for rcp that has many more features. It
+rsync: uses the "rsync algorithm" which provides a very fast method for
+rsync: bringing remote files into sync. It does this by sending just the
+rsync: differences in the files across the link, without requiring that both
+rsync: sets of files are present at one of the ends of the link beforehand.
+rsync: rsync was written by Andrew Tridgell and Paul Mackerras.
+rsync:
+rsync: Homepage: http://rsync.samba.org
+rsync:
diff --git a/patches/source/ruby/ruby.SlackBuild b/patches/source/ruby/ruby.SlackBuild
new file mode 100755
index 00000000..f3584a5c
--- /dev/null
+++ b/patches/source/ruby/ruby.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# 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=ruby
+
+if echo $PKGNAM-*.tar.?z* | grep -q p ; then
+ # With patchlevel in tarball name:
+ VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
+else
+ # Without patchlevel in tarball name:
+ VERSION=$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+fi
+
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-ruby
+
+if [ "$ARCH" = "i586" ]; then
+ # -O3 works around a compile failure due to a miniruby segfault
+ # when trying to build ruby with gcc-4.4 or newer. Evidently
+ # -O0 also works, but...
+ # other distributions also use -fno-strict-aliasing which helps stability
+ SLKCFLAGS="-march=i586 -mtune=i686 -O3 -fno-strict-aliasing"
+ OPTFLAGS=-O3
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ # Unknown if s390 is needs -O3. Check to see if it compiles with -O2.
+ SLKCFLAGS="-O3 -fno-strict-aliasing"
+ OPTFLAGS=-O3
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O3 -fPIC -fno-strict-aliasing"
+ OPTFLAGS=-O3
+ LIBDIRSUFFIX="64"
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ruby-$VERSION
+tar xvf $CWD/ruby-$VERSION.tar.?z* || exit 1
+cd ruby-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Evidently certain things must be linked static.
+# Seems suboptimal to me...
+
+CFLAGS="$SLKCFLAGS" \
+optflags=$OPTFLAGS \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --datadir=/usr/share \
+ --docdir=/usr/doc/ruby-$VERSION \
+ --enable-shared \
+ --enable-pthread \
+ --disable-install-capi \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/ruby-$VERSION
+cp -a \
+ BSDL COPYING* *GPL* ChangeLog LEGAL NEWS README* ToDo \
+ $PKG/usr/doc/ruby-$VERSION
+
+# The entire ChangeLog is excessive for most users:
+cat $PKG/usr/doc/ruby-$VERSION/ChangeLog | head -n 1000 > $PKG/usr/doc/ruby-$VERSION/CL
+mv $PKG/usr/doc/ruby-$VERSION/CL $PKG/usr/doc/ruby-$VERSION/ChangeLog
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+find $PKG | xargs file | grep -e "current ar archive" \
+ | cut -f 1 -d : | xargs strip --strip-debug 2> /dev/null
+
+# 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
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/ruby-$(echo $VERSION | tr - _)-$ARCH-$BUILD.txz
+
diff --git a/patches/source/ruby/slack-desc b/patches/source/ruby/slack-desc
new file mode 100644
index 00000000..13ffd7a3
--- /dev/null
+++ b/patches/source/ruby/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------------------------------------------------------|
+ruby: ruby (Interpreted object-oriented scripting language)
+ruby:
+ruby: Ruby is an interpreted scripting language for quick and easy
+ruby: object-oriented programming. It has many features to process text
+ruby: files and to do system management tasks (as in Perl). It is simple,
+ruby: straight-forward, and extensible.
+ruby:
+ruby: Visit the Ruby project online at http://www.ruby-lang.org/
+ruby:
+ruby:
+ruby:
diff --git a/patches/source/rxvt/rxvt-integer-overflow-fix.patch b/patches/source/rxvt/rxvt-integer-overflow-fix.patch
new file mode 100644
index 00000000..edb13856
--- /dev/null
+++ b/patches/source/rxvt/rxvt-integer-overflow-fix.patch
@@ -0,0 +1,11 @@
+--- rxvt-2.7.10/src/command.c 2003-03-26 07:01:23.000000000 +0100
++++ rxvt-2.7.10-patched/src/command.c 2017-04-27 12:06:05.682072274 +0200
+@@ -2096,7 +2096,7 @@
+ i = ch - CSI_ICH;
+ ndef = get_byte_array_bit(csi_defaults, i);
+ for (p = 0; p < nargs; p++)
+- if (arg[p] == -1)
++ if (arg[p] < 0 || arg[p] > 30000)
+ arg[p] = ndef;
+
+ #ifdef DEBUG_CMD
diff --git a/patches/source/rxvt/rxvt.SlackBuild b/patches/source/rxvt/rxvt.SlackBuild
new file mode 100755
index 00000000..3ce2a5f3
--- /dev/null
+++ b/patches/source/rxvt/rxvt.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2012, 2017 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=rxvt
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-5_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-rxvt
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf rxvt-$VERSION
+tar xvf $CWD/rxvt-$VERSION.tar.xz || exit 1
+cd rxvt-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/rxvt.utempter.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+# Patch for CVE-2017-7483:
+zcat $CWD/rxvt-integer-overflow-fix.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --enable-languages \
+ --enable-utmp \
+ --enable-wtmp \
+ --enable-xpm-background \
+ --enable-transparency \
+ --enable-menubar \
+ --enable-graphics \
+ --enable-rxvt-scroll \
+ --enable-next-scroll \
+ --enable-xterm-scroll \
+ --enable-xim \
+ --enable-frills \
+ --enable-linespace \
+ --enable-24bit \
+ --enable-keepscrolling \
+ --enable-mousewheel \
+ --enable-slipwheeling \
+ --enable-xgetdefault \
+ --enable-old-selection \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rmdir $PKG/usr/lib $PKG/usr/include
+rm $PKG/usr/bin/rxvt-$VERSION
+
+mkdir -p $PKG/usr/doc/rxvt-$VERSION
+cp -a \
+ rxvt-$VERSION.lsm doc rclock/rclock.html \
+ $PKG/usr/doc/rxvt-$VERSION
+rm -r $PKG/usr/doc/rxvt-$VERSION/doc/yodl
+
+gzip -9 $PKG/usr/man/man1/*
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/rxvt-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/rxvt/rxvt.utempter.diff b/patches/source/rxvt/rxvt.utempter.diff
new file mode 100644
index 00000000..54e06f7a
--- /dev/null
+++ b/patches/source/rxvt/rxvt.utempter.diff
@@ -0,0 +1,277 @@
+--- ./src/logging.c.orig 2002-12-15 16:33:04.000000000 -0800
++++ ./src/logging.c 2003-06-07 21:08:52.000000000 -0700
+@@ -60,157 +60,7 @@
+ void
+ rxvt_makeutent(rxvt_t *r, const char *pty, const char *hostname)
+ {
+-#ifdef HAVE_STRUCT_UTMP
+- struct utmp *ut = &(r->h->ut);
+-#endif
+-#ifdef HAVE_STRUCT_UTMPX
+- struct utmpx *utx = &(r->h->utx);
+-#endif
+-#ifdef HAVE_UTMP_PID
+- int i;
+-#endif
+- char ut_id[5];
+- struct passwd *pwent = getpwuid(getuid());
+-
+- if (!STRNCMP(pty, "/dev/", 5))
+- pty += 5; /* skip /dev/ prefix */
+-
+- if (!STRNCMP(pty, "pty", 3) || !STRNCMP(pty, "tty", 3)) {
+- STRNCPY(ut_id, (pty + 3), sizeof(ut_id));
+- }
+-#ifdef HAVE_UTMP_PID
+- else if (sscanf(pty, "pts/%d", &i) == 1)
+- sprintf(ut_id, "vt%02x", (i & 0xff)); /* sysv naming */
+-#endif
+- else if (STRNCMP(pty, "pty", 3) && STRNCMP(pty, "tty", 3)) {
+- rxvt_print_error("can't parse tty name \"%s\"", pty);
+- return;
+- }
+-
+-#ifdef HAVE_STRUCT_UTMP
+- MEMSET(ut, 0, sizeof(struct utmp));
+-# ifdef HAVE_UTMP_PID
+- setutent();
+- STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id));
+- ut->ut_type = DEAD_PROCESS;
+- getutid(ut); /* position to entry in utmp file */
+- STRNCPY(r->h->ut_id, ut_id, sizeof(r->h->ut_id));
+-# endif
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMPX
+- MEMSET(utx, 0, sizeof(struct utmpx));
+- setutxent();
+- STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id));
+- utx->ut_type = DEAD_PROCESS;
+- getutxid(utx); /* position to entry in utmp file */
+- STRNCPY(r->h->ut_id, ut_id, sizeof(r->h->ut_id));
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMP
+- STRNCPY(ut->ut_line, pty, sizeof(ut->ut_line));
+- ut->ut_time = time(NULL);
+-# ifdef HAVE_UTMP_PID
+- STRNCPY(ut->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+- sizeof(ut->ut_user));
+- STRNCPY(ut->ut_id, ut_id, sizeof(ut->ut_id));
+- ut->ut_time = time(NULL);
+- ut->ut_pid = r->h->cmd_pid;
+-# ifdef HAVE_UTMP_HOST
+- STRNCPY(ut->ut_host, hostname, sizeof(ut->ut_host));
+-# endif
+- ut->ut_type = USER_PROCESS;
+- pututline(ut);
+- endutent(); /* close the file */
+- r->h->utmp_pos = -1;
+-# else
+- STRNCPY(ut->ut_name, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+- sizeof(ut->ut_name));
+-# ifdef HAVE_UTMP_HOST
+- STRNCPY(ut->ut_host, hostname, sizeof(ut->ut_host));
+-# endif
+-# endif
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMPX
+- STRNCPY(utx->ut_line, pty, sizeof(utx->ut_line));
+- STRNCPY(utx->ut_user, (pwent && pwent->pw_name) ? pwent->pw_name : "?",
+- sizeof(utx->ut_user));
+- STRNCPY(utx->ut_id, ut_id, sizeof(utx->ut_id));
+- utx->ut_session = getsid(0);
+- utx->ut_tv.tv_sec = time(NULL);
+- utx->ut_tv.tv_usec = 0;
+- utx->ut_pid = r->h->cmd_pid;
+-# ifdef HAVE_UTMPX_HOST
+- STRNCPY(utx->ut_host, hostname, sizeof(utx->ut_host));
+-# if 0
+- {
+- char *colon;
+-
+- if ((colon = STRRCHR(ut->ut_host, ':')) != NULL)
+- *colon = '\0';
+- }
+-# endif
+-# endif
+- utx->ut_type = USER_PROCESS;
+- pututxline(utx);
+- endutxent(); /* close the file */
+- r->h->utmp_pos = -1;
+-#endif
+-
+-#if defined(HAVE_STRUCT_UTMP) && !defined(HAVE_UTMP_PID)
+- {
+- int i;
+-# ifdef HAVE_TTYSLOT
+- i = ttyslot();
+- if (rxvt_write_bsd_utmp(i, ut))
+- r->h->utmp_pos = i;
+-# else
+- FILE *fd0;
+-
+- if ((fd0 = fopen(TTYTAB_FILENAME, "r")) != NULL) {
+- char buf[256], name[256];
+-
+- buf[sizeof(buf) - 1] = '\0';
+- for (i = 1; (fgets(buf, sizeof(buf) - 1, fd0) != NULL);) {
+- if (*buf == '#' || sscanf(buf, "%s", name) != 1)
+- continue;
+- if (!STRCMP(ut->ut_line, name)) {
+- if (!rxvt_write_bsd_utmp(i, ut))
+- i = 0;
+- r->h->utmp_pos = i;
+- fclose(fd0);
+- break;
+- }
+- i++;
+- }
+- fclose(fd0);
+- }
+-# endif
+- }
+-#endif
+-
+-#ifdef WTMP_SUPPORT
+-# ifdef WTMP_ONLY_ON_LOGIN
+- if (r->Options & Opt_loginShell)
+-# endif
+- {
+-# ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UPDWTMP
+- updwtmp(RXVT_WTMP_FILE, ut);
+-# else
+- rxvt_update_wtmp(RXVT_WTMP_FILE, ut);
+-# endif
+-# endif
+-# ifdef HAVE_STRUCT_UTMPX
+- updwtmpx(RXVT_WTMPX_FILE, utx);
+-# endif
+- }
+-#endif
+-#if defined(LASTLOG_SUPPORT) && defined(RXVT_LASTLOG_FILE)
+- if (r->Options & Opt_loginShell)
+- rxvt_update_lastlog(RXVT_LASTLOG_FILE, pty, hostname);
+-#endif
++ addToUtmp(pty, NULL, r->cmd_fd);
+ }
+
+ /* ------------------------------------------------------------------------- */
+@@ -221,85 +71,7 @@
+ void
+ rxvt_cleanutent(rxvt_t *r)
+ {
+-#ifdef HAVE_STRUCT_UTMP
+- struct utmp *tmput, *ut = &(r->h->ut);
+-#endif
+-#ifdef HAVE_STRUCT_UTMPX
+- struct utmpx *tmputx, *utx = &(r->h->utx);
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UTMP_PID
+- MEMSET(ut, 0, sizeof(struct utmp));
+- setutent();
+- STRNCPY(ut->ut_id, r->h->ut_id, sizeof(ut->ut_id));
+- ut->ut_type = USER_PROCESS;
+- if ((tmput = getutid(ut))) /* position to entry in utmp file */
+- ut = tmput;
+- ut->ut_type = DEAD_PROCESS;
+-# else
+- MEMSET(ut->ut_name, 0, sizeof(ut->ut_name));
+-# ifdef HAVE_UTMP_HOST
+- MEMSET(ut->ut_host, 0, sizeof(ut->ut_host));
+-# endif
+-# endif
+- ut->ut_time = time(NULL);
+-#endif
+-
+-#ifdef HAVE_STRUCT_UTMPX
+- MEMSET(utx, 0, sizeof(struct utmpx));
+- setutxent();
+- STRNCPY(utx->ut_id, r->h->ut_id, sizeof(utx->ut_id));
+- utx->ut_type = USER_PROCESS;
+- if ((tmputx = getutxid(utx))) /* position to entry in utmp file */
+- utx = tmputx;
+- utx->ut_type = DEAD_PROCESS;
+- utx->ut_session = getsid(0);
+- utx->ut_tv.tv_sec = time(NULL);
+- utx->ut_tv.tv_usec = 0;
+-#endif
+-
+- /*
+- * Write ending wtmp entry
+- */
+-#ifdef WTMP_SUPPORT
+-# ifdef WTMP_ONLY_ON_LOGIN
+- if (r->Options & Opt_loginShell)
+-# endif
+- {
+-# ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UPDWTMP
+- updwtmp(RXVT_WTMP_FILE, ut);
+-# else
+- rxvt_update_wtmp(RXVT_WTMP_FILE, ut);
+-# endif
+-# endif
+-# ifdef HAVE_STRUCT_UTMPX
+- updwtmpx(RXVT_WTMPX_FILE, utx);
+-# endif
+- }
+-#endif
+-
+- /*
+- * Write utmp entry
+- */
+-#ifdef HAVE_STRUCT_UTMP
+-# ifdef HAVE_UTMP_PID
+- if (ut->ut_pid == r->h->cmd_pid)
+- pututline(ut);
+- endutent();
+-# else
+- if (r->h->utmp_pos > 0) {
+- MEMSET(ut, 0, sizeof(struct utmp));
+- rxvt_write_bsd_utmp(r->h->utmp_pos, ut);
+- }
+-# endif
+-#endif
+-#ifdef HAVE_STRUCT_UTMPX
+- if (utx->ut_pid == r->h->cmd_pid)
+- pututxline(utx);
+- endutxent();
+-#endif
++ removeFromUtmp();
+ }
+
+ /* ------------------------------------------------------------------------- */
+--- ./src/init.c.orig 2002-12-03 21:21:39.000000000 -0800
++++ ./src/init.c 2003-06-07 21:09:26.000000000 -0700
+@@ -858,6 +858,7 @@
+ rxvt_print_error("aborting");
+ exit(EXIT_FAILURE);
+ }
++ rxvt_privileged_utmp(r, SAVE);
+ }
+
+ /*----------------------------------------------------------------------*/
+@@ -1364,7 +1365,6 @@
+ #endif
+ r->num_fds++; /* counts from 0 */
+
+- rxvt_privileged_utmp(r, SAVE);
+ return cfd;
+ }
+
+--- ./autoconf/Make.common.in.orig 2001-11-29 19:22:56.000000000 -0800
++++ ./autoconf/Make.common.in 2003-06-07 21:08:52.000000000 -0700
+@@ -68,7 +68,7 @@
+
+ LIBTOOL = @LIBTOOL@
+ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEBUG) $(DINCLUDE) $(XINC) -I$(basedir) -I$(srcdir) -I.
+-LINK = $(CC) $(CFLAGS) $(LDFLAGS)
++LINK = $(CC) $(CFLAGS) $(LDFLAGS) -lutempter -lutil
+
+ # End of common section of the Makefile
+ #-------------------------------------------------------------------------
diff --git a/patches/source/rxvt/slack-desc b/patches/source/rxvt/slack-desc
new file mode 100644
index 00000000..5f278d61
--- /dev/null
+++ b/patches/source/rxvt/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------------------------------------------------------|
+rxvt: rxvt (terminal emulator)
+rxvt:
+rxvt: rxvt is a color vt102 terminal emulator intended as an xterm
+rxvt: replacement for users who do not require features such as Tektronix
+rxvt: 4014 emulation and toolkit-style configurability. As a result, rxvt
+rxvt: uses much less memory -- a significant advantage on a machine serving
+rxvt: many X sessions. Also included is rclock, an analog clock for X.
+rxvt:
+rxvt:
+rxvt:
+rxvt:
diff --git a/patches/source/samba/doinst.sh b/patches/source/samba/doinst.sh
new file mode 100644
index 00000000..ff09d316
--- /dev/null
+++ b/patches/source/samba/doinst.sh
@@ -0,0 +1,42 @@
+#!/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...
+}
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname ${NEW})/$(basename ${NEW} .new)"
+ if [ -e ${OLD} ]; then
+ cp -a ${OLD} ${NEW}.incoming
+ cat ${NEW} > ${NEW}.incoming
+ mv ${NEW}.incoming ${NEW}
+ fi
+ config ${NEW}
+}
+
+config etc/samba/lmhosts.new
+preserve_perms etc/rc.d/rc.samba.new
+
+# Commented out 2014-09-15 just in case we do need to change this.
+## This won't be needed. The point here is to preserve the permissions of the existing
+## file, if there is one. I don't see major new development happening in rc.samba... ;-)
+#rm -f etc/rc.d/rc.samba.new
+
+# Since /etc/samba/private/ has moved to /var/lib/samba/private, migrate any
+# important files if possible:
+if [ -d etc/samba/private -a -d var/lib/samba/private ]; then
+ for file in etc/samba/private/* ; do
+ if [ -r "$file" -a ! -r "var/lib/samba/private/$(basename $file)" ]; then
+ mv "$file" var/lib/samba/private
+ fi
+ done
+ # Might as well try to eliminate this directory, since it should be empty:
+ rmdir etc/samba/private 1> /dev/null 2> /dev/null
+fi
diff --git a/patches/source/samba/pytalloc-util.pc b/patches/source/samba/pytalloc-util.pc
new file mode 100644
index 00000000..800a9a81
--- /dev/null
+++ b/patches/source/samba/pytalloc-util.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: pytalloc-util
+Description: Utility functions for using talloc objects with Python
+Version: 2.0.8
+Libs: -L${libdir} -lpytalloc-util
+Cflags: -Wl,-rpath,/usr/lib -I${includedir}
+URL: http://talloc.samba.org/
diff --git a/patches/source/samba/rc.samba b/patches/source/samba/rc.samba
new file mode 100644
index 00000000..5b98b879
--- /dev/null
+++ b/patches/source/samba/rc.samba
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.samba
+#
+# Start/stop/restart the Samba SMB file/print server.
+#
+# To make Samba start automatically at boot, make this
+# file executable: chmod 755 /etc/rc.d/rc.samba
+#
+
+samba_start() {
+ if [ -x /usr/sbin/smbd -a -x /usr/sbin/nmbd -a -r /etc/samba/smb.conf ]; then
+ mkdir -p /var/run/samba
+ echo "Starting Samba: /usr/sbin/smbd -D"
+ /usr/sbin/smbd -D
+ echo " /usr/sbin/nmbd -D"
+ /usr/sbin/nmbd -D
+ elif [ ! -r /etc/samba/smb.conf ]; then
+ echo "ERROR: cannot start Samba since /etc/samba/smb.conf does not exist"
+ fi
+}
+
+samba_stop() {
+ killall smbd nmbd
+}
+
+samba_restart() {
+ samba_stop
+ sleep 2
+ samba_start
+}
+
+case "$1" in
+'start')
+ samba_start
+ ;;
+'stop')
+ samba_stop
+ ;;
+'restart')
+ samba_restart
+ ;;
+*)
+ # Default is "start", for backwards compatibility with previous
+ # Slackware versions. This may change to a 'usage' error someday.
+ samba_start
+esac
+
diff --git a/patches/source/samba/samba-4.4.16-CVE-2018-1057.patch b/patches/source/samba/samba-4.4.16-CVE-2018-1057.patch
new file mode 100644
index 00000000..8d4c0c0e
--- /dev/null
+++ b/patches/source/samba/samba-4.4.16-CVE-2018-1057.patch
@@ -0,0 +1,903 @@
+From 6ff2935f6a1bb2bdfb45beea07d4cb7c69c66a74 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 12:43:09 +0100
+Subject: [PATCH 01/13] CVE-2018-1057: s4:dsdb/tests: add a test for password
+ change with empty delete
+
+Note that the request using the clearTextPassword attribute for the
+password change is already correctly rejected by the server.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ selftest/knownfail.d/samba4.ldap.passwords.python | 2 +
+ source4/dsdb/tests/python/passwords.py | 49 +++++++++++++++++++++++
+ 2 files changed, 51 insertions(+)
+ create mode 100644 selftest/knownfail.d/samba4.ldap.passwords.python
+
+diff --git a/selftest/knownfail.d/samba4.ldap.passwords.python b/selftest/knownfail.d/samba4.ldap.passwords.python
+new file mode 100644
+index 0000000..343c5a7
+--- /dev/null
++++ b/selftest/knownfail.d/samba4.ldap.passwords.python
+@@ -0,0 +1,2 @@
++samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_userPassword
++samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_unicodePwd
+diff --git a/source4/dsdb/tests/python/passwords.py b/source4/dsdb/tests/python/passwords.py
+index fb3eee5..c50f2b6 100755
+--- a/source4/dsdb/tests/python/passwords.py
++++ b/source4/dsdb/tests/python/passwords.py
+@@ -931,6 +931,55 @@ userPassword: thatsAcomplPASS4
+ # Reset the "minPwdLength" as it was before
+ self.ldb.set_minPwdLength(minPwdLength)
+
++ def test_pw_change_delete_no_value_userPassword(self):
++ """Test password change with userPassword where the delete attribute doesn't have a value"""
++
++ try:
++ self.ldb2.modify_ldif("""
++dn: cn=testuser,cn=users,""" + self.base_dn + """
++changetype: modify
++delete: userPassword
++add: userPassword
++userPassword: thatsAcomplPASS1
++""")
++ except LdbError, (num, msg):
++ self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
++ else:
++ self.fail()
++
++ def test_pw_change_delete_no_value_clearTextPassword(self):
++ """Test password change with clearTextPassword where the delete attribute doesn't have a value"""
++
++ try:
++ self.ldb2.modify_ldif("""
++dn: cn=testuser,cn=users,""" + self.base_dn + """
++changetype: modify
++delete: clearTextPassword
++add: clearTextPassword
++clearTextPassword: thatsAcomplPASS2
++""")
++ except LdbError, (num, msg):
++ self.assertTrue(num == ERR_CONSTRAINT_VIOLATION or
++ num == ERR_NO_SUCH_ATTRIBUTE) # for Windows
++ else:
++ self.fail()
++
++ def test_pw_change_delete_no_value_unicodePwd(self):
++ """Test password change with unicodePwd where the delete attribute doesn't have a value"""
++
++ try:
++ self.ldb2.modify_ldif("""
++dn: cn=testuser,cn=users,""" + self.base_dn + """
++changetype: modify
++delete: unicodePwd
++add: unicodePwd
++unicodePwd:: """ + base64.b64encode("\"thatsAcomplPASS3\"".encode('utf-16-le')) + """
++""")
++ except LdbError, (num, msg):
++ self.assertEquals(num, ERR_CONSTRAINT_VIOLATION)
++ else:
++ self.fail()
++
+ def tearDown(self):
+ super(PasswordTests, self).tearDown()
+ delete_force(self.ldb, "cn=testuser,cn=users," + self.base_dn)
+--
+1.9.1
+
+
+From 35f8367aa64955d9f34beac9a62f8336e5e6c510 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 10:56:06 +0100
+Subject: [PATCH 02/13] CVE-2018-1057: s4:dsdb/password_hash: add a helper
+ variable for LDB_FLAG_MOD_TYPE
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/password_hash.c | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
+index 05b0854..aa3871d 100644
+--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
++++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
+@@ -3152,17 +3152,20 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+ }
+
+ while ((passwordAttr = ldb_msg_find_element(msg, *l)) != NULL) {
+- if (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_DELETE) {
++ unsigned int mtype = LDB_FLAG_MOD_TYPE(passwordAttr->flags);
++
++ if (mtype == LDB_FLAG_MOD_DELETE) {
+ ++del_attr_cnt;
+ }
+- if (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_ADD) {
++ if (mtype == LDB_FLAG_MOD_ADD) {
+ ++add_attr_cnt;
+ }
+- if (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_REPLACE) {
++ if (mtype == LDB_FLAG_MOD_REPLACE) {
+ ++rep_attr_cnt;
+ }
+ if ((passwordAttr->num_values != 1) &&
+- (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_ADD)) {
++ (mtype == LDB_FLAG_MOD_ADD))
++ {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have exactly one value on add operations!",
+@@ -3170,7 +3173,8 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+ return LDB_ERR_CONSTRAINT_VIOLATION;
+ }
+ if ((passwordAttr->num_values > 1) &&
+- (LDB_FLAG_MOD_TYPE(passwordAttr->flags) == LDB_FLAG_MOD_DELETE)) {
++ (mtype == LDB_FLAG_MOD_DELETE))
++ {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have zero or one value(s) on delete operations!",
+--
+1.9.1
+
+
+From 63c91916d15f355e7179292fac998056c0bd6a44 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 14:40:59 +0100
+Subject: [PATCH 03/13] CVE-2018-1057: s4:dsdb/password_hash: add a helper
+ variable for passwordAttr->num_values
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/password_hash.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
+index aa3871d..690bb98 100644
+--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
++++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
+@@ -3153,6 +3153,7 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+
+ while ((passwordAttr = ldb_msg_find_element(msg, *l)) != NULL) {
+ unsigned int mtype = LDB_FLAG_MOD_TYPE(passwordAttr->flags);
++ unsigned int nvalues = passwordAttr->num_values;
+
+ if (mtype == LDB_FLAG_MOD_DELETE) {
+ ++del_attr_cnt;
+@@ -3163,18 +3164,14 @@ static int password_hash_modify(struct ldb_module *module, struct ldb_request *r
+ if (mtype == LDB_FLAG_MOD_REPLACE) {
+ ++rep_attr_cnt;
+ }
+- if ((passwordAttr->num_values != 1) &&
+- (mtype == LDB_FLAG_MOD_ADD))
+- {
++ if ((nvalues != 1) && (mtype == LDB_FLAG_MOD_ADD)) {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have exactly one value on add operations!",
+ *l);
+ return LDB_ERR_CONSTRAINT_VIOLATION;
+ }
+- if ((passwordAttr->num_values > 1) &&
+- (mtype == LDB_FLAG_MOD_DELETE))
+- {
++ if ((nvalues > 1) && (mtype == LDB_FLAG_MOD_DELETE)) {
+ talloc_free(ac);
+ ldb_asprintf_errstring(ldb,
+ "'%s' attribute must have zero or one value(s) on delete operations!",
+--
+1.9.1
+
+
+From 895b1d2c9cbbde96646146a3c7b93bd326aada55 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 17:38:31 +0100
+Subject: [PATCH 04/13] CVE-2018-1057: s4:dsdb/acl: only call dsdb_acl_debug()
+ if we checked the acl in acl_check_password_rights()
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 62e560f..aa1660c 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -989,12 +989,14 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+ sid);
++ goto checked;
+ }
+ else if (rep_attr_cnt > 0 || (add_attr_cnt != del_attr_cnt)) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+ sid);
++ goto checked;
+ }
+ else if (add_attr_cnt == 1 && del_attr_cnt == 1) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+@@ -1005,7 +1007,13 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ if (ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {
+ ret = LDB_ERR_CONSTRAINT_VIOLATION;
+ }
++ goto checked;
+ }
++
++ talloc_free(tmp_ctx);
++ return LDB_SUCCESS;
++
++checked:
+ if (ret != LDB_SUCCESS) {
+ dsdb_acl_debug(sd, acl_user_token(module),
+ req->op.mod.message->dn,
+--
+1.9.1
+
+
+From db056b588d40c4c6995ee882286042dbf383f502 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 17:38:31 +0100
+Subject: [PATCH 05/13] CVE-2018-1057: s4:dsdb/acl: remove unused else branches
+ in acl_check_password_rights()
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index aa1660c..5ec5fd3 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -991,14 +991,24 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ sid);
+ goto checked;
+ }
+- else if (rep_attr_cnt > 0 || (add_attr_cnt != del_attr_cnt)) {
++
++ if (rep_attr_cnt > 0) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+ sid);
+ goto checked;
+ }
+- else if (add_attr_cnt == 1 && del_attr_cnt == 1) {
++
++ if (add_attr_cnt != del_attr_cnt) {
++ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
++ GUID_DRS_FORCE_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ goto checked;
++ }
++
++ if (add_attr_cnt == 1 && del_attr_cnt == 1) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+--
+1.9.1
+
+
+From ff82d4c547476751f4506092517952ac682ec38c Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 22:59:24 +0100
+Subject: [PATCH 06/13] CVE-2018-1057: s4:dsdb/acl: check for internal controls
+ before other checks
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 37 ++++++++++++++++++++++--------------
+ 1 file changed, 23 insertions(+), 14 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 5ec5fd3..56ba988 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -943,10 +943,33 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ unsigned int del_attr_cnt = 0, add_attr_cnt = 0, rep_attr_cnt = 0;
+ struct ldb_message_element *el;
+ struct ldb_message *msg;
++ struct ldb_control *c = NULL;
+ const char *passwordAttrs[] = { "userPassword", "clearTextPassword",
+ "unicodePwd", "dBCSPwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+
++ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_CHANGE_OID);
++ if (c != NULL) {
++ /*
++ * The "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
++ * have a user password change and not a set as the message
++ * looks like. In it's value blob it contains the NT and/or LM
++ * hash of the old password specified by the user. This control
++ * is used by the SAMR and "kpasswd" password change mechanisms.
++ *
++ * This control can't be used by real LDAP clients,
++ * the only caller is samdb_set_password_internal(),
++ * so we don't have to strict verification of the input.
++ */
++ ret = acl_check_extended_right(tmp_ctx,
++ sd,
++ acl_user_token(module),
++ GUID_DRS_USER_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ goto checked;
++ }
++
+ msg = ldb_msg_copy_shallow(tmp_ctx, req->op.mod.message);
+ if (msg == NULL) {
+ return ldb_module_oom(module);
+@@ -977,20 +1000,6 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ return LDB_SUCCESS;
+ }
+
+- if (ldb_request_get_control(req,
+- DSDB_CONTROL_PASSWORD_CHANGE_OID) != NULL) {
+- /* The "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
+- * have a user password change and not a set as the message
+- * looks like. In it's value blob it contains the NT and/or LM
+- * hash of the old password specified by the user.
+- * This control is used by the SAMR and "kpasswd" password
+- * change mechanisms. */
+- ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+- GUID_DRS_USER_CHANGE_PASSWORD,
+- SEC_ADS_CONTROL_ACCESS,
+- sid);
+- goto checked;
+- }
+
+ if (rep_attr_cnt > 0) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+--
+1.9.1
+
+
+From 5c92da9918e2ccbcb39db2b060406f05973c0a24 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 17:43:43 +0100
+Subject: [PATCH 07/13] CVE-2018-1057: s4:dsdb/acl: add check for
+ DSDB_CONTROL_PASSWORD_HASH_VALUES_OID control
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 56ba988..00d52fe 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -970,6 +970,26 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_HASH_VALUES_OID);
++ if (c != NULL) {
++ /*
++ * The "DSDB_CONTROL_PASSWORD_HASH_VALUES_OID" control, without
++ * "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
++ * have a force password set.
++ * This control is used by the SAMR/NETLOGON/LSA password
++ * reset mechanisms.
++ *
++ * This control can't be used by real LDAP clients,
++ * the only caller is samdb_set_password_internal(),
++ * so we don't have to strict verification of the input.
++ */
++ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
++ GUID_DRS_FORCE_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ goto checked;
++ }
++
+ msg = ldb_msg_copy_shallow(tmp_ctx, req->op.mod.message);
+ if (msg == NULL) {
+ return ldb_module_oom(module);
+--
+1.9.1
+
+
+From 6417b18bc767d471e3c88935073acdc19448dc54 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Fri, 16 Feb 2018 15:17:26 +0100
+Subject: [PATCH 08/13] CVE-2018-1057: s4:dsdb/acl: add a NULL check for
+ talloc_new() in acl_check_password_rights()
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 00d52fe..4146cbc 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -948,6 +948,10 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ "unicodePwd", "dBCSPwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+
++ if (tmp_ctx == NULL) {
++ return LDB_ERR_OPERATIONS_ERROR;
++ }
++
+ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_CHANGE_OID);
+ if (c != NULL) {
+ /*
+--
+1.9.1
+
+
+From bf6c7e1b4510242750de64b0a7a112c2024b4372 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 22 Feb 2018 10:54:37 +0100
+Subject: [PATCH 09/13] CVE-2018-1057: s4/dsdb: correctly detect password
+ resets
+
+This change ensures we correctly treat the following LDIF
+
+ dn: cn=testuser,cn=users,...
+ changetype: modify
+ delete: userPassword
+ add: userPassword
+ userPassword: thatsAcomplPASS1
+
+as a password reset. Because delete and add element counts are both
+one, the ACL module wrongly treated this as a password change
+request.
+
+For a password change we need at least one value to delete and one value
+to add. This patch ensures we correctly check attributes and their
+values.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ selftest/knownfail.d/samba4.ldap.passwords.python | 2 --
+ source4/dsdb/samdb/ldb_modules/acl.c | 18 +++++++++++++++++-
+ 2 files changed, 17 insertions(+), 3 deletions(-)
+ delete mode 100644 selftest/knownfail.d/samba4.ldap.passwords.python
+
+diff --git a/selftest/knownfail.d/samba4.ldap.passwords.python b/selftest/knownfail.d/samba4.ldap.passwords.python
+deleted file mode 100644
+index 343c5a7..0000000
+--- a/selftest/knownfail.d/samba4.ldap.passwords.python
++++ /dev/null
+@@ -1,2 +0,0 @@
+-samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_userPassword
+-samba4.ldap.passwords.python.*.__main__.PasswordTests.test_pw_change_delete_no_value_unicodePwd
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 4146cbc..7a003df 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -941,6 +941,7 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ {
+ int ret = LDB_SUCCESS;
+ unsigned int del_attr_cnt = 0, add_attr_cnt = 0, rep_attr_cnt = 0;
++ unsigned int del_val_cnt = 0, add_val_cnt = 0, rep_val_cnt = 0;
+ struct ldb_message_element *el;
+ struct ldb_message *msg;
+ struct ldb_control *c = NULL;
+@@ -1006,12 +1007,15 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ while ((el = ldb_msg_find_element(msg, *l)) != NULL) {
+ if (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_DELETE) {
+ ++del_attr_cnt;
++ del_val_cnt += el->num_values;
+ }
+ if (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_ADD) {
+ ++add_attr_cnt;
++ add_val_cnt += el->num_values;
+ }
+ if (LDB_FLAG_MOD_TYPE(el->flags) == LDB_FLAG_MOD_REPLACE) {
+ ++rep_attr_cnt;
++ rep_val_cnt += el->num_values;
+ }
+ ldb_msg_remove_element(msg, el);
+ }
+@@ -1041,7 +1045,7 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
+- if (add_attr_cnt == 1 && del_attr_cnt == 1) {
++ if (add_val_cnt == 1 && del_val_cnt == 1) {
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1053,6 +1057,18 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ if (add_val_cnt == 1 && del_val_cnt == 0) {
++ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
++ GUID_DRS_FORCE_CHANGE_PASSWORD,
++ SEC_ADS_CONTROL_ACCESS,
++ sid);
++ /* Very strange, but we get constraint violation in this case */
++ if (ret == LDB_ERR_INSUFFICIENT_ACCESS_RIGHTS) {
++ ret = LDB_ERR_CONSTRAINT_VIOLATION;
++ }
++ goto checked;
++ }
++
+ talloc_free(tmp_ctx);
+ return LDB_SUCCESS;
+
+--
+1.9.1
+
+
+From fba762e9d7599e4e2f5022a1486f3ab777d18e6d Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Wed, 14 Feb 2018 19:15:49 +0100
+Subject: [PATCH 10/13] CVE-2018-1057: s4:dsdb/acl: run password checking only
+ once
+
+This is needed, because a later commit will let the acl module add a
+control to the change request msg and we must ensure that this is only
+done once.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 7a003df..c239c01 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -1097,6 +1097,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ struct ldb_control *as_system;
+ struct ldb_control *is_undelete;
+ bool userPassword;
++ bool password_rights_checked = false;
+ TALLOC_CTX *tmp_ctx;
+ const struct ldb_message *msg = req->op.mod.message;
+ static const char *acl_attrs[] = {
+@@ -1242,6 +1243,9 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ } else if (ldb_attr_cmp("unicodePwd", el->name) == 0 ||
+ (userPassword && ldb_attr_cmp("userPassword", el->name) == 0) ||
+ ldb_attr_cmp("clearTextPassword", el->name) == 0) {
++ if (password_rights_checked) {
++ continue;
++ }
+ ret = acl_check_password_rights(tmp_ctx,
+ module,
+ req,
+@@ -1252,6 +1256,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ if (ret != LDB_SUCCESS) {
+ goto fail;
+ }
++ password_rights_checked = true;
+ } else if (ldb_attr_cmp("servicePrincipalName", el->name) == 0) {
+ ret = acl_check_spn(tmp_ctx,
+ module,
+--
+1.9.1
+
+
+From bc733fce398658e2c280dae4ba5041113e7cd500 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Fri, 16 Feb 2018 15:30:13 +0100
+Subject: [PATCH 11/13] CVE-2018-1057: s4:dsdb/samdb: define
+ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control
+
+Will be used to pass "user password change" vs "password reset" from the
+ACL to the password_hash module, ensuring both modules treat the request
+identical.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/samdb.h | 9 +++++++++
+ source4/libcli/ldap/ldap_controls.c | 1 +
+ source4/setup/schema_samba4.ldif | 2 ++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/source4/dsdb/samdb/samdb.h b/source4/dsdb/samdb/samdb.h
+index 0a1d90d..98faa4f 100644
+--- a/source4/dsdb/samdb/samdb.h
++++ b/source4/dsdb/samdb/samdb.h
+@@ -158,6 +158,15 @@ struct dsdb_control_password_change {
+ */
+ #define DSDB_CONTROL_CHANGEREPLMETADATA_RESORT_OID "1.3.6.1.4.1.7165.4.3.25"
+
++/*
++ * Used to pass "user password change" vs "password reset" from the ACL to the
++ * password_hash module, ensuring both modules treat the request identical.
++ */
++#define DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID "1.3.6.1.4.1.7165.4.3.33"
++struct dsdb_control_password_acl_validation {
++ bool pwd_reset;
++};
++
+ #define DSDB_EXTENDED_REPLICATED_OBJECTS_OID "1.3.6.1.4.1.7165.4.4.1"
+ struct dsdb_extended_replicated_object {
+ struct ldb_message *msg;
+diff --git a/source4/libcli/ldap/ldap_controls.c b/source4/libcli/ldap/ldap_controls.c
+index 14a80af..7837e05 100644
+--- a/source4/libcli/ldap/ldap_controls.c
++++ b/source4/libcli/ldap/ldap_controls.c
+@@ -1281,6 +1281,7 @@ static const struct ldap_control_handler ldap_known_controls[] = {
+ { DSDB_CONTROL_PASSWORD_CHANGE_STATUS_OID, NULL, NULL },
+ { DSDB_CONTROL_PASSWORD_HASH_VALUES_OID, NULL, NULL },
+ { DSDB_CONTROL_PASSWORD_CHANGE_OID, NULL, NULL },
++ { DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID, NULL, NULL },
+ { DSDB_CONTROL_APPLY_LINKS, NULL, NULL },
+ { LDB_CONTROL_BYPASS_OPERATIONAL_OID, NULL, NULL },
+ { DSDB_CONTROL_CHANGEREPLMETADATA_OID, NULL, NULL },
+diff --git a/source4/setup/schema_samba4.ldif b/source4/setup/schema_samba4.ldif
+index 69aa363..6e184bc 100644
+--- a/source4/setup/schema_samba4.ldif
++++ b/source4/setup/schema_samba4.ldif
+@@ -200,6 +200,8 @@
+ #Allocated: DSDB_CONTROL_PERMIT_INTERDOMAIN_TRUST_UAC_OID 1.3.6.1.4.1.7165.4.3.23
+ #Allocated: DSDB_CONTROL_RESTORE_TOMBSTONE_OID 1.3.6.1.4.1.7165.4.3.24
+ #Allocated: DSDB_CONTROL_CHANGEREPLMETADATA_RESORT_OID 1.3.6.1.4.1.7165.4.3.25
++#Allocated: DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID 1.3.6.1.4.1.7165.4.3.33
++
+
+ # Extended 1.3.6.1.4.1.7165.4.4.x
+ #Allocated: DSDB_EXTENDED_REPLICATED_OBJECTS_OID 1.3.6.1.4.1.7165.4.4.1
+--
+1.9.1
+
+
+From 7fc6a5ef5b1bad171dd6d2c019a4fe4c0ec00eb6 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Fri, 16 Feb 2018 15:38:19 +0100
+Subject: [PATCH 12/13] CVE-2018-1057: s4:dsdb: use
+ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID
+
+This is used to pass information about which password change operation (change
+or reset) the acl module validated, down to the password_hash module.
+
+It's very important that both modules treat the request identical.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 41 ++++++++++++++++++++++++--
+ source4/dsdb/samdb/ldb_modules/password_hash.c | 30 ++++++++++++++++++-
+ 2 files changed, 67 insertions(+), 4 deletions(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index c239c01..17e1e67 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -948,13 +948,22 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ const char *passwordAttrs[] = { "userPassword", "clearTextPassword",
+ "unicodePwd", "dBCSPwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
++ struct dsdb_control_password_acl_validation *pav = NULL;
+
+ if (tmp_ctx == NULL) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
++ pav = talloc_zero(req, struct dsdb_control_password_acl_validation);
++ if (pav == NULL) {
++ talloc_free(tmp_ctx);
++ return LDB_ERR_OPERATIONS_ERROR;
++ }
++
+ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_CHANGE_OID);
+ if (c != NULL) {
++ pav->pwd_reset = false;
++
+ /*
+ * The "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
+ * have a user password change and not a set as the message
+@@ -977,6 +986,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+
+ c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_HASH_VALUES_OID);
+ if (c != NULL) {
++ pav->pwd_reset = true;
++
+ /*
+ * The "DSDB_CONTROL_PASSWORD_HASH_VALUES_OID" control, without
+ * "DSDB_CONTROL_PASSWORD_CHANGE_OID" control means that we
+@@ -1030,6 +1041,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+
+
+ if (rep_attr_cnt > 0) {
++ pav->pwd_reset = true;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1038,6 +1051,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ }
+
+ if (add_attr_cnt != del_attr_cnt) {
++ pav->pwd_reset = true;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1046,6 +1061,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ }
+
+ if (add_val_cnt == 1 && del_val_cnt == 1) {
++ pav->pwd_reset = false;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_USER_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1058,6 +1075,8 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ }
+
+ if (add_val_cnt == 1 && del_val_cnt == 0) {
++ pav->pwd_reset = true;
++
+ ret = acl_check_extended_right(tmp_ctx, sd, acl_user_token(module),
+ GUID_DRS_FORCE_CHANGE_PASSWORD,
+ SEC_ADS_CONTROL_ACCESS,
+@@ -1069,6 +1088,14 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ /*
++ * Everything else is handled by the password_hash module where it will
++ * fail, but with the correct error code when the module is again
++ * checking the attributes. As the change request will lack the
++ * DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control, we can be sure that
++ * any modification attempt that went this way will be rejected.
++ */
++
+ talloc_free(tmp_ctx);
+ return LDB_SUCCESS;
+
+@@ -1078,11 +1105,19 @@ checked:
+ req->op.mod.message->dn,
+ true,
+ 10);
++ talloc_free(tmp_ctx);
++ return ret;
+ }
+- talloc_free(tmp_ctx);
+- return ret;
+-}
+
++ ret = ldb_request_add_control(req,
++ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID, false, pav);
++ if (ret != LDB_SUCCESS) {
++ ldb_debug(ldb_module_get_ctx(module), LDB_DEBUG_ERROR,
++ "Unable to register ACL validation control!\n");
++ return ret;
++ }
++ return LDB_SUCCESS;
++}
+
+ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
+ {
+diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c
+index 690bb98..de565bc 100644
+--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
++++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
+@@ -2572,7 +2572,35 @@ static int setup_io(struct ph_context *ac,
+ /* On "add" we have only "password reset" */
+ ac->pwd_reset = true;
+ } else if (ac->req->operation == LDB_MODIFY) {
+- if (io->og.cleartext_utf8 || io->og.cleartext_utf16
++ struct ldb_control *pav_ctrl = NULL;
++ struct dsdb_control_password_acl_validation *pav = NULL;
++
++ pav_ctrl = ldb_request_get_control(ac->req,
++ DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID);
++ if (pav_ctrl != NULL) {
++ pav = talloc_get_type_abort(pav_ctrl->data,
++ struct dsdb_control_password_acl_validation);
++ }
++
++ if (pav == NULL) {
++ bool ok;
++
++ /*
++ * If the DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID
++ * control is missing, we require system access!
++ */
++ ok = dsdb_module_am_system(ac->module);
++ if (!ok) {
++ return ldb_module_operr(ac->module);
++ }
++ }
++
++ if (pav != NULL) {
++ /*
++ * We assume what the acl module has validated.
++ */
++ ac->pwd_reset = pav->pwd_reset;
++ } else if (io->og.cleartext_utf8 || io->og.cleartext_utf16
+ || io->og.nt_hash || io->og.lm_hash) {
+ /* If we have an old password specified then for sure it
+ * is a user "password change" */
+--
+1.9.1
+
+
+From 0815e8653277383918530f8dd8afaeadfe8085d5 Mon Sep 17 00:00:00 2001
+From: Ralph Boehme <slow@samba.org>
+Date: Thu, 15 Feb 2018 23:11:38 +0100
+Subject: [PATCH 13/13] CVE-2018-1057: s4:dsdb/acl: changing dBCSPwd is only
+ allowed with a control
+
+This is not strictly needed to fig bug 13272, but it makes sense to also
+fix this while fixing the overall ACL checking logic.
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272
+
+Signed-off-by: Ralph Boehme <slow@samba.org>
+Reviewed-by: Stefan Metzmacher <metze@samba.org>
+---
+ source4/dsdb/samdb/ldb_modules/acl.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
+index 17e1e67..8d9b780 100644
+--- a/source4/dsdb/samdb/ldb_modules/acl.c
++++ b/source4/dsdb/samdb/ldb_modules/acl.c
+@@ -946,7 +946,7 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ struct ldb_message *msg;
+ struct ldb_control *c = NULL;
+ const char *passwordAttrs[] = { "userPassword", "clearTextPassword",
+- "unicodePwd", "dBCSPwd", NULL }, **l;
++ "unicodePwd", NULL }, **l;
+ TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+ struct dsdb_control_password_acl_validation *pav = NULL;
+
+@@ -1006,6 +1006,15 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
+ goto checked;
+ }
+
++ el = ldb_msg_find_element(req->op.mod.message, "dBCSPwd");
++ if (el != NULL) {
++ /*
++ * dBCSPwd is only allowed with a control.
++ */
++ talloc_free(tmp_ctx);
++ return LDB_ERR_UNWILLING_TO_PERFORM;
++ }
++
+ msg = ldb_msg_copy_shallow(tmp_ctx, req->op.mod.message);
+ if (msg == NULL) {
+ return ldb_module_oom(module);
+--
+1.9.1
+
diff --git a/patches/source/samba/samba-4.5.14-security-2017-11-21.patch b/patches/source/samba/samba-4.5.14-security-2017-11-21.patch
new file mode 100644
index 00000000..40b9dd08
--- /dev/null
+++ b/patches/source/samba/samba-4.5.14-security-2017-11-21.patch
@@ -0,0 +1,110 @@
+From 007f5b54d76bf69f441cc277b7f41f478e258aab Mon Sep 17 00:00:00 2001
+From: Jeremy Allison <jra@samba.org>
+Date: Tue, 19 Sep 2017 16:11:33 -0700
+Subject: [PATCH 1/2] s3: smbd: Fix SMB1 use-after-free crash bug.
+ CVE-2017-14746
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When setting up the chain, always use 'next->' variables
+not the 'req->' one.
+
+Bug discovered by 连一汉 <lianyihan@360.cn>
+
+CVE-2017-14746
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13041
+
+Signed-off-by: Jeremy Allison <jra@samba.org>
+---
+ source3/smbd/process.c | 7 ++++---
+ source3/smbd/reply.c | 5 +++++
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/source3/smbd/process.c b/source3/smbd/process.c
+index 656f1c0a667..2641894d1d7 100644
+--- a/source3/smbd/process.c
++++ b/source3/smbd/process.c
+@@ -1854,12 +1854,13 @@ void smb_request_done(struct smb_request *req)
+
+ next->vuid = SVAL(req->outbuf, smb_uid);
+ next->tid = SVAL(req->outbuf, smb_tid);
+- status = smb1srv_tcon_lookup(req->xconn, req->tid,
++ status = smb1srv_tcon_lookup(req->xconn, next->tid,
+ now, &tcon);
++
+ if (NT_STATUS_IS_OK(status)) {
+- req->conn = tcon->compat;
++ next->conn = tcon->compat;
+ } else {
+- req->conn = NULL;
++ next->conn = NULL;
+ }
+ next->chain_fsp = req->chain_fsp;
+ next->inbuf = req->inbuf;
+diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
+index a40ff81b240..26918b6d9d5 100644
+--- a/source3/smbd/reply.c
++++ b/source3/smbd/reply.c
+@@ -921,6 +921,11 @@ void reply_tcon_and_X(struct smb_request *req)
+ }
+
+ TALLOC_FREE(tcon);
++ /*
++ * This tree id is gone. Make sure we can't re-use it
++ * by accident.
++ */
++ req->tid = 0;
+ }
+
+ if ((passlen > MAX_PASS_LEN) || (passlen >= req->buflen)) {
+--
+2.11.0
+
+
+From c1a22e59f87783d88dfbaeeb132b89be166b2754 Mon Sep 17 00:00:00 2001
+From: Jeremy Allison <jra@samba.org>
+Date: Wed, 20 Sep 2017 11:04:50 -0700
+Subject: [PATCH 2/2] s3: smbd: Chain code can return uninitialized memory when
+ talloc buffer is grown.
+
+Ensure we zero out unused grown area.
+
+CVE-2017-15275
+
+BUG: https://bugzilla.samba.org/show_bug.cgi?id=13077
+
+Signed-off-by: Jeremy Allison <jra@samba.org>
+---
+ source3/smbd/srvstr.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/source3/smbd/srvstr.c b/source3/smbd/srvstr.c
+index 56dceba8c6c..c2d70b32c32 100644
+--- a/source3/smbd/srvstr.c
++++ b/source3/smbd/srvstr.c
+@@ -110,6 +110,20 @@ ssize_t message_push_string(uint8_t **outbuf, const char *str, int flags)
+ DEBUG(0, ("srvstr_push failed\n"));
+ return -1;
+ }
++
++ /*
++ * Ensure we clear out the extra data we have
++ * grown the buffer by, but not written to.
++ */
++ if (buf_size + result < buf_size) {
++ return -1;
++ }
++ if (grow_size < result) {
++ return -1;
++ }
++
++ memset(tmp + buf_size + result, '\0', grow_size - result);
++
+ set_message_bcc((char *)tmp, smb_buflen(tmp) + result);
+
+ *outbuf = tmp;
+--
+2.11.0
+
diff --git a/patches/source/samba/samba.SlackBuild b/patches/source/samba/samba.SlackBuild
new file mode 100755
index 00000000..de6bbf45
--- /dev/null
+++ b/patches/source/samba/samba.SlackBuild
@@ -0,0 +1,224 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2015, 2016 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 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+
+VERSION=${VERSION:-$(echo samba-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-3_slack14.2}
+
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # Automatically determine the architecture we're building on:
+ if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-samba
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+if [ -r /usr/lib${LIBDIRSUFFIX}/libtalloc.so.? -a ! -r /var/log/packages/talloc* ]; then
+ echo "The Samba package needs to be removed before building to ensure that"
+ echo "talloc (and possibly other bundled libraries) are included in the build."
+ echo
+ echo "Removing the Samba package in 15 seconds, and then continuing with the build."
+ sleep 15
+ removepkg samba
+fi
+
+cd $TMP
+rm -rf samba-$VERSION
+tar xvf $CWD/samba-$VERSION.tar.xz || exit 1
+cd samba-$VERSION || exit 1
+
+# Patch to install talloc/tevent/tdb libraries and includes:
+zcat $CWD/samba.install.talloc.tevent.tdb.diff.gz | patch -p1 --verbose || exit 1
+
+# Patch CVE-2017-14746 and CVE-2017-15275:
+zcat $CWD/samba-4.5.14-security-2017-11-21.patch.gz | patch -p1 --verbose || exit 1
+
+# Patch CVE-2018-1057:
+zcat $CWD/samba-4.4.16-CVE-2018-1057.patch.gz | patch -p1 --verbose || exit 1
+
+if [ ! -d source3/lib/cmdline ]; then
+ ( cd source3/lib
+ mkdir cmdline
+ cd cmdline
+ ln -sf ../../../source3/include/popt_common.h . )
+fi
+
+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 {} \;
+
+# Some of these options could be auto-detected, but declaring them
+# here doesn't hurt and helps document what features we're trying to
+# build in.
+#
+# LDFLAGS are needed to avoid problems with missing symbols.
+LDFLAGS="-Wl,--no-as-needed" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --enable-fhs \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --mandir=/usr/man \
+ --sysconfdir=/etc \
+ --with-configdir=/etc/samba \
+ --with-piddir=/var/run \
+ --with-privatedir=/var/lib/samba/private \
+ --with-privatelibdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-modulesdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-lockdir=/var/cache/samba \
+ --with-logfilebase=/var/log/samba \
+ --localstatedir=/var \
+ --enable-cups \
+ --with-acl-support \
+ --with-automount \
+ --with-quotas \
+ --with-syslog \
+ --with-utmp \
+ --with-winbind \
+ --with-ldap \
+ --with-ads \
+ --without-pam \
+ --build=$TARGET
+ # Gives errors:
+ #--builtin-libraries=replace,ccan \
+ #--bundled-libraries=heimdal \
+
+# -j options don't seem to work... [Yes they do! At least try to use -j below...]
+JOBS=6
+MAXJOBS=6
+export JOBS MAXJOBS
+make -j $MAXJOBS || make || exit 1
+
+mkdir -p \
+ $PKG/usr/doc/samba-$VERSION \
+ $PKG/var/spool/samba \
+ $PKG/var/log/samba \
+ $PKG/var/lib/samba/private \
+ $PKG/var/cache/samba
+chmod 700 $PKG/var/lib/samba/private
+chmod 1777 $PKG/var/spool/samba
+
+make install DESTDIR=$PKG || exit 1
+
+# Install the smbprint script:
+install -m0744 packaging/printing/smbprint $PKG/usr/bin/smbprint
+
+# Add a sample config file:
+cat $CWD/smb.conf.default > $PKG/etc/samba/smb.conf-sample
+
+# Setup a default lmhosts file:
+echo "127.0.0.1 localhost" > $PKG/etc/samba/lmhosts.new
+
+if [ ! -r $PKG/usr/bin/smbget ]; then
+ rm -f $PKG/usr/share/man/man1/smbget.1
+fi
+
+# We'll add rc.samba to the init directory, but chmod 644 so that it doesn't
+# start by default:
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.samba > $PKG/etc/rc.d/rc.samba.new
+chmod 644 $PKG/etc/rc.d/rc.samba.new
+
+mv $PKG/usr/share/man $PKG/usr
+gzip -9 $PKG/usr/man/man?/*.?
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# PAM related stuff we don't use:
+rm -r $PKG/usr/share/locale
+rm -f $PKG/usr/man/man8/pam*
+
+cp -a \
+ COPYING* MAINTAINERS Manifest PFIF.txt README* \
+ Read-Manifest-Now Roadmap WHATSNEW.txt docs examples \
+ $PKG/usr/doc/samba-$VERSION
+# These are installed elsewhere:
+rm -rf $PKG/usr/doc/samba-$VERSION/docs/htmldocs \
+ $PKG/usr/doc/samba-$VERSION/docs/manpages
+# Empty now?
+rmdir $PKG/usr/doc/samba-$VERSION/docs 2> /dev/null
+# I'm sorry, but when all this info is included in HTML, adding 7MB worth of
+# PDF files just to have extra artwork is more fluff than I'll agree to.
+rm -f $PKG/usr/doc/samba-$VERSION/docs/*.pdf
+# Also redundant also:
+rm -rf $PKG/usr/doc/samba-$VERSION/docs/docbook
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+cat << EOF
+
+*** Be sure the package contains:
+
+drwxr-xr-x 2 root root 4096 May 3 15:46 /var/cache/samba/
+drwx------ 2 root root 1024 Mar 12 13:21 /var/lib/samba/private
+drwxr-xr-x 2 root root 48 Aug 29 13:06 /var/log/samba/
+drwxrwxrwt 2 root root 1024 Mar 12 13:21 /var/spool/samba/
+
+EOF
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/samba-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/samba/samba.install.talloc.tevent.tdb.diff b/patches/source/samba/samba.install.talloc.tevent.tdb.diff
new file mode 100644
index 00000000..9410f2b7
--- /dev/null
+++ b/patches/source/samba/samba.install.talloc.tevent.tdb.diff
@@ -0,0 +1,102 @@
+--- ./lib/tevent/wscript.orig 2016-03-08 05:07:45.000000000 -0600
++++ ./lib/tevent/wscript 2016-04-11 12:45:14.299532166 -0500
+@@ -92,11 +92,8 @@
+ if bld.CONFIG_SET('HAVE_SOLARIS_PORTS'):
+ SRC += ' tevent_port.c'
+
+- if bld.env.standalone_tevent:
+- bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+- private_library = False
+- else:
+- private_library = True
++ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++ private_library = False
+
+ if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
+ bld.SAMBA_LIBRARY('tevent',
+--- ./lib/tdb/wscript.orig 2016-01-26 05:45:46.000000000 -0600
++++ ./lib/tdb/wscript 2016-04-11 12:45:14.301532166 -0500
+@@ -117,11 +117,8 @@
+
+ COMMON_SRC = bld.SUBDIR('common', COMMON_FILES)
+
+- if bld.env.standalone_tdb:
+- bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+- private_library = False
+- else:
+- private_library = True
++ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++ private_library = False
+
+ if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
+
+--- ./lib/talloc/wscript.orig 2016-04-11 12:45:14.295532166 -0500
++++ ./lib/talloc/wscript 2016-04-11 12:45:26.761531768 -0500
+@@ -77,41 +77,39 @@
+ def build(bld):
+ bld.RECURSE('lib/replace')
+
+- if bld.env.standalone_talloc:
+- bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
+- bld.env.TALLOC_VERSION = VERSION
+- private_library = False
+-
+- # should we also install the symlink to libtalloc1.so here?
+- bld.SAMBA_LIBRARY('talloc-compat1-%s' % (VERSION),
+- 'compat/talloc_compat1.c',
+- public_deps='talloc',
+- soname='libtalloc.so.1',
+- pc_files=[],
+- public_headers=[],
+- enabled=bld.env.TALLOC_COMPAT1)
+-
+- testsuite_deps = 'talloc'
+- if bld.CONFIG_SET('HAVE_PTHREAD'):
+- testsuite_deps += ' pthread'
+-
+- bld.SAMBA_BINARY('talloc_testsuite',
+- 'testsuite_main.c testsuite.c',
+- testsuite_deps,
+- install=False)
+-
+- bld.SAMBA_BINARY('talloc_test_magic_differs_helper',
+- 'test_magic_differs_helper.c',
+- 'talloc', install=False)
++ bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++ bld.env.TALLOC_VERSION = VERSION
++ private_library = False
++
++ # should we also install the symlink to libtalloc1.so here?
++ bld.SAMBA_LIBRARY('talloc-compat1-%s' % (VERSION),
++ 'compat/talloc_compat1.c',
++ public_deps='talloc',
++ soname='libtalloc.so.1',
++ pc_files=[],
++ public_headers=[],
++ enabled=bld.env.TALLOC_COMPAT1)
++
++ testsuite_deps = 'talloc'
++ if bld.CONFIG_SET('HAVE_PTHREAD'):
++ testsuite_deps += ' pthread'
++
++ bld.SAMBA_BINARY('talloc_testsuite',
++ 'testsuite_main.c testsuite.c',
++ testsuite_deps,
++ install=False)
++
++ bld.SAMBA_BINARY('talloc_test_magic_differs_helper',
++ 'test_magic_differs_helper.c',
++ 'talloc', install=False)
+
+- else:
+- private_library = True
+
+ if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
+
+ bld.SAMBA_LIBRARY('talloc',
+ 'talloc.c',
+ deps='replace',
++ includes='.',
+ abi_directory='ABI',
+ abi_match='talloc* _talloc*',
+ hide_symbols=True,
diff --git a/patches/source/samba/samba.url b/patches/source/samba/samba.url
new file mode 100644
index 00000000..2b35c1fb
--- /dev/null
+++ b/patches/source/samba/samba.url
@@ -0,0 +1,2 @@
+https://download.samba.org/pub/samba/stable/samba-4.4.16.tar.gz
+https://download.samba.org/pub/samba/stable/samba-4.4.16.tar.asc
diff --git a/patches/source/samba/slack-desc b/patches/source/samba/slack-desc
new file mode 100644
index 00000000..f4352c60
--- /dev/null
+++ b/patches/source/samba/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------------------------------------------------------|
+samba: samba (CIFS file and print server)
+samba:
+samba: Samba is a CIFS file and print server for CIFS clients. It allows
+samba: you to make file space or printers on a Samba host available to CIFS
+samba: clients (such as PCs running Windows).
+samba:
+samba: If you have any Windows file servers, you may be able to replace them
+samba: or supplement them with Samba. One of Samba's big strengths is
+samba: integration, so you can use it to tie together your Linux hosts and
+samba: Windows PC clients.
+samba:
diff --git a/patches/source/samba/smb.conf.default b/patches/source/samba/smb.conf.default
new file mode 100644
index 00000000..c41cfff6
--- /dev/null
+++ b/patches/source/samba/smb.conf.default
@@ -0,0 +1,223 @@
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options (perhaps too
+# many!) most of which are not shown in this example
+#
+# For a step to step guide on installing, configuring and using samba,
+# read the Samba-HOWTO-Collection. This may be obtained from:
+# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
+#
+# Many working examples of smb.conf files can be found in the
+# Samba-Guide which is generated daily and can be downloaded from:
+# http://www.samba.org/samba/docs/Samba-Guide.pdf
+#
+# Any line which starts with a ; (semi-colon) or a # (hash)
+# is a comment and is ignored. In this example we will use a #
+# for commentry and a ; for parts of the config file that you
+# may wish to enable
+#
+# NOTE: Whenever you modify this file you should run the command "testparm"
+# to check that you have not made any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone sever" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# Uncomment this if you want a guest account, you must add this to /etc/passwd
+# otherwise the user "nobody" is used
+; guest account = pcguest
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+ log file = /var/log/samba.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Specifies the Kerberos or Active Directory realm the host is part of
+; realm = MY_REALM
+
+# Backend to store user information in. New installations should
+# use either tdbsam or ldapsam. smbpasswd is available for backwards
+# compatibility. tdbsam requires no further configuration.
+; passdb backend = tdbsam
+
+# Using the following line enables you to customise your configuration
+# on a per machine basis. The %m gets replaced with the netbios name
+# of the machine that is connecting.
+# Note: Consider carefully the location in the configuration file of
+# this line. The included file is read at that point.
+; include = /usr/local/samba/lib/smb.conf.%m
+
+# Configure Samba to use multiple interfaces
+# If you have multiple network interfaces then you must list them
+# here. See the man page for details.
+; interfaces = 192.168.12.2/24 192.168.13.2/24
+
+# Where to store roving profiles (only for Win95 and WinNT)
+# %L substitutes for this servers netbios name, %U is username
+# You must uncomment the [Profiles] share below
+; logon path = \\%L\Profiles\%U
+
+# Windows Internet Name Serving Support Section:
+# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
+; wins support = yes
+
+# WINS Server - Tells the NMBD components of Samba to be a WINS Client
+# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
+; wins server = w.x.y.z
+
+# WINS Proxy - Tells Samba to answer name resolution queries on
+# behalf of a non WINS capable client, for this to work there must be
+# at least one WINS Server on the network. The default is NO.
+; wins proxy = yes
+
+# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
+# via DNS nslookups. The default is NO.
+ dns proxy = no
+
+# These scripts are used on a domain controller or stand-alone
+# machine to add or delete corresponding unix accounts
+; add user script = /usr/sbin/useradd %u
+; add group script = /usr/sbin/groupadd %g
+; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
+; delete user script = /usr/sbin/userdel %u
+; delete user from group script = /usr/sbin/deluser %u %g
+; delete group script = /usr/sbin/groupdel %g
+
+
+#============================ Share Definitions ==============================
+[homes]
+ comment = Home Directories
+ browseable = no
+ writable = yes
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+; [netlogon]
+; comment = Network Logon Service
+; path = /usr/local/samba/lib/netlogon
+; guest ok = yes
+; writable = no
+; share modes = no
+
+
+# Un-comment the following to provide a specific roving profile share
+# the default is to use the user's home directory
+;[Profiles]
+; path = /usr/local/samba/profiles
+; browseable = no
+; guest ok = yes
+
+
+# NOTE: If you have a BSD-style print system there is no need to
+# specifically define each individual printer
+[printers]
+ comment = All Printers
+ path = /var/spool/samba
+ browseable = no
+# Set public = yes to allow user 'guest account' to print
+ guest ok = no
+ writable = no
+ printable = yes
+
+# This one is useful for people to share files
+;[tmp]
+; comment = Temporary file space
+; path = /tmp
+; read only = no
+; public = yes
+
+# A publicly accessible directory, but read only, except for people in
+# the "staff" group
+;[public]
+; comment = Public Stuff
+; path = /home/samba
+; public = yes
+; writable = no
+; printable = no
+; write list = @staff
+
+# Other examples.
+#
+# A private printer, usable only by fred. Spool data will be placed in fred's
+# home directory. Note that fred must have write access to the spool directory,
+# wherever it is.
+;[fredsprn]
+; comment = Fred's Printer
+; valid users = fred
+; path = /homes/fred
+; printer = freds_printer
+; public = no
+; writable = no
+; printable = yes
+
+# A private directory, usable only by fred. Note that fred requires write
+# access to the directory.
+;[fredsdir]
+; comment = Fred's Service
+; path = /usr/somewhere/private
+; valid users = fred
+; public = no
+; writable = yes
+; printable = no
+
+# a service which has a different directory for each machine that connects
+# this allows you to tailor configurations to incoming machines. You could
+# also use the %U option to tailor it by user name.
+# The %m gets replaced with the machine name that is connecting.
+;[pchome]
+; comment = PC Directories
+; path = /usr/pc/%m
+; public = no
+; writable = yes
+
+# A publicly accessible directory, read/write to all users. Note that all files
+# created in the directory by users will be owned by the default user, so
+# any user with access can delete any other user's files. Obviously this
+# directory must be writable by the default user. Another user could of course
+# be specified, in which case all files would be owned by that user instead.
+;[public]
+; path = /usr/somewhere/else/public
+; public = yes
+; only guest = yes
+; writable = yes
+; printable = no
+
+# The following two entries demonstrate how to share a directory so that two
+# users can place files there that will be owned by the specific users. In this
+# setup, the directory should be writable by both users and should have the
+# sticky bit set on it to prevent abuse. Obviously this could be extended to
+# as many users as required.
+;[myshare]
+; comment = Mary's and Fred's stuff
+; path = /usr/somewhere/shared
+; valid users = mary fred
+; public = no
+; writable = yes
+; printable = no
+; create mask = 0765
+
+
diff --git a/patches/source/samba/smb.conf.default.orig b/patches/source/samba/smb.conf.default.orig
new file mode 100644
index 00000000..bb9c2e25
--- /dev/null
+++ b/patches/source/samba/smb.conf.default.orig
@@ -0,0 +1,223 @@
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options (perhaps too
+# many!) most of which are not shown in this example
+#
+# For a step to step guide on installing, configuring and using samba,
+# read the Samba-HOWTO-Collection. This may be obtained from:
+# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
+#
+# Many working examples of smb.conf files can be found in the
+# Samba-Guide which is generated daily and can be downloaded from:
+# http://www.samba.org/samba/docs/Samba-Guide.pdf
+#
+# Any line which starts with a ; (semi-colon) or a # (hash)
+# is a comment and is ignored. In this example we will use a #
+# for commentry and a ; for parts of the config file that you
+# may wish to enable
+#
+# NOTE: Whenever you modify this file you should run the command "testparm"
+# to check that you have not made any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone sever" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# Uncomment this if you want a guest account, you must add this to /etc/passwd
+# otherwise the user "nobody" is used
+; guest account = pcguest
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+ log file = /usr/local/samba/var/log.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Specifies the Kerberos or Active Directory realm the host is part of
+; realm = MY_REALM
+
+# Backend to store user information in. New installations should
+# use either tdbsam or ldapsam. smbpasswd is available for backwards
+# compatibility. tdbsam requires no further configuration.
+; passdb backend = tdbsam
+
+# Using the following line enables you to customise your configuration
+# on a per machine basis. The %m gets replaced with the netbios name
+# of the machine that is connecting.
+# Note: Consider carefully the location in the configuration file of
+# this line. The included file is read at that point.
+; include = /usr/local/samba/lib/smb.conf.%m
+
+# Configure Samba to use multiple interfaces
+# If you have multiple network interfaces then you must list them
+# here. See the man page for details.
+; interfaces = 192.168.12.2/24 192.168.13.2/24
+
+# Where to store roving profiles (only for Win95 and WinNT)
+# %L substitutes for this servers netbios name, %U is username
+# You must uncomment the [Profiles] share below
+; logon path = \\%L\Profiles\%U
+
+# Windows Internet Name Serving Support Section:
+# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
+; wins support = yes
+
+# WINS Server - Tells the NMBD components of Samba to be a WINS Client
+# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
+; wins server = w.x.y.z
+
+# WINS Proxy - Tells Samba to answer name resolution queries on
+# behalf of a non WINS capable client, for this to work there must be
+# at least one WINS Server on the network. The default is NO.
+; wins proxy = yes
+
+# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
+# via DNS nslookups. The default is NO.
+ dns proxy = no
+
+# These scripts are used on a domain controller or stand-alone
+# machine to add or delete corresponding unix accounts
+; add user script = /usr/sbin/useradd %u
+; add group script = /usr/sbin/groupadd %g
+; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
+; delete user script = /usr/sbin/userdel %u
+; delete user from group script = /usr/sbin/deluser %u %g
+; delete group script = /usr/sbin/groupdel %g
+
+
+#============================ Share Definitions ==============================
+[homes]
+ comment = Home Directories
+ browseable = no
+ writable = yes
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+; [netlogon]
+; comment = Network Logon Service
+; path = /usr/local/samba/lib/netlogon
+; guest ok = yes
+; writable = no
+; share modes = no
+
+
+# Un-comment the following to provide a specific roving profile share
+# the default is to use the user's home directory
+;[Profiles]
+; path = /usr/local/samba/profiles
+; browseable = no
+; guest ok = yes
+
+
+# NOTE: If you have a BSD-style print system there is no need to
+# specifically define each individual printer
+[printers]
+ comment = All Printers
+ path = /usr/spool/samba
+ browseable = no
+# Set public = yes to allow user 'guest account' to print
+ guest ok = no
+ writable = no
+ printable = yes
+
+# This one is useful for people to share files
+;[tmp]
+; comment = Temporary file space
+; path = /tmp
+; read only = no
+; public = yes
+
+# A publicly accessible directory, but read only, except for people in
+# the "staff" group
+;[public]
+; comment = Public Stuff
+; path = /home/samba
+; public = yes
+; writable = no
+; printable = no
+; write list = @staff
+
+# Other examples.
+#
+# A private printer, usable only by fred. Spool data will be placed in fred's
+# home directory. Note that fred must have write access to the spool directory,
+# wherever it is.
+;[fredsprn]
+; comment = Fred's Printer
+; valid users = fred
+; path = /homes/fred
+; printer = freds_printer
+; public = no
+; writable = no
+; printable = yes
+
+# A private directory, usable only by fred. Note that fred requires write
+# access to the directory.
+;[fredsdir]
+; comment = Fred's Service
+; path = /usr/somewhere/private
+; valid users = fred
+; public = no
+; writable = yes
+; printable = no
+
+# a service which has a different directory for each machine that connects
+# this allows you to tailor configurations to incoming machines. You could
+# also use the %U option to tailor it by user name.
+# The %m gets replaced with the machine name that is connecting.
+;[pchome]
+; comment = PC Directories
+; path = /usr/pc/%m
+; public = no
+; writable = yes
+
+# A publicly accessible directory, read/write to all users. Note that all files
+# created in the directory by users will be owned by the default user, so
+# any user with access can delete any other user's files. Obviously this
+# directory must be writable by the default user. Another user could of course
+# be specified, in which case all files would be owned by that user instead.
+;[public]
+; path = /usr/somewhere/else/public
+; public = yes
+; only guest = yes
+; writable = yes
+; printable = no
+
+# The following two entries demonstrate how to share a directory so that two
+# users can place files there that will be owned by the specific users. In this
+# setup, the directory should be writable by both users and should have the
+# sticky bit set on it to prevent abuse. Obviously this could be extended to
+# as many users as required.
+;[myshare]
+; comment = Mary's and Fred's stuff
+; path = /usr/somewhere/shared
+; valid users = mary fred
+; public = no
+; writable = yes
+; printable = no
+; create mask = 0765
+
+
diff --git a/patches/source/samba/smb.conf.diff b/patches/source/samba/smb.conf.diff
new file mode 100644
index 00000000..b08d2b12
--- /dev/null
+++ b/patches/source/samba/smb.conf.diff
@@ -0,0 +1,29 @@
+--- smb.conf.default.orig 2013-06-13 04:21:02.000000000 -0500
++++ smb.conf.default 2013-10-15 20:02:31.684043875 -0500
+@@ -22,7 +22,7 @@
+ #======================= Global Settings =====================================
+ [global]
+
+-# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
++# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
+ workgroup = MYGROUP
+
+ # server string is the equivalent of the NT Description field
+@@ -52,7 +52,7 @@
+
+ # this tells Samba to use a separate log file for each machine
+ # that connects
+- log file = /usr/local/samba/var/log.%m
++ log file = /var/log/samba.%m
+
+ # Put a capping on the size of the log files (in Kb).
+ max log size = 50
+@@ -136,7 +136,7 @@
+ # specifically define each individual printer
+ [printers]
+ comment = All Printers
+- path = /usr/spool/samba
++ path = /var/spool/samba
+ browseable = no
+ # Set public = yes to allow user 'guest account' to print
+ guest ok = no
diff --git a/patches/source/samba/talloc.pc b/patches/source/samba/talloc.pc
new file mode 100644
index 00000000..125977d1
--- /dev/null
+++ b/patches/source/samba/talloc.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: talloc
+Description: A hierarchical pool based memory system with destructors
+Version: 2.0.8
+Libs: -Wl,-rpath,/usr/lib -L${libdir} -ltalloc
+Cflags: -I${includedir}
+URL: http://talloc.samba.org/
diff --git a/patches/source/scim/scim-setup.desktop b/patches/source/scim/scim-setup.desktop
new file mode 100644
index 00000000..a236ef29
--- /dev/null
+++ b/patches/source/scim/scim-setup.desktop
@@ -0,0 +1,28 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=SCIM Input Method Setup
+Name[cs]=Nastavení vstupní metody SCIM
+Name[de]=Einstellungen der SCIM-Eingabemethoden
+Name[fr]=Configuration de la Méthode de Saisie SCIM
+Name[it]=Configurazione del metodo di inserimento SCIM
+Name[ja]=SCIM入力メソッドã®è¨­å®š
+Name[ko]=SCIM 입력기 설정
+Name[pa]=SCIM ਇੰਪà©à©±à¨Ÿ ਢੰਗ ਸੈਟਅੱਪ
+Name[zh_CN]=SCIM 输入法设置
+Name[zh_TW]=SCIM 輸入法設定
+Comment=Setup utility for Smart Common Input Method platform
+Comment[cs]=Nástroj pro nastavení Smart Common Input Method platformy
+Comment[de]=Einrichtungswerkzeug für die Smart Common Input Method-Plattform
+Comment[fr]=Utilitaire de configuration de la plateforme "Smart Common Input Method"
+Comment[it]=Programma di configurazione per il metodo inserimento comune intelligente
+Comment[ja]=Smart Common Input Method platform セットアップユーティリティ
+Comment[ko]=똑똑한 공통 ìž…ë ¥ 방법 (SCIM)ì„ ìœ„í•œ 설정 프로그램
+Comment[pa]=ਸਮਾਰਟ ਕਾਮਨ ਇੰਪà©à©±à¨Ÿ ਮੈਂਥਸਡ ਪਲੇਟਫਾਰਮ ਲਈ ਸੈਟਅੱਪ ਸਹੂਲਤ
+Comment[zh_CN]=智能通用输入法平å°çš„设置工具
+Comment[zh_TW]=泛用智慧型輸入法平å°çš„設定工具
+Exec=scim-setup
+Icon=/usr/share/pixmaps/scim-setup.png
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Applications;Settings;
diff --git a/patches/source/scim/scim.SlackBuild b/patches/source/scim/scim.SlackBuild
new file mode 100755
index 00000000..9d7e7e4e
--- /dev/null
+++ b/patches/source/scim/scim.SlackBuild
@@ -0,0 +1,250 @@
+#!/bin/sh
+
+# Copyright 2006, 2007, 2008 Eric Hameleers, Eindhoven, NL
+# Copyright 2008, 2009, 2011, 2012, 2013, 2015 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: scim
+# Descr: Smart Common Input Method platform
+# URL: http://www.scim-im.org/
+#
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=scim
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+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} || exit 1
+
+./bootstrap
+
+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 {} \;
+
+echo Building ...
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --disable-static \
+ --with-gtk-version=2 \
+ --with-qt4-im-module-dir=/usr/lib${LIBDIRSUFFIX}/qt/plugins/inputmethods \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Add a profile script that sets up the environment:
+mkdir -p $PKG/etc/profile.d
+
+cat <<EOT > $PKG/etc/profile.d/scim.sh.new
+#!/bin/sh
+
+# SCIM (Smart Common Input Method platform). This is used to support the
+# entering of text in non-US-English languages.
+
+# For SCIM to work, you need to use a UTF-8 locale. Make sure it ends on
+# ".UTF-8", not "utf-8"! As an example, you would need to use en_US.UTF-8
+# for a US locale (export LANG=en_US.UTF-8), not en_US.
+#
+# The locale (LANG variable) is set in /etc/profile.d/lang.sh.
+
+if [ -x /usr/bin/scim ]; then
+ # Enable legacy X applications to use scim:
+ export XMODIFIERS="@im=SCIM"
+ # Let GTK applications like Firefox/Thunderbird use scim as
+ # default immodule:
+ export GTK_IM_MODULE="scim"
+ # Enable Qt/KDE applications to use scim:
+ export QT_IM_MODULE="scim"
+ # Make scim start automatically if the "magic key" Ctrl-Space is pressed:
+ export XIM_PROGRAM="/usr/bin/scim -d"
+fi
+
+# This ensures scim starts when you logon.
+# This will only work if you login through runlevel 4 (graphical login)!!!
+# Better is to have it start through Ctrl-Space like configured higher up ^^.
+#if [ ! \`ls /tmp/scim-socket*\` ]; then
+# /usr/bin/scim -d
+#fi
+
+EOT
+
+cat <<EOT > $PKG/etc/profile.d/scim.csh.new
+#!/bin/csh
+
+# SCIM (Smart Common Input Method platform). This is used to support the
+# entering of text in non-US-English languages.
+
+# For SCIM to work, you need to use a UTF-8 locale. Make sure it ends on
+# ".UTF-8", not "utf-8"! As an example, you would need to use en_US.UTF-8
+# for a US locale (setenv LANG en_US.UTF-8), not en_US.
+#
+# The locale (LANG variable) is set in /etc/profile.d/lang.csh.
+
+[ -x /usr/bin/scim ]
+if (\$status == 0) then
+ # Enable legacy X applications to use scim:
+ setenv XMODIFIERS "@im=SCIM"
+ # Let GTK applications like Firefox/Thunderbird use scim as
+ # default immodule:
+ setenv GTK_IM_MODULE "scim"
+ # Enable Qt/KDE applications to use scim (does not work for kde4):
+ setenv QT_IM_MODULE "scim"
+ # Make scim start automatically if the "magic key" Ctrl-Space is pressed:
+ setenv XIM_PROGRAM "/usr/bin/scim -d"
+endif
+
+# This ensures scim starts when you logon.
+# This will only work if you login through runlevel 4 (graphical login)!!!
+# Better is to have it start through Ctrl-Space like configured higher up ^^.
+#[ ! \`ls /tmp/scim-socket*\` ]
+#if (\$status == 0) then
+# /usr/bin/scim -d
+#endif
+
+EOT
+
+chmod 755 $PKG/etc/profile.d/scim.sh.new
+chmod 755 $PKG/etc/profile.d/scim.csh.new
+
+mkdir -p $PKG/usr/share/applications
+cat $CWD/scim.desktop > $PKG/usr/share/applications/scim.desktop
+cat $CWD/scim-setup.desktop > $PKG/usr/share/applications/scim-setup.desktop
+
+# Protect config files from being overwritten:
+mv $PKG/etc/scim/config{,.new}
+mv $PKG/etc/scim/global{,.new}
+
+# 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
+}
+
+# Prepare the new configuration files
+for file in etc/scim/config.new etc/scim/global.new etc/profile.d/scim.sh.new etc/profile.d/scim.csh.new ; do
+ if [ -e \$(dirname \$file)/\$(basename \$file .new) -a -x \$(dirname \$file)/\$(basename \$file .new) ]; then
+ chmod 755 \$file
+ else
+ chmod 644 \$file
+ fi
+ config \$file
+done
+
+# Run gtk-query-immodules so that "scim" will appear under Imput Method
+# when you right- click your mouse in a text box.
+if [ -x /usr/bin/update-gtk-immodules ]; then
+ /usr/bin/update-gtk-immodules
+fi
+
+EOINS
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/manual/zh_CN/figures
+cp -a \
+ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+# Install documentation and user manual
+cp -a docs/manual/zh_CN/user-manual.html \
+ $PKG/usr/doc/$PKGNAM-$VERSION/manual/zh_CN/
+cp -a docs/manual/zh_CN/figures/*.png \
+ $PKG/usr/doc/$PKGNAM-$VERSION/manual/zh_CN/figures/
+
+# 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 $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg --prepend --linkadd y --chown n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/patches/source/scim/scim.desktop b/patches/source/scim/scim.desktop
new file mode 100644
index 00000000..7aacbcc0
--- /dev/null
+++ b/patches/source/scim/scim.desktop
@@ -0,0 +1,20 @@
+[Desktop Entry]
+Comment=Start the Smart Common Input Method platform
+Comment[zh_CN]=
+Encoding=UTF-8
+Exec=scim -d
+GenericName=
+GenericName[zh_CN]=
+Icon=/usr/share/pixmaps/scim-setup.png
+MimeType=
+Name=SCIM (Smart Common Input Method) startup
+Name[zh_CN]=
+Path=
+StartupNotify=true
+Terminal=false
+TerminalOptions=
+Type=Application
+X-DCOP-ServiceType=
+X-KDE-SubstituteUID=false
+X-KDE-Username=
+Categories=Applications;Utility;
diff --git a/patches/source/scim/slack-desc b/patches/source/scim/slack-desc
new file mode 100644
index 00000000..066d9f41
--- /dev/null
+++ b/patches/source/scim/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------------------------------------------------------|
+scim: scim (Smart Common Input Method platform)
+scim:
+scim: SCIM is an input platform for CJK and other languages.
+scim: It aims to significantly reduce the difficulty of input method
+scim: development.
+scim:
+scim: See the scim scripts in /etc/profile.d/ for setup info.
+scim:
+scim: scim home: http://www.scim-im.org/
+scim:
+scim:
diff --git a/patches/source/screen/26source_encoding.patch b/patches/source/screen/26source_encoding.patch
new file mode 100644
index 00000000..1094ac51
--- /dev/null
+++ b/patches/source/screen/26source_encoding.patch
@@ -0,0 +1,353 @@
+Author: Ben Finney <ben@benfinney.id.au>
+Description: Replace the composed characters with their respective description.
+--- a/process.c
++++ b/process.c
+@@ -250,177 +250,177 @@
+
+ /* digraph table taken from old vim and rfc1345 */
+ static struct digraph digraphs[MAX_DIGRAPH + 1] = {
+- {{' ', ' '}, 160}, /*   */
+- {{'N', 'S'}, 160}, /*   */
+- {{'~', '!'}, 161}, /* ¡ */
+- {{'!', '!'}, 161}, /* ¡ */
+- {{'!', 'I'}, 161}, /* ¡ */
+- {{'c', '|'}, 162}, /* ¢ */
+- {{'c', 't'}, 162}, /* ¢ */
+- {{'$', '$'}, 163}, /* £ */
+- {{'P', 'd'}, 163}, /* £ */
+- {{'o', 'x'}, 164}, /* ¤ */
+- {{'C', 'u'}, 164}, /* ¤ */
+- {{'C', 'u'}, 164}, /* ¤ */
+- {{'E', 'u'}, 164}, /* ¤ */
+- {{'Y', '-'}, 165}, /* ¥ */
+- {{'Y', 'e'}, 165}, /* ¥ */
+- {{'|', '|'}, 166}, /* ¦ */
+- {{'B', 'B'}, 166}, /* ¦ */
+- {{'p', 'a'}, 167}, /* § */
+- {{'S', 'E'}, 167}, /* § */
+- {{'"', '"'}, 168}, /* ¨ */
+- {{'\'', ':'}, 168}, /* ¨ */
+- {{'c', 'O'}, 169}, /* © */
+- {{'C', 'o'}, 169}, /* © */
+- {{'a', '-'}, 170}, /* ª */
+- {{'<', '<'}, 171}, /* « */
+- {{'-', ','}, 172}, /* ¬ */
+- {{'N', 'O'}, 172}, /* ¬ */
+- {{'-', '-'}, 173}, /* ­ */
+- {{'r', 'O'}, 174}, /* ® */
+- {{'R', 'g'}, 174}, /* ® */
+- {{'-', '='}, 175}, /* ¯ */
+- {{'\'', 'm'}, 175}, /* ¯ */
+- {{'~', 'o'}, 176}, /* ° */
+- {{'D', 'G'}, 176}, /* ° */
+- {{'+', '-'}, 177}, /* ± */
+- {{'2', '2'}, 178}, /* ² */
+- {{'2', 'S'}, 178}, /* ² */
+- {{'3', '3'}, 179}, /* ³ */
+- {{'3', 'S'}, 179}, /* ³ */
+- {{'\'', '\''}, 180}, /* ´ */
+- {{'j', 'u'}, 181}, /* µ */
+- {{'M', 'y'}, 181}, /* µ */
+- {{'p', 'p'}, 182}, /* ¶ */
+- {{'P', 'I'}, 182}, /* ¶ */
+- {{'~', '.'}, 183}, /* · */
+- {{'.', 'M'}, 183}, /* · */
+- {{',', ','}, 184}, /* ¸ */
+- {{'\'', ','}, 184}, /* ¸ */
+- {{'1', '1'}, 185}, /* ¹ */
+- {{'1', 'S'}, 185}, /* ¹ */
+- {{'o', '-'}, 186}, /* º */
+- {{'>', '>'}, 187}, /* » */
+- {{'1', '4'}, 188}, /* ¼ */
+- {{'1', '2'}, 189}, /* ½ */
+- {{'3', '4'}, 190}, /* ¾ */
+- {{'~', '?'}, 191}, /* ¿ */
+- {{'?', '?'}, 191}, /* ¿ */
+- {{'?', 'I'}, 191}, /* ¿ */
+- {{'A', '`'}, 192}, /* À */
+- {{'A', '!'}, 192}, /* À */
+- {{'A', '\''}, 193}, /* Á */
+- {{'A', '^'}, 194}, /* Â */
+- {{'A', '>'}, 194}, /* Â */
+- {{'A', '~'}, 195}, /* Ã */
+- {{'A', '?'}, 195}, /* Ã */
+- {{'A', '"'}, 196}, /* Ä */
+- {{'A', ':'}, 196}, /* Ä */
+- {{'A', '@'}, 197}, /* Å */
+- {{'A', 'A'}, 197}, /* Å */
+- {{'A', 'E'}, 198}, /* Æ */
+- {{'C', ','}, 199}, /* Ç */
+- {{'E', '`'}, 200}, /* È */
+- {{'E', '!'}, 200}, /* È */
+- {{'E', '\''}, 201}, /* É */
+- {{'E', '^'}, 202}, /* Ê */
+- {{'E', '>'}, 202}, /* Ê */
+- {{'E', '"'}, 203}, /* Ë */
+- {{'E', ':'}, 203}, /* Ë */
+- {{'I', '`'}, 204}, /* Ì */
+- {{'I', '!'}, 204}, /* Ì */
+- {{'I', '\''}, 205}, /* Í */
+- {{'I', '^'}, 206}, /* Î */
+- {{'I', '>'}, 206}, /* Î */
+- {{'I', '"'}, 207}, /* Ï */
+- {{'I', ':'}, 207}, /* Ï */
+- {{'D', '-'}, 208}, /* Ð */
+- {{'N', '~'}, 209}, /* Ñ */
+- {{'N', '?'}, 209}, /* Ñ */
+- {{'O', '`'}, 210}, /* Ò */
+- {{'O', '!'}, 210}, /* Ò */
+- {{'O', '\''}, 211}, /* Ó */
+- {{'O', '^'}, 212}, /* Ô */
+- {{'O', '>'}, 212}, /* Ô */
+- {{'O', '~'}, 213}, /* Õ */
+- {{'O', '?'}, 213}, /* Õ */
+- {{'O', '"'}, 214}, /* Ö */
+- {{'O', ':'}, 214}, /* Ö */
+- {{'/', '\\'}, 215}, /* × */
+- {{'*', 'x'}, 215}, /* × */
+- {{'O', '/'}, 216}, /* Ø */
+- {{'U', '`'}, 217}, /* Ù */
+- {{'U', '!'}, 217}, /* Ù */
+- {{'U', '\''}, 218}, /* Ú */
+- {{'U', '^'}, 219}, /* Û */
+- {{'U', '>'}, 219}, /* Û */
+- {{'U', '"'}, 220}, /* Ü */
+- {{'U', ':'}, 220}, /* Ü */
+- {{'Y', '\''}, 221}, /* Ý */
+- {{'I', 'p'}, 222}, /* Þ */
+- {{'T', 'H'}, 222}, /* Þ */
+- {{'s', 's'}, 223}, /* ß */
+- {{'s', '"'}, 223}, /* ß */
+- {{'a', '`'}, 224}, /* à */
+- {{'a', '!'}, 224}, /* à */
+- {{'a', '\''}, 225}, /* á */
+- {{'a', '^'}, 226}, /* â */
+- {{'a', '>'}, 226}, /* â */
+- {{'a', '~'}, 227}, /* ã */
+- {{'a', '?'}, 227}, /* ã */
+- {{'a', '"'}, 228}, /* ä */
+- {{'a', ':'}, 228}, /* ä */
+- {{'a', 'a'}, 229}, /* å */
+- {{'a', 'e'}, 230}, /* æ */
+- {{'c', ','}, 231}, /* ç */
+- {{'e', '`'}, 232}, /* è */
+- {{'e', '!'}, 232}, /* è */
+- {{'e', '\''}, 233}, /* é */
+- {{'e', '^'}, 234}, /* ê */
+- {{'e', '>'}, 234}, /* ê */
+- {{'e', '"'}, 235}, /* ë */
+- {{'e', ':'}, 235}, /* ë */
+- {{'i', '`'}, 236}, /* ì */
+- {{'i', '!'}, 236}, /* ì */
+- {{'i', '\''}, 237}, /* í */
+- {{'i', '^'}, 238}, /* î */
+- {{'i', '>'}, 238}, /* î */
+- {{'i', '"'}, 239}, /* ï */
+- {{'i', ':'}, 239}, /* ï */
+- {{'d', '-'}, 240}, /* ð */
+- {{'n', '~'}, 241}, /* ñ */
+- {{'n', '?'}, 241}, /* ñ */
+- {{'o', '`'}, 242}, /* ò */
+- {{'o', '!'}, 242}, /* ò */
+- {{'o', '\''}, 243}, /* ó */
+- {{'o', '^'}, 244}, /* ô */
+- {{'o', '>'}, 244}, /* ô */
+- {{'o', '~'}, 245}, /* õ */
+- {{'o', '?'}, 245}, /* õ */
+- {{'o', '"'}, 246}, /* ö */
+- {{'o', ':'}, 246}, /* ö */
+- {{':', '-'}, 247}, /* ÷ */
+- {{'o', '/'}, 248}, /* ø */
+- {{'u', '`'}, 249}, /* ù */
+- {{'u', '!'}, 249}, /* ù */
+- {{'u', '\''}, 250}, /* ú */
+- {{'u', '^'}, 251}, /* û */
+- {{'u', '>'}, 251}, /* û */
+- {{'u', '"'}, 252}, /* ü */
+- {{'u', ':'}, 252}, /* ü */
+- {{'y', '\''}, 253}, /* ý */
+- {{'i', 'p'}, 254}, /* þ */
+- {{'t', 'h'}, 254}, /* þ */
+- {{'y', '"'}, 255}, /* ÿ */
+- {{'y', ':'}, 255}, /* ÿ */
+- {{'"', '['}, 196}, /* Ä */
+- {{'"', '\\'}, 214}, /* Ö */
+- {{'"', ']'}, 220}, /* Ü */
+- {{'"', '{'}, 228}, /* ä */
+- {{'"', '|'}, 246}, /* ö */
+- {{'"', '}'}, 252}, /* ü */
+- {{'"', '~'}, 223} /* ß */
++ {{' ', ' '}, 0x00a0}, /* NO-BREAK SPACE */
++ {{'N', 'S'}, 0x00a0}, /* NO-BREAK SPACE */
++ {{'~', '!'}, 0x00a1}, /* INVERTED EXCLAMATION MARK */
++ {{'!', '!'}, 0x00a1}, /* INVERTED EXCLAMATION MARK */
++ {{'!', 'I'}, 0x00a1}, /* INVERTED EXCLAMATION MARK */
++ {{'c', '|'}, 0x00a2}, /* CENT SIGN */
++ {{'c', 't'}, 0x00a2}, /* CENT SIGN */
++ {{'$', '$'}, 0x00a3}, /* POUND SIGN */
++ {{'P', 'd'}, 0x00a3}, /* POUND SIGN */
++ {{'o', 'x'}, 0x00a4}, /* CURRENCY SIGN */
++ {{'C', 'u'}, 0x00a4}, /* CURRENCY SIGN */
++ {{'C', 'u'}, 0x00a4}, /* CURRENCY SIGN */
++ {{'E', 'u'}, 0x00a4}, /* CURRENCY SIGN */
++ {{'Y', '-'}, 0x00a5}, /* YEN SIGN */
++ {{'Y', 'e'}, 0x00a5}, /* YEN SIGN */
++ {{'|', '|'}, 0x00a6}, /* BROKEN BAR */
++ {{'B', 'B'}, 0x00a6}, /* BROKEN BAR */
++ {{'p', 'a'}, 0x00a7}, /* SECTION SIGN */
++ {{'S', 'E'}, 0x00a7}, /* SECTION SIGN */
++ {{'"', '"'}, 0x00a8}, /* DIAERESIS */
++ {{'\'', ':'}, 0x00a8}, /* DIAERESIS */
++ {{'c', 'O'}, 0x00a9}, /* COPYRIGHT SIGN */
++ {{'C', 'o'}, 0x00a9}, /* COPYRIGHT SIGN */
++ {{'-', 'a'}, 0x00aa}, /* FEMININE ORDINAL INDICATOR */
++ {{'<', '<'}, 0x00ab}, /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */
++ {{'-', ','}, 0x00ac}, /* NOT SIGN */
++ {{'N', 'O'}, 0x00ac}, /* NOT SIGN */
++ {{'-', '-'}, 0x00ad}, /* SOFT HYPHEN */
++ {{'r', 'O'}, 0x00ae}, /* REGISTERED SIGN */
++ {{'R', 'g'}, 0x00ae}, /* REGISTERED SIGN */
++ {{'-', '='}, 0x00af}, /* MACRON */
++ {{'\'', 'm'}, 0x00af}, /* MACRON */
++ {{'~', 'o'}, 0x00b0}, /* DEGREE SIGN */
++ {{'D', 'G'}, 0x00b0}, /* DEGREE SIGN */
++ {{'+', '-'}, 0x00b1}, /* PLUS-MINUS SIGN */
++ {{'2', '2'}, 0x00b2}, /* SUPERSCRIPT TWO */
++ {{'2', 'S'}, 0x00b2}, /* SUPERSCRIPT TWO */
++ {{'3', '3'}, 0x00b3}, /* SUPERSCRIPT THREE */
++ {{'3', 'S'}, 0x00b3}, /* SUPERSCRIPT THREE */
++ {{'\'', '\''}, 0x00b4}, /* ACUTE ACCENT */
++ {{'j', 'u'}, 0x00b5}, /* MICRO SIGN */
++ {{'M', 'y'}, 0x00b5}, /* MICRO SIGN */
++ {{'p', 'p'}, 0x00b6}, /* PILCROW SIGN */
++ {{'P', 'I'}, 0x00b6}, /* PILCROW SIGN */
++ {{'~', '.'}, 0x00b7}, /* MIDDLE DOT */
++ {{'.', 'M'}, 0x00b7}, /* MIDDLE DOT */
++ {{',', ','}, 0x00b8}, /* CEDILLA */
++ {{'\'', ','}, 0x00b8}, /* CEDILLA */
++ {{'1', '1'}, 0x00b9}, /* SUPERSCRIPT ONE */
++ {{'1', 'S'}, 0x00b9}, /* SUPERSCRIPT ONE */
++ {{'-', 'o'}, 0x00ba}, /* MASCULINE ORDINAL INDICATOR */
++ {{'>', '>'}, 0x00bb}, /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */
++ {{'1', '4'}, 0x00bc}, /* VULGAR FRACTION ONE QUARTER */
++ {{'1', '2'}, 0x00bd}, /* VULGAR FRACTION ONE HALF */
++ {{'3', '4'}, 0x00be}, /* VULGAR FRACTION THREE QUARTERS */
++ {{'~', '?'}, 0x00bf}, /* INVERTED QUESTION MARK */
++ {{'?', '?'}, 0x00bf}, /* INVERTED QUESTION MARK */
++ {{'?', 'I'}, 0x00bf}, /* INVERTED QUESTION MARK */
++ {{'A', '`'}, 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */
++ {{'A', '!'}, 0x00c0}, /* LATIN CAPITAL LETTER A WITH GRAVE */
++ {{'A', '\''}, 0x00c1}, /* LATIN CAPITAL LETTER A WITH ACUTE */
++ {{'A', '^'}, 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
++ {{'A', '>'}, 0x00c2}, /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */
++ {{'A', '~'}, 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */
++ {{'A', '?'}, 0x00c3}, /* LATIN CAPITAL LETTER A WITH TILDE */
++ {{'A', '"'}, 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */
++ {{'A', ':'}, 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */
++ {{'A', '@'}, 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */
++ {{'A', 'A'}, 0x00c5}, /* LATIN CAPITAL LETTER A WITH RING ABOVE */
++ {{'A', 'E'}, 0x00c6}, /* LATIN CAPITAL LETTER AE */
++ {{'C', ','}, 0x00c7}, /* LATIN CAPITAL LETTER C WITH CEDILLA */
++ {{'E', '`'}, 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */
++ {{'E', '!'}, 0x00c8}, /* LATIN CAPITAL LETTER E WITH GRAVE */
++ {{'E', '\''}, 0x00c9}, /* LATIN CAPITAL LETTER E WITH ACUTE */
++ {{'E', '^'}, 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
++ {{'E', '>'}, 0x00ca}, /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */
++ {{'E', '"'}, 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */
++ {{'E', ':'}, 0x00cb}, /* LATIN CAPITAL LETTER E WITH DIAERESIS */
++ {{'I', '`'}, 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */
++ {{'I', '!'}, 0x00cc}, /* LATIN CAPITAL LETTER I WITH GRAVE */
++ {{'I', '\''}, 0x00cd}, /* LATIN CAPITAL LETTER I WITH ACUTE */
++ {{'I', '^'}, 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
++ {{'I', '>'}, 0x00ce}, /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */
++ {{'I', '"'}, 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */
++ {{'I', ':'}, 0x00cf}, /* LATIN CAPITAL LETTER I WITH DIAERESIS */
++ {{'D', '-'}, 0x00d0}, /* LATIN CAPITAL LETTER ETH */
++ {{'N', '~'}, 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */
++ {{'N', '?'}, 0x00d1}, /* LATIN CAPITAL LETTER N WITH TILDE */
++ {{'O', '`'}, 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */
++ {{'O', '!'}, 0x00d2}, /* LATIN CAPITAL LETTER O WITH GRAVE */
++ {{'O', '\''}, 0x00d3}, /* LATIN CAPITAL LETTER O WITH ACUTE */
++ {{'O', '^'}, 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
++ {{'O', '>'}, 0x00d4}, /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */
++ {{'O', '~'}, 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */
++ {{'O', '?'}, 0x00d5}, /* LATIN CAPITAL LETTER O WITH TILDE */
++ {{'O', '"'}, 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */
++ {{'O', ':'}, 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */
++ {{'/', '\\'}, 0x00d7}, /* MULTIPLICATION SIGN */
++ {{'*', 'x'}, 0x00d7}, /* MULTIPLICATION SIGN */
++ {{'O', '/'}, 0x00d8}, /* LATIN CAPITAL LETTER O WITH STROKE */
++ {{'U', '`'}, 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */
++ {{'U', '!'}, 0x00d9}, /* LATIN CAPITAL LETTER U WITH GRAVE */
++ {{'U', '\''}, 0x00da}, /* LATIN CAPITAL LETTER U WITH ACUTE */
++ {{'U', '^'}, 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
++ {{'U', '>'}, 0x00db}, /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */
++ {{'U', '"'}, 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */
++ {{'U', ':'}, 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */
++ {{'Y', '\''}, 0x00dd}, /* LATIN CAPITAL LETTER Y WITH ACUTE */
++ {{'I', 'p'}, 0x00de}, /* LATIN CAPITAL LETTER THORN */
++ {{'T', 'H'}, 0x00de}, /* LATIN CAPITAL LETTER THORN */
++ {{'s', 's'}, 0x00df}, /* LATIN SMALL LETTER SHARP S */
++ {{'s', '"'}, 0x00df}, /* LATIN SMALL LETTER SHARP S */
++ {{'a', '`'}, 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */
++ {{'a', '!'}, 0x00e0}, /* LATIN SMALL LETTER A WITH GRAVE */
++ {{'a', '\''}, 0x00e1}, /* LATIN SMALL LETTER A WITH ACUTE */
++ {{'a', '^'}, 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
++ {{'a', '>'}, 0x00e2}, /* LATIN SMALL LETTER A WITH CIRCUMFLEX */
++ {{'a', '~'}, 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */
++ {{'a', '?'}, 0x00e3}, /* LATIN SMALL LETTER A WITH TILDE */
++ {{'a', '"'}, 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */
++ {{'a', ':'}, 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */
++ {{'a', 'a'}, 0x00e5}, /* LATIN SMALL LETTER A WITH RING ABOVE */
++ {{'a', 'e'}, 0x00e6}, /* LATIN SMALL LETTER AE */
++ {{'c', ','}, 0x00e7}, /* LATIN SMALL LETTER C WITH CEDILLA */
++ {{'e', '`'}, 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */
++ {{'e', '!'}, 0x00e8}, /* LATIN SMALL LETTER E WITH GRAVE */
++ {{'e', '\''}, 0x00e9}, /* LATIN SMALL LETTER E WITH ACUTE */
++ {{'e', '^'}, 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
++ {{'e', '>'}, 0x00ea}, /* LATIN SMALL LETTER E WITH CIRCUMFLEX */
++ {{'e', '"'}, 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */
++ {{'e', ':'}, 0x00eb}, /* LATIN SMALL LETTER E WITH DIAERESIS */
++ {{'i', '`'}, 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */
++ {{'i', '!'}, 0x00ec}, /* LATIN SMALL LETTER I WITH GRAVE */
++ {{'i', '\''}, 0x00ed}, /* LATIN SMALL LETTER I WITH ACUTE */
++ {{'i', '^'}, 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
++ {{'i', '>'}, 0x00ee}, /* LATIN SMALL LETTER I WITH CIRCUMFLEX */
++ {{'i', '"'}, 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */
++ {{'i', ':'}, 0x00ef}, /* LATIN SMALL LETTER I WITH DIAERESIS */
++ {{'d', '-'}, 0x00f0}, /* LATIN SMALL LETTER ETH */
++ {{'n', '~'}, 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */
++ {{'n', '?'}, 0x00f1}, /* LATIN SMALL LETTER N WITH TILDE */
++ {{'o', '`'}, 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */
++ {{'o', '!'}, 0x00f2}, /* LATIN SMALL LETTER O WITH GRAVE */
++ {{'o', '\''}, 0x00f3}, /* LATIN SMALL LETTER O WITH ACUTE */
++ {{'o', '^'}, 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
++ {{'o', '>'}, 0x00f4}, /* LATIN SMALL LETTER O WITH CIRCUMFLEX */
++ {{'o', '~'}, 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */
++ {{'o', '?'}, 0x00f5}, /* LATIN SMALL LETTER O WITH TILDE */
++ {{'o', '"'}, 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */
++ {{'o', ':'}, 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */
++ {{'-', ':'}, 0x00f7}, /* DIVISION SIGN */
++ {{'o', '/'}, 0x00f8}, /* LATIN SMALL LETTER O WITH STROKE */
++ {{'u', '`'}, 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */
++ {{'u', '!'}, 0x00f9}, /* LATIN SMALL LETTER U WITH GRAVE */
++ {{'u', '\''}, 0x00fa}, /* LATIN SMALL LETTER U WITH ACUTE */
++ {{'u', '^'}, 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
++ {{'u', '>'}, 0x00fb}, /* LATIN SMALL LETTER U WITH CIRCUMFLEX */
++ {{'u', '"'}, 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */
++ {{'u', ':'}, 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */
++ {{'y', '\''}, 0x00fd}, /* LATIN SMALL LETTER Y WITH ACUTE */
++ {{'i', 'p'}, 0x00fe}, /* LATIN SMALL LETTER THORN */
++ {{'t', 'h'}, 0x00fe}, /* LATIN SMALL LETTER THORN */
++ {{'y', '"'}, 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */
++ {{'y', ':'}, 0x00ff}, /* LATIN SMALL LETTER Y WITH DIAERESIS */
++ {{'"', '['}, 0x00c4}, /* LATIN CAPITAL LETTER A WITH DIAERESIS */
++ {{'"', '\\'}, 0x00d6}, /* LATIN CAPITAL LETTER O WITH DIAERESIS */
++ {{'"', ']'}, 0x00dc}, /* LATIN CAPITAL LETTER U WITH DIAERESIS */
++ {{'"', '{'}, 0x00e4}, /* LATIN SMALL LETTER A WITH DIAERESIS */
++ {{'"', '|'}, 0x00f6}, /* LATIN SMALL LETTER O WITH DIAERESIS */
++ {{'"', '}'}, 0x00fc}, /* LATIN SMALL LETTER U WITH DIAERESIS */
++ {{'"', '~'}, 0x00df}, /* LATIN SMALL LETTER SHARP S */
+ };
+
+ #define RESIZE_FLAG_H 1
diff --git a/patches/source/screen/45suppress_remap.patch b/patches/source/screen/45suppress_remap.patch
new file mode 100644
index 00000000..85109a2e
--- /dev/null
+++ b/patches/source/screen/45suppress_remap.patch
@@ -0,0 +1,13 @@
+Author: Loic Minier <lool@dooz.org>
+Description: Unbreak several useful keybindings.
+--- a/termcap.c
++++ b/termcap.c
+@@ -552,8 +552,6 @@
+ else
+ break;
+ }
+- if (n < KMAP_KEYS)
+- domap = 1;
+ if (map == 0 && domap)
+ return 0;
+ if (map && !domap)
diff --git a/patches/source/screen/52fix_screen_utf8_nfd.patch b/patches/source/screen/52fix_screen_utf8_nfd.patch
new file mode 100644
index 00000000..0aa72d5e
--- /dev/null
+++ b/patches/source/screen/52fix_screen_utf8_nfd.patch
@@ -0,0 +1,41 @@
+## 52fix_screen_utf8_nfd.dpatch by Nobuhiro Iwamatsu <iwamatsu@debian.org>
+##
+## DP: screen outputs screen "ÿ" after a connected character.
+## DP: This is a character without the need.
+## DP: This happens in UTF-8 environment.
+## DP: Before : screen$ ruby1.9.1 -e 'puts "\u304b\u3099.."'
+## DP: ã‹ã‚™Ã¿...
+## DP: patch applied : screen $ ruby1.9.1 -e 'puts "\u304b\u3099.."'
+## DP: ã‹ã‚™..
+## DP: Report from http://d.hatena.ne.jp/mrkn/20101014/fix_screen_utf8_nfd_bug
+## DP: Copyright Kenta Murata (mrkn) <mrkn@ruby-lang.org>
+## DP: Modified by Nobuhiro Iwamatsu <iwamatsu@debian.org>
+
+Index: screen/ansi.c
+===================================================================
+--- screen.orig/ansi.c 2012-03-20 22:15:02.000000000 +0100
++++ screen/ansi.c 2012-03-20 22:41:45.000000000 +0100
+@@ -725,6 +725,10 @@
+ LPutChar(&curr->w_layer, &omc, ox, oy);
+ LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
+ }
++ if (curr->w_mbcs)
++ {
++ curr->w_rend.mbcs = curr->w_mbcs = 0;
++ }
+ break;
+ }
+ font = curr->w_rend.font;
+Index: screen/display.c
+===================================================================
+--- screen.orig/display.c 2012-03-20 22:41:28.000000000 +0100
++++ screen/display.c 2012-03-20 22:41:45.000000000 +0100
+@@ -603,7 +603,7 @@
+ D_x += D_AM ? 1 : -1;
+ D_mbcs = 0;
+ }
+- else if (utf8_isdouble(c))
++ else if (utf8_isdouble(c) || (c >= 0xd800 && c < 0xe000))
+ {
+ D_mbcs = c;
+ D_x++;
diff --git a/patches/source/screen/58-show-encoding-hardstatus.patch b/patches/source/screen/58-show-encoding-hardstatus.patch
new file mode 100644
index 00000000..45fecdbf
--- /dev/null
+++ b/patches/source/screen/58-show-encoding-hardstatus.patch
@@ -0,0 +1,41 @@
+Author: rascov@rascov.tw
+Date: Wed Feb 11 05:51:31 CST 2009
+Subject: show encoding in hardstatus, orginal from FreeBSD by yzlin@cs.nctu.edu.tw
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/screen/+bug/286810
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533498
+
+Index: screen/screen.c
+===================================================================
+--- screen.orig/screen.c 2014-04-28 03:14:19.195018278 +0200
++++ screen/screen.c 2014-04-28 03:14:19.179018199 +0200
+@@ -2801,6 +2801,18 @@
+ }
+ p += strlen(p) - 1;
+ break;
++ #ifdef ENCODINGS
++ case 'e':
++ *p = 0;
++ D_encoding = nwin_options.encoding > 0 ? nwin_options.encoding : 0;
++ if (win && win->w_encoding)
++ {
++ *p++ = ' ';
++ strcpy(p, EncodingName(win->w_encoding));
++ }
++ p += strlen(p) - 1;
++ break;
++ #endif
+ case '{':
+ {
+ char rbuf[128];
+Index: screen/process.c
+===================================================================
+--- screen.orig/process.c 2014-04-28 03:14:19.195018278 +0200
++++ screen/process.c 2014-04-28 03:14:19.183018228 +0200
+@@ -3693,6 +3693,7 @@
+ {
+ WinSwitchEncoding(fore, n);
+ ResetCharsets(fore);
++ RedisplayDisplays(0);
+ }
+ else if (i && display)
+ D_encoding = n;
diff --git a/patches/source/screen/60-revert-screenrc-change.diff b/patches/source/screen/60-revert-screenrc-change.diff
new file mode 100644
index 00000000..1f208e1d
--- /dev/null
+++ b/patches/source/screen/60-revert-screenrc-change.diff
@@ -0,0 +1,13 @@
+--- screen-4.4.0/etc/etcscreenrc 2015-09-05 14:28:22.000000000 -0500
++++ screen-4.2.1/etc/etcscreenrc 2014-04-25 14:08:40.000000000 -0500
+@@ -68,8 +68,8 @@
+ #
+ # Do not use xterms alternate window buffer.
+ # This one would not add lines to the scrollback buffer.
+-termcap xterm|xterms|xs ti=\E7\E[?47l
+-terminfo xterm|xterms|xs ti=\E7\E[?47l
++#termcap xterm|xterms|xs ti=\E7\E[?47l
++#terminfo xterm|xterms|xs ti=\E7\E[?47l
+
+ #make hp700 termcap/info better
+ termcap hp700 'Z0=\E[?3h:Z1=\E[?3l:hs:ts=\E[62"p\E[0$~\E[2$~\E[1$}:fs=\E[0}\E[61"p:ds=\E[62"p\E[1$~\E[61"p:ic@'
diff --git a/patches/source/screen/screen.SlackBuild b/patches/source/screen/screen.SlackBuild
new file mode 100755
index 00000000..2472c7c4
--- /dev/null
+++ b/patches/source/screen/screen.SlackBuild
@@ -0,0 +1,158 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 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=screen
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-screen
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf screen-$VERSION
+tar xvf $CWD/screen-$VERSION.tar.?z* || exit 1
+
+cd screen-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Apply patches taken from Debian:
+for pf in \
+ 26source_encoding.patch.gz \
+ 45suppress_remap.patch.gz \
+ 52fix_screen_utf8_nfd.patch.gz \
+ 58-show-encoding-hardstatus.patch.gz \
+ ; do zcat $CWD/$pf | patch --verbose -p1 || exit 1
+done
+
+# Revert a change to /etc/screenrc introduced in screen-4.3.x that prevents
+# the console from being properly cleared when detaching from a screen session:
+zcat $CWD/60-revert-screenrc-change.diff.gz | patch -p1 --verbose || exit 1
+
+# Do not link against libelf:
+zcat $CWD/screen.no_libelf.diff.gz | patch -p1 --verbose || exit 1
+
+# Reconf after patching configure.ac:
+autoreconf -vif
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --with-sys-screenrc=/etc/screenrc \
+ --with-pty-mode=0620 \
+ --with-pty-group=5 \
+ --disable-pam \
+ --enable-telnet \
+ --disable-socket-dir \
+ --enable-use-locale \
+ --enable-colors256 \
+ --enable-rxvt_osc \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Substitutions:
+perl -pi -e 's|.*#undef HAVE_BRAILLE.*|#define HAVE_BRAILLE 1|' config.h
+perl -pi -e 's|/usr/local/etc/screenrc|/etc/screenrc|' etc/etcscreenrc doc/*
+perl -pi -e 's|/local/etc/screenrc|/etc/screenrc|' doc/*
+
+# Build screen:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Prepare package:
+( 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
+)
+
+# Sorry, pal. Not around here.
+chmod 755 $PKG/usr/bin/screen-$VERSION
+mkdir -p $PKG/etc/skel
+cat etc/etcscreenrc > $PKG/etc/screenrc.new
+cat etc/screenrc > $PKG/etc/skel/.screenrc.new
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+gzip -9 $PKG/usr/man/man1/*
+mkdir -p $PKG/usr/doc/screen-$VERSION
+chmod 644 doc/FAQ
+cp -a COPYING ChangeLog HACKING INSTALL NEWS README TODO \
+ doc/FAQ doc/README.DOTSCREEN \
+ $PKG/usr/doc/screen-$VERSION
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat << EOF > $PKG/install/doinst.sh
+#!/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...
+}
+config etc/screenrc.new
+config etc/skel/.screenrc.new
+# This is probably safer than leaving the hidden .new file... maybe?
+rm -f etc/skel/.screenrc.new
+EOF
+
+# Build package:
+cd $PKG
+makepkg -l y -c n $TMP/screen-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/screen/screen.no_libelf.diff b/patches/source/screen/screen.no_libelf.diff
new file mode 100644
index 00000000..992fb07a
--- /dev/null
+++ b/patches/source/screen/screen.no_libelf.diff
@@ -0,0 +1,19 @@
+--- ./configure.ac.orig 2015-06-28 16:22:55.000000000 -0500
++++ ./configure.ac 2015-08-02 13:46:59.649097842 -0500
+@@ -202,16 +202,6 @@
+ #endif
+ ], LIBS="$LIBS -lsocket -linet";seqptx=1)
+
+-oldlibs="$LIBS"
+-LIBS="$LIBS -lelf"
+-AC_CHECKING(SVR4)
+-AC_TRY_LINK([#include <utmpx.h>
+-],,
+-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN),
+-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])]
+-,LIBS="$oldlibs")
+-AC_CHECK_HEADERS([stropts.h string.h strings.h])
+-
+ AC_CHECKING(for Solaris 2.x)
+ AC_EGREP_CPP(yes,
+ [#if defined(SVR4) && defined(sun)
diff --git a/patches/source/screen/slack-desc b/patches/source/screen/slack-desc
new file mode 100644
index 00000000..cfe3136b
--- /dev/null
+++ b/patches/source/screen/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------------------------------------------------------|
+screen: screen (screen manager with VT100/ANSI terminal emulation)
+screen:
+screen: Screen is a full-screen window manager that multiplexes a physical
+screen: terminal between several processes (typically interactive shells).
+screen: Each virtual terminal provides the functions of a DEC VT100 terminal
+screen: and several control functions from the ISO 6492 (ECMA 48, ANSI X3.64)
+screen: and ISO 2022 standards (e.g. insert/delete line and support for
+screen: multiple character sets). There is a scrollback history buffer for
+screen: each virtual terminal and a copy-and-paste mechanism that allows
+screen: moving text regions between windows.
+screen:
diff --git a/patches/source/sdl/SDL_mixer.usrlocal.diff b/patches/source/sdl/SDL_mixer.usrlocal.diff
new file mode 100644
index 00000000..4630e9ea
--- /dev/null
+++ b/patches/source/sdl/SDL_mixer.usrlocal.diff
@@ -0,0 +1,11 @@
+--- ./timidity/config.h.orig 2010-02-14 17:14:44.000000000 -0600
++++ ./timidity/config.h 2010-02-14 17:15:45.000000000 -0600
+@@ -179,7 +179,7 @@
+ #else
+ #define DEFAULT_PATH "/etc/timidity"
+ #define DEFAULT_PATH1 "/usr/share/timidity"
+-#define DEFAULT_PATH2 "/usr/local/lib/timidity"
++#define DEFAULT_PATH2 "/usr/lib/timidity"
+ #endif
+
+ /* These affect general volume */
diff --git a/patches/source/sdl/SDL_ttf.shaded.text.diff b/patches/source/sdl/SDL_ttf.shaded.text.diff
new file mode 100644
index 00000000..549a60a4
--- /dev/null
+++ b/patches/source/sdl/SDL_ttf.shaded.text.diff
@@ -0,0 +1,11 @@
+--- ./SDL_ttf.c.orig 2012-01-14 22:44:08.000000000 -0600
++++ ./SDL_ttf.c 2016-06-08 11:59:50.163770281 -0500
+@@ -1747,7 +1747,7 @@
+ /* Copy the character from the pixmap */
+ src = glyph->pixmap.buffer;
+ dst = (Uint8*) textbuf->pixels;
+- for ( row = 0; row < glyph->bitmap.rows; ++row ) {
++ for ( row = 0; row < glyph->pixmap.rows; ++row ) {
+ memcpy( dst, src, glyph->pixmap.width );
+ src += glyph->pixmap.pitch;
+ dst += textbuf->pitch;
diff --git a/patches/source/sdl/libsdl-1.2.15-resizing.patch b/patches/source/sdl/libsdl-1.2.15-resizing.patch
new file mode 100644
index 00000000..70988196
--- /dev/null
+++ b/patches/source/sdl/libsdl-1.2.15-resizing.patch
@@ -0,0 +1,63 @@
+Description: Revert change that breaks window corner resizing
+ http://bugzilla.libsdl.org/show_bug.cgi?id=1430
+Author: Andrew Caudwell <acaudwell@gmail.com>
+Last-Update: 2012-04-10
+Bug-Debian: http://bugs.debian.org/665779
+
+diff -r c787fb1b5699 src/video/x11/SDL_x11events.c
+--- a/src/video/x11/SDL_x11events.c Mon Feb 20 23:51:08 2012 -0500
++++ b/src/video/x11/SDL_x11events.c Mon Mar 26 12:26:52 2012 +1300
+@@ -57,12 +57,6 @@
+ static SDLKey MISC_keymap[256];
+ SDLKey X11_TranslateKeycode(Display *display, KeyCode kc);
+
+-/*
+- Pending resize target for ConfigureNotify (so outdated events don't
+- cause inappropriate resize events)
+-*/
+-int X11_PendingConfigureNotifyWidth = -1;
+-int X11_PendingConfigureNotifyHeight = -1;
+
+ #ifdef X_HAVE_UTF8_STRING
+ Uint32 Utf8ToUcs4(const Uint8 *utf8)
+@@ -825,16 +819,6 @@
+ #ifdef DEBUG_XEVENTS
+ printf("ConfigureNotify! (resize: %dx%d)\n", xevent.xconfigure.width, xevent.xconfigure.height);
+ #endif
+- if ((X11_PendingConfigureNotifyWidth != -1) &&
+- (X11_PendingConfigureNotifyHeight != -1)) {
+- if ((xevent.xconfigure.width != X11_PendingConfigureNotifyWidth) &&
+- (xevent.xconfigure.height != X11_PendingConfigureNotifyHeight)) {
+- /* Event is from before the resize, so ignore. */
+- break;
+- }
+- X11_PendingConfigureNotifyWidth = -1;
+- X11_PendingConfigureNotifyHeight = -1;
+- }
+ if ( SDL_VideoSurface ) {
+ if ((xevent.xconfigure.width != SDL_VideoSurface->w) ||
+ (xevent.xconfigure.height != SDL_VideoSurface->h)) {
+diff -r c787fb1b5699 src/video/x11/SDL_x11events_c.h
+--- a/src/video/x11/SDL_x11events_c.h Mon Feb 20 23:51:08 2012 -0500
++++ b/src/video/x11/SDL_x11events_c.h Mon Mar 26 12:26:52 2012 +1300
+@@ -27,8 +27,3 @@
+ extern void X11_InitOSKeymap(_THIS);
+ extern void X11_PumpEvents(_THIS);
+ extern void X11_SetKeyboardState(Display *display, const char *key_vec);
+-
+-/* Variables to be exported */
+-extern int X11_PendingConfigureNotifyWidth;
+-extern int X11_PendingConfigureNotifyHeight;
+-
+diff -r c787fb1b5699 src/video/x11/SDL_x11video.c
+--- a/src/video/x11/SDL_x11video.c Mon Feb 20 23:51:08 2012 -0500
++++ b/src/video/x11/SDL_x11video.c Mon Mar 26 12:26:52 2012 +1300
+@@ -1182,8 +1182,6 @@
+ current = NULL;
+ goto done;
+ }
+- X11_PendingConfigureNotifyWidth = width;
+- X11_PendingConfigureNotifyHeight = height;
+ } else {
+ if (X11_CreateWindow(this,current,width,height,bpp,flags) < 0) {
+ current = NULL;
diff --git a/patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch b/patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch
new file mode 100644
index 00000000..7d3e5acf
--- /dev/null
+++ b/patches/source/sdl/sdl-1.2.14-fix-mouse-clicking.patch
@@ -0,0 +1,23 @@
+--- SDL-1.2.14/src/video/x11/SDL_x11events.c.orig 2010-04-08 11:57:05.003169834 -0700
++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-08 12:33:51.690926340 -0700
+@@ -423,12 +423,15 @@
+ if ( xevent.xcrossing.mode == NotifyUngrab )
+ printf("Mode: NotifyUngrab\n");
+ #endif
+- if ( this->input_grab == SDL_GRAB_OFF ) {
+- posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
++ if ( (xevent.xcrossing.mode != NotifyGrab) &&
++ (xevent.xcrossing.mode != NotifyUngrab) ) {
++ if ( this->input_grab == SDL_GRAB_OFF ) {
++ posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS);
++ }
++ posted = SDL_PrivateMouseMotion(0, 0,
++ xevent.xcrossing.x,
++ xevent.xcrossing.y);
+ }
+- posted = SDL_PrivateMouseMotion(0, 0,
+- xevent.xcrossing.x,
+- xevent.xcrossing.y);
+ }
+ break;
+
diff --git a/patches/source/sdl/sdl.SlackBuild b/patches/source/sdl/sdl.SlackBuild
new file mode 100755
index 00000000..b506e7f9
--- /dev/null
+++ b/patches/source/sdl/sdl.SlackBuild
@@ -0,0 +1,255 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2013, 2016 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 SDL-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+IMAGE=${IMAGE:-$(echo SDL_image-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+MIXER=${MIXER:-$(echo SDL_mixer-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+NET=${NET:-$(echo SDL_net-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+TTF=${TTF:-$(echo SDL_ttf-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+
+BUILD=${BUILD:-5_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-sdl
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf sdl-$VERSION
+tar xf $CWD/SDL-$VERSION.tar.?z* || exit 1
+cd SDL-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+zcat $CWD/libsdl-1.2.15-resizing.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/sdl-1.2.14-fix-mouse-clicking.patch.gz | patch -p1 --verbose || exit 1
+
+# We must use --disable-x11-shared or programs linked with SDL will
+# crash on machines that use the closed source nVidia drivers.
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --disable-arts \
+ --disable-esd \
+ --enable-shared=yes \
+ --enable-static=no \
+ --disable-x11-shared
+
+make $NUMJOBS || make || exit 1
+
+# Spam /, for mixer/image later on:
+make install
+# install to package:
+make install DESTDIR=$PKG || exit 1
+mkdir -p $PKG/usr/doc/SDL-$VERSION/html
+cp -a docs/index.html $PKG/usr/doc/SDL-$VERSION
+cp -a docs/html/*.html $PKG/usr/doc/SDL-$VERSION/html
+cp -a \
+ BUGS COPYING CREDITS INSTALL README* TODO WhatsNew \
+ $PKG/usr/doc/SDL-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Add SDL_image:
+cd $TMP
+rm -rf SDL_image-$IMAGE
+tar xf $CWD/SDL_image-$IMAGE.tar.?z* || exit 1
+cd SDL_image-$IMAGE
+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 {} \;
+
+# we don't want sdl to load the libs with dlopen(), gcc is smarter...
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --enable-shared=yes \
+ --enable-static=no \
+ --enable-jpg-shared=no \
+ --enable-png-shared=no \
+ --enable-tif-shared=no
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+mkdir -p $PKG/usr/doc/SDL_image-$IMAGE
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_image-$IMAGE
+
+# Add SDL_mixer:
+cd $TMP
+rm -rf SDL_mixer-$MIXER
+tar xf $CWD/SDL_mixer-$MIXER.tar.?z* || exit 1
+cd SDL_mixer-$MIXER
+
+# Fix default library path. Don't use /usr/local, and use lib64 where needed:
+sed -i "s,usr/local/lib,usr/lib${LIBDIRSUFFIX},g" timidity/config.h
+
+# Install patched static libmikmod:
+tar xf $CWD/libmikmod-3.1.20.tar.xz
+( cd libmikmod-3.1.20
+ CFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr/local \
+ --libdir=/usr/local/lib${LIBDIRSUFFIX} \
+ --with-pic \
+ --enable-shared=no \
+ --enable-static=yes || exit 1
+ make $NUMJOBS || make || exit 1
+ make install || exit 1
+) || 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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --enable-music-mod \
+ --enable-shared=yes \
+ --enable-static=no
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/SDL_mixer-$MIXER
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_mixer-$MIXER
+
+# We do not want to try to pull in -lmikmod, since that was linked static:
+sed -i -e "s/ -lmikmod//g" $PKG/usr/lib${LIBDIRSUFFIX}/libSDL_mixer.la
+
+# Add SDL_net:
+cd $TMP
+rm -rf SDL_net-$NET
+tar xf $CWD/SDL_net-$NET.tar.?z* || exit 1
+cd SDL_net-$NET
+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 \
+ --enable-shared=yes \
+ --enable-static=no
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/SDL_net-$NET
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_net-$NET
+
+# Add SDL_ttf:
+cd $TMP
+rm -rf SDL_ttf-$TTF
+tar xf $CWD/SDL_ttf-$TTF.tar.?z* || exit 1
+cd SDL_ttf-$TTF
+
+#zcat $CWD/SDL_ttf-2.0.8-noftinternals.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/SDL_ttf.shaded.text.diff.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -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 \
+ --enable-shared=yes \
+ --enable-static=no
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mkdir -p $PKG/usr/doc/SDL_ttf-$TTF
+cp -a \
+ CHANGES COPYING README \
+ $PKG/usr/doc/SDL_ttf-$TTF
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+gzip -9 $PKG/usr/man/man?/*.?
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/sdl-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/sdl/slack-desc b/patches/source/sdl/slack-desc
new file mode 100644
index 00000000..e4c7502b
--- /dev/null
+++ b/patches/source/sdl/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------------------------------------------------------|
+sdl: sdl (Simple DirectMedia Layer library)
+sdl:
+sdl: This is the Simple DirectMedia Layer, a generic API that provides low
+sdl: level access to audio, keyboard, mouse, joystick, 3D hardware via
+sdl: OpenGL, and 2D framebuffer across multiple platforms.
+sdl:
+sdl: SDL links against alsa-lib, audiofile, esound, and the X11 libraries.
+sdl: Make sure all of these are installed if you're planning to use SDL
+sdl: (a full installation will cover all of the prerequisites).
+sdl:
+sdl:
diff --git a/patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch b/patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch
new file mode 100644
index 00000000..5e7b2311
--- /dev/null
+++ b/patches/source/seamonkey/autoconf/autoconf-2.13-consolidated_fixes-1.patch
@@ -0,0 +1,504 @@
+Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
+Date: 2016-06-11
+Initial Package Version: 2.13
+Upstream Status: Version is historic and unmaintained.
+Origin: Found at fedora, plus fixes for LFS.
+Description: All of the patches currently used by fedora, except for
+the patch which ensures gawk is used in preference to mawk (we do not
+install mawk). For LFS: we put mktemp in /usr/bin not /bin, remove
+the install-info target because that will overwrite standards.info
+with an old version (fedora always use a DESTDIR), and change the
+man and info dirs to ${datadir}/ i.e. /usr/share (an empty /usr/info
+will otherwise be created).
+
+diff -Naur a/acgeneral.m4 b/acgeneral.m4
+--- a/acgeneral.m4 1999-01-05 13:27:37.000000000 +0000
++++ b/acgeneral.m4 2016-06-11 00:18:24.429043947 +0100
+@@ -1817,10 +1817,6 @@
+ [cat > conftest.$ac_ext <<EOF
+ [#]line __oline__ "configure"
+ #include "confdefs.h"
+-ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+-extern "C" void exit(int);
+-#endif
+-])dnl
+ [$1]
+ EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+@@ -1988,12 +1984,12 @@
+ AC_MSG_CHECKING(size of $1)
+ AC_CACHE_VAL(AC_CV_NAME,
+ [AC_TRY_RUN([#include <stdio.h>
+-main()
++int main()
+ {
+ FILE *f=fopen("conftestval", "w");
+- if (!f) exit(1);
++ if (!f) return(1);
+ fprintf(f, "%d\n", sizeof($1));
+- exit(0);
++ return(0);
+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
+ AC_MSG_RESULT($AC_CV_NAME)
+ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
+@@ -2160,20 +2156,38 @@
+ dnl AC_OUTPUT_MAKE_DEFS()
+ define(AC_OUTPUT_MAKE_DEFS,
+ [# Transform confdefs.h into DEFS.
+-dnl Using a here document instead of a string reduces the quoting nightmare.
+ # Protect against shell expansion while executing Makefile rules.
+ # Protect against Makefile macro expansion.
+-cat > conftest.defs <<\EOF
++#
++# If the first sed substitution is executed (which looks for macros that
++# take arguments), then we branch to the quote section. Otherwise,
++# look for a macro that doesn't take arguments.
++cat >confdef2opt.sed <<\_ACEOF
+ changequote(<<, >>)dnl
+-s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
+-s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
+-s%\[%\\&%g
+-s%\]%\\&%g
+-s%\$%$$%g
++t clear
++: clear
++s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
++t quote
++s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
++t quote
++d
++: quote
++s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
++s,\[,\\&,g
++s,\],\\&,g
++s,\$,$$,g
++p
+ changequote([, ])dnl
+-EOF
+-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
+-rm -f conftest.defs
++_ACEOF
++# We use echo to avoid assuming a particular line-breaking character.
++# The extra dot is to prevent the shell from consuming trailing
++# line-breaks from the sub-command output. A line-break within
++# single-quotes doesn't work because, if this script is created in a
++# platform that uses two characters for line-breaks (e.g., DOS), tr
++# would break.
++ac_LF_and_DOT=`echo; echo .`
++DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
++rm -f confdef2opt.sed
+ ])
+
+ dnl Do the variable substitutions to create the Makefiles or whatever.
+diff -Naur a/acspecific.m4 b/acspecific.m4
+--- a/acspecific.m4 1999-01-05 13:27:52.000000000 +0000
++++ b/acspecific.m4 2016-06-11 00:18:17.533078644 +0100
+@@ -152,8 +152,41 @@
+ CXXFLAGS=
+ fi
+ fi
++
++AC_PROG_CXX_EXIT_DECLARATION
+ ])
+
++
++# AC_PROG_CXX_EXIT_DECLARATION
++# -----------------------------
++# Find a valid prototype for exit and declare it in confdefs.h.
++AC_DEFUN(AC_PROG_CXX_EXIT_DECLARATION,
++[for ac_declaration in \
++ ''\
++ '#include <stdlib.h>' \
++ 'extern "C" void std::exit (int) throw (); using std::exit;' \
++ 'extern "C" void std::exit (int); using std::exit;' \
++ 'extern "C" void exit (int) throw ();' \
++ 'extern "C" void exit (int);' \
++ 'void exit (int);'
++do
++ AC_TRY_COMPILE([#include <stdlib.h>
++$ac_declaration],
++ [exit (42);],
++ [],
++ [continue])
++ AC_TRY_COMPILE([$ac_declaration],
++ [exit (42);],
++ [break])
++done
++if test -n "$ac_declaration"; then
++ echo '#ifdef __cplusplus' >>confdefs.h
++ echo $ac_declaration >>confdefs.h
++ echo '#endif' >>confdefs.h
++fi
++])# AC_PROG_CXX_EXIT_DECLARATION
++
++
+ dnl Determine a Fortran 77 compiler to use. If `F77' is not already set
+ dnl in the environment, check for `g77', `f77' and `f2c', in that order.
+ dnl Set the output variable `F77' to the name of the compiler found.
+@@ -1010,7 +1043,7 @@
+ ])
+
+ AC_DEFUN(AC_FUNC_MMAP,
+-[AC_CHECK_HEADERS(unistd.h)
++[AC_CHECK_HEADERS(stdlib.h unistd.h sys/stat.h sys/types.h)
+ AC_CHECK_FUNCS(getpagesize)
+ AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
+ [AC_TRY_RUN([
+@@ -1039,11 +1072,24 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+
++#if HAVE_SYS_TYPES_H
++# include <sys/types.h>
++#endif
++
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
++
++#if HAVE_SYS_STAT_H
++# include <sys/stat.h>
++#endif
++
++#if HAVE_UNISTD_H
++# include <unistd.h>
++#endif
++
+ /* This mess was copied from the GNU getpagesize.h. */
+ #ifndef HAVE_GETPAGESIZE
+-# ifdef HAVE_UNISTD_H
+-# include <unistd.h>
+-# endif
+
+ /* Assume that all systems that can run configure have sys/param.h. */
+ # ifndef HAVE_SYS_PARAM_H
+@@ -1373,6 +1419,8 @@
+ r.ru_majflt = r.ru_minflt = 0;
+ switch (fork()) {
+ case 0: /* Child. */
++ /* Unless we actually _do_ something, the kernel sometimes doesn't chalk up any system time to this process. */
++ if(fork()) { i = 123; wait(NULL); } else { i = 234; exit(0); }
+ sleep(1); /* Give up the CPU. */
+ _exit(0);
+ case -1: _exit(0); /* What can we do? */
+diff -Naur a/autoconf.sh b/autoconf.sh
+--- a/autoconf.sh 1999-01-05 13:27:53.000000000 +0000
++++ b/autoconf.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -45,20 +45,20 @@
+ esac
+
+ : ${TMPDIR=/tmp}
+-tmpout=${TMPDIR}/acout.$$
++tmpout=`/usr/bin/mktemp ${TMPDIR}/acout.XXXXXX`
+ localdir=
+ show_version=no
+
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout ; exit 0 ;;
+ --localdir=* | --l*=* )
+ localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -l | --localdir | --l*)
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ localdir="${1}"
+ shift ;;
+ --macrodir=* | --m*=* )
+@@ -66,7 +66,7 @@
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $tmpout; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --v* )
+@@ -76,7 +76,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $tmpout; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -86,23 +86,25 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $tmpout
+ exit 0
+ fi
+
+ case $# in
+ 0) infile=configure.in ;;
+ 1) infile="$1" ;;
+- *) echo "$usage" >&2; exit 1 ;;
++ *) echo "$usage" >&2; rm -f $tmpout; exit 1 ;;
+ esac
+
+ trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
+
+-tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
++tmpin=`/usr/bin/mktemp ${TMPDIR}/acin.XXXXXX`
++# Always set this, to avoid bogus errors from some rm's.
+ if test z$infile = z-; then
+ infile=$tmpin
+- cat > $infile
+ elif test ! -r "$infile"; then
+ echo "autoconf: ${infile}: No such file or directory" >&2
++ rm -f $tmpin $tmpout
+ exit 1
+ fi
+
+@@ -111,6 +113,8 @@
+ else
+ use_localdir=
+ fi
++# Make sure we don't leave those around - they are annoying
++trap 'rm -f $tmpin $tmpout' 0
+
+ # Use the frozen version of Autoconf if available.
+ r= f=
+@@ -118,7 +122,7 @@
+ case `$M4 --help < /dev/null 2>&1` in
+ *reload-state*) test -r $AC_MACRODIR/autoconf.m4f && { r=--reload f=f; } ;;
+ *traditional*) ;;
+-*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin; exit 1 ;;
++*) echo Autoconf requires GNU m4 1.1 or later >&2; rm -f $tmpin $tmpout; exit 1 ;;
+ esac
+
+ $M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
+@@ -154,6 +158,6 @@
+ /__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
+ ' >&4
+
+-rm -f $tmpout
++rm -f $tmpout $tmpin
+
+ exit $status
+diff -Naur a/autoconf.texi b/autoconf.texi
+--- a/autoconf.texi 1999-01-05 13:28:37.000000000 +0000
++++ b/autoconf.texi 2016-06-11 00:18:46.360933604 +0100
+@@ -1,7 +1,7 @@
+ \input texinfo @c -*-texinfo-*-
+ @c %**start of header
+-@setfilename autoconf.info
+-@settitle Autoconf
++@setfilename autoconf.info
++@settitle Autoconf
+ @c For double-sided printing, uncomment:
+ @c @setchapternewpage odd
+ @c %**end of header
+@@ -17,7 +17,8 @@
+ @ifinfo
+ @format
+ START-INFO-DIR-ENTRY
+-* Autoconf: (autoconf). Create source code configuration scripts.
++* Autoconf: (autoconf). Create source code configuration scripts.
++ This is a legacy version of autoconf.
+ END-INFO-DIR-ENTRY
+ @end format
+
+diff -Naur a/autoheader.sh b/autoheader.sh
+--- a/autoheader.sh 1999-01-05 13:28:39.000000000 +0000
++++ b/autoheader.sh 2016-06-11 00:22:17.351872133 +0100
+@@ -194,9 +194,9 @@
+ # Some fgrep's have limits on the number of lines that can be in the
+ # pattern on the command line, so use a temporary file containing the
+ # pattern.
+- (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
++ (fgrep_tmp=`/usr/bin/mktemp ${TMPDIR-/tmp}/autoh$$.XXXXXX`
+ trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+- cat > $fgrep_tmp <<EOF
++ cat >> $fgrep_tmp <<EOF
+ $syms
+ EOF
+ fgrep -f $fgrep_tmp
+diff -Naur a/autoupdate.sh b/autoupdate.sh
+--- a/autoupdate.sh 1999-01-05 13:28:42.000000000 +0000
++++ b/autoupdate.sh 2016-06-11 00:23:19.151561252 +0100
+@@ -26,7 +26,7 @@
+ Usage: autoupdate [-h] [--help] [-m dir] [--macrodir=dir]
+ [--version] [template-file]"
+
+-sedtmp=/tmp/acups.$$
++sedtmp=`/usr/bin/mktemp /tmp/acups.XXXXXX`
+ # For debugging.
+ #sedtmp=/tmp/acups
+ show_version=no
+@@ -35,13 +35,13 @@
+ while test $# -gt 0 ; do
+ case "${1}" in
+ -h | --help | --h* )
+- echo "${usage}" 1>&2; exit 0 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 0 ;;
+ --macrodir=* | --m*=* )
+ AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+ shift ;;
+ -m | --macrodir | --m* )
+ shift
+- test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
++ test $# -eq 0 && { echo "${usage}" 1>&2; rm -f $sedtmp; exit 1; }
+ AC_MACRODIR="${1}"
+ shift ;;
+ --version | --versio | --versi | --vers)
+@@ -51,7 +51,7 @@
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+- echo "${usage}" 1>&2; exit 1 ;;
++ echo "${usage}" 1>&2; rm -f $sedtmp; exit 1 ;;
+ * )
+ break ;;
+ esac
+@@ -61,6 +61,7 @@
+ version=`sed -n 's/define.AC_ACVERSION.[ ]*\([0-9.]*\).*/\1/p' \
+ $AC_MACRODIR/acgeneral.m4`
+ echo "Autoconf version $version"
++ rm -f $sedtmp
+ exit 0
+ fi
+
+@@ -68,6 +69,7 @@
+
+ tmpout=acupo.$$
+ trap 'rm -f $sedtmp $tmpout; exit 1' 1 2 15
++trap 'rm -f $sedtmp' 0
+ case $# in
+ 0) infile=configure.in; out="> $tmpout"
+ # Make sure $infile can be read, and $tmpout has the same permissions.
+diff -Naur a/configure b/configure
+--- a/configure 1999-01-05 13:28:57.000000000 +0000
++++ b/configure 2016-06-11 00:50:57.771231914 +0100
+@@ -43,8 +43,8 @@
+ libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++infodir='${datadir}/info'
++mandir='${datadir}/man'
+
+ # Initialize some other variables.
+ subdirs=
+diff -Naur a/Makefile.in b/Makefile.in
+--- a/Makefile.in 1999-01-05 13:27:16.000000000 +0000
++++ b/Makefile.in 2016-06-11 00:29:34.005678107 +0100
+@@ -49,7 +49,7 @@
+
+ # Directory in which to install library files.
+ datadir = @datadir@
+-acdatadir = $(datadir)/autoconf
++acdatadir = $(datadir)/autoconf-2.13
+
+ # Directory in which to install documentation info files.
+ infodir = @infodir@
+@@ -68,8 +68,8 @@
+ DISTFILES = AUTHORS COPYING ChangeLog ChangeLog.1 INSTALL \
+ Makefile.in NEWS README TODO $(M4FILES) \
+ acconfig.h acfunctions acheaders acidentifiers \
+- acmakevars acprograms autoconf.info* \
+- autoconf.sh autoconf.texi install.texi \
++ acmakevars acprograms autoconf.info* \
++ autoconf.sh autoconf.texi install.texi \
+ autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
+ config.guess config.sub configure configure.in \
+ install-sh mkinstalldirs texinfo.tex \
+@@ -106,11 +106,11 @@
+ autoconf.m4f: autoconf.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+ autoheader.m4f: autoheader.m4 acgeneral.m4 acspecific.m4 acoldnames.m4
+
+-info: autoconf.info @standards_info@ INSTALL
++info: autoconf.info @standards_info@ INSTALL
+
+ # Use --no-split to avoid creating filenames > 14 chars.
+-autoconf.info: autoconf.texi install.texi
+- $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
++autoconf.info: autoconf.texi install.texi
++ $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
+
+ INSTALL: install.texi
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
+@@ -121,8 +121,8 @@
+
+ dvi: autoconf.dvi @standards_dvi@
+
+-autoconf.dvi: autoconf.texi
+- $(TEXI2DVI) $(srcdir)/autoconf.texi
++autoconf.dvi: autoconf.texi
++ $(TEXI2DVI) $(srcdir)/autoconf.texi
+
+ standards.dvi: standards.texi make-stds.texi
+ $(TEXI2DVI) $(srcdir)/standards.texi
+@@ -137,35 +137,35 @@
+ cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
+
+ installdirs:
+- $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
++ $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)/$(bindir) $(DESTDIR)/$(infodir) $(DESTDIR)/$(acdatadir)
+
+-install: all $(M4FILES) acconfig.h installdirs install-info
++install: all $(M4FILES) acconfig.h installdirs
+ for p in $(ASCRIPTS); do \
+- $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) $$p $(DESTDIR)/$(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ for i in $(M4FROZEN); do \
+- $(INSTALL_DATA) $$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ for i in $(M4FILES) acconfig.h; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done
+ -if test -f autoscan; then \
+- $(INSTALL_PROGRAM) autoscan $(bindir)/`echo autoscan|sed '$(transform)'`; \
++ $(INSTALL_PROGRAM) autoscan $(DESTDIR)/$(bindir)/`echo autoscan|sed '$(transform)'`; \
+ for i in acfunctions acheaders acidentifiers acprograms \
+ acmakevars; do \
+- $(INSTALL_DATA) $(srcdir)/$$i $(acdatadir)/$$i; \
++ $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)/$(acdatadir)/$$i; \
+ done; \
+ else :; fi
+
+ # Don't cd, to avoid breaking install-sh references.
+ install-info: info installdirs
+- if test -f autoconf.info; then \
++ if test -f autoconf.info; then \
+ for i in *.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/$$i; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/$$i; \
+ done; \
+ else \
+ for i in $(srcdir)/*.info*; do \
+- $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
++ $(INSTALL_DATA) $$i $(DESTDIR)/$(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ done; \
+ fi
+
+@@ -174,7 +174,7 @@
+ rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
+ done
+ rm -fr $(acdatadir)
+- cd $(infodir) && rm -f autoconf.info*
++ cd $(infodir) && rm -f autoconf.info*
+ if test -f standards.info || test -f $(srcdir)/standards.info; \
+ then cd $(infodir) && rm -f standards.info*; fi
+
+diff -Naur a/testsuite/autoconf.s/syntax.exp b/testsuite/autoconf.s/syntax.exp
+--- a/testsuite/autoconf.s/syntax.exp 1999-01-05 13:29:54.000000000 +0000
++++ b/testsuite/autoconf.s/syntax.exp 2016-06-11 00:18:51.996905247 +0100
+@@ -2,7 +2,7 @@
+
+ send_user "Checking for syntax errors in the specific tests...\n"
+ set script {s/^AC_DEFUN(\([^,]*\).*/\1/p}
+-set macros [exec sed -n $script $srcdir/../acspecific.m4]
++set macros [exec sed -n $script $srcdir/../acspecific.m4 | grep -v -e AC_FUNC_GETLOADAVG -e F77]
+
+ foreach mac $macros {
+ send_user "$mac\n"
diff --git a/patches/source/seamonkey/autoconf/autoconf.build b/patches/source/seamonkey/autoconf/autoconf.build
new file mode 100755
index 00000000..7dae1bad
--- /dev/null
+++ b/patches/source/seamonkey/autoconf/autoconf.build
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# Copyright 2005-2016 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=autoconf
+VERSION=2.13
+BUILD=${BUILD:-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
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-autoconf
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf autoconf-$VERSION
+tar xvf $CWD/autoconf-$VERSION.tar.xz || exit 1
+cd autoconf-$VERSION
+
+zcat $CWD/autoconf-2.13-consolidated_fixes-1.patch.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Build a temporary copy of autoconf-2.13 only to be used to compile
+# Firefox, since it somewhat inexplicably requires this ancient version:
+
+rm -rf $TMP/autoconf-tmp
+mkdir -p $TMP/autoconf-tmp
+# This will be at the beginning of the $PATH, so protect against nonsense
+# happening in /tmp:
+chmod 700 $TMP/autoconf-tmp
+rm -rf $TMP/autoconf-tmp/*
+mkdir -p $TMP/autoconf-tmp/usr
+
+./configure \
+ --prefix=$TMP/autoconf-tmp/usr \
+ --program-suffix=-2.13 \
+ --infodir=$TMP/autoconf-tmp/usr/info \
+ --mandir=$TMP/autoconf-tmp/usr/man \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install || exit 1
+
diff --git a/patches/source/seamonkey/doinst.sh b/patches/source/seamonkey/doinst.sh
new file mode 100644
index 00000000..c236bea5
--- /dev/null
+++ b/patches/source/seamonkey/doinst.sh
@@ -0,0 +1,11 @@
+# If there's no mozilla here, then take over:
+if [ ! -r usr/bin/mozilla ]; then
+ ( cd usr/bin ; ln -sf seamonkey mozilla )
+fi
+# Hopefully this won't break everything. ;-)
+if ! grep /usr/lib/seamonkey etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
+ echo "/usr/lib/seamonkey" >> etc/ld.so.conf
+fi
+if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig 2> /dev/null
+fi
diff --git a/patches/source/seamonkey/gold/gold b/patches/source/seamonkey/gold/gold
new file mode 100755
index 00000000..8c86d3b0
--- /dev/null
+++ b/patches/source/seamonkey/gold/gold
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/ld.gold "$@"
diff --git a/patches/source/seamonkey/gold/ld b/patches/source/seamonkey/gold/ld
new file mode 120000
index 00000000..78a06a2a
--- /dev/null
+++ b/patches/source/seamonkey/gold/ld
@@ -0,0 +1 @@
+gold \ No newline at end of file
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc b/patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc
new file mode 100644
index 00000000..e5053267
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-gtkmozembed.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: Mozilla Gtk Embedding Widget
+Description: Mozilla Embedding Widget for Gtk+
+Version: @VERSION@
+Requires: seamonkey-xpcom = @VERSION@
+Libs: -L${libdir} -lgtkembedmoz
+Cflags: -I${includedir}/gtkembedmoz
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc b/patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc
new file mode 100644
index 00000000..0c990042
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-libxul.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+idldir=/usr/share/idl/seamonkey-@VERSION@
+
+Name: libxul
+Description: The Mozilla Runtime and Embedding Engine
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Libs: -L${libdir} -lxul -lxpcom
+Cflags: -I${includedir} -fshort-wchar
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc b/patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc
new file mode 100644
index 00000000..756e996d
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-nspr.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: NSPR
+Description: The Netscape Portable Runtime
+Version: 4.7.1
+Libs: -L/usr/@LIB@/seamonkey-@VERSION@ -lplds4 -lplc4 -lnspr4 -lpthread -ldl
+Cflags: -I/usr/include/seamonkey-@VERSION@/nspr
+
+
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-nss.pc b/patches/source/seamonkey/pkgconfig/seamonkey-nss.pc
new file mode 100644
index 00000000..f5bf0993
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-nss.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: NSS
+Description: Mozilla Network Security Services
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3 -lnssutil3
+Cflags: -I${includedir}/nss
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc b/patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc
new file mode 100644
index 00000000..bbdb1f41
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-plugin.pc
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+
+Name: Mozilla Plug-In API
+Description: Mozilla Plug-In API
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Cflags: -I${includedir}/java -I${includedir}/plugin -DXP_UNIX
diff --git a/patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc b/patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc
new file mode 100644
index 00000000..53200567
--- /dev/null
+++ b/patches/source/seamonkey/pkgconfig/seamonkey-xpcom.pc
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/@LIB@/seamonkey-@VERSION@
+includedir=/usr/include/seamonkey-@VERSION@
+idldir=/usr/share/idl/seamonkey-@VERSION@
+
+Name: XPCOM
+Description: The Mozilla Cross Platform Component Library
+Version: @VERSION@
+Requires: seamonkey-nspr >= 4.7.1
+Libs: -L${libdir} -lxpcom
+Cflags: -I${includedir} -I${includedir}/xpcom -I${includedir}/string
diff --git a/patches/source/seamonkey/seamonkey-icon.png b/patches/source/seamonkey/seamonkey-icon.png
new file mode 100644
index 00000000..824ab7a5
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey-icon.png
Binary files differ
diff --git a/patches/source/seamonkey/seamonkey-mail-icon.png b/patches/source/seamonkey/seamonkey-mail-icon.png
new file mode 100644
index 00000000..123b077b
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey-mail-icon.png
Binary files differ
diff --git a/patches/source/seamonkey/seamonkey-mail.desktop b/patches/source/seamonkey/seamonkey-mail.desktop
new file mode 100644
index 00000000..1e0b62b1
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey-mail.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=SeaMonkey Mail
+Comment=Read Mail with SeaMonkey
+Exec=/usr/bin/seamonkey -mail
+Icon=/usr/share/pixmaps/seamonkey-mail-icon.png
+Terminal=0
+Type=Application
+Categories=Application;Network;
diff --git a/patches/source/seamonkey/seamonkey.SlackBuild b/patches/source/seamonkey/seamonkey.SlackBuild
new file mode 100755
index 00000000..58dc6a75
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey.SlackBuild
@@ -0,0 +1,289 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 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.
+
+TARBALLVER=${VERSION:-$(basename $(ls seamonkey-*.tar.* | cut -d - -f 2 | rev | cut -f 3- -d . | rev) .source)}
+# Strip the end from beta versions:
+VERSION=$(echo $TARBALLVER | cut -f 1 -d b)
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ LIBDIRSUFFIX=""
+ OPTIMIZE_FLAG="-O1"
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+ OPTIMIZE_FLAG="-O1"
+else
+ LIBDIRSUFFIX=""
+ OPTIMIZE_FLAG="-O1"
+fi
+
+# Link using gold. This avoids running out of memory on 32-bit systems, and
+# avoids a recurring build failure with GNU ld on other systems.
+PATH="$(pwd)/gold:$PATH"
+export CC="gcc -B$(pwd)/gold"
+export CXX="g++ -B$(pwd)/gold"
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-seamonkey
+rm -rf $PKG
+mkdir -p $TMP $PKG/usr
+
+# We need to use the incredibly ancient autoconf-2.13 for this :/
+( cd $CWD/autoconf ; ./autoconf.build )
+PATH=/tmp/autoconf-tmp/usr/bin:$PATH
+
+cd $TMP
+rm -rf seamonkey-${TARBALLVER}
+# Unpack this in a subdirectory to prevent changing permissions on /tmp:
+rm -rf seamonkey-unpack
+mkdir seamonkey-unpack
+cd seamonkey-unpack
+tar xvf $CWD/seamonkey-${TARBALLVER}.source.tar.?z* || exit 1
+mv * ..
+cd ..
+rm -rf seamonkey-unpack
+cd seamonkey-${TARBALLVER} || exit 1
+
+# Make sure the perms/ownerships 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 {} \;
+
+chown -R root:root .
+
+# Our building options, in a configure-like display ;)
+OPTIONS="\
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --enable-optimize=$OPTIMIZE_FLAG \
+ --enable-cpp-rtti \
+ --enable-default-toolkit=cairo-gtk2 \
+ --enable-startup-notification \
+ --enable-alsa \
+ --disable-debug \
+ --with-default-mozilla-five-home=/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION} \
+ --enable-strip \
+ --disable-tests \
+ --disable-crashreporter \
+ --enable-safe-browsing \
+ --disable-updater \
+ --enable-chrome-format=omni \
+ --disable-necko-wifi \
+ --enable-extensions=default,irc \
+ --without-system-nspr \
+ --with-system-zlib \
+ --enable-application=suite \
+ --with-pthreads \
+ --host=$ARCH-slackware-linux \
+ --target=$ARCH-slackware-linux"
+
+export BUILD_OFFICIAL=1
+export MOZILLA_OFFICIAL=1
+export MOZ_MAKE_FLAGS="$NUMJOBS"
+
+# Clear some variables that could break the build
+unset DBUS_SESSION_BUS_ADDRESS ORBIT_SOCKETDIR SESSION_MANAGER \
+ XDG_SESSION_COOKIE XAUTHORITY MAKEFLAGS
+
+# Assemble our .mozconfig:
+echo > .mozconfig
+
+# Mozilla devs enforce using an objdir for building
+# https://developer.mozilla.org/en/Configuring_Build_Options#Building_with_an_objdir
+mkdir obj
+echo "mk_add_options MOZ_OBJDIR=$(pwd)/obj" >> .mozconfig
+# This directory is also needed or the build will fail:
+mkdir -p mozilla/obj
+
+# Write in it the options above
+for option in $OPTIONS; do echo "ac_add_options $option" >> .mozconfig; done
+
+echo "ac_add_options --disable-tests" >> .mozconfig
+make -f client.mk build || exit 1
+make -f client.mk install DESTDIR=$PKG || exit 1
+
+# Keep the "obsolete" nspr headers:
+if [ ! -d mozilla/dist/include/nspr/obsolete ]; then
+ mkdir -p mozilla/dist/include/nspr/obsolete
+ cp -a mozilla/nsprpub/pr/include/obsolete/*.h mozilla/dist/include/nspr/obsolete
+fi
+
+# Install nspr/nss headers.
+for includedir in nspr nspr/obsolete nspr/private ; do
+ mkdir -p $PKG/usr/include/seamonkey-${VERSION}/$includedir
+ cp -aL mozilla/dist/include/${includedir}/*.h $PKG/usr/include/seamonkey-${VERSION}/$includedir
+done
+cp -aL mozilla/dist/include/*.tbl mozilla/dist/include/*.msg $PKG/usr/include/seamonkey-${VERSION}
+cp -aL mozilla/dist/include/*.h $PKG/usr/include/seamonkey-${VERSION}
+cp -aL mozilla/dist/sdk/include/* $PKG/usr/include/seamonkey-${VERSION}
+# compat symlinks
+( cd $PKG/usr/include/seamonkey-${VERSION}
+ # Relocate anything that might be in the nss directory, and replace the directory with a symlink.
+ # make install was putting an empty directory here, which was breaking other compiles.
+ if [ -d nss ]; then
+ mv nss/* .
+ rmdir nss
+ fi
+ ln -sf . nss
+ ln -sf . plugin
+ ln -sf . xpcom
+)
+
+# We don't need this stuff in the package:
+rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/seamonkey-devel-$VERSION
+
+chown -R root:root $PKG/usr/include/seamonkey-${VERSION}
+find $PKG/usr/include/seamonkey-${VERSION} -name "*.h" -type f -exec chmod 644 {} \;
+# Create a more generic include files symlink:
+( cd $PKG/usr/include
+ if [ ! -e seamonkey ]; then
+ ln -sf seamonkey-${VERSION} seamonkey
+ fi
+)
+
+# Install pkgconfig files:
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+for file in $CWD/pkgconfig/* ; do
+cat $file \
+ | sed -e "s/@LIB@/lib${LIBDIRSUFFIX}/" \
+ -e "s/@VERSION@/$VERSION/" \
+ > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/$(basename $file)
+done
+
+# Add symlinks for the pkgconfig files:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+ ln -s seamonkey-libxul.pc libxul.pc
+ ln -s seamonkey-plugin.pc plugin.pc
+ ln -s seamonkey-xpcom.pc xpcom.pc
+ # These are now provided by the mozilla-nss package:
+ #ln -s seamonkey-nspr.pc nspr.pc
+ #ln -s seamonkey-nss.pc nss.pc
+)
+
+# 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
+
+# Strip files:
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# This remains the standard plugin directory for all browsers.
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+
+# This is traditional.
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ if [ ! -e seamonkey ]; then
+ ln -sf seamonkey-${VERSION} seamonkey
+ fi
+)
+
+mkdir -p $PKG/usr/share/applications
+cp -a $CWD/*.desktop $PKG/usr/share/applications
+chown -R root:root $PKG/usr/share/applications
+chmod 644 $PKG/usr/share/applications/*
+mkdir -p $PKG/usr/share/pixmaps
+cp -a $CWD/*.png $PKG/usr/share/pixmaps
+chown -R root:root $PKG/usr/share/pixmaps
+chmod 644 $PKG/usr/share/pixmaps/*
+
+mkdir -p $PKG/usr/doc/seamonkey-$VERSION
+( cd mozilla
+ cp -a \
+ LEGAL LICENSE README.txt \
+ $PKG/usr/doc/seamonkey-$VERSION
+)
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ > $PKG/install/doinst.sh
+
+cd $TMP/package-seamonkey
+/sbin/makepkg -l y -c n -p $TMP/seamonkey-$TARBALLVER-$ARCH-$BUILD.txz
+
+# Create a standalone seamonkey-solibs package for RPM, gxine, etc.
+rm -r $TMP/package-seamonkey-solibs
+mkdir -p $TMP/package-seamonkey-solibs/usr/doc
+cp -a $PKG/usr/doc/seamonkey-$VERSION $TMP/package-seamonkey-solibs/usr/doc
+mkdir -p $TMP/package-seamonkey-solibs/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION}
+for file in libfreebl3.chk libfreebl3.so libmozsqlite3.so \
+ libnspr4.so libnss* libplc4.so libplds4.so libsmime3.so libsoftokn3.chk \
+ libsoftokn3.so libssl3.so ; do
+ cp -a $PKG/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION}/$file \
+ $TMP/package-seamonkey-solibs/usr/lib${LIBDIRSUFFIX}/seamonkey-${VERSION}
+done
+mkdir $TMP/package-seamonkey-solibs/install
+cat << EOF | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $TMP/package-seamonkey-solibs/install/doinst.sh
+( cd usr/lib ; rm -rf seamonkey )
+( cd usr/lib ; ln -sf seamonkey-$VERSION seamonkey )
+if ! grep /usr/lib/seamonkey etc/ld.so.conf 1> /dev/null 2> /dev/null ; then
+ echo "/usr/lib/seamonkey" >> etc/ld.so.conf
+fi
+if [ -x /sbin/ldconfig ]; then
+ /sbin/ldconfig 2> /dev/null
+fi
+EOF
+cat << EOF > $TMP/package-seamonkey-solibs/install/slack-desc
+ |-----handy-ruler------------------------------------------------------|
+seamonkey-solibs: seamonkey-solibs (Shared libraries from Seamonkey)
+seamonkey-solibs:
+seamonkey-solibs: This package contains a subset of the shared libraries from Seamonkey
+seamonkey-solibs: to provide runtime support for various programs.
+seamonkey-solibs: This package is built from the Seamonkey sources and is provided
+seamonkey-solibs: as a standalone runtime package for people who do not want to install
+seamonkey-solibs: the entire seamonkey package (as for server use).
+seamonkey-solibs:
+seamonkey-solibs: This package is runtime only. The include files and other files for
+seamonkey-solibs: development can be found in the seamonkey package.
+seamonkey-solibs:
+EOF
+cd $TMP/package-seamonkey-solibs
+/sbin/makepkg -l y -c n -p $TMP/seamonkey-solibs-$TARBALLVER-$ARCH-$BUILD.txz
+
diff --git a/patches/source/seamonkey/seamonkey.desktop b/patches/source/seamonkey/seamonkey.desktop
new file mode 100644
index 00000000..eaf81ddf
--- /dev/null
+++ b/patches/source/seamonkey/seamonkey.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=SeaMonkey
+Comment=Web Browser
+Exec=/usr/bin/seamonkey
+Icon=/usr/share/pixmaps/seamonkey-icon.png
+Terminal=0
+Type=Application
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
+Categories=Application;Network;
diff --git a/patches/source/seamonkey/slack-desc b/patches/source/seamonkey/slack-desc
new file mode 100644
index 00000000..af6ee240
--- /dev/null
+++ b/patches/source/seamonkey/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------------------------------------------------------|
+seamonkey: SeaMonkey (an open-source web browser suite)
+seamonkey:
+seamonkey: The SeaMonkey browser suite. SeaMonkey features a state-of-the-art
+seamonkey: web browser and powerful email client, as well as a WYSIWYG web page
+seamonkey: composer and a feature-rich IRC chat client.
+seamonkey:
+seamonkey:
+seamonkey:
+seamonkey: Visit the SeaMonkey project at this URL:
+seamonkey: http://www.mozilla.org/projects/seamonkey/
+seamonkey:
diff --git a/patches/source/squashfs-tools/0001-kfreebsd.patch b/patches/source/squashfs-tools/0001-kfreebsd.patch
new file mode 100644
index 00000000..7ce6cd5b
--- /dev/null
+++ b/patches/source/squashfs-tools/0001-kfreebsd.patch
@@ -0,0 +1,123 @@
+Author: Cyril Brulebois <kibi@debian.org>
+Description: Fixes FTBFS on kfreebsd (Closes: #557174).
+Last-Update: 2015-09-06
+
+--- squashfs-tools-4.3.orig/squashfs-tools/mksquashfs.c
++++ squashfs-tools-4.3/squashfs-tools/mksquashfs.c
+@@ -51,7 +51,7 @@
+ #include <limits.h>
+ #include <ctype.h>
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+@@ -4105,7 +4105,7 @@ void initialise_threads(int readq, int f
+ BAD_ERROR("Failed to set signal mask in intialise_threads\n");
+
+ if(processors == -1) {
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ int mib[2];
+ size_t len = sizeof(processors);
+
+--- squashfs-tools-4.3.orig/squashfs-tools/read_fs.c
++++ squashfs-tools-4.3/squashfs-tools/read_fs.c
+@@ -35,7 +35,7 @@
+ #include <limits.h>
+ #include <dirent.h>
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+--- squashfs-tools-4.3.orig/squashfs-tools/read_xattrs.c
++++ squashfs-tools-4.3/squashfs-tools/read_xattrs.c
+@@ -31,7 +31,7 @@
+ #include <stdio.h>
+ #include <string.h>
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+--- squashfs-tools-4.3.orig/squashfs-tools/swap.c
++++ squashfs-tools-4.3/squashfs-tools/swap.c
+@@ -19,7 +19,7 @@
+ * swap.c
+ */
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+--- squashfs-tools-4.3.orig/squashfs-tools/unsquashfs.c
++++ squashfs-tools-4.3/squashfs-tools/unsquashfs.c
+@@ -2190,7 +2190,7 @@ void initialise_threads(int fragment_buf
+ "\n");
+
+ if(processors == -1) {
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ int mib[2];
+ size_t len = sizeof(processors);
+
+--- squashfs-tools-4.3.orig/squashfs-tools/unsquashfs.h
++++ squashfs-tools-4.3/squashfs-tools/unsquashfs.h
+@@ -47,7 +47,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/time.h>
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+--- squashfs-tools-4.3.orig/squashfs-tools/xz_wrapper.h
++++ squashfs-tools-4.3/squashfs-tools/xz_wrapper.h
+@@ -24,7 +24,7 @@
+ *
+ */
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+--- squashfs-tools-4.3.orig/squashfs-tools/gzip_wrapper.h
++++ squashfs-tools-4.3/squashfs-tools/gzip_wrapper.h
+@@ -24,7 +24,7 @@
+ *
+ */
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+--- squashfs-tools-4.3.orig/squashfs-tools/lz4_wrapper.h
++++ squashfs-tools-4.3/squashfs-tools/lz4_wrapper.h
+@@ -24,7 +24,7 @@
+ *
+ */
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
+--- squashfs-tools-4.3.orig/squashfs-tools/lzo_wrapper.h
++++ squashfs-tools-4.3/squashfs-tools/lzo_wrapper.h
+@@ -24,7 +24,7 @@
+ *
+ */
+
+-#ifndef linux
++#if !defined(linux) && !defined(__GLIBC__)
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
diff --git a/patches/source/squashfs-tools/0002-fix_phys_mem_calculation.patch b/patches/source/squashfs-tools/0002-fix_phys_mem_calculation.patch
new file mode 100644
index 00000000..20f9005b
--- /dev/null
+++ b/patches/source/squashfs-tools/0002-fix_phys_mem_calculation.patch
@@ -0,0 +1,159 @@
+From 55f7ba830d40d438f0b0663a505e0c227fc68b6b Mon Sep 17 00:00:00 2001
+From: Phillip Lougher <phillip@squashfs.org.uk>
+Date: Tue, 10 Jun 2014 21:51:52 +0100
+Subject: [PATCH] mksquashfs: fix phys mem calculation for 32-bit processes on
+ PAE/64-bit kernels
+
+When adding the code to base default memory usage on physical memory
+(by default use 25% of physical memory), I made an oversight. I assumed
+the process would be able to address 25% of physical memory.
+
+However, for 32-bit processes running on a PAE kernel or 64-bit kernel,
+25% of physical memory can easily exceed the addressible memory for a
+32-bit process, e.g. if a machine has 24 GB of physical memory, the
+code would asume the process could easily use 6 GB.
+
+A 32-bit process by definition can only address 4 GB (32-bit pointers).
+But, due to the typical kernel/user-space split (1GB/3GB, or 2GB/2GB)
+on PAE kernels, a 32-bit process may only be able to address 2 GB.
+
+So, if Mksquashfs is a 32-bit application running on a PAE/64-bit kernel,
+the code assumes it can address much more memory than it really can, which
+means it runs out of memory.
+
+The fix is to impose a maximum default limit on 32-bit kernels, or
+otherwise to never use a value more than 25% of the address space. If
+we assume the maximum address space is 2 GB, then the maximum becomes
+512 MB. But, given most kernels used the 1GB/3GB split, that may be
+unduely conservative, and 25% of 3 GB (756 MB) may be better. This
+patch compromises on 640 MB, which is mid-way between the 512 MB and 756 MB
+values. It is also the fixed default value previously used by Mksquashfs.
+
+This patch also alters the code which imposes a maximum size. Previously
+it was believed limiting to the physical memory size was adequate. But
+obviously this needs to be updated to take into account a 32-bit process
+may only be able to address 2 GB. In the process I've also taken the
+opportunity to limit all requests to no more than 75% of physical memory.
+
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+---
+ squashfs-tools/mksquashfs.c | 78 ++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 70 insertions(+), 8 deletions(-)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index 86f82bb..5370ecf 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -304,7 +304,7 @@ void restorefs();
+ struct dir_info *scan1_opendir(char *pathname, char *subpath, int depth);
+ void write_filesystem_tables(struct squashfs_super_block *sBlk, int nopad);
+ unsigned short get_checksum_mem(char *buff, int bytes);
+-int get_physical_memory();
++void check_usable_phys_mem(int total_mem);
+
+
+ void prep_exit()
+@@ -4053,11 +4053,7 @@ void initialise_threads(int readq, int fragq, int bwriteq, int fwriteq,
+ BAD_ERROR("Queue sizes rediculously too large\n");
+ total_mem += fwriteq;
+
+- if(total_mem > get_physical_memory()) {
+- ERROR("Total queue sizes larger than physical memory.\n");
+- ERROR("Mksquashfs will exhaust physical memory and thrash.\n");
+- BAD_ERROR("Queues too large\n");
+- }
++ check_usable_phys_mem(total_mem);
+
+ /*
+ * convert from queue size in Mbytes to queue size in
+@@ -4879,6 +4875,72 @@ int get_physical_memory()
+ }
+
+
++void check_usable_phys_mem(int total_mem)
++{
++ /*
++ * We want to allow users to use as much of their physical
++ * memory as they wish. However, for practical reasons there are
++ * limits which need to be imposed, to protect users from themselves
++ * and to prevent people from using Mksquashfs as a DOS attack by using
++ * all physical memory. Mksquashfs uses memory to cache data from disk
++ * to optimise performance. It is pointless to ask it to use more
++ * than 75% of physical memory, as this causes thrashing and it is thus
++ * self-defeating.
++ */
++ int mem = get_physical_memory();
++
++ mem = (mem >> 1) + (mem >> 2); /* 75% */
++
++ if(total_mem > mem) {
++ ERROR("Total memory requested is more than 75%% of physical "
++ "memory.\n");
++ ERROR("Mksquashfs uses memory to cache data from disk to "
++ "optimise performance.\n");
++ ERROR("It is pointless to ask it to use more than this amount "
++ "of memory, as this\n");
++ ERROR("causes thrashing and it is thus self-defeating.\n");
++ BAD_ERROR("Requested memory size too large\n");
++ }
++
++ if(sizeof(void *) == 4 && total_mem > 2048) {
++ /*
++ * If we're running on a kernel with PAE or on a 64-bit kernel,
++ * then the 75% physical memory limit can still easily exceed
++ * the addressable memory by this process.
++ *
++ * Due to the typical kernel/user-space split (1GB/3GB, or
++ * 2GB/2GB), we have to conservatively assume the 32-bit
++ * processes can only address 2-3GB. So refuse if the user
++ * tries to allocate more than 2GB.
++ */
++ ERROR("Total memory requested may exceed maximum "
++ "addressable memory by this process\n");
++ BAD_ERROR("Requested memory size too large\n");
++ }
++}
++
++
++int get_default_phys_mem()
++{
++ int mem = get_physical_memory() / SQUASHFS_TAKE;
++
++ if(sizeof(void *) == 4 && mem > 640) {
++ /*
++ * If we're running on a kernel with PAE or on a 64-bit kernel,
++ * the default memory usage can exceed the addressable
++ * memory by this process.
++ * Due to the typical kernel/user-space split (1GB/3GB, or
++ * 2GB/2GB), we have to conservatively assume the 32-bit
++ * processes can only address 2-3GB. So limit the default
++ * usage to 640M, which gives room for other data.
++ */
++ mem = 640;
++ }
++
++ return mem;
++}
++
++
+ void calculate_queue_sizes(int mem, int *readq, int *fragq, int *bwriteq,
+ int *fwriteq)
+ {
+@@ -4890,7 +4952,7 @@ void calculate_queue_sizes(int mem, int *readq, int *fragq, int *bwriteq,
+
+
+ #define VERSION() \
+- printf("mksquashfs version 4.3 (2014/05/12)\n");\
++ printf("mksquashfs version 4.3-git (2014/06/09)\n");\
+ printf("copyright (C) 2014 Phillip Lougher "\
+ "<phillip@squashfs.org.uk>\n\n"); \
+ printf("This program is free software; you can redistribute it and/or"\
+@@ -4918,7 +4980,7 @@ int main(int argc, char *argv[])
+ int fragq;
+ int bwriteq;
+ int fwriteq;
+- int total_mem = get_physical_memory() / SQUASHFS_TAKE;
++ int total_mem = get_default_phys_mem();
+ int progress = TRUE;
+ int force_progress = FALSE;
+ struct file_buffer **fragment = NULL;
diff --git a/patches/source/squashfs-tools/0003-CVE-2015-4645_and_CVE-2015-4646.patch b/patches/source/squashfs-tools/0003-CVE-2015-4645_and_CVE-2015-4646.patch
new file mode 100644
index 00000000..d81639f6
--- /dev/null
+++ b/patches/source/squashfs-tools/0003-CVE-2015-4645_and_CVE-2015-4646.patch
@@ -0,0 +1,76 @@
+From 6777e08cc38bc780d27c69c1d8c272867b74524f Mon Sep 17 00:00:00 2001
+From: Giancarlo Canales Barreto <gcanalesb@me.com>
+Date: Wed, 17 Jun 2015 00:22:19 -0400
+Subject: [PATCH] Update unsquash-4.c
+
+There seems to be a stack overflow in read_fragment_table_4 at via what seems to be an integer overflow. Still looking into this problem, it seems like two or three different problems combined.
+
+The first problem overflows the bytes variable, so that the allocation is enormous.
+```c
+int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
+```
+
+If we fix this by making the variable size_t, we run into an unrelated problem in which the stack VLA allocation of fragment_table_index can easily exceed RLIMIT_STACK.
+```c
+long long fragment_table_index[indexes];
+```
+
+In the case of my system, the RLIMIT_STACK is 8388608, and VLA is asking for 15728648. Plus the stack probably already has a bunch of other things. This is what I believe ultimately leads to the stack overflow.
+
+Afterwards, the heap allocation seems to succeed, and the disastrous call to read_fs_bytes is made, which initiates transfer from the squashfs image to the stack. At this stage, a stack overflow appears to be in full effect.
+
+```c
+ res = read_fs_bytes(fd, sBlk.s.fragment_table_start,
+ SQUASHFS_FRAGMENT_INDEX_BYTES(sBlk.s.fragments),
+ fragment_table_index);
+```
+This problem is also present in other read_fragment_table_N functions, and in in the original squashfs-tools.
+
+```
+Parallel unsquashfs: Using 8 processors
+ASAN:SIGSEGV
+=================================================================
+==8221==ERROR: AddressSanitizer: stack-overflow on address 0x7ffef3ae9608 (pc 0x000000559011 bp 0x7ffef49e9670 sp 0x7ffef3ae9610 T0)
+ #0 0x559010 in read_fragment_table_4 /home/septimus/vr/squashfs-vr/squashfs-tools/unsquash-4.c:40:9
+ #1 0x525073 in main /home/septimus/vr/squashfs-vr/squashfs-tools/unsquashfs.c:2763:5
+ #2 0x7fb56c533a3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
+ #3 0x418468 in _start (/home/septimus/vr/squashfs-vr/squashfs-tools/unsquashfs+0x418468)
+SUMMARY: AddressSanitizer: stack-overflow /home/septimus/vr/squashfs-vr/squashfs-tools/unsquash-4.c:40:9 in read_fragment_table_4
+==8221==ABORTING
+```
+
+Perhaps we should avoid using VLA altogether, and allocate fragment_table_index to the heap?
+This pull request is an example implementation of the fix for unsquash-4, but I don't have enough test vectors to verify it will not break anything.
+---
+ unsquash-4.c | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/squashfs-tools/unsquash-4.c b/squashfs-tools/unsquash-4.c
+index ecdaac7..2c0cf63 100644
+--- a/squashfs-tools/unsquash-4.c
++++ b/squashfs-tools/unsquash-4.c
+@@ -31,9 +31,9 @@ static unsigned int *id_table;
+ int read_fragment_table_4(long long *directory_table_end)
+ {
+ int res, i;
+- int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
+- int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
+- long long fragment_table_index[indexes];
++ size_t bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments);
++ size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments);
++ long long *fragment_table_index;
+
+ TRACE("read_fragment_table: %d fragments, reading %d fragment indexes "
+ "from 0x%llx\n", sBlk.s.fragments, indexes,
+@@ -44,6 +44,11 @@ int read_fragment_table_4(long long *directory_table_end)
+ return TRUE;
+ }
+
++ fragment_table_index = malloc(indexes*sizeof(long long));
++ if(fragment_table_index == NULL)
++ EXIT_UNSQUASH("read_fragment_table: failed to allocate "
++ "fragment table index\n");
++
+ fragment_table = malloc(bytes);
+ if(fragment_table == NULL)
+ EXIT_UNSQUASH("read_fragment_table: failed to allocate "
diff --git a/patches/source/squashfs-tools/0004-unsquashfs-add-support-for-LZMA-magics.patch b/patches/source/squashfs-tools/0004-unsquashfs-add-support-for-LZMA-magics.patch
new file mode 100644
index 00000000..258416bf
--- /dev/null
+++ b/patches/source/squashfs-tools/0004-unsquashfs-add-support-for-LZMA-magics.patch
@@ -0,0 +1,102 @@
+From c2dc60a94b01a1fff4a22db1c0569651afa6c959 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Wed, 19 Oct 2011 11:44:57 +0200
+Subject: [PATCH] unsquashfs: add support for LZMA magics
+X-Face: z*RaLf`X<@C75u6Ig9}{oW$H;1_\2t5)({*|jhM<pyWR#k60!#=#>/Vb;]yA5<GWI5`6u&+
+ ;6b'@y|8w"wB;4/e!7wYYrcqdJFY,~%Gk_4]cq$Ei/7<j&N3ah(m`ku?pX.&+~:_/wC~dwn^)MizBG
+ !pE^+iDQQ1yC6^,)YDKkxDd!T>\I~93>J<_`<4)A{':UrE
+
+Some vendor (e.g. Thomson/Technicolor) use a different super block magic
+to indicate LZMA compression:
+
+ qshs (0x71736873) - LZMA compression
+ shsq (0x73687371) - LZMA compression, SWAPPED fields
+
+Add support for detecting this and enable extraction for filesystems
+from those firmwares.
+
+Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
+Tested-by: Antonio Ospite <ospite@studenti.unina.it>
+---
+ squashfs-tools/squashfs_fs.h | 6 ++++++
+ squashfs-tools/unsquashfs.c | 24 ++++++++++++++++++------
+ 2 files changed, 24 insertions(+), 6 deletions(-)
+
+diff --git a/squashfs-tools/squashfs_fs.h b/squashfs-tools/squashfs_fs.h
+index d4fba1b..8462a6b 100644
+--- a/squashfs-tools/squashfs_fs.h
++++ b/squashfs-tools/squashfs_fs.h
+@@ -30,6 +30,12 @@
+ #define SQUASHFS_MAGIC_SWAP 0x68737173
+ #define SQUASHFS_START 0
+
++/*
++ * Squashfs + LZMA
++ */
++#define SQUASHFS_MAGIC_LZMA 0x71736873
++#define SQUASHFS_MAGIC_LZMA_SWAP 0x73687371
++
+ /* size of metadata (inode and directory) blocks */
+ #define SQUASHFS_METADATA_SIZE 8192
+ #define SQUASHFS_METADATA_LOG 13
+diff --git a/squashfs-tools/unsquashfs.c b/squashfs-tools/unsquashfs.c
+index 320bead..7869a38 100644
+--- a/squashfs-tools/unsquashfs.c
++++ b/squashfs-tools/unsquashfs.c
+@@ -1516,10 +1516,12 @@ int read_super(char *source)
+ */
+ read_fs_bytes(fd, SQUASHFS_START, sizeof(struct squashfs_super_block),
+ &sBlk_4);
+- swap = sBlk_4.s_magic != SQUASHFS_MAGIC;
++ swap = (sBlk_4.s_magic != SQUASHFS_MAGIC &&
++ sBlk_4.s_magic != SQUASHFS_MAGIC_LZMA);
+ SQUASHFS_INSWAP_SUPER_BLOCK(&sBlk_4);
+
+- if(sBlk_4.s_magic == SQUASHFS_MAGIC && sBlk_4.s_major == 4 &&
++ if((sBlk_4.s_magic == SQUASHFS_MAGIC ||
++ sBlk_4.s_magic == SQUASHFS_MAGIC_LZMA) && sBlk_4.s_major == 4 &&
+ sBlk_4.s_minor == 0) {
+ s_ops.squashfs_opendir = squashfs_opendir_4;
+ s_ops.read_fragment = read_fragment_4;
+@@ -1532,7 +1534,11 @@ int read_super(char *source)
+ /*
+ * Check the compression type
+ */
+- comp = lookup_compressor_id(sBlk.s.compression);
++ if (sBlk_4.s_magic == SQUASHFS_MAGIC_LZMA)
++ comp = lookup_compressor("lzma");
++ else
++ comp = lookup_compressor_id(sBlk.s.compression);
++
+ return TRUE;
+ }
+
+@@ -1547,8 +1553,10 @@ int read_super(char *source)
+ * Check it is a SQUASHFS superblock
+ */
+ swap = 0;
+- if(sBlk_3.s_magic != SQUASHFS_MAGIC) {
+- if(sBlk_3.s_magic == SQUASHFS_MAGIC_SWAP) {
++ if(sBlk_3.s_magic != SQUASHFS_MAGIC &&
++ sBlk_3.s_magic != SQUASHFS_MAGIC_LZMA) {
++ if(sBlk_3.s_magic == SQUASHFS_MAGIC_SWAP ||
++ sBlk_3.s_magic == SQUASHFS_MAGIC_LZMA_SWAP) {
+ squashfs_super_block_3 sblk;
+ ERROR("Reading a different endian SQUASHFS filesystem "
+ "on %s\n", source);
+@@ -1626,7 +1634,11 @@ int read_super(char *source)
+ /*
+ * 1.x, 2.x and 3.x filesystems use gzip compression.
+ */
+- comp = lookup_compressor("gzip");
++ if (sBlk.s.s_magic == SQUASHFS_MAGIC_LZMA)
++ comp = lookup_compressor("lzma");
++ else
++ comp = lookup_compressor("gzip");
++
+ return TRUE;
+
+ failed_mount:
+--
+1.7.10.4
+
diff --git a/patches/source/squashfs-tools/0006-uptream-fix-race.patch b/patches/source/squashfs-tools/0006-uptream-fix-race.patch
new file mode 100644
index 00000000..3cefbe5b
--- /dev/null
+++ b/patches/source/squashfs-tools/0006-uptream-fix-race.patch
@@ -0,0 +1,54 @@
+commit de03266983ceb62e5365aac84fcd3b2fd4d16e6f
+Author: Phillip Lougher <phillip@squashfs.org.uk>
+Date: Thu Sep 18 01:28:11 2014 +0100
+
+ mksquashfs: fix rare race in fragment waiting in filesystem finalisation
+
+ Fix a rare race condition in fragment waiting when finalising the
+ filesystem. This is a race condition that was initially fixed in 2009,
+ but inadvertantly re-introduced in the latest release when the code
+ was rewritten.
+
+ Background:
+
+ When finalising the filesystem, the main control thread needs to ensure
+ all the in-flight fragments have been queued to the writer thread before
+ asking the writer thread to finish, and then writing the metadata.
+
+ It does this by waiting on the fragments_outstanding counter. Once this
+ counter reaches 0, it synchronises with the writer thread, waiting until
+ the writer thread reports no outstanding data to be written.
+
+ However, the main thread can race with the fragment deflator thread(s)
+ because the fragment deflator thread(s) decrement the fragments_outstanding
+ counter and release the mutex before queueing the compressed fragment
+ to the writer thread, i.e. the offending code is:
+
+ fragments_outstanding --;
+ pthread_mutex_unlock(&fragment_mutex);
+ queue_put(to_writer, write_buffer);
+
+ In extremely rare circumstances, the main thread may see the
+ fragments_outstanding counter is zero before the fragment
+ deflator sends the fragment buffer to the writer thread, and synchronise
+ with the writer thread, and finalise before the fragment has been written.
+
+ The fix is to ensure the fragment is queued to the writer thread
+ before releasing the mutex.
+
+ Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index 87b7d86..f1fcff1 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -2445,8 +2445,8 @@ void *frag_deflator(void *arg)
+ write_buffer->block = bytes;
+ bytes += compressed_size;
+ fragments_outstanding --;
+- pthread_mutex_unlock(&fragment_mutex);
+ queue_put(to_writer, write_buffer);
++ pthread_mutex_unlock(&fragment_mutex);
+ TRACE("Writing fragment %lld, uncompressed size %d, "
+ "compressed size %d\n", file_buffer->block,
+ file_buffer->size, compressed_size);
diff --git a/patches/source/squashfs-tools/0007-fix-2GB-limit-in-mksquashfs.patch b/patches/source/squashfs-tools/0007-fix-2GB-limit-in-mksquashfs.patch
new file mode 100644
index 00000000..c689a3a9
--- /dev/null
+++ b/patches/source/squashfs-tools/0007-fix-2GB-limit-in-mksquashfs.patch
@@ -0,0 +1,27 @@
+From 9c1db6d13a51a2e009f0027ef336ce03624eac0d Mon Sep 17 00:00:00 2001
+From: "Guan, Xin" <guanx.bac@gmail.com>
+Date: Sat, 13 Sep 2014 13:15:26 +0200
+Subject: [PATCH] Fix 2GB-limit of the is_fragment(...) function.
+
+Applies to squashfs-tools 4.3.
+
+Reported-by: Bruno Wolff III <bruno@wolff.to>
+Signed-off-by: Guan, Xin <guanx.bac@gmail.com>
+Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
+---
+ squashfs-tools/mksquashfs.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
+index f1fcff1..d221c35 100644
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -2055,7 +2055,7 @@ struct file_info *duplicate(long long file_size, long long bytes,
+
+ inline int is_fragment(struct inode_info *inode)
+ {
+- int file_size = inode->buf.st_size;
++ off_t file_size = inode->buf.st_size;
+
+ /*
+ * If this block is to be compressed differently to the
diff --git a/patches/source/squashfs-tools/slack-desc b/patches/source/squashfs-tools/slack-desc
new file mode 100644
index 00000000..681a6630
--- /dev/null
+++ b/patches/source/squashfs-tools/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+squashfs-tools: squashfs-tools (squashed read-only filesystem for Linux)
+squashfs-tools:
+squashfs-tools: Squashfs is a highly compressed read-only filesystem for Linux.
+squashfs-tools: Squashfs compresses both files, inodes and directories, and
+squashfs-tools: supports block sizes up to 1Mbytes for greater compression.
+squashfs-tools: It is implemented as a kernel module under VFS.
+squashfs-tools: The package contains tools for manipulation of squashfs bundles.
+squashfs-tools:
+squashfs-tools:
+squashfs-tools: squashfs-tools home: http://squashfs.sourceforge.net/
+squashfs-tools:
diff --git a/patches/source/squashfs-tools/squashfs-tools.SlackBuild b/patches/source/squashfs-tools/squashfs-tools.SlackBuild
new file mode 100755
index 00000000..1b010d0e
--- /dev/null
+++ b/patches/source/squashfs-tools/squashfs-tools.SlackBuild
@@ -0,0 +1,122 @@
+#!/bin/sh
+
+# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 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.
+
+
+PKGNAM=squashfs-tools
+VERSION=${VERSION:-$(echo squashfs*.tar.xz | cut -b9- | rev | cut -f3- -d . | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf squashfs${VERSION}
+tar xvf $CWD/squashfs${VERSION}.tar.xz || exit 1
+cd squashfs${VERSION} || exit 1
+
+zcat $CWD/0001-kfreebsd.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0002-fix_phys_mem_calculation.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0003-CVE-2015-4645_and_CVE-2015-4646.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0004-unsquashfs-add-support-for-LZMA-magics.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0006-uptream-fix-race.patch.gz | patch -p1 --verbose || exit 1
+zcat $CWD/0007-fix-2GB-limit-in-mksquashfs.patch.gz | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+cd squashfs-tools || exit 1
+
+# Build:
+CFLAGS="$SLKCFLAGS" \
+make $NUMJOBS \
+ GZIP_SUPPORT="1" \
+ XZ_SUPPORT="1" \
+ LZO_SUPPORT="1" \
+ LZMA_XZ_SUPPORT="1" \
+ COMP_DEFAULT="xz" || exit 1
+
+# Install:
+make install INSTALL_DIR=$PKG/usr/bin || 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
+)
+
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+( cd ..
+ cp -a \
+ ACKNOWLEDGEMENTS CHANGES COPYING DONATIONS INSTALL \
+ README* PERFORMANCE.README *.example \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+)
+
+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/stunnel/doinst.sh b/patches/source/stunnel/doinst.sh
new file mode 100644
index 00000000..21f004b0
--- /dev/null
+++ b/patches/source/stunnel/doinst.sh
@@ -0,0 +1,12 @@
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/stunnel/openssl.cnf.new
diff --git a/patches/source/stunnel/generate-stunnel-key.sh b/patches/source/stunnel/generate-stunnel-key.sh
new file mode 100644
index 00000000..b24b4ba8
--- /dev/null
+++ b/patches/source/stunnel/generate-stunnel-key.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+USE_DH=0
+
+openssl req -new -x509 -days 365 -nodes \
+ -config ./openssl.cnf -out stunnel.pem -keyout stunnel.pem
+
+test $USE_DH -eq 0 || openssl gendh >> stunnel.pem
+
+openssl x509 -subject -dates -fingerprint -noout \
+ -in stunnel.pem
+
+chmod 600 stunnel.pem
+rm -f stunnel.rnd
diff --git a/patches/source/stunnel/slack-desc b/patches/source/stunnel/slack-desc
new file mode 100644
index 00000000..f8ee5bc4
--- /dev/null
+++ b/patches/source/stunnel/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------------------------------------------------------|
+stunnel: stunnel (Universal SSL tunnel)
+stunnel:
+stunnel: The stunnel program is designed to work as an SSL encryption wrapper
+stunnel: between remote client and local (inetd-startable) or remote servers.
+stunnel: The goal is to facilitate SSL encryption and authentication for
+stunnel: non-SSL-aware programs.
+stunnel:
+stunnel: stunnel can be used to add SSL functionality to commonly used inetd
+stunnel: daemons like POP-2, POP-3 and IMAP servers without any changes in the
+stunnel: programs' code.
+stunnel:
diff --git a/patches/source/stunnel/stunnel.SlackBuild b/patches/source/stunnel/stunnel.SlackBuild
new file mode 100755
index 00000000..9797f3bc
--- /dev/null
+++ b/patches/source/stunnel/stunnel.SlackBuild
@@ -0,0 +1,140 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 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=stunnel
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-stunnel
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf stunnel-$VERSION
+tar xvf $CWD/stunnel-$VERSION.tar.?z || exit 1
+cd stunnel-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --exec-prefix= \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --mandir=/usr/man \
+ --sbindir=/usr/sbin \
+ --bindir=/usr/bin \
+ --localstatedir=/var \
+ --build=$ARCH-slackware-linux
+
+make $NUMJOBS || make || exit 1
+
+# This used to be installed in /usr/sbin, so it would probably be nice to
+# link from there:
+mkdir -p $PKG/usr/sbin
+( cd $PKG/usr/sbin
+ ln -sf ../bin/stunnel .
+ ln -sf ../bin/stunnel3 .
+)
+
+mkdir -p $PKG/var/run/stunnel
+# This will produce a useless key.
+make -i install DESTDIR=$PKG
+# Get rid of key, so nobody tries to use it:
+rm -f $PKG/etc/stunnel/stunnel.pem
+# Add cnf:
+cat tools/openssl.cnf > $PKG/etc/stunnel/openssl.cnf.new
+cat $CWD/generate-stunnel-key.sh > $PKG/etc/stunnel/generate-stunnel-key.sh
+chmod 755 $PKG/etc/stunnel/generate-stunnel-key.sh
+
+mkdir -p $PKG/usr/doc/stunnel-$VERSION
+mv $PKG/usr/share/doc/stunnel/* $PKG/usr/doc/stunnel-$VERSION
+rmdir $PKG/usr/share/doc/stunnel
+rmdir $PKG/usr/share/doc
+rmdir $PKG/usr/share
+
+mkdir -p $PKG/usr/man/pl/man8
+mv $PKG/usr/man/man8/stunnel.pl.8 $PKG/usr/man/pl/man8/stunnel.8
+mkdir -p $PKG/usr/man/fr/man8
+mv $PKG/usr/man/man8/stunnel.fr.8 $PKG/usr/man/fr/man8/stunnel.8
+gzip -9 $PKG/usr/man/*/man?/*.? $PKG/usr/man/man?/*.?
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# The 4.15 version of stunnel caused some bizarre perms, so
+# we'll protect against that:
+chmod 0755 $PKG/var/lib
+chown root:root $PKG/var/lib
+
+# 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
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/stunnel-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/subversion/get-svn-book.sh b/patches/source/subversion/get-svn-book.sh
new file mode 100755
index 00000000..e88530d3
--- /dev/null
+++ b/patches/source/subversion/get-svn-book.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+CWD=`pwd`
+
+# Add the latest copy of the Subversion book:
+( cd $CWD
+ lftpget http://svnbook.red-bean.com/en/1.7/svn-book-html.tar.bz2
+ chmod 644 svn-book-html.tar.bz2
+)
+
diff --git a/patches/source/subversion/slack-desc b/patches/source/subversion/slack-desc
new file mode 100644
index 00000000..af2ef0b6
--- /dev/null
+++ b/patches/source/subversion/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------------------------------------------------------|
+subversion: subversion (a version control system)
+subversion:
+subversion: Subversion is a version control system which allows you to keep old
+subversion: versions of files and directories (usually source code), and keep a
+subversion: log of who, when, and why changes occurred, similar to other such
+subversion: systems like CVS, RCS or SCCS. Subversion keeps all the information
+subversion: to permit extracting previous versions of those files at any time.
+subversion:
+subversion: For more information about the Subversion project, visit:
+subversion: http://subversion.apache.org
+subversion:
diff --git a/patches/source/subversion/subversion.SlackBuild b/patches/source/subversion/subversion.SlackBuild
new file mode 100755
index 00000000..83c397b9
--- /dev/null
+++ b/patches/source/subversion/subversion.SlackBuild
@@ -0,0 +1,174 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 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.
+
+
+VERSION=${VERSION:-$(echo subversion-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-subversion
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf subversion-$VERSION
+tar xvf $CWD/subversion-$VERSION.tar.?z* || exit 1
+cd subversion-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-apache-libexecdir=/usr/lib${LIBDIRSUFFIX}/httpd/modules \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/subversion-$VERSION \
+ --enable-shared \
+ --disable-static \
+ --with-apr=/usr \
+ --with-apr-util=/usr \
+ --with-apxs=/usr/bin/apxs \
+ --with-zlib=/usr \
+ --with-pic \
+ --with-kwallet \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+make install-tools DESTDIR=$PKG || exit 1
+make install-docs DESTDIR=$PKG || exit 1
+
+# Install python bindings
+make swig-py
+make install-swig-py DESTDIR=$PKG
+PYTHON_VER=$(python -c 'import sys; print "%d.%d" % sys.version_info[:2]')
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/python${PYTHON_VER}/site-packages
+mv $PKG/usr/lib${LIBDIRSUFFIX}/svn-python/* \
+ $PKG/usr/lib${LIBDIRSUFFIX}/python${PYTHON_VER}/site-packages
+rmdir $PKG/usr/lib${LIBDIRSUFFIX}/svn-python
+
+# Perl bindings
+make swig-pl-lib
+make install-swig-pl-lib DESTDIR=$PKG
+( cd subversion/bindings/swig/perl/native
+ perl Makefile.PL
+ make install_vendor DESTDIR=$PKG
+)
+eval $(perl '-V:archlib')
+mv $PKG/$archlib/perllocal.pod $PKG/$archlib/subversion.pod
+
+# Ruby bindings
+make swig-rb
+make install-swig-rb 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
+
+rm -rf $PKG/usr/info
+# Something doesn't honor --mandir
+mv $PKG/usr/share/man/man3 $PKG/usr/man
+gzip -9 $PKG/usr/man/man?/*
+rmdir $PKG/usr/share/man
+
+# What is this junk for? Since I don't know, I'll erase it. :-)
+rm -rf $PKG/usr/build
+
+mkdir -p $PKG/usr/doc/subversion-$VERSION
+cp -a \
+ BUGS COMMITTERS COPYING* HACKING INSTALL README TRANSLATING doc \
+ $PKG/usr/doc/subversion-$VERSION
+# too big && useless for most || if you think not, can be found in the source tarball
+rm -rf $PKG/usr/doc/subversion-$VERSION/doc/tools
+# Add the HTML svn book:
+( cd $PKG/usr/doc/subversion-$VERSION
+ tar xf $CWD/svn-book-html.tar.bz2
+ mv svn-book-html book
+ cd book
+ chown -R root:root .
+ find . -type d -exec chmod 0755 {} \;
+ find . -type f -exec chmod 0644 {} \;
+ find . -perm 2755 -exec chmod 0755 {} \;
+ 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 {} \;
+)
+
+# 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 removes our DESTDIR from the packlist filenames, to keep perl's
+# internal inventories consistent and correct.
+find $PKG -name .packlist | while read plist ; do
+ sed -e "s%$PKG%%g" \
+ -e "s%/share/man%/man%g" \
+ -re "s%\.([1-9]n?|3pm)$%&.gz%g # extend man filenames for .gz" \
+ ${plist} > ${plist}.new
+ mv -f ${plist}.new ${plist}
+done
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/subversion-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/sudo/doinst.sh b/patches/source/sudo/doinst.sh
new file mode 100644
index 00000000..01e3d173
--- /dev/null
+++ b/patches/source/sudo/doinst.sh
@@ -0,0 +1,14 @@
+#!/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...
+}
+config etc/sudoers.new
+rm -f etc/sudoers.new
diff --git a/patches/source/sudo/slack-desc b/patches/source/sudo/slack-desc
new file mode 100644
index 00000000..66f1aa8c
--- /dev/null
+++ b/patches/source/sudo/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------------------------------------------------------|
+sudo: sudo (give limited root privileges to certain users)
+sudo:
+sudo: 'sudo' is a command that allows users to execute some commands as
+sudo: root. The /etc/sudoers file (edited with 'visudo') specifies which
+sudo: users have access to sudo and which commands they can run. 'sudo'
+sudo: logs all its activities to /var/log/ so the system administrator
+sudo: can keep an eye on things.
+sudo:
+sudo:
+sudo:
+sudo:
diff --git a/patches/source/sudo/sudo.SlackBuild b/patches/source/sudo/sudo.SlackBuild
new file mode 100755
index 00000000..7611ad06
--- /dev/null
+++ b/patches/source/sudo/sudo.SlackBuild
@@ -0,0 +1,125 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011, 2012, 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=sudo
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-sudo
+
+rm -rf $PKG
+mkdir -p $TMP $PKG/var/db
+
+if [ "$ARCH" = "i386" ]; then
+ SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
+
+cd $TMP
+rm -rf sudo-$VERSION
+tar xvf $CWD/sudo-$VERSION.tar.?z* || exit 1
+cd sudo-$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 \
+ --sbindir=/usr/sbin \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/sudo-$VERSION \
+ --with-env-editor \
+ --disable-pam-session \
+ --with-pam=no \
+ --with-rundir=/var/db/sudo \
+ --with-insults \
+ --with-all-insults \
+ --with-pc-insults \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+( cd $PKG/usr/bin
+ chmod 4711 sudo
+ ln -sf sudo sudoedit
+)
+chmod 755 $PKG/usr/sbin/visudo
+
+rm -f $PKG/usr/man/man8/sudoedit.8
+gzip -9 $PKG/usr/man/man?/*.?
+( cd $PKG/usr/man/man8 ; ln -sf sudo.8.gz sudoedit.8.gz )
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mv $PKG/etc/sudoers $PKG/etc/sudoers.new
+
+rm -r $PKG/usr/doc/sudo-$VERSION
+mkdir -p $PKG/usr/doc/sudo-$VERSION
+cp -a \
+ INSTALL NEWS README* \
+ doc/{CONTRIBUTORS,HISTORY,LICENSE,TROUBLESHOOTING,UPGRADE} \
+ $PKG/usr/doc/sudo-$VERSION
+chmod 644 $PKG/usr/doc/sudo-$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
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/sudo-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/tcpdump/slack-desc b/patches/source/tcpdump/slack-desc
new file mode 100644
index 00000000..5e969643
--- /dev/null
+++ b/patches/source/tcpdump/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------------------------------------------------------|
+tcpdump: tcpdump (network monitoring tool)
+tcpdump:
+tcpdump: Tcpdump is a tool for network monitoring and data acquisition. You
+tcpdump: can use it to dump information on all the packets on a network that
+tcpdump: match a boolean expression. Tcpdump uses libpcap, a system
+tcpdump: independent interface for user-level packet capture.
+tcpdump:
+tcpdump: Project homepage: http://www.tcpdump.org
+tcpdump:
+tcpdump:
+tcpdump:
diff --git a/patches/source/tcpdump/tcpdump.SlackBuild b/patches/source/tcpdump/tcpdump.SlackBuild
new file mode 100755
index 00000000..dab4848c
--- /dev/null
+++ b/patches/source/tcpdump/tcpdump.SlackBuild
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010 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=tcpdump
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-tcpdump
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf tcpdump-$VERSION
+
+# To (try to) avoid weird errors, take an axe to this:
+rm -rf $TMP/libpcap-?.?.?
+
+tar xvf $CWD/tcpdump-$VERSION.tar.xz || exit 1
+cd tcpdump-$VERSION || exit 1
+find . -type d -name CVS -depth -exec rm -rf {} \;
+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 \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/tcpdump-$VERSION \
+ --enable-ipv6 \
+ --build=$ARCH-slackware-linux
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strange, two identical files:
+( cd $PKG/usr/sbin
+ rm -f tcpdump
+ ln -s tcpdump.$VERSION tcpdump
+) || exit 1
+
+mkdir -p $PKG/usr/doc/tcpdump-$VERSION
+cp -a \
+ CHANGES CREDITS FILES INSTALL.txt LICENSE README* VERSION \
+ $PKG/usr/doc/tcpdump-$VERSION
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress man pages
+( 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/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/tcpdump-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/wget/doinst.sh b/patches/source/wget/doinst.sh
new file mode 100644
index 00000000..dd81eb50
--- /dev/null
+++ b/patches/source/wget/doinst.sh
@@ -0,0 +1,14 @@
+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/wgetrc.new
+
diff --git a/patches/source/wget/slack-desc b/patches/source/wget/slack-desc
new file mode 100644
index 00000000..d023ea37
--- /dev/null
+++ b/patches/source/wget/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------------------------------------------------------|
+wget: wget (a non-interactive network retriever)
+wget:
+wget: GNU Wget is a free network utility to retrieve files from the
+wget: World Wide Web using HTTP and FTP, the two most widely used Internet
+wget: protocols. It works non-interactively, thus enabling work in the
+wget: background after having logged off.
+wget:
+wget: The author of Wget is Hrvoje Niksic <hniksic@srce.hr>.
+wget:
+wget:
+wget:
diff --git a/patches/source/wget/wget.SlackBuild b/patches/source/wget/wget.SlackBuild
new file mode 100755
index 00000000..7519418b
--- /dev/null
+++ b/patches/source/wget/wget.SlackBuild
@@ -0,0 +1,109 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2015 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 wget-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-wget
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf wget-$VERSION
+tar xvf $CWD/wget-$VERSION.tar.?z || exit 1
+cd wget-$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 \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/wget-$VERSION \
+ --with-ssl=openssl \
+ --build=${ARCH}-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+mv $PKG/etc/wgetrc $PKG/etc/wgetrc.new
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rm -f $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/* $PKG/usr/man/man?/*
+
+mkdir -p $PKG/usr/doc/wget-$VERSION
+cp -a \
+ AUTHORS COPYING* MAILING-LIST NEWS PATCHES README* TODO \
+ $PKG/usr/doc/wget-$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/*-$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/wget-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
new file mode 100644
index 00000000..72768486
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch
@@ -0,0 +1,174 @@
+From cf4cab804c7afd5c45505528a8d16e46163243a2 Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Fri, 14 Jul 2017 15:15:35 +0200
+Subject: [PATCH 1/8] hostapd: Avoid key reinstallation in FT handshake
+
+Do not reinstall TK to the driver during Reassociation Response frame
+processing if the first attempt of setting the TK succeeded. This avoids
+issues related to clearing the TX/RX PN that could result in reusing
+same PN values for transmitted frames (e.g., due to CCM nonce reuse and
+also hitting replay protection on the receiver) and accepting replayed
+frames on RX side.
+
+This issue was introduced by the commit
+0e84c25434e6a1f283c7b4e62e483729085b78d2 ('FT: Fix PTK configuration in
+authenticator') which allowed wpa_ft_install_ptk() to be called multiple
+times with the same PTK. While the second configuration attempt is
+needed with some drivers, it must be done only if the first attempt
+failed.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+---
+ src/ap/ieee802_11.c | 16 +++++++++++++---
+ src/ap/wpa_auth.c | 11 +++++++++++
+ src/ap/wpa_auth.h | 3 ++-
+ src/ap/wpa_auth_ft.c | 10 ++++++++++
+ src/ap/wpa_auth_i.h | 1 +
+ 5 files changed, 37 insertions(+), 4 deletions(-)
+
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index 4e04169..333035f 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -1841,6 +1841,7 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ {
+ struct ieee80211_ht_capabilities ht_cap;
+ struct ieee80211_vht_capabilities vht_cap;
++ int set = 1;
+
+ /*
+ * Remove the STA entry to ensure the STA PS state gets cleared and
+@@ -1848,9 +1849,18 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ * FT-over-the-DS, where a station re-associates back to the same AP but
+ * skips the authentication flow, or if working with a driver that
+ * does not support full AP client state.
++ *
++ * Skip this if the STA has already completed FT reassociation and the
++ * TK has been configured since the TX/RX PN must not be reset to 0 for
++ * the same key.
+ */
+- if (!sta->added_unassoc)
++ if (!sta->added_unassoc &&
++ (!(sta->flags & WLAN_STA_AUTHORIZED) ||
++ !wpa_auth_sta_ft_tk_already_set(sta->wpa_sm))) {
+ hostapd_drv_sta_remove(hapd, sta->addr);
++ wpa_auth_sm_event(sta->wpa_sm, WPA_DRV_STA_REMOVED);
++ set = 0;
++ }
+
+ #ifdef CONFIG_IEEE80211N
+ if (sta->flags & WLAN_STA_HT)
+@@ -1873,11 +1883,11 @@ static int add_associated_sta(struct hostapd_data *hapd,
+ sta->flags & WLAN_STA_VHT ? &vht_cap : NULL,
+ sta->flags | WLAN_STA_ASSOC, sta->qosinfo,
+ sta->vht_opmode, sta->p2p_ie ? 1 : 0,
+- sta->added_unassoc)) {
++ set)) {
+ hostapd_logger(hapd, sta->addr,
+ HOSTAPD_MODULE_IEEE80211, HOSTAPD_LEVEL_NOTICE,
+ "Could not %s STA to kernel driver",
+- sta->added_unassoc ? "set" : "add");
++ set ? "set" : "add");
+
+ if (sta->added_unassoc) {
+ hostapd_drv_sta_remove(hapd, sta->addr);
+diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
+index 3587086..707971d 100644
+--- a/src/ap/wpa_auth.c
++++ b/src/ap/wpa_auth.c
+@@ -1745,6 +1745,9 @@ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event)
+ #else /* CONFIG_IEEE80211R */
+ break;
+ #endif /* CONFIG_IEEE80211R */
++ case WPA_DRV_STA_REMOVED:
++ sm->tk_already_set = FALSE;
++ return 0;
+ }
+
+ #ifdef CONFIG_IEEE80211R
+@@ -3250,6 +3253,14 @@ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm)
+ }
+
+
++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm)
++{
++ if (!sm || !wpa_key_mgmt_ft(sm->wpa_key_mgmt))
++ return 0;
++ return sm->tk_already_set;
++}
++
++
+ int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
+ struct rsn_pmksa_cache_entry *entry)
+ {
+diff --git a/src/ap/wpa_auth.h b/src/ap/wpa_auth.h
+index 0de8d97..97461b0 100644
+--- a/src/ap/wpa_auth.h
++++ b/src/ap/wpa_auth.h
+@@ -267,7 +267,7 @@ void wpa_receive(struct wpa_authenticator *wpa_auth,
+ u8 *data, size_t data_len);
+ enum wpa_event {
+ WPA_AUTH, WPA_ASSOC, WPA_DISASSOC, WPA_DEAUTH, WPA_REAUTH,
+- WPA_REAUTH_EAPOL, WPA_ASSOC_FT
++ WPA_REAUTH_EAPOL, WPA_ASSOC_FT, WPA_DRV_STA_REMOVED
+ };
+ void wpa_remove_ptk(struct wpa_state_machine *sm);
+ int wpa_auth_sm_event(struct wpa_state_machine *sm, enum wpa_event event);
+@@ -280,6 +280,7 @@ int wpa_auth_pairwise_set(struct wpa_state_machine *sm);
+ int wpa_auth_get_pairwise(struct wpa_state_machine *sm);
+ int wpa_auth_sta_key_mgmt(struct wpa_state_machine *sm);
+ int wpa_auth_sta_wpa_version(struct wpa_state_machine *sm);
++int wpa_auth_sta_ft_tk_already_set(struct wpa_state_machine *sm);
+ int wpa_auth_sta_clear_pmksa(struct wpa_state_machine *sm,
+ struct rsn_pmksa_cache_entry *entry);
+ struct rsn_pmksa_cache_entry *
+diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
+index 42242a5..e63b99a 100644
+--- a/src/ap/wpa_auth_ft.c
++++ b/src/ap/wpa_auth_ft.c
+@@ -780,6 +780,14 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
+ return;
+ }
+
++ if (sm->tk_already_set) {
++ /* Must avoid TK reconfiguration to prevent clearing of TX/RX
++ * PN in the driver */
++ wpa_printf(MSG_DEBUG,
++ "FT: Do not re-install same PTK to the driver");
++ return;
++ }
++
+ /* FIX: add STA entry to kernel/driver here? The set_key will fail
+ * most likely without this.. At the moment, STA entry is added only
+ * after association has been completed. This function will be called
+@@ -792,6 +800,7 @@ void wpa_ft_install_ptk(struct wpa_state_machine *sm)
+
+ /* FIX: MLME-SetProtection.Request(TA, Tx_Rx) */
+ sm->pairwise_set = TRUE;
++ sm->tk_already_set = TRUE;
+ }
+
+
+@@ -898,6 +907,7 @@ static int wpa_ft_process_auth_req(struct wpa_state_machine *sm,
+
+ sm->pairwise = pairwise;
+ sm->PTK_valid = TRUE;
++ sm->tk_already_set = FALSE;
+ wpa_ft_install_ptk(sm);
+
+ buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
+diff --git a/src/ap/wpa_auth_i.h b/src/ap/wpa_auth_i.h
+index 72b7eb3..7fd8f05 100644
+--- a/src/ap/wpa_auth_i.h
++++ b/src/ap/wpa_auth_i.h
+@@ -65,6 +65,7 @@ struct wpa_state_machine {
+ struct wpa_ptk PTK;
+ Boolean PTK_valid;
+ Boolean pairwise_set;
++ Boolean tk_already_set;
+ int keycount;
+ Boolean Pair;
+ struct wpa_key_replay_counter {
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
new file mode 100644
index 00000000..1802d664
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch
@@ -0,0 +1,250 @@
+From 927f891007c402fefd1ff384645b3f07597c3ede Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Wed, 12 Jul 2017 16:03:24 +0200
+Subject: [PATCH 2/8] Prevent reinstallation of an already in-use group key
+
+Track the current GTK and IGTK that is in use and when receiving a
+(possibly retransmitted) Group Message 1 or WNM-Sleep Mode Response, do
+not install the given key if it is already in use. This prevents an
+attacker from trying to trick the client into resetting or lowering the
+sequence counter associated to the group key.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+---
+ src/common/wpa_common.h | 11 +++++
+ src/rsn_supp/wpa.c | 116 ++++++++++++++++++++++++++++++------------------
+ src/rsn_supp/wpa_i.h | 4 ++
+ 3 files changed, 87 insertions(+), 44 deletions(-)
+
+diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
+index af1d0f0..d200285 100644
+--- a/src/common/wpa_common.h
++++ b/src/common/wpa_common.h
+@@ -217,6 +217,17 @@ struct wpa_ptk {
+ size_t tk_len;
+ };
+
++struct wpa_gtk {
++ u8 gtk[WPA_GTK_MAX_LEN];
++ size_t gtk_len;
++};
++
++#ifdef CONFIG_IEEE80211W
++struct wpa_igtk {
++ u8 igtk[WPA_IGTK_MAX_LEN];
++ size_t igtk_len;
++};
++#endif /* CONFIG_IEEE80211W */
+
+ /* WPA IE version 1
+ * 00-50-f2:1 (OUI:OUI type)
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 3c47879..95bd7be 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -714,6 +714,15 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ const u8 *_gtk = gd->gtk;
+ u8 gtk_buf[32];
+
++ /* Detect possible key reinstallation */
++ if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
++ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++ "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
++ gd->keyidx, gd->tx, gd->gtk_len);
++ return 0;
++ }
++
+ wpa_hexdump_key(MSG_DEBUG, "WPA: Group Key", gd->gtk, gd->gtk_len);
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Installing GTK to the driver (keyidx=%d tx=%d len=%d)",
+@@ -748,6 +757,9 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ }
+ os_memset(gtk_buf, 0, sizeof(gtk_buf));
+
++ sm->gtk.gtk_len = gd->gtk_len;
++ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++
+ return 0;
+ }
+
+@@ -854,6 +866,48 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+ }
+
+
++#ifdef CONFIG_IEEE80211W
++static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
++ const struct wpa_igtk_kde *igtk)
++{
++ size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
++ u16 keyidx = WPA_GET_LE16(igtk->keyid);
++
++ /* Detect possible key reinstallation */
++ if (sm->igtk.igtk_len == len &&
++ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++ "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
++ keyidx);
++ return 0;
++ }
++
++ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
++ "WPA: IGTK keyid %d pn %02x%02x%02x%02x%02x%02x",
++ keyidx, MAC2STR(igtk->pn));
++ wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK", igtk->igtk, len);
++ if (keyidx > 4095) {
++ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
++ "WPA: Invalid IGTK KeyID %d", keyidx);
++ return -1;
++ }
++ if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
++ broadcast_ether_addr,
++ keyidx, 0, igtk->pn, sizeof(igtk->pn),
++ igtk->igtk, len) < 0) {
++ wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
++ "WPA: Failed to configure IGTK to the driver");
++ return -1;
++ }
++
++ sm->igtk.igtk_len = len;
++ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++
++ return 0;
++}
++#endif /* CONFIG_IEEE80211W */
++
++
+ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ struct wpa_eapol_ie_parse *ie)
+ {
+@@ -864,30 +918,14 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ if (ie->igtk) {
+ size_t len;
+ const struct wpa_igtk_kde *igtk;
+- u16 keyidx;
++
+ len = wpa_cipher_key_len(sm->mgmt_group_cipher);
+ if (ie->igtk_len != WPA_IGTK_KDE_PREFIX_LEN + len)
+ return -1;
++
+ igtk = (const struct wpa_igtk_kde *) ie->igtk;
+- keyidx = WPA_GET_LE16(igtk->keyid);
+- wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: IGTK keyid %d "
+- "pn %02x%02x%02x%02x%02x%02x",
+- keyidx, MAC2STR(igtk->pn));
+- wpa_hexdump_key(MSG_DEBUG, "WPA: IGTK",
+- igtk->igtk, len);
+- if (keyidx > 4095) {
+- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
+- "WPA: Invalid IGTK KeyID %d", keyidx);
+- return -1;
+- }
+- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
+- broadcast_ether_addr,
+- keyidx, 0, igtk->pn, sizeof(igtk->pn),
+- igtk->igtk, len) < 0) {
+- wpa_msg(sm->ctx->msg_ctx, MSG_WARNING,
+- "WPA: Failed to configure IGTK to the driver");
++ if (wpa_supplicant_install_igtk(sm, igtk) < 0)
+ return -1;
+- }
+ }
+
+ return 0;
+@@ -2307,7 +2345,7 @@ void wpa_sm_deinit(struct wpa_sm *sm)
+ */
+ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ {
+- int clear_ptk = 1;
++ int clear_keys = 1;
+
+ if (sm == NULL)
+ return;
+@@ -2333,11 +2371,11 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ /* Prepare for the next transition */
+ wpa_ft_prepare_auth_request(sm, NULL);
+
+- clear_ptk = 0;
++ clear_keys = 0;
+ }
+ #endif /* CONFIG_IEEE80211R */
+
+- if (clear_ptk) {
++ if (clear_keys) {
+ /*
+ * IEEE 802.11, 8.4.10: Delete PTK SA on (re)association if
+ * this is not part of a Fast BSS Transition.
+@@ -2347,6 +2385,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ sm->tptk_set = 0;
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
++ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++#ifdef CONFIG_IEEE80211W
++ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++#endif /* CONFIG_IEEE80211W */
+ }
+
+ #ifdef CONFIG_TDLS
+@@ -2877,6 +2919,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
+ os_memset(sm->pmk, 0, sizeof(sm->pmk));
+ os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
++ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++#ifdef CONFIG_IEEE80211W
++ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++#endif /* CONFIG_IEEE80211W */
+ #ifdef CONFIG_IEEE80211R
+ os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
+ os_memset(sm->pmk_r0, 0, sizeof(sm->pmk_r0));
+@@ -2949,29 +2995,11 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+ os_memset(&gd, 0, sizeof(gd));
+ #ifdef CONFIG_IEEE80211W
+ } else if (subelem_id == WNM_SLEEP_SUBELEM_IGTK) {
+- struct wpa_igtk_kde igd;
+- u16 keyidx;
+-
+- os_memset(&igd, 0, sizeof(igd));
+- keylen = wpa_cipher_key_len(sm->mgmt_group_cipher);
+- os_memcpy(igd.keyid, buf + 2, 2);
+- os_memcpy(igd.pn, buf + 4, 6);
+-
+- keyidx = WPA_GET_LE16(igd.keyid);
+- os_memcpy(igd.igtk, buf + 10, keylen);
+-
+- wpa_hexdump_key(MSG_DEBUG, "Install IGTK (WNM SLEEP)",
+- igd.igtk, keylen);
+- if (wpa_sm_set_key(sm, wpa_cipher_to_alg(sm->mgmt_group_cipher),
+- broadcast_ether_addr,
+- keyidx, 0, igd.pn, sizeof(igd.pn),
+- igd.igtk, keylen) < 0) {
+- wpa_printf(MSG_DEBUG, "Failed to install the IGTK in "
+- "WNM mode");
+- os_memset(&igd, 0, sizeof(igd));
++ const struct wpa_igtk_kde *igtk;
++
++ igtk = (const struct wpa_igtk_kde *) (buf + 2);
++ if (wpa_supplicant_install_igtk(sm, igtk) < 0)
+ return -1;
+- }
+- os_memset(&igd, 0, sizeof(igd));
+ #endif /* CONFIG_IEEE80211W */
+ } else {
+ wpa_printf(MSG_DEBUG, "Unknown element id");
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index f653ba6..afc9e37 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -31,6 +31,10 @@ struct wpa_sm {
+ u8 rx_replay_counter[WPA_REPLAY_COUNTER_LEN];
+ int rx_replay_counter_set;
+ u8 request_counter[WPA_REPLAY_COUNTER_LEN];
++ struct wpa_gtk gtk;
++#ifdef CONFIG_IEEE80211W
++ struct wpa_igtk igtk;
++#endif /* CONFIG_IEEE80211W */
+
+ struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
+
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
new file mode 100644
index 00000000..e2937b85
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch
@@ -0,0 +1,184 @@
+From 8280294e74846ea342389a0cd17215050fa5afe8 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sun, 1 Oct 2017 12:12:24 +0300
+Subject: [PATCH 3/8] Extend protection of GTK/IGTK reinstallation of WNM-Sleep
+ Mode cases
+
+This extends the protection to track last configured GTK/IGTK value
+separately from EAPOL-Key frames and WNM-Sleep Mode frames to cover a
+corner case where these two different mechanisms may get used when the
+GTK/IGTK has changed and tracking a single value is not sufficient to
+detect a possible key reconfiguration.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/rsn_supp/wpa.c | 53 +++++++++++++++++++++++++++++++++++++---------------
+ src/rsn_supp/wpa_i.h | 2 ++
+ 2 files changed, 40 insertions(+), 15 deletions(-)
+
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 95bd7be..7a2c68d 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -709,14 +709,17 @@ struct wpa_gtk_data {
+
+ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ const struct wpa_gtk_data *gd,
+- const u8 *key_rsc)
++ const u8 *key_rsc, int wnm_sleep)
+ {
+ const u8 *_gtk = gd->gtk;
+ u8 gtk_buf[32];
+
+ /* Detect possible key reinstallation */
+- if (sm->gtk.gtk_len == (size_t) gd->gtk_len &&
+- os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) {
++ if ((sm->gtk.gtk_len == (size_t) gd->gtk_len &&
++ os_memcmp(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len) == 0) ||
++ (sm->gtk_wnm_sleep.gtk_len == (size_t) gd->gtk_len &&
++ os_memcmp(sm->gtk_wnm_sleep.gtk, gd->gtk,
++ sm->gtk_wnm_sleep.gtk_len) == 0)) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Not reinstalling already in-use GTK to the driver (keyidx=%d tx=%d len=%d)",
+ gd->keyidx, gd->tx, gd->gtk_len);
+@@ -757,8 +760,14 @@ static int wpa_supplicant_install_gtk(struct wpa_sm *sm,
+ }
+ os_memset(gtk_buf, 0, sizeof(gtk_buf));
+
+- sm->gtk.gtk_len = gd->gtk_len;
+- os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++ if (wnm_sleep) {
++ sm->gtk_wnm_sleep.gtk_len = gd->gtk_len;
++ os_memcpy(sm->gtk_wnm_sleep.gtk, gd->gtk,
++ sm->gtk_wnm_sleep.gtk_len);
++ } else {
++ sm->gtk.gtk_len = gd->gtk_len;
++ os_memcpy(sm->gtk.gtk, gd->gtk, sm->gtk.gtk_len);
++ }
+
+ return 0;
+ }
+@@ -852,7 +861,7 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+ (wpa_supplicant_check_group_cipher(sm, sm->group_cipher,
+ gtk_len, gtk_len,
+ &gd.key_rsc_len, &gd.alg) ||
+- wpa_supplicant_install_gtk(sm, &gd, key_rsc))) {
++ wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0))) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "RSN: Failed to install GTK");
+ os_memset(&gd, 0, sizeof(gd));
+@@ -868,14 +877,18 @@ static int wpa_supplicant_pairwise_gtk(struct wpa_sm *sm,
+
+ #ifdef CONFIG_IEEE80211W
+ static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
+- const struct wpa_igtk_kde *igtk)
++ const struct wpa_igtk_kde *igtk,
++ int wnm_sleep)
+ {
+ size_t len = wpa_cipher_key_len(sm->mgmt_group_cipher);
+ u16 keyidx = WPA_GET_LE16(igtk->keyid);
+
+ /* Detect possible key reinstallation */
+- if (sm->igtk.igtk_len == len &&
+- os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) {
++ if ((sm->igtk.igtk_len == len &&
++ os_memcmp(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len) == 0) ||
++ (sm->igtk_wnm_sleep.igtk_len == len &&
++ os_memcmp(sm->igtk_wnm_sleep.igtk, igtk->igtk,
++ sm->igtk_wnm_sleep.igtk_len) == 0)) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Not reinstalling already in-use IGTK to the driver (keyidx=%d)",
+ keyidx);
+@@ -900,8 +913,14 @@ static int wpa_supplicant_install_igtk(struct wpa_sm *sm,
+ return -1;
+ }
+
+- sm->igtk.igtk_len = len;
+- os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++ if (wnm_sleep) {
++ sm->igtk_wnm_sleep.igtk_len = len;
++ os_memcpy(sm->igtk_wnm_sleep.igtk, igtk->igtk,
++ sm->igtk_wnm_sleep.igtk_len);
++ } else {
++ sm->igtk.igtk_len = len;
++ os_memcpy(sm->igtk.igtk, igtk->igtk, sm->igtk.igtk_len);
++ }
+
+ return 0;
+ }
+@@ -924,7 +943,7 @@ static int ieee80211w_set_keys(struct wpa_sm *sm,
+ return -1;
+
+ igtk = (const struct wpa_igtk_kde *) ie->igtk;
+- if (wpa_supplicant_install_igtk(sm, igtk) < 0)
++ if (wpa_supplicant_install_igtk(sm, igtk, 0) < 0)
+ return -1;
+ }
+
+@@ -1574,7 +1593,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm,
+ if (wpa_supplicant_rsc_relaxation(sm, key->key_rsc))
+ key_rsc = null_rsc;
+
+- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc) ||
++ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 0) ||
+ wpa_supplicant_send_2_of_2(sm, key, ver, key_info) < 0)
+ goto failed;
+ os_memset(&gd, 0, sizeof(gd));
+@@ -2386,8 +2405,10 @@ void wpa_sm_notify_assoc(struct wpa_sm *sm, const u8 *bssid)
+ sm->tptk_set = 0;
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
+ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
+ #ifdef CONFIG_IEEE80211W
+ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
+ #endif /* CONFIG_IEEE80211W */
+ }
+
+@@ -2920,8 +2941,10 @@ void wpa_sm_drop_sa(struct wpa_sm *sm)
+ os_memset(&sm->ptk, 0, sizeof(sm->ptk));
+ os_memset(&sm->tptk, 0, sizeof(sm->tptk));
+ os_memset(&sm->gtk, 0, sizeof(sm->gtk));
++ os_memset(&sm->gtk_wnm_sleep, 0, sizeof(sm->gtk_wnm_sleep));
+ #ifdef CONFIG_IEEE80211W
+ os_memset(&sm->igtk, 0, sizeof(sm->igtk));
++ os_memset(&sm->igtk_wnm_sleep, 0, sizeof(sm->igtk_wnm_sleep));
+ #endif /* CONFIG_IEEE80211W */
+ #ifdef CONFIG_IEEE80211R
+ os_memset(sm->xxkey, 0, sizeof(sm->xxkey));
+@@ -2986,7 +3009,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+
+ wpa_hexdump_key(MSG_DEBUG, "Install GTK (WNM SLEEP)",
+ gd.gtk, gd.gtk_len);
+- if (wpa_supplicant_install_gtk(sm, &gd, key_rsc)) {
++ if (wpa_supplicant_install_gtk(sm, &gd, key_rsc, 1)) {
+ os_memset(&gd, 0, sizeof(gd));
+ wpa_printf(MSG_DEBUG, "Failed to install the GTK in "
+ "WNM mode");
+@@ -2998,7 +3021,7 @@ int wpa_wnmsleep_install_key(struct wpa_sm *sm, u8 subelem_id, u8 *buf)
+ const struct wpa_igtk_kde *igtk;
+
+ igtk = (const struct wpa_igtk_kde *) (buf + 2);
+- if (wpa_supplicant_install_igtk(sm, igtk) < 0)
++ if (wpa_supplicant_install_igtk(sm, igtk, 1) < 0)
+ return -1;
+ #endif /* CONFIG_IEEE80211W */
+ } else {
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index afc9e37..9a54631 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -32,8 +32,10 @@ struct wpa_sm {
+ int rx_replay_counter_set;
+ u8 request_counter[WPA_REPLAY_COUNTER_LEN];
+ struct wpa_gtk gtk;
++ struct wpa_gtk gtk_wnm_sleep;
+ #ifdef CONFIG_IEEE80211W
+ struct wpa_igtk igtk;
++ struct wpa_igtk igtk_wnm_sleep;
+ #endif /* CONFIG_IEEE80211W */
+
+ struct eapol_sm *eapol; /* EAPOL state machine from upper level code */
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch
new file mode 100644
index 00000000..22ee2179
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch
@@ -0,0 +1,79 @@
+From 8f82bc94e8697a9d47fa8774dfdaaede1084912c Mon Sep 17 00:00:00 2001
+From: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+Date: Fri, 29 Sep 2017 04:22:51 +0200
+Subject: [PATCH 4/8] Prevent installation of an all-zero TK
+
+Properly track whether a PTK has already been installed to the driver
+and the TK part cleared from memory. This prevents an attacker from
+trying to trick the client into installing an all-zero TK.
+
+This fixes the earlier fix in commit
+ad00d64e7d8827b3cebd665a0ceb08adabf15e1e ('Fix TK configuration to the
+driver in EAPOL-Key 3/4 retry case') which did not take into account
+possibility of an extra message 1/4 showing up between retries of
+message 3/4.
+
+Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
+---
+ src/common/wpa_common.h | 1 +
+ src/rsn_supp/wpa.c | 5 ++---
+ src/rsn_supp/wpa_i.h | 1 -
+ 3 files changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/src/common/wpa_common.h b/src/common/wpa_common.h
+index d200285..1021ccb 100644
+--- a/src/common/wpa_common.h
++++ b/src/common/wpa_common.h
+@@ -215,6 +215,7 @@ struct wpa_ptk {
+ size_t kck_len;
+ size_t kek_len;
+ size_t tk_len;
++ int installed; /* 1 if key has already been installed to driver */
+ };
+
+ struct wpa_gtk {
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 7a2c68d..0550a41 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -510,7 +510,6 @@ static void wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
+ os_memset(buf, 0, sizeof(buf));
+ }
+ sm->tptk_set = 1;
+- sm->tk_to_set = 1;
+
+ kde = sm->assoc_wpa_ie;
+ kde_len = sm->assoc_wpa_ie_len;
+@@ -615,7 +614,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
+ enum wpa_alg alg;
+ const u8 *key_rsc;
+
+- if (!sm->tk_to_set) {
++ if (sm->ptk.installed) {
+ wpa_dbg(sm->ctx->msg_ctx, MSG_DEBUG,
+ "WPA: Do not re-install same PTK to the driver");
+ return 0;
+@@ -659,7 +658,7 @@ static int wpa_supplicant_install_ptk(struct wpa_sm *sm,
+
+ /* TK is not needed anymore in supplicant */
+ os_memset(sm->ptk.tk, 0, WPA_TK_MAX_LEN);
+- sm->tk_to_set = 0;
++ sm->ptk.installed = 1;
+
+ if (sm->wpa_ptk_rekey) {
+ eloop_cancel_timeout(wpa_sm_rekey_ptk, sm, NULL);
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index 9a54631..41f371f 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -24,7 +24,6 @@ struct wpa_sm {
+ struct wpa_ptk ptk, tptk;
+ int ptk_set, tptk_set;
+ unsigned int msg_3_of_4_ok:1;
+- unsigned int tk_to_set:1;
+ u8 snonce[WPA_NONCE_LEN];
+ u8 anonce[WPA_NONCE_LEN]; /* ANonce from the last 1/4 msg */
+ int renew_snonce;
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
new file mode 100644
index 00000000..c19c4c71
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch
@@ -0,0 +1,64 @@
+From 12fac09b437a1dc8a0f253e265934a8aaf4d2f8b Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Sun, 1 Oct 2017 12:32:57 +0300
+Subject: [PATCH 5/8] Fix PTK rekeying to generate a new ANonce
+
+The Authenticator state machine path for PTK rekeying ended up bypassing
+the AUTHENTICATION2 state where a new ANonce is generated when going
+directly to the PTKSTART state since there is no need to try to
+determine the PMK again in such a case. This is far from ideal since the
+new PTK would depend on a new nonce only from the supplicant.
+
+Fix this by generating a new ANonce when moving to the PTKSTART state
+for the purpose of starting new 4-way handshake to rekey PTK.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/ap/wpa_auth.c | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
+index 707971d..bf10cc1 100644
+--- a/src/ap/wpa_auth.c
++++ b/src/ap/wpa_auth.c
+@@ -1901,6 +1901,21 @@ SM_STATE(WPA_PTK, AUTHENTICATION2)
+ }
+
+
++static int wpa_auth_sm_ptk_update(struct wpa_state_machine *sm)
++{
++ if (random_get_bytes(sm->ANonce, WPA_NONCE_LEN)) {
++ wpa_printf(MSG_ERROR,
++ "WPA: Failed to get random data for ANonce");
++ sm->Disconnect = TRUE;
++ return -1;
++ }
++ wpa_hexdump(MSG_DEBUG, "WPA: Assign new ANonce", sm->ANonce,
++ WPA_NONCE_LEN);
++ sm->TimeoutCtr = 0;
++ return 0;
++}
++
++
+ SM_STATE(WPA_PTK, INITPMK)
+ {
+ u8 msk[2 * PMK_LEN];
+@@ -2458,9 +2473,12 @@ SM_STEP(WPA_PTK)
+ SM_ENTER(WPA_PTK, AUTHENTICATION);
+ else if (sm->ReAuthenticationRequest)
+ SM_ENTER(WPA_PTK, AUTHENTICATION2);
+- else if (sm->PTKRequest)
+- SM_ENTER(WPA_PTK, PTKSTART);
+- else switch (sm->wpa_ptk_state) {
++ else if (sm->PTKRequest) {
++ if (wpa_auth_sm_ptk_update(sm) < 0)
++ SM_ENTER(WPA_PTK, DISCONNECTED);
++ else
++ SM_ENTER(WPA_PTK, PTKSTART);
++ } else switch (sm->wpa_ptk_state) {
+ case WPA_PTK_INITIALIZE:
+ break;
+ case WPA_PTK_DISCONNECT:
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch
new file mode 100644
index 00000000..e1bd5a57
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch
@@ -0,0 +1,132 @@
+From 6c4bed4f47d1960ec04981a9d50e5076aea5223d Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 11:03:15 +0300
+Subject: [PATCH 6/8] TDLS: Reject TPK-TK reconfiguration
+
+Do not try to reconfigure the same TPK-TK to the driver after it has
+been successfully configured. This is an explicit check to avoid issues
+related to resetting the TX/RX packet number. There was already a check
+for this for TPK M2 (retries of that message are ignored completely), so
+that behavior does not get modified.
+
+For TPK M3, the TPK-TK could have been reconfigured, but that was
+followed by immediate teardown of the link due to an issue in updating
+the STA entry. Furthermore, for TDLS with any real security (i.e.,
+ignoring open/WEP), the TPK message exchange is protected on the AP path
+and simple replay attacks are not feasible.
+
+As an additional corner case, make sure the local nonce gets updated if
+the peer uses a very unlikely "random nonce" of all zeros.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/rsn_supp/tdls.c | 38 ++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 36 insertions(+), 2 deletions(-)
+
+diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c
+index e424168..9eb9738 100644
+--- a/src/rsn_supp/tdls.c
++++ b/src/rsn_supp/tdls.c
+@@ -112,6 +112,7 @@ struct wpa_tdls_peer {
+ u8 tk[16]; /* TPK-TK; assuming only CCMP will be used */
+ } tpk;
+ int tpk_set;
++ int tk_set; /* TPK-TK configured to the driver */
+ int tpk_success;
+ int tpk_in_progress;
+
+@@ -192,6 +193,20 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ u8 rsc[6];
+ enum wpa_alg alg;
+
++ if (peer->tk_set) {
++ /*
++ * This same TPK-TK has already been configured to the driver
++ * and this new configuration attempt (likely due to an
++ * unexpected retransmitted frame) would result in clearing
++ * the TX/RX sequence number which can break security, so must
++ * not allow that to happen.
++ */
++ wpa_printf(MSG_INFO, "TDLS: TPK-TK for the peer " MACSTR
++ " has already been configured to the driver - do not reconfigure",
++ MAC2STR(peer->addr));
++ return -1;
++ }
++
+ os_memset(rsc, 0, 6);
+
+ switch (peer->cipher) {
+@@ -209,12 +224,15 @@ static int wpa_tdls_set_key(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ return -1;
+ }
+
++ wpa_printf(MSG_DEBUG, "TDLS: Configure pairwise key for peer " MACSTR,
++ MAC2STR(peer->addr));
+ if (wpa_sm_set_key(sm, alg, peer->addr, -1, 1,
+ rsc, sizeof(rsc), peer->tpk.tk, key_len) < 0) {
+ wpa_printf(MSG_WARNING, "TDLS: Failed to set TPK to the "
+ "driver");
+ return -1;
+ }
++ peer->tk_set = 1;
+ return 0;
+ }
+
+@@ -696,7 +714,7 @@ static void wpa_tdls_peer_clear(struct wpa_sm *sm, struct wpa_tdls_peer *peer)
+ peer->cipher = 0;
+ peer->qos_info = 0;
+ peer->wmm_capable = 0;
+- peer->tpk_set = peer->tpk_success = 0;
++ peer->tk_set = peer->tpk_set = peer->tpk_success = 0;
+ peer->chan_switch_enabled = 0;
+ os_memset(&peer->tpk, 0, sizeof(peer->tpk));
+ os_memset(peer->inonce, 0, WPA_NONCE_LEN);
+@@ -1159,6 +1177,7 @@ skip_rsnie:
+ wpa_tdls_peer_free(sm, peer);
+ return -1;
+ }
++ peer->tk_set = 0; /* A new nonce results in a new TK */
+ wpa_hexdump(MSG_DEBUG, "TDLS: Initiator Nonce for TPK handshake",
+ peer->inonce, WPA_NONCE_LEN);
+ os_memcpy(ftie->Snonce, peer->inonce, WPA_NONCE_LEN);
+@@ -1751,6 +1770,19 @@ static int wpa_tdls_addset_peer(struct wpa_sm *sm, struct wpa_tdls_peer *peer,
+ }
+
+
++static int tdls_nonce_set(const u8 *nonce)
++{
++ int i;
++
++ for (i = 0; i < WPA_NONCE_LEN; i++) {
++ if (nonce[i])
++ return 1;
++ }
++
++ return 0;
++}
++
++
+ static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr,
+ const u8 *buf, size_t len)
+ {
+@@ -2004,7 +2036,8 @@ skip_rsn:
+ peer->rsnie_i_len = kde.rsn_ie_len;
+ peer->cipher = cipher;
+
+- if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0) {
++ if (os_memcmp(peer->inonce, ftie->Snonce, WPA_NONCE_LEN) != 0 ||
++ !tdls_nonce_set(peer->inonce)) {
+ /*
+ * There is no point in updating the RNonce for every obtained
+ * TPK M1 frame (e.g., retransmission due to timeout) with the
+@@ -2020,6 +2053,7 @@ skip_rsn:
+ "TDLS: Failed to get random data for responder nonce");
+ goto error;
+ }
++ peer->tk_set = 0; /* A new nonce results in a new TK */
+ }
+
+ #if 0
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
new file mode 100644
index 00000000..85ea1d62
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch
@@ -0,0 +1,43 @@
+From 53c5eb58e95004f86e65ee9fbfccbc291b139057 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 11:25:02 +0300
+Subject: [PATCH 7/8] WNM: Ignore WNM-Sleep Mode Response without pending
+ request
+
+Commit 03ed0a52393710be6bdae657d1b36efa146520e5 ('WNM: Ignore WNM-Sleep
+Mode Response if WNM-Sleep Mode has not been used') started ignoring the
+response when no WNM-Sleep Mode Request had been used during the
+association. This can be made tighter by clearing the used flag when
+successfully processing a response. This adds an additional layer of
+protection against unexpected retransmissions of the response frame.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ wpa_supplicant/wnm_sta.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
+index 1b3409c..67a07ff 100644
+--- a/wpa_supplicant/wnm_sta.c
++++ b/wpa_supplicant/wnm_sta.c
+@@ -260,7 +260,7 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
+
+ if (!wpa_s->wnmsleep_used) {
+ wpa_printf(MSG_DEBUG,
+- "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode has not been used in this association");
++ "WNM: Ignore WNM-Sleep Mode Response frame since WNM-Sleep Mode operation has not been requested");
+ return;
+ }
+
+@@ -299,6 +299,8 @@ static void ieee802_11_rx_wnmsleep_resp(struct wpa_supplicant *wpa_s,
+ return;
+ }
+
++ wpa_s->wnmsleep_used = 0;
++
+ if (wnmsleep_ie->status == WNM_STATUS_SLEEP_ACCEPT ||
+ wnmsleep_ie->status == WNM_STATUS_SLEEP_EXIT_ACCEPT_GTK_UPDATE) {
+ wpa_printf(MSG_DEBUG, "Successfully recv WNM-Sleep Response "
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
new file mode 100644
index 00000000..b9678f68
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch
@@ -0,0 +1,82 @@
+From b372ab0b7daea719749194dc554b26e6367603f2 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen <j@w1.fi>
+Date: Fri, 22 Sep 2017 12:06:37 +0300
+Subject: [PATCH 8/8] FT: Do not allow multiple Reassociation Response frames
+
+The driver is expected to not report a second association event without
+the station having explicitly request a new association. As such, this
+case should not be reachable. However, since reconfiguring the same
+pairwise or group keys to the driver could result in nonce reuse issues,
+be extra careful here and do an additional state check to avoid this
+even if the local driver ends up somehow accepting an unexpected
+Reassociation Response frame.
+
+Signed-off-by: Jouni Malinen <j@w1.fi>
+---
+ src/rsn_supp/wpa.c | 3 +++
+ src/rsn_supp/wpa_ft.c | 8 ++++++++
+ src/rsn_supp/wpa_i.h | 1 +
+ 3 files changed, 12 insertions(+)
+
+diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
+index 0550a41..2a53c6f 100644
+--- a/src/rsn_supp/wpa.c
++++ b/src/rsn_supp/wpa.c
+@@ -2440,6 +2440,9 @@ void wpa_sm_notify_disassoc(struct wpa_sm *sm)
+ #ifdef CONFIG_TDLS
+ wpa_tdls_disassoc(sm);
+ #endif /* CONFIG_TDLS */
++#ifdef CONFIG_IEEE80211R
++ sm->ft_reassoc_completed = 0;
++#endif /* CONFIG_IEEE80211R */
+
+ /* Keys are not needed in the WPA state machine anymore */
+ wpa_sm_drop_sa(sm);
+diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c
+index 205793e..d45bb45 100644
+--- a/src/rsn_supp/wpa_ft.c
++++ b/src/rsn_supp/wpa_ft.c
+@@ -153,6 +153,7 @@ static u8 * wpa_ft_gen_req_ies(struct wpa_sm *sm, size_t *len,
+ u16 capab;
+
+ sm->ft_completed = 0;
++ sm->ft_reassoc_completed = 0;
+
+ buf_len = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
+ 2 + sm->r0kh_id_len + ric_ies_len + 100;
+@@ -681,6 +682,11 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
+ return -1;
+ }
+
++ if (sm->ft_reassoc_completed) {
++ wpa_printf(MSG_DEBUG, "FT: Reassociation has already been completed for this FT protocol instance - ignore unexpected retransmission");
++ return 0;
++ }
++
+ if (wpa_ft_parse_ies(ies, ies_len, &parse) < 0) {
+ wpa_printf(MSG_DEBUG, "FT: Failed to parse IEs");
+ return -1;
+@@ -781,6 +787,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies,
+ return -1;
+ }
+
++ sm->ft_reassoc_completed = 1;
++
+ if (wpa_ft_process_gtk_subelem(sm, parse.gtk, parse.gtk_len) < 0)
+ return -1;
+
+diff --git a/src/rsn_supp/wpa_i.h b/src/rsn_supp/wpa_i.h
+index 41f371f..56f88dc 100644
+--- a/src/rsn_supp/wpa_i.h
++++ b/src/rsn_supp/wpa_i.h
+@@ -128,6 +128,7 @@ struct wpa_sm {
+ size_t r0kh_id_len;
+ u8 r1kh_id[FT_R1KH_ID_LEN];
+ int ft_completed;
++ int ft_reassoc_completed;
+ int over_the_ds_in_progress;
+ u8 target_ap[ETH_ALEN]; /* over-the-DS target AP */
+ int set_ptk_after_assoc;
+--
+2.7.4
+
diff --git a/patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt b/patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt
new file mode 100644
index 00000000..5ccb5098
--- /dev/null
+++ b/patches/source/wpa_supplicant/2017-1/wpa-packet-number-reuse-with-replayed-messages.txt
@@ -0,0 +1,226 @@
+WPA packet number reuse with replayed messages and key reinstallation
+
+Published: October 16, 2017
+Identifiers:
+- CERT case ID: VU#228519
+- CVE-2017-13077
+- CVE-2017-13078
+- CVE-2017-13079
+- CVE-2017-13080
+- CVE-2017-13081
+- CVE-2017-13082
+- CVE-2017-13084 (not applicable)
+- CVE-2017-13086
+- CVE-2017-13087
+- CVE-2017-13088
+Latest version available from: https://w1.fi/security/2017-1/
+
+
+Vulnerability
+
+A vulnerability was found in how a number of implementations can be
+triggered to reconfigure WPA/WPA2/RSN keys (TK, GTK, or IGTK) by
+replaying a specific frame that is used to manage the keys. Such
+reinstallation of the encryption key can result in two different types
+of vulnerabilities: disabling replay protection and significantly
+reducing the security of encryption to the point of allowing frames to
+be decrypted or some parts of the keys to be determined by an attacker
+depending on which cipher is used.
+
+This document focuses on the cases that apply to systems using hostapd
+(AP) or wpa_supplicant (station), but it should be noted that the
+generic vulnerability itself is applicable to other implementations and
+may have different impact in other cases.
+
+This vulnerability can in theory apply to any case where a TK (the
+pairwise/unicast encryption key used with TKIP, CCMP, GCMP), a GTK
+(group/multicast encryption key), or an IGTK (group management frame
+integrity protection key) is configured by the Authentication/Supplicant
+component to the WLAN driver/firmware taking care of the TX/RX path and
+encryption/decryption of frames.
+
+If the same key is configured multiple times, it is likely that the
+transmit and receive packet numbers (PN, IPN, RSC/TSC, etc.) are cleared
+to a smaller value (zero in case of pairwise keys, zero or at least a
+smaller value than the last used value in case of group keys). When this
+happens with the same key, this breaks replay protection on RX side and
+can result in reuse of packet numbers on TX side. The former may allow
+replaying of previously delivered packets (without the attacker being
+able to decrypt them or modify their contents) while the latter may
+result in more severe issues on the TX side due to resulting CCM nonce
+replay and related issues with GCMP and TKIP. The TX side issue may make
+it significantly easier for the attacker to decrypt frames and determine
+some parts of the keys (e.g., a Michael MIC key in case of TKIP).
+
+Impact on AP/hostapd
+
+On the AP side, this generic issue has been determined to be applicable
+in the case where hostapd is used to operate an RSN/WPA2 network with FT
+(Fast BSS Transition from IEEE 802.11r) enabled. Replaying of the
+Reassociation Request frame can be used to get the AP reinstalling the
+TK which results in the AP accepting previously delivered unicast frames
+from the station and the AP reusing previously used packet numbers
+(local TX packet number gets reset to zero). This latter issue on the TX
+side can result in CCM nonce reuse which invalidates CCMP security
+properties. In case of TKIP this can result in the attacker being able
+to determine part of the TK more easily and with GCMP, result in similar
+issues.
+
+It should be noted that the AP side issue with FT would be close to
+applying to FILS authentication (from IEEE 802.11ai) in hostapd with
+replaying of (Re)Association Request frames. However, due to a different
+handling of the repeated association processing with FILS, this would
+actually result in the station getting immediately disconnected which
+prevents this attack in practice. In addition, the FILS implementation
+in the current hostapd version is still experimental and documented as
+being discouraged in production use cases.
+
+Another area of potentially reduced security was identified when looking
+into these issues. When AP/Authenticator implementation in hostapd is
+requested to rekey the PTK without performing EAP reauthentication
+(either through local periodic rekeying or due to a request from an
+association station), the ANonce value does not get updated. This
+results in the new 4-way handshake depending on the station/supplicant
+side generating a new, unique (for the current PMK/PSK) SNonce for the
+PTK derivation to result in a new key. While a properly working
+supplicant would do so, if there is a supplicant implementation that
+does not, this combination could result in deriving the same PTK
+again. When the TK from that PTK gets configured in the driver, this
+would result in reinstalling the same key and the same issues as
+described above for the FT protocol case.
+
+Impact on station/wpa_supplicant
+
+On the station side, this generic issue has been determined to be
+applicable in the cases where wpa_supplicant processes a group key (GTK
+or IGTK) update from the AP. An attacker that is able to limit access
+to frame delivery may be able to extract two update messages and deliver
+those to the station with significant time delay between them. When
+wpa_supplicant processes the second message, it may end up reinstalling
+the same key to the driver and when doing this, clear the RX packet
+number to an old value. This would allow the attacker to replay all
+group-addressed frames that the AP sent between the time the key update
+message was originally sent and the time when the attacker forwarded the
+second frame to the station. The attacker would not be able to decrypt
+or modify the frames based on this vulnerability, though. There is an
+exception to this with older wpa_supplicant versions as noted below in
+version specific notes.
+
+For the current wpa_supplicant version (v2.6), there is also an
+additional EAPOL-Key replay sequence where an additional forged
+EAPOL-Key message can be used to bypass the existing protection for the
+pairwise key reconfiguration in a manner that ends up configuring a
+known TK that an attacker could use to decrypt any frame sent by the
+station and to inject arbitrary unicast frames. Similar issues are
+reachable in older versions as noted below.
+
+PeerKey / TDLS PeerKey
+
+As far as the related CVE-2017-13084 (reinstallation of the STK key in
+the PeerKey handshake) is concerned, it should be noted that PeerKey
+implementation in wpa_supplicant is not fully functional and the actual
+installation of the key into the driver does not work. As such, this
+item is not applicable in practice. Furthermore, the PeerKey handshake
+for IEEE 802.11e DLS is obsolete and not known to have been deployed.
+
+As far as the TDLS PeerKey handshake is concerned (CVE-2017-13086),
+wpa_supplicant implementation is already rejecting TPK M2 retries, so
+the reconfiguration issue cannot apply for it. For TPK M3, there is a
+theoretical impact. However, if that frame is replayed, the current
+wpa_supplicant implementation ends up tearing down the TDLS link
+immediately and as such, there is no real window for performing the
+attack. Furthermore, TPK M3 goes through the AP path and if RSN is used
+there, that frame has replay protection, so the attacker could not
+perform the attack. If the AP path were to use WEP, the frame could be
+replayed, though. That said, if WEP is used on the AP path, it would be
+fair to assume that there is no security in the network, so a new attack
+vector would be of small additional value.
+
+With older wpa_supplicant versions, it may be possible for an attacker
+to cause TPK M2 to be retransmitted with delay that would be able to
+trigger reinstallation of TK on the peer receiving TPK M2
+(CVE-2017-13086). This may open a short window for the attack with v2.3,
+v2.4, and v2.5; and a longer window with older versions.
+
+Vulnerable versions/configurations
+
+For the AP/Authenticator TK (unicast) reinstallation in FT protocol
+(CVE-2017-13082):
+
+hostapd v0.7.2 and newer with FT enabled (i.e., practically all versions
+that include full FT implementation). FT needs to be enabled in the
+runtime configuration to make this applicable.
+
+For the AP/Authenticator missing ANonce during PTK rekeying:
+
+All hostapd versions.
+
+For the station/Supplicant side GTK/IGTK reinstallation and TK
+configuration:
+
+All wpa_supplicant versions. The impact on older versions can be more
+severe due to earlier changes in this area: v2.3 and older can also
+reinstall the pairwise key and as such have similar impact as the AP FT
+case (CVE-2017-13077); v2.4 and v2.5 end up configuring an all-zero TK
+which breaks the normal data path, but could allow an attacker to
+decrypt all following frames from the station and to inject arbitrary
+frames to the station. In addition, a different message sequence
+involving 4-way handshake can result in configuration of an all-zero TK
+in v2.6 and the current snapshot of the development repository as of the
+publication of this advisory.
+
+
+Acknowledgments
+
+Thanks to Mathy Vanhoef of the imec-DistriNet research group of KU
+Leuven for discovering and reporting this issue. Thanks to John A. Van
+Boxtel for finding additional issues related to this topic.
+
+
+Possible mitigation steps
+
+- For AP/hostapd and FT replay issue (CVE-2017-13082), it is possible to
+ prevent the issue temporarily by disabling FT in runtime
+ configuration, if needed before being able to update the
+ implementations.
+
+- Merge the following commits to hostapd/wpa_supplicant and rebuild them:
+
+ hostapd and replayed FT reassociation request frame (CVE-2017-13082):
+ hostapd: Avoid key reinstallation in FT handshake
+
+ hostapd PTK rekeying and ANonce update:
+ Fix PTK rekeying to generate a new ANonce
+
+ wpa_supplicant and GTK/IGTK rekeying (CVE-2017-13078, CVE-2017-13079,
+ CVE-2017-13080, CVE-2017-13081, CVE-2017-13087, CVE-2017-13088):
+ Prevent reinstallation of an already in-use group key
+ Extend protection of GTK/IGTK reinstallation of WNM-Sleep Mode cases
+
+ wpa_supplicant (v2.6 or newer snapshot) and known TK issue:
+ Prevent installation of an all-zero TK
+
+ Additional protection steps for wpa_supplicant:
+ TDLS: Reject TPK-TK reconfiguration
+ WNM: Ignore WNM-Sleep Mode Response without pending request
+ FT: Do not allow multiple Reassociation Response frames
+
+ These patches are available from https://w1.fi/security/2017-1/
+ (both against the snapshot of hostap.git master branch and rebased on
+ top of the v2.6 release)
+
+ For the TDLS TPK M2 retransmission issue (CVE-2017-13086) with older
+ wpa_supplicant versions, consider updating to the latest version or
+ merge in a commit that is present in v2.6:
+ https://w1.fi/cgit/hostap/commit/?id=dabdef9e048b17b22b1c025ad592922eab30dda8
+ ('TDLS: Ignore incoming TDLS Setup Response retries')
+
+- Update to hostapd/wpa_supplicant v2.7 or newer, once available
+ * it should be noted that there are number of additional changes in
+ the related areas of the implementation to provide extra layer of
+ protection for potential unknown issues; these changes are not
+ included in this advisory as they have not been identified to be
+ critical for preventing any of the identified security
+ vulnerabilities; however, users of hostapd/wpa_supplicant are
+ encouraged to consider merging such changes even if not fully
+ moving to v2.7
diff --git a/patches/source/wpa_supplicant/README.slackware b/patches/source/wpa_supplicant/README.slackware
new file mode 100644
index 00000000..7ab40a28
--- /dev/null
+++ b/patches/source/wpa_supplicant/README.slackware
@@ -0,0 +1,55 @@
+=================================================
+How do I get my card to use WPA-PSK in Slackware?
+=================================================
+
+First off: wpa_supplicant REQUIRES the AP to broadcast the SSID. When the AP
+hides its SSID, all you will get out of wpa_supplicant is the message:
+"No suitable AP found"
+
+Also, read the MADwifi FAQ (http://madwifi.sourceforge.net/dokuwiki/doku.php)
+since it contains a wealth of information.
+
+This being said, you'll have to do the following (as root):
+Edit the file named /etc/wpa_supplicant.conf and add these lines:
+
+network={
+ scan_ssid=0
+ proto=WPA
+ key_mgmt=WPA-PSK
+ pairwise=CCMP TKIP
+ group=CCMP TKIP WEP104 WEP40
+}
+
+Then execute:
+
+/usr/sbin/wpa_passphrase YOURSSID passphrase
+
+with the SSID of your AP and the passphrase you've entered in its WPA-PSK configuration. You'll receive an output, which looks like this:
+
+network={
+ ssid="YOURSSID"
+ #psk="passphrase"
+
+psk=66a4bfb03de5656cf26cfa03a116097546046f4aea11ee044b841171207d8308
+}
+
+Copy the three lines within the network-tag into your own entry in wpa_supplicant.conf and change the permissions after you've finished editing:
+
+chmod 640 /etc/wpa_supplicant.conf
+
+To get your network device up and running, execute:
+
+### /usr/sbin/wpa_supplicant -Bw -c/etc/wpa_supplicant.conf -iath0 -Dmadwifi ###
+### you don't have to run the above command by hand, because it will ###
+### be executed by the rc.inet1 command that you run: ###
+
+/etc/rc.d/rc.inet1 ath0_start
+
+In case you want to see the wpa_supplicant in action, start it on the command line before enabling the wireless device, by running:
+/usr/sbin/wpa_supplicant -dw -c/etc/wpa_supplicant.conf -iath0 -Dmadwifi
+The terminal where you've started the wpa_supplicant should now show the communication between your wlan card and the AP. If you got everything up and running you can let Slackware's init script take over by killing wpa_supplicant and running:
+
+/etc/rc.d/rc.inet1 ath0_restart
+
+Studying the wpa_supplicant README is also highly recommended for further insight!
+
diff --git a/patches/source/wpa_supplicant/config/dot.config b/patches/source/wpa_supplicant/config/dot.config
new file mode 100644
index 00000000..45593ac6
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/dot.config
@@ -0,0 +1,37 @@
+CONFIG_AP=y
+CONFIG_BACKEND=file
+CONFIG_BGSCAN_SIMPLE=y
+CONFIG_CTRL_IFACE=y
+CONFIG_CTRL_IFACE_DBUS=y
+CONFIG_CTRL_IFACE_DBUS_INTRO=y
+CONFIG_CTRL_IFACE_DBUS_NEW=y
+CONFIG_DEBUG_FILE=y
+CONFIG_DRIVER_NL80211=y
+CONFIG_DRIVER_WEXT=y
+CONFIG_DRIVER_WIRED=y
+CONFIG_EAP_AKA=y
+CONFIG_EAP_FAST=y
+CONFIG_EAP_GPSK=y
+CONFIG_EAP_GPSK_SHA256=y
+CONFIG_EAP_GTC=y
+CONFIG_EAP_IKEV2=y
+CONFIG_EAP_LEAP=y
+CONFIG_EAP_MD5=y
+CONFIG_EAP_MSCHAPV2=y
+CONFIG_EAP_OTP=y
+CONFIG_EAP_PAX=y
+CONFIG_EAP_PEAP=y
+CONFIG_EAP_SAKE=y
+CONFIG_EAP_TLS=y
+CONFIG_EAP_TNC=y
+CONFIG_EAP_TTLS=y
+CONFIG_IBSS_RSN=y
+CONFIG_IEEE8021X_EAPOL=y
+CONFIG_LIBNL32=y
+CONFIG_P2P=y
+CONFIG_PEERKEY=y
+CONFIG_PKCS12=y
+CONFIG_READLINE=y
+CONFIG_SMARTCARD=y
+CONFIG_WPS=y
+
diff --git a/patches/source/wpa_supplicant/config/wpa_gui.desktop b/patches/source/wpa_supplicant/config/wpa_gui.desktop
new file mode 100644
index 00000000..31b8b6b0
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_gui.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=wpa_gui
+Comment[en]=Wpa_supplicant management
+Exec=kdesu wpa_gui
+Icon=wpa_gui
+Type=Application
+Categories=Qt;Network;
diff --git a/patches/source/wpa_supplicant/config/wpa_gui.png b/patches/source/wpa_supplicant/config/wpa_gui.png
new file mode 100644
index 00000000..a72f3569
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_gui.png
Binary files differ
diff --git a/patches/source/wpa_supplicant/config/wpa_supplicant.conf b/patches/source/wpa_supplicant/config/wpa_supplicant.conf
new file mode 100644
index 00000000..4dbbf96a
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_supplicant.conf
@@ -0,0 +1,2 @@
+ctrl_interface=/var/run/wpa_supplicant
+ctrl_interface_group=root
diff --git a/patches/source/wpa_supplicant/config/wpa_supplicant.logrotate b/patches/source/wpa_supplicant/config/wpa_supplicant.logrotate
new file mode 100644
index 00000000..bd7ef91c
--- /dev/null
+++ b/patches/source/wpa_supplicant/config/wpa_supplicant.logrotate
@@ -0,0 +1,6 @@
+/var/log/wpa_supplicant.log {
+ missingok
+ notifempty
+ size 30k
+ create 0600 root root
+}
diff --git a/patches/source/wpa_supplicant/doinst.sh b/patches/source/wpa_supplicant/doinst.sh
new file mode 100644
index 00000000..6052fca4
--- /dev/null
+++ b/patches/source/wpa_supplicant/doinst.sh
@@ -0,0 +1,15 @@
+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/wpa_supplicant.conf.new
+config etc/logrotate.d/wpa_supplicant.new
diff --git a/patches/source/wpa_supplicant/patches/assoc-timeout.diff b/patches/source/wpa_supplicant/patches/assoc-timeout.diff
new file mode 100644
index 00000000..8be4d2cd
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/assoc-timeout.diff
@@ -0,0 +1,16 @@
+diff -Nur wpa_supplicant-2.0.orig/wpa_supplicant/wpa_supplicant.c wpa_supplicant-2.0/wpa_supplicant/wpa_supplicant.c
+--- wpa_supplicant-2.0.orig/wpa_supplicant/wpa_supplicant.c 2013-01-12 09:42:53.000000000 -0600
++++ wpa_supplicant-2.0/wpa_supplicant/wpa_supplicant.c 2013-05-11 14:09:34.586718122 -0500
+@@ -1666,10 +1666,10 @@
+
+ if (assoc_failed) {
+ /* give IBSS a bit more time */
+- timeout = ssid->mode == WPAS_MODE_IBSS ? 10 : 5;
++ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10;
+ } else if (wpa_s->conf->ap_scan == 1) {
+ /* give IBSS a bit more time */
+- timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 10;
++ timeout = ssid->mode == WPAS_MODE_IBSS ? 20 : 20;
+ }
+ wpa_supplicant_req_auth_timeout(wpa_s, timeout, 0);
+ }
diff --git a/patches/source/wpa_supplicant/patches/dbus-service-file-args.diff b/patches/source/wpa_supplicant/patches/dbus-service-file-args.diff
new file mode 100644
index 00000000..7e2449f2
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/dbus-service-file-args.diff
@@ -0,0 +1,20 @@
+diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in
+--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-04-16 15:15:40.000000000 -0500
++++ wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.epitest.hostap.WPASupplicant.service.in 2012-05-06 01:07:44.523999837 -0500
+@@ -1,5 +1,5 @@
+ [D-BUS Service]
+ Name=fi.epitest.hostap.WPASupplicant
+-Exec=@BINDIR@/wpa_supplicant -u
++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
+ User=root
+ SystemdService=wpa_supplicant.service
+diff -Nur wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in
+--- wpa_supplicant-1.0-rc3.orig/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-04-16 15:15:40.000000000 -0500
++++ wpa_supplicant-1.0-rc3/wpa_supplicant/dbus/fi.w1.wpa_supplicant1.service.in 2012-05-06 01:06:59.528589953 -0500
+@@ -1,5 +1,5 @@
+ [D-BUS Service]
+ Name=fi.w1.wpa_supplicant1
+-Exec=@BINDIR@/wpa_supplicant -u
++Exec=@BINDIR@/wpa_supplicant -B -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
+ User=root
+ SystemdService=wpa_supplicant.service
diff --git a/patches/source/wpa_supplicant/patches/flush-debug-output.diff b/patches/source/wpa_supplicant/patches/flush-debug-output.diff
new file mode 100644
index 00000000..7d6af7b3
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/flush-debug-output.diff
@@ -0,0 +1,50 @@
+diff -Nur wpa_supplicant-2.0.orig/src/utils/wpa_debug.c wpa_supplicant-2.0/src/utils/wpa_debug.c
+--- wpa_supplicant-2.0.orig/src/utils/wpa_debug.c 2013-01-12 09:42:53.000000000 -0600
++++ wpa_supplicant-2.0/src/utils/wpa_debug.c 2013-05-11 14:10:37.886101742 -0500
+@@ -75,6 +75,7 @@
+ if (out_file) {
+ fprintf(out_file, "%ld.%06u: ", (long) tv.sec,
+ (unsigned int) tv.usec);
++ fflush(out_file);
+ } else
+ #endif /* CONFIG_DEBUG_FILE */
+ printf("%ld.%06u: ", (long) tv.sec, (unsigned int) tv.usec);
+@@ -221,6 +222,7 @@
+ if (out_file) {
+ vfprintf(out_file, fmt, ap);
+ fprintf(out_file, "\n");
++ fflush(out_file);
+ } else {
+ #endif /* CONFIG_DEBUG_FILE */
+ vprintf(fmt, ap);
+@@ -357,6 +359,7 @@
+ fprintf(out_file, " [REMOVED]");
+ }
+ fprintf(out_file, "\n");
++ fflush(out_file);
+ } else {
+ #endif /* CONFIG_DEBUG_FILE */
+ printf("%s - hexdump(len=%lu):", title, (unsigned long) len);
+@@ -425,12 +428,14 @@
+ fprintf(out_file,
+ "%s - hexdump_ascii(len=%lu): [REMOVED]\n",
+ title, (unsigned long) len);
++ fflush(out_file);
+ return;
+ }
+ if (buf == NULL) {
+ fprintf(out_file,
+ "%s - hexdump_ascii(len=%lu): [NULL]\n",
+ title, (unsigned long) len);
++ fflush(out_file);
+ return;
+ }
+ fprintf(out_file, "%s - hexdump_ascii(len=%lu):\n",
+@@ -455,6 +460,7 @@
+ pos += llen;
+ len -= llen;
+ }
++ fflush(out_file);
+ } else {
+ #endif /* CONFIG_DEBUG_FILE */
+ if (!show) {
diff --git a/patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff b/patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff
new file mode 100644
index 00000000..7f85e810
--- /dev/null
+++ b/patches/source/wpa_supplicant/patches/quiet-scan-results-message.diff
@@ -0,0 +1,16 @@
+--- ./wpa_supplicant/events.c.orig 2017-01-05 11:29:16.968898845 -0600
++++ ./wpa_supplicant/events.c 2017-01-05 11:31:13.515907254 -0600
+@@ -1555,11 +1555,11 @@
+ if (wpa_s->last_scan_req == MANUAL_SCAN_REQ &&
+ wpa_s->manual_scan_use_id && wpa_s->own_scan_running &&
+ own_request && !(data && data->scan_info.external_scan)) {
+- wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS "id=%u",
++ wpa_msg_ctrl(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS "id=%u",
+ wpa_s->manual_scan_id);
+ wpa_s->manual_scan_use_id = 0;
+ } else {
+- wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_SCAN_RESULTS);
++ wpa_msg_ctrl(wpa_s, MSG_DEBUG, WPA_EVENT_SCAN_RESULTS);
+ }
+ wpas_notify_scan_results(wpa_s);
+
diff --git a/patches/source/wpa_supplicant/slack-desc b/patches/source/wpa_supplicant/slack-desc
new file mode 100644
index 00000000..4313b378
--- /dev/null
+++ b/patches/source/wpa_supplicant/slack-desc
@@ -0,0 +1,18 @@
+# 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------------------------------------------------------|
+wpa_supplicant: wpa_supplicant (WPA/WPA2/IEEE 802.1X Supplicant)
+wpa_supplicant:
+wpa_supplicant: wpa_supplicant is a WPA Supplicant for Linux with support for WPA and
+wpa_supplicant: WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA
+wpa_supplicant: component that is used in the client stations. It implements key
+wpa_supplicant: negotiation with a WPA Authenticator and it controls the roaming and
+wpa_supplicant: IEEE 802.11 authentication/association of the wlan driver.
+wpa_supplicant:
+wpa_supplicant: More info: http://hostap.epitest.fi/wpa_supplicant/
+wpa_supplicant:
+wpa_supplicant:
diff --git a/patches/source/wpa_supplicant/wpa_supplicant.SlackBuild b/patches/source/wpa_supplicant/wpa_supplicant.SlackBuild
new file mode 100755
index 00000000..d00d7eae
--- /dev/null
+++ b/patches/source/wpa_supplicant/wpa_supplicant.SlackBuild
@@ -0,0 +1,181 @@
+#!/bin/sh
+
+# Copyright 2004-2008 Eric Hameleers, Eindhoven, NL
+# Copyright 2008-2015 Patrick J. Volkerding, Sebeka, MN, USA
+# 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.
+# -----------------------------------------------------------------------------
+
+PKGNAM=wpa_supplicant
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+SRCVERSION=$(printf $VERSION | tr _ -)
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv4 -mtune=xscale"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "armel" ]; then
+ SLKCFLAGS="-O2 -march=armv4t"
+ LIBDIRSUFFIX=""
+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}-${SRCVERSION}
+tar xvf $CWD/${PKGNAM}-${SRCVERSION}.tar.?z* || exit 1
+cd ${PKGNAM}-${SRCVERSION}
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+
+zcat $CWD/2017-1/rebased-v2.6-0001-hostapd-Avoid-key-reinstallation-in-FT-handshake.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0002-Prevent-reinstallation-of-an-already-in-use-group-ke.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0003-Extend-protection-of-GTK-IGTK-reinstallation-of-WNM-.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0004-Prevent-installation-of-an-all-zero-TK.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0005-Fix-PTK-rekeying-to-generate-a-new-ANonce.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0006-TDLS-Reject-TPK-TK-reconfiguration.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0007-WNM-Ignore-WNM-Sleep-Mode-Response-without-pending-r.patch.gz | patch -p1 || exit 1
+zcat $CWD/2017-1/rebased-v2.6-0008-FT-Do-not-allow-multiple-Reassociation-Response-fram.patch.gz | patch -p1 || exit 1
+
+# Fixup various paths in the dbus service file
+cat $CWD/patches/dbus-service-file-args.diff | patch -p1 --verbose || exit 1
+
+# Eliminate some logspam
+cat $CWD/patches/quiet-scan-results-message.diff | patch -p1 --verbose || exit 1
+
+# Apply a couple of other patches from Fedora
+cat $CWD/patches/assoc-timeout.diff | patch -p1 --verbose || exit 1
+cat $CWD/patches/flush-debug-output.diff | patch -p1 --verbose || exit 1
+
+cd wpa_supplicant
+
+# Create the configuration file for building wpa_supplicant:
+cat $CWD/config/dot.config > .config
+
+# Build the usual binaries
+CFLAGS="$SLKCFLAGS" \
+make $NUMJOBS \
+ BINDIR=/usr/sbin \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} || exit 1
+
+# Build the Qt4 GUI client
+CFLAGS="$SLKCFLAGS" \
+make $NUMJOBS \
+ wpa_gui-qt4 \
+ BINDIR=/usr/sbin \
+ LIBDIR=/usr/lib${LIBDIRSUFFIX} || exit 1
+
+# Make sure man pages are built
+make -C doc/docbook man
+
+# This goes into the doc directory later on:
+mv wpa_supplicant.conf wpa_supplicant.conf.sample
+
+# Install binaries:
+mkdir -p $PKG/usr/sbin $PKG/usr/bin
+cp wpa_supplicant wpa_passphrase wpa_cli $PKG/usr/sbin/
+cp wpa_gui-qt4/wpa_gui $PKG/usr/bin/
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Install dbus configuration file:
+mkdir -p $PKG/etc/dbus-1/system.d/
+cp dbus/dbus-wpa_supplicant.conf \
+ $PKG/etc/dbus-1/system.d/dbus-wpa_supplicant.conf
+
+mkdir -p $PKG/usr/share/dbus-1/system-services
+install -m644 dbus/*.service $PKG/usr/share/dbus-1/system-services/
+
+# Install a .desktop file and icon for wpa_gui:
+# (converted from the wpa_gui.svg in the source)
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+cat $CWD/config/wpa_gui.desktop > $PKG/usr/share/applications/wpa_gui.desktop
+cat $CWD/config/wpa_gui.png > $PKG/usr/share/pixmaps/wpa_gui.png
+
+# Install a logrotate config
+mkdir -p $PKG/etc/logrotate.d
+cat $CWD/config/wpa_supplicant.logrotate > $PKG/etc/logrotate.d/wpa_supplicant.new
+
+# Install man pages:
+for m in 5 8; do
+ mkdir -p $PKG/usr/man/man${m}
+ cp doc/docbook/*.${m} $PKG/usr/man/man${m}/
+done
+find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+
+# Install a default configuration file (only readable by root):
+mkdir -p $PKG/etc
+cat $CWD/config/wpa_supplicant.conf > $PKG/etc/wpa_supplicant.conf.new
+chmod 600 $PKG/etc/wpa_supplicant.conf.new
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ ChangeLog ../COPYING README README-{P2P,WPS} examples *.txt *.sample $CWD/README.slackware \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION/*
+chmod -R a-w $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/xfce4-weather-plugin/slack-desc b/patches/source/xfce4-weather-plugin/slack-desc
new file mode 100644
index 00000000..7d9b0675
--- /dev/null
+++ b/patches/source/xfce4-weather-plugin/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------------------------------------------------------|
+xfce4-weather-plugin: xfce4-weather-plugin (weather plugin for the Xfce panel)
+xfce4-weather-plugin:
+xfce4-weather-plugin: The weather plugin displays current weather conditions and forecasts.
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
+xfce4-weather-plugin:
diff --git a/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild
new file mode 100755
index 00000000..4a38b44e
--- /dev/null
+++ b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.SlackBuild
@@ -0,0 +1,107 @@
+#!/bin/sh
+
+# Slackware build script for xfce4-weather-plugin
+
+# Copyright 2006-2012 Robby Workman, Northport, Alabama, 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=xfce4-weather-plugin
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+GEONAMES_USERNAME="slackware" \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc/xfce \
+ --enable-shared=yes \
+ --enable-static=no \
+ --enable-debug=no \
+ --build=$ARCH-slackware-linux || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+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/xfce4-weather-plugin/xfce4-weather-plugin.url b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.url
new file mode 100644
index 00000000..9ee0ef01
--- /dev/null
+++ b/patches/source/xfce4-weather-plugin/xfce4-weather-plugin.url
@@ -0,0 +1 @@
+http://archive.xfce.org/src/panel-plugins/xfce4-weather-plugin/
diff --git a/patches/source/xorg-server/arch.use.flags b/patches/source/xorg-server/arch.use.flags
new file mode 100644
index 00000000..f28a6cca
--- /dev/null
+++ b/patches/source/xorg-server/arch.use.flags
@@ -0,0 +1,7 @@
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+fi
diff --git a/patches/source/xorg-server/build/xorg-server b/patches/source/xorg-server/build/xorg-server
new file mode 100644
index 00000000..36bf3dc0
--- /dev/null
+++ b/patches/source/xorg-server/build/xorg-server
@@ -0,0 +1 @@
+5_slack14.2
diff --git a/patches/source/xorg-server/configure/xorg-server b/patches/source/xorg-server/configure/xorg-server
new file mode 100644
index 00000000..755b565d
--- /dev/null
+++ b/patches/source/xorg-server/configure/xorg-server
@@ -0,0 +1,53 @@
+# Servers to build:
+BUILD_SERVERS="--enable-xorg \
+ --enable-dmx \
+ --enable-xvfb \
+ --enable-xnest \
+ --enable-glamor \
+ --enable-kdrive \
+ --enable-xephyr \
+ --enable-xfbdev \
+ --enable-config-udev \
+ --enable-kdrive-evdev \
+ --enable-kdrive-kbd \
+ --enable-kdrive-mouse \
+ --disable-config-hal \
+ --disable-systemd-logind"
+
+#MESA_VERSION=${MESA_VERSION:-7.5} # unused in 1.7+
+
+# Default font paths to be used by the X server
+DEF_FONTPATH="/usr/share/fonts/local,/usr/share/fonts/TTF,/usr/share/fonts/OTF,/usr/share/fonts/Type1,/usr/share/fonts/misc,/usr/share/fonts/CID,/usr/share/fonts/75dpi/:unscaled,/usr/share/fonts/100dpi/:unscaled,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/cyrillic"
+
+# Reconf (don't remove this plz):
+autoreconf -vif
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --disable-static \
+ --with-pic \
+ --enable-suid-wrapper \
+ --with-int10=x86emu \
+ --with-default-font-path="${DEF_FONTPATH}" \
+ --with-module-dir=/usr/lib${LIBDIRSUFFIX}/xorg/modules \
+ --with-os-name="Slackware 14.2" \
+ --with-os-vendor="Slackware Linux Project" \
+ --with-xkb-path=/etc/X11/xkb \
+ --with-xkb-output=/var/lib/xkb \
+ $BUILD_SERVERS \
+ --build=$ARCH-slackware-linux
+
+# --with-dri-driver-path=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri
+
+if [ "$ARCH" = "x86_64" ]; then
+ # To prevent the error "No rule to make target `-ldl'"
+ sed -i -e 's#-ldl##' hw/xfree86/Makefile
+ sed -i -e 's#-lm#-lm -ldl#' hw/xfree86/Makefile
+fi
+
diff --git a/patches/source/xorg-server/makepkg/xorg-server b/patches/source/xorg-server/makepkg/xorg-server
new file mode 100644
index 00000000..13d601ed
--- /dev/null
+++ b/patches/source/xorg-server/makepkg/xorg-server
@@ -0,0 +1,47 @@
+
+rm -r ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/bin
+mv $PKG/usr/bin/Xnest ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/bin
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/man/man1
+mv $PKG/usr/man/man1/Xnest.1.gz ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/usr/man/man1
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/install
+cat $CWD/slack-desc/xorg-server-xnest > ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest/install/slack-desc
+cd ${SLACK_X_BUILD_DIR}/package-xorg-server-xnest
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-xnest-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+rm -r ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/bin
+mv $PKG/usr/bin/Xvfb ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/bin
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/man/man1
+mv $PKG/usr/man/man1/Xvfb.1.gz ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/usr/man/man1
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/install
+cat $CWD/slack-desc/xorg-server-xvfb > ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb/install/slack-desc
+cd ${SLACK_X_BUILD_DIR}/package-xorg-server-xvfb
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+rm -r ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/bin
+mv $PKG/usr/bin/Xephyr ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/bin
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/man/man1
+mv $PKG/usr/man/man1/Xephyr.1.gz ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/usr/man/man1
+mkdir -p ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/install
+cat $CWD/slack-desc/xorg-server-xephyr > ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr/install/slack-desc
+cd ${SLACK_X_BUILD_DIR}/package-xorg-server-xephyr
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+# Build the main xorg-server package:
+cd $PKG
+/sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+
+if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xnest-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xnest-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xvfb-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-xephyr-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/xorg-server-${MODULAR_PACKAGE_VERSION}-$ARCH-$BUILD.txz
+fi
+
diff --git a/patches/source/xorg-server/modularize b/patches/source/xorg-server/modularize
new file mode 100644
index 00000000..d6eb2f68
--- /dev/null
+++ b/patches/source/xorg-server/modularize
@@ -0,0 +1,265 @@
+# If a package is listed here, it will be built apart from the
+# usual "grab bag" package that's made from each source directory.
+
+appres
+bdftopcf
+beforelight
+bigreqsproto
+bitmap
+compiz
+compositeproto
+damageproto
+dmxproto
+dri2proto
+editres
+encodings
+evieext
+fixesproto
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-util
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+fonttosfnt
+fslsfonts
+fstobdf
+gccmakedep
+glproto
+iceauth
+ico
+imake
+inputproto
+intel-gpu-tools
+kbproto
+libFS
+libICE
+libSM
+libX11
+libXScrnSaver
+libXau
+libXaw
+libXaw3d
+libXcm
+libXcomposite
+libXcursor
+libXdamage
+libXdmcp
+libXevie
+libXext
+libXfixes
+libXfont
+libXfontcache
+libXft
+libXi
+libXinerama
+libXmu
+libXp
+libXpm
+libXrandr
+libXrender
+libXres
+libXt
+libXtst
+libXv
+libXvMC
+libXxf86dga
+libXxf86misc
+libXxf86vm
+libdmx
+libfontenc
+libpciaccess
+libpthread-stubs
+libxcb
+libxkbfile
+listres
+lndir
+luit
+makedepend
+mkcomposecache
+mkfontdir
+mkfontscale
+oclock
+pixman
+printproto
+randrproto
+recordproto
+rendercheck
+renderproto
+resourceproto
+rgb
+scrnsaverproto
+sessreg
+setxkbmap
+showfont
+smproxy
+twm
+util-macros
+videoproto
+viewres
+x11perf
+xauth
+xbacklight
+xbiff
+xbitmaps
+xcalc
+xcb-proto
+xcb-util
+xcb-util-image
+xcb-util-keysyms
+xcb-util-renderutil
+xcb-util-wm
+xclipboard
+xclock
+xcmiscproto
+xcmsdb
+xcompmgr
+xconsole
+xcursor-themes
+xcursorgen
+xdbedizzy
+xditview
+xdm
+xdpyinfo
+xdriinfo
+xedit
+xev
+xextproto
+xeyes
+xf86-input-acecad
+xf86-input-aiptek
+xf86-input-evdev
+xf86-input-joystick
+xf86-input-penmount
+xf86-input-synaptics
+xf86-input-vmmouse
+xf86-input-void
+xf86-input-wacom
+xf86-video-apm
+xf86-video-ark
+xf86-video-ast
+xf86-video-ati
+xf86-video-chips
+xf86-video-cirrus
+xf86-video-dummy
+xf86-video-geode
+xf86-video-glint
+xf86-video-i128
+xf86-video-i740
+xf86-video-intel
+xf86-video-mach64
+xf86-video-mga
+xf86-video-modesetting
+xf86-video-neomagic
+xf86-video-nouveau
+xf86-video-nv
+xf86-video-openchrome
+xf86-video-qxl
+xf86-video-r128
+xf86-video-rendition
+xf86-video-s3
+xf86-video-s3virge
+xf86-video-savage
+xf86-video-siliconmotion
+xf86-video-sis
+xf86-video-sisusb
+xf86-video-tdfx
+xf86-video-tga
+xf86-video-trident
+xf86-video-tseng
+xf86-video-v4l
+xf86-video-vesa
+xf86-video-vmware
+xf86-video-voodoo
+xf86-video-xgi
+xf86bigfontproto
+xf86dga
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xfd
+xfontsel
+xfs
+xfsinfo
+xgamma
+xgc
+xhost
+xineramaproto
+xinit
+xinput
+xkbcomp
+xkbevd
+xkbprint
+xkbutils
+xkeyboard-config
+xkill
+xload
+xlogo
+xlsatoms
+xlsclients
+xlsfonts
+xmag
+xman
+xmessage
+xmh
+xmodmap
+xmore
+xorg-cf-files
+xorg-docs
+xorg-server
+xorg-server-xephyr
+xorg-server-xnest
+xorg-server-xvfb
+xorg-sgml-doctools
+xpr
+xprop
+xproto
+xpyb
+xrandr
+xrdb
+xrefresh
+xscope
+xset
+xsetroot
+xsm
+xstdcmap
+xtrans
+xvidtune
+xvinfo
+xwd
+xwininfo
+xwud
diff --git a/patches/source/xorg-server/noarch b/patches/source/xorg-server/noarch
new file mode 100644
index 00000000..480ffc26
--- /dev/null
+++ b/patches/source/xorg-server/noarch
@@ -0,0 +1,76 @@
+# List packages with an $ARCH of "noarch" (i.e. packages
+# that contain no binaries) here:
+bigreqsproto
+compositeproto
+damageproto
+dejavu-ttf
+dmxproto
+encodings
+evieext
+font-adobe-100dpi
+font-adobe-75dpi
+font-adobe-utopia-100dpi
+font-adobe-utopia-75dpi
+font-adobe-utopia-type1
+font-alias
+font-arabic-misc
+font-bh-100dpi
+font-bh-75dpi
+font-bh-lucidatypewriter-100dpi
+font-bh-lucidatypewriter-75dpi
+font-bh-ttf
+font-bh-type1
+font-bitstream-100dpi
+font-bitstream-75dpi
+font-bitstream-speedo
+font-bitstream-type1
+font-cronyx-cyrillic
+font-cursor-misc
+font-daewoo-misc
+font-dec-misc
+font-ibm-type1
+font-isas-misc
+font-jis-misc
+font-micro-misc
+font-misc-cyrillic
+font-misc-ethiopic
+font-misc-meltho
+font-misc-misc
+font-mutt-misc
+font-schumacher-misc
+font-screen-cyrillic
+font-sony-misc
+font-sun-misc
+font-winitzki-cyrillic
+font-xfree86-type1
+fontcacheproto
+fontsproto
+gccmakedep
+glproto
+inputproto
+kbproto
+libpthread-stubs
+mkfontdir
+printproto
+randrproto
+recordproto
+renderproto
+resourceproto
+scrnsaverproto
+ttf-indic-fonts
+util-macros
+videoproto
+x11-skel
+xcmiscproto
+xcursor-themes
+xf86bigfontproto
+xf86dgaproto
+xf86driproto
+xf86miscproto
+xf86vidmodeproto
+xineramaproto
+xkeyboard-config
+xorg-cf-files
+xorg-docs
+xproto
+xtrans
diff --git a/patches/source/xorg-server/package-blacklist b/patches/source/xorg-server/package-blacklist
new file mode 100644
index 00000000..37762499
--- /dev/null
+++ b/patches/source/xorg-server/package-blacklist
@@ -0,0 +1,39 @@
+# Enter packages to skip (perhaps because they aren't used on
+# this platform) below. Just the package name -- no version
+# number is needed.
+
+# MacOS related packages:
+applewmproto
+windowswmproto
+libAppleWM
+libWindowsWM
+
+# Sun video cards:
+xf86-video-sunbw2
+xf86-video-suncg14
+xf86-video-suncg3
+xf86-video-suncg6
+xf86-video-sunffb
+xf86-video-sunleo
+xf86-video-suntcx
+
+# Obsolete packages:
+liboldX
+xf86-video-amd
+xf86-video-via
+xkbdata
+xphelloworld
+xrx
+
+# Not applicable to us
+grandr
+constype
+
+# CAREFUL NOT TO "SHIP" THE STUFF BELOW IN THE MAIN X PACKAGES DIR!
+
+# This is probably obsolete, and kills "X -configure" too
+xf86-video-nsc
+
+# We don't want this one, as it causes failure of X with no xorg.conf
+xf86-video-fbdev
+
diff --git a/patches/source/xorg-server/patch/xorg-server.patch b/patches/source/xorg-server/patch/xorg-server.patch
new file mode 100644
index 00000000..52730518
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server.patch
@@ -0,0 +1,15 @@
+zcat $CWD/patch/xorg-server/x11.startwithblackscreen.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-10971.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-10972.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-13721.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-13723.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12176.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12177.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12178.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12180_12181_12182.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12183.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+zcat $CWD/patch/xorg-server/xorg-server.CVE-2017-12184_12185_12186_12187.diff.gz | patch -p1 --verbose || { touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff b/patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff
new file mode 100644
index 00000000..8c0e3b54
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/x11.startwithblackscreen.diff
@@ -0,0 +1,14 @@
+diff -Nur xorg-server-1.12.1.orig/dix/window.c xorg-server-1.12.1/dix/window.c
+--- xorg-server-1.12.1.orig/dix/window.c 2012-03-29 21:57:25.000000000 -0500
++++ xorg-server-1.12.1/dix/window.c 2012-04-13 22:01:24.456073603 -0500
+@@ -145,8 +145,8 @@
+
+ Bool bgNoneRoot = FALSE;
+
+-static unsigned char _back_lsb[4] = { 0x88, 0x22, 0x44, 0x11 };
+-static unsigned char _back_msb[4] = { 0x11, 0x44, 0x22, 0x88 };
++static unsigned char _back_lsb[4] = { 0x00, 0x00, 0x00, 0x00 };
++static unsigned char _back_msb[4] = { 0x00, 0x00, 0x00, 0x00 };
+
+ static Bool WindowParentHasDeviceCursor(WindowPtr pWin,
+ DeviceIntPtr pDev, CursorPtr pCurs);
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff
new file mode 100644
index 00000000..00ed28ac
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10971.diff
@@ -0,0 +1,40 @@
+From ba336b24052122b136486961c82deac76bbde455 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Wed, 24 May 2017 15:54:42 +0300
+Subject: Xi: Do not try to swap GenericEvent.
+
+The SProcXSendExtensionEvent must not attempt to swap GenericEvent because
+it is assuming that the event has fixed size and gives the swapping function
+xEvent-sized buffer.
+
+A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway.
+
+Signed-off-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/Xi/sendexev.c b/Xi/sendexev.c
+index 5e63bfc..5c2e0fc 100644
+--- a/Xi/sendexev.c
++++ b/Xi/sendexev.c
+@@ -95,9 +95,17 @@ SProcXSendExtensionEvent(ClientPtr client)
+
+ eventP = (xEvent *) &stuff[1];
+ for (i = 0; i < stuff->num_events; i++, eventP++) {
++ if (eventP->u.u.type == GenericEvent) {
++ client->errorValue = eventP->u.u.type;
++ return BadValue;
++ }
++
+ proc = EventSwapVector[eventP->u.u.type & 0177];
+- if (proc == NotImplemented) /* no swapping proc; invalid event type? */
++ /* no swapping proc; invalid event type? */
++ if (proc == NotImplemented) {
++ client->errorValue = eventP->u.u.type;
+ return BadValue;
++ }
+ (*proc) (eventP, &eventT);
+ *eventP = eventT;
+ }
+--
+cgit v0.10.2
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff
new file mode 100644
index 00000000..edddc8d6
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-10972.diff
@@ -0,0 +1,36 @@
+From 05442de962d3dc624f79fc1a00eca3ffc5489ced Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Wed, 24 May 2017 15:54:39 +0300
+Subject: Xi: Zero target buffer in SProcXSendExtensionEvent.
+
+Make sure that the xEvent eventT is initialized with zeros, the same way as
+in SProcSendEvent.
+
+Some event swapping functions do not overwrite all 32 bytes of xEvent
+structure, for example XSecurityAuthorizationRevoked. Two cooperating
+clients, one swapped and the other not, can send
+XSecurityAuthorizationRevoked event to each other to retrieve old stack data
+from X server. This can be potentialy misused to go around ASLR or
+stack-protector.
+
+Signed-off-by: Michal Srb <msrb@suse.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/Xi/sendexev.c b/Xi/sendexev.c
+index 11d8202..1cf118a 100644
+--- a/Xi/sendexev.c
++++ b/Xi/sendexev.c
+@@ -78,7 +78,7 @@ SProcXSendExtensionEvent(ClientPtr client)
+ {
+ CARD32 *p;
+ int i;
+- xEvent eventT;
++ xEvent eventT = { .u.u.type = 0 };
+ xEvent *eventP;
+ EventSwapPtr proc;
+
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff
new file mode 100644
index 00000000..9caf3124
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12176.diff
@@ -0,0 +1,31 @@
+From b747da5e25be944337a9cd1415506fc06b70aa81 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 10:15:46 -0500
+Subject: Unvalidated extra length in ProcEstablishConnection (CVE-2017-12176)
+
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/dix/dispatch.c b/dix/dispatch.c
+index 8b371b6..176c7a0 100644
+--- a/dix/dispatch.c
++++ b/dix/dispatch.c
+@@ -3702,7 +3702,12 @@ ProcEstablishConnection(ClientPtr client)
+ prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq);
+ auth_proto = (char *) prefix + sz_xConnClientPrefix;
+ auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto);
+- if ((prefix->majorVersion != X_PROTOCOL) ||
++
++ if ((client->req_len << 2) != sz_xReq + sz_xConnClientPrefix +
++ pad_to_int32(prefix->nbytesAuthProto) +
++ pad_to_int32(prefix->nbytesAuthString))
++ reason = "Bad length";
++ else if ((prefix->majorVersion != X_PROTOCOL) ||
+ (prefix->minorVersion != X_PROTOCOL_REVISION))
+ reason = "Protocol version mismatch";
+ else
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12177.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12177.diff
new file mode 100644
index 00000000..4a3eaa9e
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12177.diff
@@ -0,0 +1,41 @@
+From 4ca68b878e851e2136c234f40a25008297d8d831 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 10:09:14 -0500
+Subject: dbe: Unvalidated variable-length request in ProcDbeGetVisualInfo
+ (CVE-2017-12177)
+
+v2: Protect against integer overflow (Alan Coopersmith)
+
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/dbe/dbe.c b/dbe/dbe.c
+index 9a0c7a7..292a223 100644
+--- a/dbe/dbe.c
++++ b/dbe/dbe.c
+@@ -574,6 +574,9 @@ ProcDbeGetVisualInfo(ClientPtr client)
+ XdbeScreenVisualInfo *pScrVisInfo;
+
+ REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq);
++ if (stuff->n > UINT32_MAX / sizeof(CARD32))
++ return BadLength;
++ REQUEST_FIXED_SIZE(xDbeGetVisualInfoReq, stuff->n * sizeof(CARD32));
+
+ if (stuff->n > UINT32_MAX / sizeof(DrawablePtr))
+ return BadAlloc;
+@@ -924,7 +927,7 @@ SProcDbeSwapBuffers(ClientPtr client)
+
+ swapl(&stuff->n);
+ if (stuff->n > UINT32_MAX / sizeof(DbeSwapInfoRec))
+- return BadAlloc;
++ return BadLength;
+ REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, stuff->n * sizeof(xDbeSwapInfo));
+
+ if (stuff->n != 0) {
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12178.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12178.diff
new file mode 100644
index 00000000..8177c119
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12178.diff
@@ -0,0 +1,29 @@
+From 859b08d523307eebde7724fd1a0789c44813e821 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Wed, 24 Dec 2014 16:22:18 -0500
+Subject: Xi: fix wrong extra length check in ProcXIChangeHierarchy
+ (CVE-2017-12178)
+
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
+index 87f191f..cbdd912 100644
+--- a/Xi/xichangehierarchy.c
++++ b/Xi/xichangehierarchy.c
+@@ -423,7 +423,7 @@ ProcXIChangeHierarchy(ClientPtr client)
+ if (!stuff->num_changes)
+ return rc;
+
+- len = ((size_t)stuff->length << 2) - sizeof(xXIAnyHierarchyChangeInfo);
++ len = ((size_t)stuff->length << 2) - sizeof(xXIChangeHierarchyReq);
+
+ any = (xXIAnyHierarchyChangeInfo *) &stuff[1];
+ while (stuff->num_changes--) {
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff
new file mode 100644
index 00000000..0b373464
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p1.diff
@@ -0,0 +1,42 @@
+From 211e05ac85a294ef361b9f80d689047fa52b9076 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Fri, 7 Jul 2017 17:21:46 +0200
+Subject: Xi: Test exact size of XIBarrierReleasePointer
+
+Otherwise a client can send any value of num_barriers and cause reading or swapping of values on heap behind the receive buffer.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
+index af1562e..d82ecb6 100644
+--- a/Xi/xibarriers.c
++++ b/Xi/xibarriers.c
+@@ -830,10 +830,13 @@ SProcXIBarrierReleasePointer(ClientPtr client)
+ REQUEST(xXIBarrierReleasePointerReq);
+ int i;
+
+- info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+-
+ swaps(&stuff->length);
++ REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
++
+ swapl(&stuff->num_barriers);
++ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
++
++ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+ for (i = 0; i < stuff->num_barriers; i++, info++) {
+ swaps(&info->deviceid);
+ swapl(&info->barrier);
+@@ -853,7 +856,7 @@ ProcXIBarrierReleasePointer(ClientPtr client)
+ xXIBarrierReleasePointerInfo *info;
+
+ REQUEST(xXIBarrierReleasePointerReq);
+- REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
++ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
+
+ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+ for (i = 0; i < stuff->num_barriers; i++, info++) {
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff
new file mode 100644
index 00000000..34675603
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12179_p2.diff
@@ -0,0 +1,46 @@
+From d088e3c1286b548a58e62afdc70bb40981cdb9e8 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 10:04:41 -0500
+Subject: Xi: integer overflow and unvalidated length in
+ (S)ProcXIBarrierReleasePointer
+
+[jcristau: originally this patch fixed the same issue as commit
+ 211e05ac85 "Xi: Test exact size of XIBarrierReleasePointer", with the
+ addition of these checks]
+
+This addresses CVE-2017-12179
+
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
+index d82ecb6..d0be701 100644
+--- a/Xi/xibarriers.c
++++ b/Xi/xibarriers.c
+@@ -834,6 +834,8 @@ SProcXIBarrierReleasePointer(ClientPtr client)
+ REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
+
+ swapl(&stuff->num_barriers);
++ if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo))
++ return BadLength;
+ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
+
+ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+@@ -856,6 +858,9 @@ ProcXIBarrierReleasePointer(ClientPtr client)
+ xXIBarrierReleasePointerInfo *info;
+
+ REQUEST(xXIBarrierReleasePointerReq);
++ REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
++ if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo))
++ return BadLength;
+ REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo));
+
+ info = (xXIBarrierReleasePointerInfo*) &stuff[1];
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12180_12181_12182.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12180_12181_12182.diff
new file mode 100644
index 00000000..70ebee8c
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12180_12181_12182.diff
@@ -0,0 +1,601 @@
+From 1b1d4c04695dced2463404174b50b3581dbd857b Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Sun, 21 Dec 2014 01:10:03 -0500
+Subject: hw/xfree86: unvalidated lengths
+
+This addresses:
+CVE-2017-12180 in XFree86-VidModeExtension
+CVE-2017-12181 in XFree86-DGA
+CVE-2017-12182 in XFree86-DRI
+
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/Xext/vidmode.c b/Xext/vidmode.c
+index 8ba919a..6e4a7c7 100644
+--- a/Xext/vidmode.c
++++ b/Xext/vidmode.c
+@@ -454,6 +454,20 @@ ProcVidModeAddModeLine(ClientPtr client)
+ DEBUG_P("XF86VidModeAddModeline");
+
+ ver = ClientMajorVersion(client);
++
++ if (ver < 2) {
++ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86OldVidModeAddModeLineReq));
++ }
++ else {
++ REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86VidModeAddModeLineReq));
++ }
++
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -501,18 +515,6 @@ ProcVidModeAddModeLine(ClientPtr client)
+ stuff->after_vsyncend, stuff->after_vtotal,
+ (unsigned long) stuff->after_flags);
+
+- if (ver < 2) {
+- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86OldVidModeAddModeLineReq));
+- }
+- else {
+- REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86VidModeAddModeLineReq));
+- }
+ if (len != stuff->privsize)
+ return BadLength;
+
+@@ -622,6 +624,20 @@ ProcVidModeDeleteModeLine(ClientPtr client)
+ DEBUG_P("XF86VidModeDeleteModeline");
+
+ ver = ClientMajorVersion(client);
++
++ if (ver < 2) {
++ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86OldVidModeDeleteModeLineReq));
++ }
++ else {
++ REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86VidModeDeleteModeLineReq));
++ }
++
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -649,18 +665,6 @@ ProcVidModeDeleteModeLine(ClientPtr client)
+ stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal,
+ (unsigned long) stuff->flags);
+
+- if (ver < 2) {
+- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86OldVidModeDeleteModeLineReq));
+- }
+- else {
+- REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86VidModeDeleteModeLineReq));
+- }
+ if (len != stuff->privsize) {
+ DebugF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, "
+ "len = %d, length = %d\n",
+@@ -744,6 +748,20 @@ ProcVidModeModModeLine(ClientPtr client)
+ DEBUG_P("XF86VidModeModModeline");
+
+ ver = ClientMajorVersion(client);
++
++ if (ver < 2) {
++ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq));
++ }
++ else {
++ REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86VidModeModModeLineReq));
++ }
++
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -768,18 +786,6 @@ ProcVidModeModModeLine(ClientPtr client)
+ stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend,
+ stuff->vtotal, (unsigned long) stuff->flags);
+
+- if (ver < 2) {
+- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq));
+- }
+- else {
+- REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86VidModeModModeLineReq));
+- }
+ if (len != stuff->privsize)
+ return BadLength;
+
+@@ -877,6 +883,19 @@ ProcVidModeValidateModeLine(ClientPtr client)
+ DEBUG_P("XF86VidModeValidateModeline");
+
+ ver = ClientMajorVersion(client);
++
++ if (ver < 2) {
++ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
++ len = client->req_len -
++ bytes_to_int32(sizeof(xXF86OldVidModeValidateModeLineReq));
++ }
++ else {
++ REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86VidModeValidateModeLineReq));
++ }
++
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -905,17 +924,6 @@ ProcVidModeValidateModeLine(ClientPtr client)
+ stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal,
+ (unsigned long) stuff->flags);
+
+- if (ver < 2) {
+- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
+- len = client->req_len -
+- bytes_to_int32(sizeof(xXF86OldVidModeValidateModeLineReq));
+- }
+- else {
+- REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86VidModeValidateModeLineReq));
+- }
+ if (len != stuff->privsize)
+ return BadLength;
+
+@@ -1027,6 +1035,20 @@ ProcVidModeSwitchToMode(ClientPtr client)
+ DEBUG_P("XF86VidModeSwitchToMode");
+
+ ver = ClientMajorVersion(client);
++
++ if (ver < 2) {
++ REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86OldVidModeSwitchToModeReq));
++ }
++ else {
++ REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq);
++ len =
++ client->req_len -
++ bytes_to_int32(sizeof(xXF86VidModeSwitchToModeReq));
++ }
++
+ if (ver < 2) {
+ /* convert from old format */
+ stuff = &newstuff;
+@@ -1055,18 +1077,6 @@ ProcVidModeSwitchToMode(ClientPtr client)
+ stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal,
+ (unsigned long) stuff->flags);
+
+- if (ver < 2) {
+- REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86OldVidModeSwitchToModeReq));
+- }
+- else {
+- REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq);
+- len =
+- client->req_len -
+- bytes_to_int32(sizeof(xXF86VidModeSwitchToModeReq));
+- }
+ if (len != stuff->privsize)
+ return BadLength;
+
+@@ -1457,6 +1467,7 @@ ProcVidModeSetGammaRamp(ClientPtr client)
+ VidModePtr pVidMode;
+
+ REQUEST(xXF86VidModeSetGammaRampReq);
++ REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
+
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
+index 95434e8..505b019 100644
+--- a/hw/xfree86/common/xf86DGA.c
++++ b/hw/xfree86/common/xf86DGA.c
+@@ -1272,13 +1272,14 @@ ProcXDGAOpenFramebuffer(ClientPtr client)
+ char *deviceName;
+ int nameSize;
+
++ REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (!DGAAvailable(stuff->screen))
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
+
+- REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -1305,14 +1306,14 @@ ProcXDGACloseFramebuffer(ClientPtr client)
+ {
+ REQUEST(xXDGACloseFramebufferReq);
+
++ REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (!DGAAvailable(stuff->screen))
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
+
+- REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq);
+-
+ DGACloseFramebuffer(stuff->screen);
+
+ return Success;
+@@ -1328,10 +1329,11 @@ ProcXDGAQueryModes(ClientPtr client)
+ xXDGAModeInfo info;
+ XDGAModePtr mode;
+
++ REQUEST_SIZE_MATCH(xXDGAQueryModesReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXDGAQueryModesReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.number = 0;
+@@ -1443,11 +1445,12 @@ ProcXDGASetMode(ClientPtr client)
+ ClientPtr owner;
+ int size;
+
++ REQUEST_SIZE_MATCH(xXDGASetModeReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+ owner = DGA_GETCLIENT(stuff->screen);
+
+- REQUEST_SIZE_MATCH(xXDGASetModeReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.offset = 0;
+@@ -1533,14 +1536,14 @@ ProcXDGASetViewport(ClientPtr client)
+ {
+ REQUEST(xXDGASetViewportReq);
+
++ REQUEST_SIZE_MATCH(xXDGASetViewportReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGASetViewportReq);
+-
+ DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags);
+
+ return Success;
+@@ -1554,14 +1557,14 @@ ProcXDGAInstallColormap(ClientPtr client)
+
+ REQUEST(xXDGAInstallColormapReq);
+
++ REQUEST_SIZE_MATCH(xXDGAInstallColormapReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGAInstallColormapReq);
+-
+ rc = dixLookupResourceByType((void **) &cmap, stuff->cmap, RT_COLORMAP,
+ client, DixInstallAccess);
+ if (rc != Success)
+@@ -1575,14 +1578,14 @@ ProcXDGASelectInput(ClientPtr client)
+ {
+ REQUEST(xXDGASelectInputReq);
+
++ REQUEST_SIZE_MATCH(xXDGASelectInputReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGASelectInputReq);
+-
+ if (DGA_GETCLIENT(stuff->screen) == client)
+ DGASelectInput(stuff->screen, client, stuff->mask);
+
+@@ -1594,14 +1597,14 @@ ProcXDGAFillRectangle(ClientPtr client)
+ {
+ REQUEST(xXDGAFillRectangleReq);
+
++ REQUEST_SIZE_MATCH(xXDGAFillRectangleReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGAFillRectangleReq);
+-
+ if (Success != DGAFillRect(stuff->screen, stuff->x, stuff->y,
+ stuff->width, stuff->height, stuff->color))
+ return BadMatch;
+@@ -1614,14 +1617,14 @@ ProcXDGACopyArea(ClientPtr client)
+ {
+ REQUEST(xXDGACopyAreaReq);
+
++ REQUEST_SIZE_MATCH(xXDGACopyAreaReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGACopyAreaReq);
+-
+ if (Success != DGABlitRect(stuff->screen, stuff->srcx, stuff->srcy,
+ stuff->width, stuff->height, stuff->dstx,
+ stuff->dsty))
+@@ -1635,14 +1638,14 @@ ProcXDGACopyTransparentArea(ClientPtr client)
+ {
+ REQUEST(xXDGACopyTransparentAreaReq);
+
++ REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq);
+-
+ if (Success != DGABlitTransRect(stuff->screen, stuff->srcx, stuff->srcy,
+ stuff->width, stuff->height, stuff->dstx,
+ stuff->dsty, stuff->key))
+@@ -1657,13 +1660,14 @@ ProcXDGAGetViewportStatus(ClientPtr client)
+ REQUEST(xXDGAGetViewportStatusReq);
+ xXDGAGetViewportStatusReply rep;
+
++ REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -1680,13 +1684,14 @@ ProcXDGASync(ClientPtr client)
+ REQUEST(xXDGASyncReq);
+ xXDGASyncReply rep;
+
++ REQUEST_SIZE_MATCH(xXDGASyncReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGASyncReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -1725,13 +1730,14 @@ ProcXDGAChangePixmapMode(ClientPtr client)
+ xXDGAChangePixmapModeReply rep;
+ int x, y;
+
++ REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -1755,14 +1761,14 @@ ProcXDGACreateColormap(ClientPtr client)
+ REQUEST(xXDGACreateColormapReq);
+ int result;
+
++ REQUEST_SIZE_MATCH(xXDGACreateColormapReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXDGACreateColormapReq);
+-
+ if (!stuff->mode)
+ return BadValue;
+
+@@ -1791,10 +1797,11 @@ ProcXF86DGAGetVideoLL(ClientPtr client)
+ int num, offset, flags;
+ char *name;
+
++ REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -1831,9 +1838,10 @@ ProcXF86DGADirectVideo(ClientPtr client)
+
+ REQUEST(xXF86DGADirectVideoReq);
+
++ REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+- REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq);
+
+ if (!DGAAvailable(stuff->screen))
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
+@@ -1889,10 +1897,11 @@ ProcXF86DGAGetViewPortSize(ClientPtr client)
+ REQUEST(xXF86DGAGetViewPortSizeReq);
+ xXF86DGAGetViewPortSizeReply rep;
+
++ REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -1917,14 +1926,14 @@ ProcXF86DGASetViewPort(ClientPtr client)
+ {
+ REQUEST(xXF86DGASetViewPortReq);
+
++ REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq);
+-
+ if (!DGAAvailable(stuff->screen))
+ return DGAErrorBase + XF86DGANoDirectVideoMode;
+
+@@ -1944,10 +1953,11 @@ ProcXF86DGAGetVidPage(ClientPtr client)
+ REQUEST(xXF86DGAGetVidPageReq);
+ xXF86DGAGetVidPageReply rep;
+
++ REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -1962,11 +1972,11 @@ ProcXF86DGASetVidPage(ClientPtr client)
+ {
+ REQUEST(xXF86DGASetVidPageReq);
+
++ REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq);
+-
+ /* silently fail */
+
+ return Success;
+@@ -1980,14 +1990,14 @@ ProcXF86DGAInstallColormap(ClientPtr client)
+
+ REQUEST(xXF86DGAInstallColormapReq);
+
++ REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq);
+-
+ if (!DGAActive(stuff->screen))
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+@@ -2008,10 +2018,11 @@ ProcXF86DGAQueryDirectVideo(ClientPtr client)
+ REQUEST(xXF86DGAQueryDirectVideoReq);
+ xXF86DGAQueryDirectVideoReply rep;
+
++ REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+- REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+@@ -2030,14 +2041,14 @@ ProcXF86DGAViewPortChanged(ClientPtr client)
+ REQUEST(xXF86DGAViewPortChangedReq);
+ xXF86DGAViewPortChangedReply rep;
+
++ REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq);
++
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
+ if (DGA_GETCLIENT(stuff->screen) != client)
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+- REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq);
+-
+ if (!DGAActive(stuff->screen))
+ return DGAErrorBase + XF86DGADirectNotActivated;
+
+diff --git a/hw/xfree86/dri/xf86dri.c b/hw/xfree86/dri/xf86dri.c
+index 8f3c2d6..d356db9 100644
+--- a/hw/xfree86/dri/xf86dri.c
++++ b/hw/xfree86/dri/xf86dri.c
+@@ -570,6 +570,7 @@ static int _X_COLD
+ SProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client)
+ {
+ REQUEST(xXF86DRIQueryDirectRenderingCapableReq);
++ REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq);
+ swaps(&stuff->length);
+ swapl(&stuff->screen);
+ return ProcXF86DRIQueryDirectRenderingCapable(client);
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff
new file mode 100644
index 00000000..b88ba950
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12183.diff
@@ -0,0 +1,95 @@
+From 55caa8b08c84af2b50fbc936cf334a5a93dd7db5 Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 11:43:05 -0500
+Subject: xfixes: unvalidated lengths (CVE-2017-12183)
+
+v2: Use before swap (Jeremy Huddleston Sequoia)
+
+v3: Fix wrong XFixesCopyRegion checks (Alan Coopersmith)
+
+Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/xfixes/cursor.c b/xfixes/cursor.c
+index c1ab3be..dc447ed 100644
+--- a/xfixes/cursor.c
++++ b/xfixes/cursor.c
+@@ -281,6 +281,7 @@ int _X_COLD
+ SProcXFixesSelectCursorInput(ClientPtr client)
+ {
+ REQUEST(xXFixesSelectCursorInputReq);
++ REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+@@ -414,7 +415,7 @@ ProcXFixesSetCursorName(ClientPtr client)
+ REQUEST(xXFixesSetCursorNameReq);
+ Atom atom;
+
+- REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq);
++ REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes);
+ VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess);
+ tchar = (char *) &stuff[1];
+ atom = MakeAtom(tchar, stuff->nbytes, TRUE);
+@@ -1007,6 +1008,8 @@ SProcXFixesCreatePointerBarrier(ClientPtr client)
+ int i;
+ CARD16 *in_devices = (CARD16 *) &stuff[1];
+
++ REQUEST_AT_LEAST_SIZE(xXFixesCreatePointerBarrierReq);
++
+ swaps(&stuff->length);
+ swaps(&stuff->num_devices);
+ REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices));
+diff --git a/xfixes/region.c b/xfixes/region.c
+index e773701..7c0a7d2 100644
+--- a/xfixes/region.c
++++ b/xfixes/region.c
+@@ -359,6 +359,7 @@ ProcXFixesCopyRegion(ClientPtr client)
+ RegionPtr pSource, pDestination;
+
+ REQUEST(xXFixesCopyRegionReq);
++ REQUEST_SIZE_MATCH(xXFixesCopyRegionReq);
+
+ VERIFY_REGION(pSource, stuff->source, client, DixReadAccess);
+ VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess);
+@@ -375,7 +376,7 @@ SProcXFixesCopyRegion(ClientPtr client)
+ REQUEST(xXFixesCopyRegionReq);
+
+ swaps(&stuff->length);
+- REQUEST_AT_LEAST_SIZE(xXFixesCopyRegionReq);
++ REQUEST_SIZE_MATCH(xXFixesCopyRegionReq);
+ swapl(&stuff->source);
+ swapl(&stuff->destination);
+ return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
+diff --git a/xfixes/saveset.c b/xfixes/saveset.c
+index 2043153..fd9c7a1 100644
+--- a/xfixes/saveset.c
++++ b/xfixes/saveset.c
+@@ -62,6 +62,7 @@ int _X_COLD
+ SProcXFixesChangeSaveSet(ClientPtr client)
+ {
+ REQUEST(xXFixesChangeSaveSetReq);
++ REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
+index 77efd64..248bf02 100644
+--- a/xfixes/xfixes.c
++++ b/xfixes/xfixes.c
+@@ -160,6 +160,7 @@ static _X_COLD int
+ SProcXFixesQueryVersion(ClientPtr client)
+ {
+ REQUEST(xXFixesQueryVersionReq);
++ REQUEST_SIZE_MATCH(xXFixesQueryVersionReq);
+
+ swaps(&stuff->length);
+ swapl(&stuff->majorVersion);
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12184_12185_12186_12187.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12184_12185_12186_12187.diff
new file mode 100644
index 00000000..d2995686
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-12184_12185_12186_12187.diff
@@ -0,0 +1,139 @@
+From cad5a1050b7184d828aef9c1dd151c3ab649d37e Mon Sep 17 00:00:00 2001
+From: Nathan Kidd <nkidd@opentext.com>
+Date: Fri, 9 Jan 2015 09:57:23 -0500
+Subject: Unvalidated lengths
+
+v2: Add overflow check and remove unnecessary check (Julien Cristau)
+
+This addresses:
+CVE-2017-12184 in XINERAMA
+CVE-2017-12185 in MIT-SCREEN-SAVER
+CVE-2017-12186 in X-Resource
+CVE-2017-12187 in RENDER
+
+Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+Signed-off-by: Nathan Kidd <nkidd@opentext.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
+index 209df29..844ea49 100644
+--- a/Xext/panoramiX.c
++++ b/Xext/panoramiX.c
+@@ -988,10 +988,11 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
+ xPanoramiXGetScreenSizeReply rep;
+ int rc;
+
++ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
++
+ if (stuff->screen >= PanoramiXNumScreens)
+ return BadMatch;
+
+- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+diff --git a/Xext/saver.c b/Xext/saver.c
+index 0949761..f6090d8 100644
+--- a/Xext/saver.c
++++ b/Xext/saver.c
+@@ -1186,6 +1186,8 @@ ProcScreenSaverUnsetAttributes(ClientPtr client)
+ PanoramiXRes *draw;
+ int rc, i;
+
++ REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
++
+ rc = dixLookupResourceByClass((void **) &draw, stuff->drawable,
+ XRC_DRAWABLE, client, DixWriteAccess);
+ if (rc != Success)
+diff --git a/Xext/xres.c b/Xext/xres.c
+index 21239f5..0242158 100644
+--- a/Xext/xres.c
++++ b/Xext/xres.c
+@@ -947,6 +947,8 @@ ProcXResQueryResourceBytes (ClientPtr client)
+ ConstructResourceBytesCtx ctx;
+
+ REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
++ if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0]))
++ return BadLength;
+ REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
+ stuff->numSpecs * sizeof(ctx.specs[0]));
+
+@@ -1052,8 +1054,8 @@ SProcXResQueryResourceBytes (ClientPtr client)
+ int c;
+ xXResResourceIdSpec *specs = (void*) ((char*) stuff + sizeof(*stuff));
+
+- swapl(&stuff->numSpecs);
+ REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq);
++ swapl(&stuff->numSpecs);
+ REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq,
+ stuff->numSpecs * sizeof(specs[0]));
+
+diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c
+index d99d3d4..5232b37 100644
+--- a/Xext/xvdisp.c
++++ b/Xext/xvdisp.c
+@@ -1493,12 +1493,14 @@ XineramaXvShmPutImage(ClientPtr client)
+ {
+ REQUEST(xvShmPutImageReq);
+ PanoramiXRes *draw, *gc, *port;
+- Bool send_event = stuff->send_event;
++ Bool send_event;
+ Bool isRoot;
+ int result, i, x, y;
+
+ REQUEST_SIZE_MATCH(xvShmPutImageReq);
+
++ send_event = stuff->send_event;
++
+ result = dixLookupResourceByClass((void **) &draw, stuff->drawable,
+ XRC_DRAWABLE, client, DixWriteAccess);
+ if (result != Success)
+diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c
+index 1f1022e..63caec9 100644
+--- a/hw/dmx/dmxpict.c
++++ b/hw/dmx/dmxpict.c
+@@ -716,6 +716,8 @@ dmxProcRenderSetPictureFilter(ClientPtr client)
+ filter = (char *) (stuff + 1);
+ params = (XFixed *) (filter + ((stuff->nbytes + 3) & ~3));
+ nparams = ((XFixed *) stuff + client->req_len) - params;
++ if (nparams < 0)
++ return BadLength;
+
+ XRenderSetPictureFilter(dmxScreen->beDisplay,
+ pPictPriv->pict, filter, params, nparams);
+diff --git a/pseudoramiX/pseudoramiX.c b/pseudoramiX/pseudoramiX.c
+index d8b2593..95f6e10 100644
+--- a/pseudoramiX/pseudoramiX.c
++++ b/pseudoramiX/pseudoramiX.c
+@@ -297,10 +297,11 @@ ProcPseudoramiXGetScreenSize(ClientPtr client)
+
+ TRACE;
+
++ REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
++
+ if (stuff->screen >= pseudoramiXNumScreens)
+ return BadMatch;
+
+- REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
+diff --git a/render/render.c b/render/render.c
+index ccae49a..7d94bd5 100644
+--- a/render/render.c
++++ b/render/render.c
+@@ -1757,6 +1757,9 @@ ProcRenderSetPictureFilter(ClientPtr client)
+ name = (char *) (stuff + 1);
+ params = (xFixed *) (name + pad_to_int32(stuff->nbytes));
+ nparams = ((xFixed *) stuff + client->req_len) - params;
++ if (nparams < 0)
++ return BadLength;
++
+ result = SetPictureFilter(pPicture, name, stuff->nbytes, params, nparams);
+ return result;
+ }
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13721.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13721.diff
new file mode 100644
index 00000000..8341a337
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13721.diff
@@ -0,0 +1,27 @@
+From b95f25af141d33a65f6f821ea9c003f66a01e1f1 Mon Sep 17 00:00:00 2001
+From: Michal Srb <msrb@suse.com>
+Date: Fri, 28 Jul 2017 16:27:10 +0200
+Subject: Xext/shm: Validate shmseg resource id (CVE-2017-13721)
+
+Otherwise it can belong to a non-existing client and abort X server with
+FatalError "client not in use", or overwrite existing segment of another
+existing client.
+
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/Xext/shm.c b/Xext/shm.c
+index 91ea90b..2f9a788 100644
+--- a/Xext/shm.c
++++ b/Xext/shm.c
+@@ -1238,6 +1238,7 @@ ProcShmCreateSegment(ClientPtr client)
+ };
+
+ REQUEST_SIZE_MATCH(xShmCreateSegmentReq);
++ LEGAL_NEW_RESOURCE(stuff->shmseg, client);
+ if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) {
+ client->errorValue = stuff->readOnly;
+ return BadValue;
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff
new file mode 100644
index 00000000..6e37be48
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.CVE-2017-13723.diff
@@ -0,0 +1,116 @@
+From 94f11ca5cf011ef123bd222cabeaef6f424d76ac Mon Sep 17 00:00:00 2001
+From: Keith Packard <keithp@keithp.com>
+Date: Thu, 27 Jul 2017 10:08:32 -0700
+Subject: xkb: Handle xkb formated string output safely (CVE-2017-13723)
+
+Generating strings for XKB data used a single shared static buffer,
+which offered several opportunities for errors. Use a ring of
+resizable buffers instead, to avoid problems when strings end up
+longer than anticipated.
+
+Reviewed-by: Michal Srb <msrb@suse.com>
+Signed-off-by: Keith Packard <keithp@keithp.com>
+Signed-off-by: Julien Cristau <jcristau@debian.org>
+
+diff --git a/xkb/xkbtext.c b/xkb/xkbtext.c
+index ead2b1a..d2a2567 100644
+--- a/xkb/xkbtext.c
++++ b/xkb/xkbtext.c
+@@ -47,23 +47,27 @@
+
+ /***====================================================================***/
+
+-#define BUFFER_SIZE 512
+-
+-static char textBuffer[BUFFER_SIZE];
+-static int tbNext = 0;
++#define NUM_BUFFER 8
++static struct textBuffer {
++ int size;
++ char *buffer;
++} textBuffer[NUM_BUFFER];
++static int textBufferIndex;
+
+ static char *
+ tbGetBuffer(unsigned size)
+ {
+- char *rtrn;
++ struct textBuffer *tb;
+
+- if (size >= BUFFER_SIZE)
+- return NULL;
+- if ((BUFFER_SIZE - tbNext) <= size)
+- tbNext = 0;
+- rtrn = &textBuffer[tbNext];
+- tbNext += size;
+- return rtrn;
++ tb = &textBuffer[textBufferIndex];
++ textBufferIndex = (textBufferIndex + 1) % NUM_BUFFER;
++
++ if (size > tb->size) {
++ free(tb->buffer);
++ tb->buffer = xnfalloc(size);
++ tb->size = size;
++ }
++ return tb->buffer;
+ }
+
+ /***====================================================================***/
+@@ -79,8 +83,6 @@ XkbAtomText(Atom atm, unsigned format)
+ int len;
+
+ len = strlen(atmstr) + 1;
+- if (len > BUFFER_SIZE)
+- len = BUFFER_SIZE - 2;
+ rtrn = tbGetBuffer(len);
+ strlcpy(rtrn, atmstr, len);
+ }
+@@ -128,8 +130,6 @@ XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format)
+ len = strlen(tmp) + 1;
+ if (format == XkbCFile)
+ len += 4;
+- if (len >= BUFFER_SIZE)
+- len = BUFFER_SIZE - 1;
+ rtrn = tbGetBuffer(len);
+ if (format == XkbCFile) {
+ strcpy(rtrn, "vmod_");
+@@ -140,6 +140,8 @@ XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format)
+ return rtrn;
+ }
+
++#define VMOD_BUFFER_SIZE 512
++
+ char *
+ XkbVModMaskText(XkbDescPtr xkb,
+ unsigned modMask, unsigned mask, unsigned format)
+@@ -147,7 +149,7 @@ XkbVModMaskText(XkbDescPtr xkb,
+ register int i, bit;
+ int len;
+ char *mm, *rtrn;
+- char *str, buf[BUFFER_SIZE];
++ char *str, buf[VMOD_BUFFER_SIZE];
+
+ if ((modMask == 0) && (mask == 0)) {
+ rtrn = tbGetBuffer(5);
+@@ -173,7 +175,7 @@ XkbVModMaskText(XkbDescPtr xkb,
+ len = strlen(tmp) + 1 + (str == buf ? 0 : 1);
+ if (format == XkbCFile)
+ len += 4;
+- if ((str - (buf + len)) <= BUFFER_SIZE) {
++ if ((str - (buf + len)) <= VMOD_BUFFER_SIZE) {
+ if (str != buf) {
+ if (format == XkbCFile)
+ *str++ = '|';
+@@ -199,8 +201,6 @@ XkbVModMaskText(XkbDescPtr xkb,
+ len = 0;
+ if (str)
+ len += strlen(str) + (mm == NULL ? 0 : 1);
+- if (len >= BUFFER_SIZE)
+- len = BUFFER_SIZE - 1;
+ rtrn = tbGetBuffer(len + 1);
+ rtrn[0] = '\0';
+
+--
+cgit v0.10.2
+
+
diff --git a/patches/source/xorg-server/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch b/patches/source/xorg-server/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch
new file mode 100644
index 00000000..83f67303
--- /dev/null
+++ b/patches/source/xorg-server/patch/xorg-server/xorg-server.combo.mouse.keyboard.layout.patch
@@ -0,0 +1,49 @@
+--- b/Xi/exevents.c 2013-12-27 19:38:52.000000000 +0200
++++ a/Xi/exevents.c 2014-03-04 19:44:15.228721619 +0200
+@@ -665,7 +665,8 @@
+ DeepCopyFeedbackClasses(from, to);
+
+ if ((dce->flags & DEVCHANGE_KEYBOARD_EVENT))
+- DeepCopyKeyboardClasses(from, to);
++ /* We need to copy to MASTER_KEYBOARD. Didn't worked with 'to'. */
++ DeepCopyKeyboardClasses(from, GetMaster(from, MASTER_KEYBOARD));
+ if ((dce->flags & DEVCHANGE_POINTER_EVENT))
+ DeepCopyPointerClasses(from, to);
+ }
+--- b/dix/getevents.c 2013-12-27 19:38:52.000000000 +0200
++++ a/dix/getevents.c 2014-03-04 19:46:50.126336327 +0200
+@@ -706,12 +706,19 @@
+ {
+ DeviceIntPtr master;
+
+- master =
+- GetMaster(dev,
+- (type & DEVCHANGE_POINTER_EVENT) ? MASTER_POINTER :
+- MASTER_KEYBOARD);
++ /* Don't guess the master upon the event type. Use MASTER_ATTACHED,
++ * otherwise we'll never get a DeviceChangedEvent(reason:SlaveSwith). */
++ master = GetMaster(dev, MASTER_ATTACHED);
++ /* Need to track the slave event type. Other we'le never get a
++ * DeviceChangedEvent(reason:SlaveSwith) for the 'keyboard' if the
++ * 'pointer' has been touched before. */
++ int slave_type = (type & DEVCHANGE_KEYBOARD_EVENT) |
++ (type & DEVCHANGE_POINTER_EVENT);
+
+- if (master && master->last.slave != dev) {
++ if (master &&
++ ((master->last.slave != dev) ||
++ (master->last.slave == dev && master->last.slave_type != slave_type))) {
++ master->last.slave_type = slave_type;
+ CreateClassesChangedEvent(events, master, dev,
+ type | DEVCHANGE_SLAVE_SWITCH);
+ if (IsPointerDevice(master)) {
+--- b/include/inputstr.h 2013-12-27 19:38:52.000000000 +0200
++++ a/include/inputstr.h 2014-03-04 19:47:28.074051116 +0200
+@@ -577,6 +577,7 @@
+ double valuators[MAX_VALUATORS];
+ int numValuators;
+ DeviceIntPtr slave;
++ int slave_type;
+ ValuatorMask *scroll;
+ int num_touches; /* size of the touches array */
+ DDXTouchPointInfoPtr touches;
diff --git a/patches/source/xorg-server/post-install/xorg-server.post-install b/patches/source/xorg-server/post-install/xorg-server.post-install
new file mode 100644
index 00000000..e21a0f03
--- /dev/null
+++ b/patches/source/xorg-server/post-install/xorg-server.post-install
@@ -0,0 +1,66 @@
+# Create the configuration directories for xorg-server 1.9.x
+mkdir -p $PKG/etc/X11/xorg.conf.d $PKG/usr/share/X11/xorg.conf.d
+
+# Create a sample keyboard layout
+# Enable zapping by default
+cat << EOF > $PKG/usr/share/X11/xorg.conf.d/90-keyboard-layout.conf
+Section "InputClass"
+ Identifier "keyboard-all"
+ MatchIsKeyboard "on"
+ MatchDevicePath "/dev/input/event*"
+ Driver "evdev"
+ Option "XkbLayout" "us"
+ #Option "XkbVariant" ""
+ Option "XkbOptions" "terminate:ctrl_alt_bksp"
+EndSection
+
+# READ THIS FOR CUSTOM KEYBOARD INFORMATION
+#
+# If you want to add a custom model/layout/variant to X, you will need to COPY
+# this file to /etc/X11/xorg.conf.d/ and edit that copy. After editing it to
+# suit, you will need to restart X.
+#
+# Here's an example of the lines from above:
+#
+# Section "InputClass"
+# Identifier "keyboard-all"
+# MatchIsKeyboard "on"
+# MatchDevicePath "/dev/input/event*"
+# Driver "evdev"
+# Option "XkbLayout" "us"
+# Option "XkbVariant" "intl"
+# Option "XkbOptions" "compose:rwin,terminate:ctrl_alt_bksp"
+# EndSection
+#
+# Many desktop environments, including KDE and Xfce, have their own methods to
+# configure keyboard layouts and such if you'd like to use them.
+#
+# If you prefer to use the "old" way of configuring keyboards (without input
+# device hotplugging), then you'll need to add the following lines to the
+# ServerFlags section of /etc/X11/xorg.conf:
+# Option "AllowEmptyInput" "false"
+# Option "AutoAddDevices" "false"
+# Option "AutoEnableDevices" "false"
+# Alternatively, you can break this up into separate "stubs" in the xorg.conf.d/
+# directory, but that's your call. Assuming you elect to keep a monolithic
+# /etc/X11/xorg.conf file, you can now edit the Keyboard section as usual.
+
+EOF
+
+# Add COPYING file:
+mkdir -p $PKG/usr/doc/xorg-server-$MODULAR_PACKAGE_VERSION
+cp -a COPYING $PKG/usr/doc/xorg-server-$MODULAR_PACKAGE_VERSION
+
+# Don't mess with my /var/log/ permissions:
+rmdir $PKG/var/log
+rmdir $PKG/var
+
+# While I hate to have X11 take over another generic-sounding
+# piece of prime filesystem real estate, this symlink will
+# direct (for now) proprietary X drivers into the corrent
+# location:
+
+( cd $PKG/usr/lib
+ rm -rf modules
+ ln -sf xorg/modules .
+)
diff --git a/patches/source/xorg-server/slack-desc/xorg-server b/patches/source/xorg-server/slack-desc/xorg-server
new file mode 100644
index 00000000..9d25b405
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server
@@ -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------------------------------------------------------|
+xorg-server: xorg-server (The Xorg server, the core of the X Window System)
+xorg-server:
+xorg-server: Xorg is a full featured X server that was originally designed for UNIX
+xorg-server: and UNIX-like operating systems running on Intel x86 hardware. It now
+xorg-server: runs on a wider range of hardware and OS platforms. This work was
+xorg-server: derived by the X.Org Foundation from the XFree86 Project's XFree86
+xorg-server: 4.4rc2 release. The XFree86 release was originally derived from X386
+xorg-server: 1.2 by Thomas Roell which was contributed to X11R5 by Snitily Graphics
+xorg-server: Consulting Service.
+xorg-server:
+xorg-server: The home page for the X project is: http://www.x.org
diff --git a/patches/source/xorg-server/slack-desc/xorg-server-xephyr b/patches/source/xorg-server/slack-desc/xorg-server-xephyr
new file mode 100644
index 00000000..640f3d18
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server-xephyr
@@ -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------------------------------------------------------|
+xorg-server-xephyr: xorg-server-xephyr (Improved nested X server/client)
+xorg-server-xephyr:
+xorg-server-xephyr: Xephyr is a nested X-Client like Xnest, but with some additional
+xorg-server-xephyr: features like XRender support.
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
+xorg-server-xephyr:
diff --git a/patches/source/xorg-server/slack-desc/xorg-server-xnest b/patches/source/xorg-server/slack-desc/xorg-server-xnest
new file mode 100644
index 00000000..393f93bd
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server-xnest
@@ -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------------------------------------------------------|
+xorg-server-xnest: xorg-server-xnest (a nested X server)
+xorg-server-xnest:
+xorg-server-xnest: Xnest is an experimental nested server for X that acts as both a
+xorg-server-xnest: client and a server. Xnest is a client of the real server which
+xorg-server-xnest: manages windows and graphics requests on its behalf. Xnest is a
+xorg-server-xnest: server to its own clients. Xnest manages windows and graphics
+xorg-server-xnest: requests on their behalf. To these clients Xnest appears to be a
+xorg-server-xnest: conventional server.
+xorg-server-xnest:
+xorg-server-xnest:
+xorg-server-xnest:
diff --git a/patches/source/xorg-server/slack-desc/xorg-server-xvfb b/patches/source/xorg-server/slack-desc/xorg-server-xvfb
new file mode 100644
index 00000000..aff9c642
--- /dev/null
+++ b/patches/source/xorg-server/slack-desc/xorg-server-xvfb
@@ -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------------------------------------------------------|
+xorg-server-xvfb: xorg-server-xvfb (virtual framebuffer X server)
+xorg-server-xvfb:
+xorg-server-xvfb: Xvfb is an X server that can run on machines with no display hardware
+xorg-server-xvfb: and no physical input devices. It emulates a dumb framebuffer using
+xorg-server-xvfb: virtual memory. The primary use of this server is intended to be
+xorg-server-xvfb: server testing. The mfb or cfb code for any depth can be exercised
+xorg-server-xvfb: with this server without the need for real hardware that supports the
+xorg-server-xvfb: desired depths. A secondary use is testing clients against unusual
+xorg-server-xvfb: depths and screen configurations.
+xorg-server-xvfb:
+xorg-server-xvfb:
diff --git a/patches/source/xorg-server/x11.SlackBuild b/patches/source/xorg-server/x11.SlackBuild
new file mode 100755
index 00000000..d2d75e4f
--- /dev/null
+++ b/patches/source/xorg-server/x11.SlackBuild
@@ -0,0 +1,381 @@
+#!/bin/sh
+# Copyright 2007-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.
+
+# To build only a single package group, specify it as $1, like:
+# ./x11.SlackBuild lib
+# To build only a single package, specify both the source directory
+# and the name of the package, like:
+# ./x11.SlackBuild lib libX11
+
+# Upgrade packages as they are built.
+# Default is to upgrade new packages (UPGRADE_PACKAGES=yes).
+# To install ALL newly built packages (even if they are already installed),
+# use UPGRADE_PACKAGES=always
+# To not upgrade, pass UPGRADE_PACKAGES=no
+UPGRADE_PACKAGES=${UPGRADE_PACKAGES:-yes}
+
+pkgbase() {
+ PKGEXT=$(echo $1 | rev | cut -f 1 -d . | rev)
+ case $PKGEXT in
+ 'gz' )
+ PKGRETURN=$(basename $1 .tar.gz)
+ ;;
+ 'bz2' )
+ PKGRETURN=$(basename $1 .tar.bz2)
+ ;;
+ 'lzma' )
+ PKGRETURN=$(basename $1 .tar.lzma)
+ ;;
+ 'xz' )
+ PKGRETURN=$(basename $1 .tar.xz)
+ ;;
+ *)
+ PKGRETURN=$(basename $1)
+ ;;
+ esac
+ echo $PKGRETURN
+}
+
+# Set initial variables:
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# A lot of this stuff just controls the package names this time:
+VERSION=${VERSION:-7.5}
+BUILD=${BUILD:-1}
+PKGARCH=$ARCH
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
+
+# Set up a few useful functions:
+
+fix_perms() {
+ 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 {} \;
+}
+
+process_man_pages() {
+ # Compress and if needed symlink the man pages:
+ if [ -d usr/man ]; then
+ ( cd 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
+}
+
+process_info_pages() {
+ # Compress info pages and purge "dir" file from the package:
+ if [ -d usr/info ]; then
+ ( cd usr/info
+ rm -f dir
+ gzip -9 *
+ )
+ fi
+}
+
+no_usr_share_doc() {
+ # If there are docs, move them:
+ if [ -d usr/share/doc ]; then
+ mkdir -p usr/doc
+ mv usr/share/doc/* usr/doc
+ rmdir usr/share/doc
+ fi
+}
+
+# Set the compile options for the $ARCH being used:
+. $CWD/arch.use.flags
+
+SLACK_X_BUILD_DIR=$TMP/x11-build
+mkdir -p $SLACK_X_BUILD_DIR
+
+# Better have some binaries installed first, as this may not be
+# in the "magic order". I built mine by hand through trial-and-error
+# before getting this script to work. It wasn't that hard... I think. ;-)
+( cd src
+ for x_source_dir in proto data util xcb lib app doc xserver driver font ; do
+ # See if $1 is a source directory like "lib":
+ if [ ! -z "$1" ]; then
+ if [ ! "$1" = "${x_source_dir}" ]; then
+ continue
+ fi
+ fi
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+ rm -rf $PKG
+ mkdir -p $PKG
+ ( cd $x_source_dir
+ for x_pkg in *.tar.?z* ; do
+ # Reset $PKGARCH to its initial value:
+ PKGARCH=$ARCH
+ PKGNAME=$(echo $x_pkg | rev | cut -f 2- -d - | rev)
+ # Perhaps $PKGARCH should be something different:
+ if grep -wq "^$PKGNAME" ${CWD}/noarch ; then
+ PKGARCH=noarch
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/package-blacklist ; then
+ continue
+ fi
+ cd $SLACK_X_BUILD_DIR
+ # If $2 is set, we only want to build one package:
+ if [ ! -z "$2" ]; then
+ if [ "$2" = "$PKGNAME" ]; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ else
+ continue
+ fi
+ else
+ echo
+ echo "Building from source ${x_pkg}"
+ echo
+ fi
+ if grep -wq "^$PKGNAME" ${CWD}/modularize ; then
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_X_BUILD_DIR/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+ fi
+
+ # Let's figure out the version number on the modular package:
+ MODULAR_PACKAGE_VERSION=$(echo $x_pkg | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+
+ rm -rf $(pkgbase $x_pkg)
+ tar xf $CWD/src/${x_source_dir}/${x_pkg} || exit 1
+ cd $(pkgbase $x_pkg) || exit 1
+
+ fix_perms
+
+ # If any patches are needed, call this script to apply them:
+ if [ -r $CWD/patch/${PKGNAME}.patch ]; then
+ . $CWD/patch/${PKGNAME}.patch
+ fi
+
+ # I heard somewhere that -O2 breaks some chipset or another. If you encounter
+ # problems, please contact volkerdi@slackware.com. Thanks! :-)
+
+ # ./configure, using custom configure script if needed:
+ if [ -r $CWD/configure/${PKGNAME} ]; then
+ . $CWD/configure/${PKGNAME}
+ else
+ # This is the default configure script:
+ . $CWD/configure/configure
+ fi
+
+ if ! make $NUMJOBS ; then
+ touch ${SLACK_X_BUILD_DIR}/${PKGNAME}.failed
+ continue
+ fi
+
+ make install DESTDIR=$PKG
+
+ mkdir -p $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_VERSION}
+ cp -a \
+ AUTHORS* COPYING* INSTALL* README* NEWS* TODO* \
+ $PKG/usr/doc/${PKGNAME}-${MODULAR_PACKAGE_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/${PKGNAME}-$MODULAR_PACKAGE_VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+ fi
+
+ # Get rid of zero-length junk files:
+ find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
+ rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
+
+ # 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
+ find . | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ )
+
+ # If there's any special post-install things to do, do them:
+ if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/${PKGNAME}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+
+ # If this package requires some doinst.sh material, add it here:
+ if [ -r $CWD/doinst.sh/${PKGNAME} ]; then
+ mkdir -p $PKG/install
+ cat $CWD/doinst.sh/${PKGNAME} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+
+ # If this is a modular package, build it here:
+ if [ -d $SLACK_X_BUILD_DIR/package-$PKGNAME ]; then
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/${PKGNAME} ]; then
+ cat $CWD/slack-desc/${PKGNAME} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ fi
+ fi
+ fi
+
+ # Reset $PKG to assume we're building the whole source dir:
+ PKG=${SLACK_X_BUILD_DIR}/package-${x_source_dir}
+
+ done
+
+ # Nothing here? Must have been fully modular. :-)
+ if [ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/etc -a \
+ ! -d ${SLACK_X_BUILD_DIR}/package-${x_source_dir}/usr ]; then
+ continue
+ fi
+
+ # Build an "x11-<sourcedir>" package for anything that wasn't built modular:
+ # It's safer to consider these to have binaries in them. ;-)
+ PKGARCH=$ARCH
+ cd $PKG
+ process_man_pages
+ process_info_pages
+ no_usr_share_doc
+ # If there are post-install things to do for the combined package,
+ # we do them here. This could be used for things like making a
+ # VERSION number for a combined package. :-)
+ if [ -r $CWD/post-install/x11-${x_source_dir}.post-install ]; then
+ RUNSCRIPT=$(mktemp -p $TMP) || exit 1
+ cat $CWD/post-install/x11-${x_source_dir}.post-install \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" > $RUNSCRIPT
+ . $RUNSCRIPT
+ rm -f $RUNSCRIPT
+ fi
+ mkdir -p $PKG/install
+ if [ -r $CWD/slack-desc/x11-${x_source_dir} ]; then
+ cat $CWD/slack-desc/x11-${x_source_dir} > $PKG/install/slack-desc
+ else
+ touch $PKG/install/slack-desc-missing
+ fi
+ if [ -r $CWD/doinst.sh/x11-${x_source_dir} ]; then
+ cat $CWD/doinst.sh/x11-${x_source_dir} \
+ | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
+ >> $PKG/install/doinst.sh
+ fi
+ if [ -r $CWD/build/x11-${PKGNAME} ]; then
+ SRCDIRBUILD=$(cat $CWD/build/x11-${PKGNAME})
+ else
+ SRCDIRBUILD=$BUILD
+ fi
+ if [ -r $CWD/makepkg/${PKGNAME} ]; then
+ BUILD=$MODBUILD . $CWD/makepkg/${PKGNAME}
+ else
+ /sbin/makepkg -l y -c n ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ if [ "$UPGRADE_PACKAGES" = "yes" ]; then
+ /sbin/upgradepkg --install-new ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ elif [ "$UPGRADE_PACKAGES" = "always" ]; then
+ /sbin/upgradepkg --install-new --reinstall ${SLACK_X_BUILD_DIR}/x11-${x_source_dir}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
+ fi
+ fi
+ )
+ done
+)
+
+exit 0
+
+# I don't think I'll be using the following stuff, since I went for the latest in
+# "individual", rather than a release. That was mostly because version 7.1 depends
+# on a version of Mesa that won't build against kernel headers this new (&etc.).
+
+# If environment variable "REFRESH" is exported, start by refreshing the source tree:
+# export REFRESH yes
+if [ ! -z "$REFRESH" ]; then
+ # Only works once, unless you uncomment above.
+ unset REFRESH
+ ( cd patches
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/patches
+ mirror --delete --dereference .
+ exit"
+ chmod 644 *
+ )
+ ( cd src
+ mkdir -p update everything
+ for dir in app data deprecated doc driver extras font lib proto util xserver ; do
+ # We won't really download "update", as problems ensue. Plus, --dereference is
+ # bringing us updated files when needed, so it's redundant (like "everything").
+ if [ ! -d $dir ]; then
+ mkdir $dir
+ fi
+ ( cd $dir
+ lftp -c \
+ "lftp ftp://ftp.x.org:/pub/X11R7.1/src/$dir
+ mirror -c --delete --dereference --include-glob "*.tar.bz2" .
+ exit"
+ chmod 644 *
+ )
+ done
+ )
+fi
+
diff --git a/patches/source/xorg-server/xorg-server.SlackBuild b/patches/source/xorg-server/xorg-server.SlackBuild
new file mode 100755
index 00000000..688448ec
--- /dev/null
+++ b/patches/source/xorg-server/xorg-server.SlackBuild
@@ -0,0 +1,2 @@
+UPGRADE_PACKAGES=no ./x11.SlackBuild xserver xorg-server
+mv /tmp/x11-build/*txz /tmp
diff --git a/patches/source/xscreensaver/dump.android.osx.sources.sh b/patches/source/xscreensaver/dump.android.osx.sources.sh
new file mode 100755
index 00000000..3993f510
--- /dev/null
+++ b/patches/source/xscreensaver/dump.android.osx.sources.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Repacks the xscreensaver tarball to remove the unneeded OSX sources.
+
+VERSION=${VERSION:-$(echo xscreensaver-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+
+tar xf xscreensaver-${VERSION}.tar.xz || exit 1
+mv xscreensaver-${VERSION}.tar.xz xscreensaver-${VERSION}.tar.xz.orig
+rm -r xscreensaver-${VERSION}/OSX/*
+rm -r xscreensaver-${VERSION}/android/*
+tar cf xscreensaver-${VERSION}.tar xscreensaver-${VERSION}
+rm -r xscreensaver-${VERSION}
+xz -9 xscreensaver-${VERSION}.tar
+touch -r xscreensaver-${VERSION}.tar.xz.orig xscreensaver-${VERSION}.tar.xz
+rm xscreensaver-${VERSION}.tar.xz.orig
diff --git a/patches/source/xscreensaver/setuid.c b/patches/source/xscreensaver/setuid.c
new file mode 100644
index 00000000..343dcf09
--- /dev/null
+++ b/patches/source/xscreensaver/setuid.c
@@ -0,0 +1,274 @@
+/* setuid.c --- management of runtime privileges.
+ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation. No representations are made about the suitability of this
+ * software for any purpose. It is provided "as is" without express or
+ * implied warranty.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <X11/Xlib.h> /* not used for much... */
+
+/* This file doesn't need the Xt headers, so stub these types out... */
+#undef XtPointer
+#define XtAppContext void*
+#define XrmDatabase void*
+#define XtIntervalId void*
+#define XtPointer void*
+#define Widget void*
+
+#include "xscreensaver.h"
+
+#ifndef EPERM
+#include <errno.h>
+#endif
+
+#include <pwd.h> /* for getpwnam() and struct passwd */
+#include <grp.h> /* for getgrgid() and struct group */
+
+static const char *
+uid_gid_string (uid_t uid, gid_t gid)
+{
+ static char buf[255];
+ struct passwd *p = 0;
+ struct group *g = 0;
+ p = getpwuid (uid);
+ g = getgrgid (gid);
+ sprintf (buf, "%s/%s (%ld/%ld)",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+ return buf;
+}
+
+
+void
+describe_uids (saver_info *si, FILE *out)
+{
+ uid_t uid = getuid();
+ gid_t gid = getgid();
+ uid_t euid = geteuid();
+ gid_t egid = getegid();
+ char *s1 = strdup (uid_gid_string (uid, gid));
+ char *s2 = strdup (uid_gid_string (euid, egid));
+
+ if (si->orig_uid && *si->orig_uid &&
+ (!!strcmp (si->orig_uid, s1) ||
+ !!strcmp (si->orig_uid, s2)))
+ fprintf (out, "%s: initial effective uid/gid was %s\n", blurb(),
+ si->orig_uid);
+
+ fprintf (out, "%s: running as %s", blurb(), s1);
+ if (uid != euid || gid != egid)
+ fprintf (out, "; effectively %s", s2);
+ fprintf(out, "\n");
+ free(s1);
+ free(s2);
+}
+
+
+static int
+set_ids_by_number (uid_t uid, gid_t gid, char **message_ret)
+{
+ int uid_errno = 0;
+ int gid_errno = 0;
+ struct passwd *p = getpwuid (uid);
+ struct group *g = getgrgid (gid);
+
+ if (message_ret)
+ *message_ret = 0;
+
+ /* Rumor has it that some implementations of of setuid() do nothing
+ when called with -1; therefore, if the "nobody" user has a uid of
+ -1, then that would be Really Bad. Rumor further has it that such
+ systems really ought to be using -2 for "nobody", since that works.
+ So, if we get a uid (or gid, for good measure) of -1, switch to -2
+ instead. Note that this must be done after we've looked up the
+ user/group names with getpwuid(-1) and/or getgrgid(-1).
+ */
+ if (gid == (gid_t) -1) gid = (gid_t) -2;
+ if (uid == (uid_t) -1) uid = (uid_t) -2;
+
+ errno = 0;
+ if (setgid (gid) != 0)
+ gid_errno = errno ? errno : -1;
+
+ errno = 0;
+ if (setuid (uid) != 0)
+ uid_errno = errno ? errno : -1;
+
+ if (uid_errno == 0 && gid_errno == 0)
+ {
+ static char buf [1024];
+ sprintf (buf, "changed uid/gid to %s/%s (%ld/%ld).",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+ if (message_ret)
+ *message_ret = buf;
+ return 0;
+ }
+ else
+ {
+ char buf [1024];
+ if (gid_errno)
+ {
+ sprintf (buf, "%s: couldn't set gid to %s (%ld)",
+ blurb(),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) gid);
+ if (gid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+ perror(buf);
+ }
+
+ if (uid_errno)
+ {
+ sprintf (buf, "%s: couldn't set uid to %s (%ld)",
+ blurb(),
+ (p && p->pw_name ? p->pw_name : "???"),
+ (long) uid);
+ if (uid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+ perror(buf);
+ }
+
+ return -1;
+ }
+}
+
+
+/* If we've been run as setuid or setgid to someone else (most likely root)
+ turn off the extra permissions so that random user-specified programs
+ don't get special privileges. (On some systems it is necessary to install
+ this program as setuid root in order to read the passwd file to implement
+ lock-mode.)
+
+ *** WARNING: DO NOT DISABLE ANY OF THE FOLLOWING CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+void
+hack_uid (saver_info *si)
+{
+
+ /* Discard privileges, and set the effective user/group ids to the
+ real user/group ids. That is, give up our "chmod +s" rights.
+ */
+ {
+ uid_t euid = geteuid();
+ gid_t egid = getegid();
+ uid_t uid = getuid();
+ gid_t gid = getgid();
+
+ si->orig_uid = strdup (uid_gid_string (euid, egid));
+
+ if (uid != euid || gid != egid)
+ if (set_ids_by_number (uid, gid, &si->uid_message) != 0)
+ saver_exit (si, 1, 0);
+ }
+
+
+ /* Locking can't work when running as root, because we have no way of
+ knowing what the user id of the logged in user is (so we don't know
+ whose password to prompt for.)
+
+ *** WARNING: DO NOT DISABLE THIS CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+ if (getuid() == (uid_t) 0)
+ {
+ si->locking_disabled_p = True;
+ si->nolock_reason = "running as root";
+ }
+
+
+ /* If we're running as root, switch to a safer user. This is above and
+ beyond the fact that we've disabling locking, above -- the theory is
+ that running graphics demos as root is just always a stupid thing
+ to do, since they have probably never been security reviewed and are
+ more likely to be buggy than just about any other kind of program.
+ (And that assumes non-malicious code. There are also attacks here.)
+
+ *** WARNING: DO NOT DISABLE THIS CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+ if (getuid() == (uid_t) 0)
+ {
+ struct passwd *p;
+
+ p = getpwnam ("nobody");
+ if (! p) p = getpwnam ("noaccess");
+ if (! p) p = getpwnam ("daemon");
+ if (! p)
+ {
+ fprintf (stderr,
+ "%s: running as root, and couldn't find a safer uid.\n",
+ blurb());
+ saver_exit(si, 1, 0);
+ }
+
+ if (set_ids_by_number (p->pw_uid, p->pw_gid, &si->uid_message) != 0)
+ saver_exit (si, -1, 0);
+ }
+
+
+ /* If there's anything even remotely funny looking about the passwd struct,
+ or if we're running as some other user from the list below (a
+ non-comprehensive selection of users known to be privileged in some way,
+ and not normal end-users) then disable locking. If it was possible,
+ switching to "nobody" would be the thing to do, but only root itself has
+ the privs to do that.
+
+ *** WARNING: DO NOT DISABLE THIS CODE!
+ If you do so, you will open a security hole. See the sections
+ of the xscreensaver manual titled "LOCKING AND ROOT LOGINS",
+ and "USING XDM".
+ */
+ {
+ uid_t uid = getuid (); /* get it again */
+ struct passwd *p = getpwuid (uid); /* get it again */
+
+ if (!p ||
+ uid == (uid_t) 0 ||
+ uid == (uid_t) -1 ||
+ uid == (uid_t) -2 ||
+ p->pw_uid == (uid_t) 0 ||
+ p->pw_uid == (uid_t) -1 ||
+ p->pw_uid == (uid_t) -2 ||
+ !p->pw_name ||
+ !*p->pw_name ||
+ !strcmp (p->pw_name, "root") ||
+ !strcmp (p->pw_name, "nobody") ||
+ !strcmp (p->pw_name, "noaccess") ||
+ !strcmp (p->pw_name, "operator") ||
+ !strcmp (p->pw_name, "daemon") ||
+ !strcmp (p->pw_name, "bin") ||
+ !strcmp (p->pw_name, "adm") ||
+ !strcmp (p->pw_name, "sys") ||
+ !strcmp (p->pw_name, "games"))
+ {
+ static char buf [1024];
+ sprintf (buf, "running as %s",
+ (p && p->pw_name && *p->pw_name
+ ? p->pw_name : "<unknown>"));
+ si->nolock_reason = buf;
+ si->locking_disabled_p = True;
+ si->dangerous_uid_p = True;
+ }
+ }
+}
diff --git a/patches/source/xscreensaver/slack-desc b/patches/source/xscreensaver/slack-desc
new file mode 100644
index 00000000..ea0efe02
--- /dev/null
+++ b/patches/source/xscreensaver/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------------------------------------------------------|
+xscreensaver: xscreensaver (a screen saver and locker for X)
+xscreensaver:
+xscreensaver: A modular screen saver and locker for the X Window System. Highly
+xscreensaver: customizable: allows the use of any program that can draw on the
+xscreensaver: root window as a display mode. More than 100 display modes are
+xscreensaver: included in this package.
+xscreensaver:
+xscreensaver: Homepage: http://www.jwz.org/xscreensaver
+xscreensaver:
+xscreensaver:
+xscreensaver:
diff --git a/patches/source/xscreensaver/xscreensaver-getimage-file-5.14 b/patches/source/xscreensaver/xscreensaver-getimage-file-5.14
new file mode 100644
index 00000000..bc7bcbd9
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver-getimage-file-5.14
@@ -0,0 +1,555 @@
+#!/usr/bin/perl -w
+# Copyright © 2001-2011 Jamie Zawinski <jwz@jwz.org>.
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation. No representations are made about the suitability of this
+# software for any purpose. It is provided "as is" without express or
+# implied warranty.
+#
+# This program chooses a random file from under the given directory, and
+# prints its name. The file will be an image file whose dimensions are
+# larger than a certain minimum size.
+#
+# The various xscreensaver hacks that manipulate images ("jigsaw", etc.) get
+# the image to manipulate by running the "xscreensaver-getimage" program.
+#
+# Under X11, the "xscreensaver-getimage" program invokes this script,
+# depending on the value of the "chooseRandomImages" and "imageDirectory"
+# settings in the ~/.xscreensaver file (or .../app-defaults/XScreenSaver).
+# The screen savers invoke "xscreensaver-getimage" via utils/grabclient.c,
+# which then invokes this script.
+#
+# Under Cocoa, this script lives inside the .saver bundle, and is invoked
+# directly from utils/grabclient.c.
+#
+# Created: 12-Apr-01.
+
+require 5;
+#use diagnostics; # Fails on some MacOS 10.5 systems
+use strict;
+
+use POSIX;
+use Fcntl;
+
+use Fcntl ':flock'; # import LOCK_* constants
+
+use POSIX ':fcntl_h'; # S_ISDIR was here in Perl 5.6
+import Fcntl ':mode' unless defined &S_ISUID; # but it is here in Perl 5.8
+ # but in Perl 5.10, both of these load, and cause errors!
+ # So we have to check for S_ISUID instead of S_ISDIR? WTF?
+
+use bytes; # Larry can take Unicode and shove it up his ass sideways.
+ # Perl 5.8.0 causes us to start getting incomprehensible
+ # errors about UTF-8 all over the place without this.
+
+my $progname = $0; $progname =~ s@.*/@@g;
+my $version = q{ $Revision: 1.29 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+
+my $verbose = 0;
+
+# Whether to use MacOS X's Spotlight to generate the list of files.
+# When set to -1, uses Spotlight if "mdfind" exists.
+#
+# (In my experience, this isn't actually any faster, and might not find
+# everything if your Spotlight index is out of date, which happens often.)
+#
+my $use_spotlight_p = 0;
+
+# Whether to cache the results of the last run.
+#
+my $cache_p = 1;
+
+# Regenerate the cache if it is older than this many seconds.
+#
+my $cache_max_age = 60 * 60 * 3; # 3 hours
+
+
+# This matches files that we are allowed to use as images (case-insensitive.)
+# Anything not matching this is ignored. This is so you can point your
+# imageDirectory at directory trees that have things other than images in
+# them, but it assumes that you gave your images sensible file extensions.
+#
+my @good_extensions = ('jpg', 'jpeg', 'pjpeg', 'pjpg', 'png', 'gif',
+ 'tif', 'tiff', 'xbm', 'xpm');
+my $good_file_re = '\.(' . join("|", @good_extensions) . ')$';
+
+# This matches file extensions that might occur in an image directory,
+# and that are never used in the name of a subdirectory. This is an
+# optimization that prevents us from having to stat() those files to
+# tell whether they are directories or not. (It speeds things up a
+# lot. Don't give your directories stupid names.)
+#
+my @nondir_extensions = ('ai', 'bmp', 'bz2', 'cr2', 'crw', 'db',
+ 'dmg', 'eps', 'gz', 'hqx', 'htm', 'html', 'icns', 'ilbm', 'mov',
+ 'nef', 'pbm', 'pdf', 'pl', 'ppm', 'ps', 'psd', 'sea', 'sh', 'shtml',
+ 'tar', 'tgz', 'thb', 'txt', 'xcf', 'xmp', 'Z', 'zip' );
+my $nondir_re = '\.(' . join("|", @nondir_extensions) . ')$';
+
+
+# JPEG, GIF, and PNG files that are are smaller than this are rejected:
+# this is so that you can use an image directory that contains both big
+# images and thumbnails, and have it only select the big versions.
+#
+my $min_image_width = 255;
+my $min_image_height = 255;
+
+my @all_files = (); # list of "good" files we've collected
+my %seen_inodes; # for breaking recursive symlink loops
+
+# For diagnostic messages:
+#
+my $dir_count = 1; # number of directories seen
+my $stat_count = 0; # number of files/dirs stat'ed
+my $skip_count_unstat = 0; # number of files skipped without stat'ing
+my $skip_count_stat = 0; # number of files skipped after stat
+
+sub find_all_files($);
+sub find_all_files($) {
+ my ($dir) = @_;
+
+ print STDERR "$progname: + reading dir $dir/...\n" if ($verbose > 1);
+
+ my $dd;
+ if (! opendir ($dd, $dir)) {
+ print STDERR "$progname: couldn't open $dir: $!\n" if ($verbose);
+ return;
+ }
+ my @files = readdir ($dd);
+ closedir ($dd);
+
+ my @dirs = ();
+
+ foreach my $file (@files) {
+ next if ($file =~ m/^\./); # silently ignore dot files/dirs
+
+ if ($file =~ m/[~%\#]$/) { # ignore backup files (and dirs...)
+ $skip_count_unstat++;
+ print STDERR "$progname: - skip file $file\n" if ($verbose > 1);
+ }
+
+ $file = "$dir/$file";
+
+ if ($file =~ m/$good_file_re/io) {
+ #
+ # Assume that files ending in .jpg exist and are not directories.
+ #
+ push @all_files, $file;
+ print STDERR "$progname: - found file $file\n" if ($verbose > 1);
+
+ } elsif ($file =~ m/$nondir_re/io) {
+ #
+ # Assume that files ending in .html are not directories.
+ #
+ $skip_count_unstat++;
+ print STDERR "$progname: -- skip file $file\n" if ($verbose > 1);
+
+ } else {
+ #
+ # Now we need to stat the file to see if it's a subdirectory.
+ #
+ # Note: we could use the trick of checking "nlinks" on the parent
+ # directory to see if this directory contains any subdirectories,
+ # but that would exclude any symlinks to directories.
+ #
+ my @st = stat($file);
+ my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
+ $atime,$mtime,$ctime,$blksize,$blocks) = @st;
+
+ $stat_count++;
+
+ if ($#st == -1) {
+ if ($verbose) {
+ my $ll = readlink $file;
+ if (defined ($ll)) {
+ print STDERR "$progname: + dangling symlink: $file -> $ll\n";
+ } else {
+ print STDERR "$progname: + unreadable: $file\n";
+ }
+ }
+ next;
+ }
+
+ next if ($seen_inodes{"$dev:$ino"}); # break symlink loops
+ $seen_inodes{"$dev:$ino"} = 1;
+
+ if (S_ISDIR($mode)) {
+ push @dirs, $file;
+ $dir_count++;
+ print STDERR "$progname: + found dir $file\n" if ($verbose > 1);
+
+ } else {
+ $skip_count_stat++;
+ print STDERR "$progname: + skip file $file\n" if ($verbose > 1);
+ }
+ }
+ }
+
+ foreach (@dirs) {
+ find_all_files ($_);
+ }
+}
+
+
+sub spotlight_all_files($) {
+ my ($dir) = @_;
+
+ my @terms = ();
+ # "public.image" matches all (indexed) images, including Photoshop, etc.
+# push @terms, "kMDItemContentTypeTree == 'public.image'";
+ foreach (@good_extensions) {
+
+ # kMDItemFSName hits the file system every time: much worse than "find".
+# push @terms, "kMDItemFSName == '*.$_'";
+
+ # kMDItemDisplayName matches against the name in the Spotlight index,
+ # but won't find files that (for whatever reason) didn't get indexed.
+ push @terms, "kMDItemDisplayName == '*.$_'";
+ }
+
+ $dir =~ s@([^-_/a-z\d.,])@\\$1@gsi; # quote for sh
+ my $cmd = "mdfind -onlyin $dir \"" . join (' || ', @terms) . "\"";
+
+ print STDERR "$progname: executing: $cmd\n" if ($verbose > 1);
+ @all_files = split (/[\r\n]+/, `$cmd`);
+}
+
+
+# If we're using cacheing, read the cache file and return its contents,
+# if any. This also holds an exclusive lock on the cache file, which
+# has the additional benefit that if two copies of this program are
+# running at once, one will wait for the other, instead of both of
+# them spanking the same file system at the same time.
+#
+my $cache_fd = undef;
+my $cache_file_name = undef;
+my $read_cache_p = 0;
+
+sub read_cache($) {
+ my ($dir) = @_;
+
+ return () unless ($cache_p);
+
+ my $dd = "$ENV{HOME}/Library/Caches"; # MacOS location
+ if (-d $dd) {
+ $cache_file_name = "$dd/org.jwz.xscreensaver.getimage.cache";
+ } elsif (-d "$ENV{HOME}/tmp") {
+ $cache_file_name = "$ENV{HOME}/tmp/.xscreensaver-getimage.cache";
+ } else {
+ $cache_file_name = "$ENV{HOME}/.xscreensaver-getimage.cache";
+ }
+
+ print STDERR "$progname: awaiting lock: $cache_file_name\n"
+ if ($verbose > 1);
+
+ my $file = $cache_file_name;
+ open ($cache_fd, '+>>', $file) || error ("unable to write $file: $!");
+ flock ($cache_fd, LOCK_EX) || error ("unable to lock $file: $!");
+ seek ($cache_fd, 0, 0) || error ("unable to rewind $file: $!");
+
+ my $mtime = (stat($cache_fd))[9];
+
+ if ($mtime + $cache_max_age < time) {
+ print STDERR "$progname: cache is too old\n" if ($verbose);
+ return ();
+ }
+
+ my $odir = <$cache_fd>;
+ $odir =~ s/[\r\n]+$//s if defined ($odir);
+ if (!defined ($odir) || ($dir ne $odir)) {
+ print STDERR "$progname: cache is for $odir, not $dir\n"
+ if ($verbose && $odir);
+ return ();
+ }
+
+ my @files = ();
+ while (<$cache_fd>) {
+ s/[\r\n]+$//s;
+ push @files, "$odir/$_";
+ }
+
+ print STDERR "$progname: " . ($#files+1) . " files in cache\n"
+ if ($verbose);
+
+ $read_cache_p = 1;
+ return @files;
+}
+
+
+sub write_cache($) {
+ my ($dir) = @_;
+
+ return unless ($cache_p);
+
+ # If we read the cache, just close it without rewriting it.
+ # If we didn't read it, then write it now.
+
+ if (! $read_cache_p) {
+
+ truncate ($cache_fd, 0) ||
+ error ("unable to truncate $cache_file_name: $!");
+ seek ($cache_fd, 0, 0) ||
+ error ("unable to rewind $cache_file_name: $!");
+
+ if ($#all_files >= 0) {
+ print $cache_fd "$dir\n";
+ foreach (@all_files) {
+ my $f = $_; # stupid Perl. do this to avoid modifying @all_files!
+ $f =~ s@^\Q$dir\L/@@so || die; # remove $dir from front
+ print $cache_fd "$f\n";
+ }
+ }
+
+ print STDERR "$progname: cached " . ($#all_files+1) . " files\n"
+ if ($verbose);
+ }
+
+ flock ($cache_fd, LOCK_UN) ||
+ error ("unable to unlock $cache_file_name: $!");
+ close ($cache_fd);
+ $cache_fd = undef;
+}
+
+
+sub find_random_file($) {
+ my ($dir) = @_;
+
+ if ($use_spotlight_p == -1) {
+ $use_spotlight_p = 0;
+ if (-x '/usr/bin/mdfind') {
+ $use_spotlight_p = 1;
+ }
+ }
+
+ @all_files = read_cache ($dir);
+
+ if ($#all_files >= 0) {
+ # got it from the cache...
+
+ } elsif ($use_spotlight_p) {
+ print STDERR "$progname: spotlighting $dir...\n" if ($verbose);
+ spotlight_all_files ($dir);
+ print STDERR "$progname: found " . ($#all_files+1) .
+ " file" . ($#all_files == 0 ? "" : "s") .
+ " via Spotlight\n"
+ if ($verbose);
+ } else {
+ print STDERR "$progname: recursively reading $dir...\n" if ($verbose);
+ find_all_files ($dir);
+ print STDERR "$progname: " .
+ "f=" . ($#all_files+1) . "; " .
+ "d=$dir_count; " .
+ "s=$stat_count; " .
+ "skip=${skip_count_unstat}+$skip_count_stat=" .
+ ($skip_count_unstat + $skip_count_stat) .
+ ".\n"
+ if ($verbose);
+ }
+
+ write_cache ($dir);
+
+# @all_files = sort(@all_files);
+
+ if ($#all_files < 0) {
+ print STDERR "$progname: no files in $dir\n";
+ exit 1;
+ }
+
+ my $max_tries = 50;
+ for (my $i = 0; $i < $max_tries; $i++) {
+
+ my $n = int (rand ($#all_files + 1));
+ my $file = $all_files[$n];
+ if (large_enough_p ($file)) {
+ $file =~ s@^\Q$dir\L/@@so || die; # remove $dir from front
+ return $file;
+ }
+ }
+
+ print STDERR "$progname: no suitable images in $dir " .
+ "(after $max_tries tries)\n";
+ exit 1;
+}
+
+
+sub large_enough_p($) {
+ my ($file) = @_;
+
+ my ($w, $h) = image_file_size ($file);
+
+ if (!defined ($h)) {
+ print STDERR "$progname: $file: unable to determine image size\n"
+ if ($verbose);
+ # Assume that unknown files are of good sizes: this will happen if
+ # they matched $good_file_re, but we don't have code to parse them.
+ # (This will also happen if the file is junk...)
+ return 1;
+ }
+
+ if ($w < $min_image_width || $h < $min_image_height) {
+ print STDERR "$progname: $file: too small ($w x $h)\n" if ($verbose);
+ return 0;
+ }
+
+ print STDERR "$progname: $file: $w x $h\n" if ($verbose);
+ return 1;
+}
+
+
+
+# Given the raw body of a GIF document, returns the dimensions of the image.
+#
+sub gif_size($) {
+ my ($body) = @_;
+ my $type = substr($body, 0, 6);
+ my $s;
+ return () unless ($type =~ /GIF8[7,9]a/);
+ $s = substr ($body, 6, 10);
+ my ($a,$b,$c,$d) = unpack ("C"x4, $s);
+ return (($b<<8|$a), ($d<<8|$c));
+}
+
+# Given the raw body of a JPEG document, returns the dimensions of the image.
+#
+sub jpeg_size($) {
+ my ($body) = @_;
+ my $i = 0;
+ my $L = length($body);
+
+ my $c1 = substr($body, $i, 1); $i++;
+ my $c2 = substr($body, $i, 1); $i++;
+ return () unless (ord($c1) == 0xFF && ord($c2) == 0xD8);
+
+ my $ch = "0";
+ while (ord($ch) != 0xDA && $i < $L) {
+ # Find next marker, beginning with 0xFF.
+ while (ord($ch) != 0xFF) {
+ return () if (length($body) <= $i);
+ $ch = substr($body, $i, 1); $i++;
+ }
+ # markers can be padded with any number of 0xFF.
+ while (ord($ch) == 0xFF) {
+ return () if (length($body) <= $i);
+ $ch = substr($body, $i, 1); $i++;
+ }
+
+ # $ch contains the value of the marker.
+ my $marker = ord($ch);
+
+ if (($marker >= 0xC0) &&
+ ($marker <= 0xCF) &&
+ ($marker != 0xC4) &&
+ ($marker != 0xCC)) { # it's a SOFn marker
+ $i += 3;
+ return () if (length($body) <= $i);
+ my $s = substr($body, $i, 4); $i += 4;
+ my ($a,$b,$c,$d) = unpack("C"x4, $s);
+ return (($c<<8|$d), ($a<<8|$b));
+
+ } else {
+ # We must skip variables, since FFs in variable names aren't
+ # valid JPEG markers.
+ return () if (length($body) <= $i);
+ my $s = substr($body, $i, 2); $i += 2;
+ my ($c1, $c2) = unpack ("C"x2, $s);
+ my $length = ($c1 << 8) | $c2;
+ return () if ($length < 2);
+ $i += $length-2;
+ }
+ }
+ return ();
+}
+
+# Given the raw body of a PNG document, returns the dimensions of the image.
+#
+sub png_size($) {
+ my ($body) = @_;
+ return () unless ($body =~ m/^\211PNG\r/s);
+ my ($bits) = ($body =~ m/^.{12}(.{12})/s);
+ return () unless defined ($bits);
+ return () unless ($bits =~ /^IHDR/);
+ my ($ign, $w, $h) = unpack("a4N2", $bits);
+ return ($w, $h);
+}
+
+
+# Given the raw body of a GIF, JPEG, or PNG document, returns the dimensions
+# of the image.
+#
+sub image_size($) {
+ my ($body) = @_;
+ return () if (length($body) < 10);
+ my ($w, $h) = gif_size ($body);
+ if ($w && $h) { return ($w, $h); }
+ ($w, $h) = jpeg_size ($body);
+ if ($w && $h) { return ($w, $h); }
+ # #### TODO: need image parsers for TIFF, XPM, XBM.
+ return png_size ($body);
+}
+
+# Returns the dimensions of the image file.
+#
+sub image_file_size($) {
+ my ($file) = @_;
+ my $in;
+ if (! open ($in, '<', $file)) {
+ print STDERR "$progname: $file: $!\n" if ($verbose);
+ return undef;
+ }
+ binmode ($in); # Larry can take Unicode and shove it up his ass sideways.
+ my $body = '';
+ sysread ($in, $body, 1024 * 50); # The first 50k should be enough.
+ close $in; # (It's not for certain huge jpegs...
+ return image_size ($body); # but we know they're huge!)
+}
+
+
+sub error($) {
+ my ($err) = @_;
+ print STDERR "$progname: $err\n";
+ exit 1;
+}
+
+sub usage() {
+ print STDERR "usage: $progname [--verbose] directory\n" .
+ " Prints the name of a randomly-selected image file. The directory\n" .
+ " is searched recursively. Images smaller than " .
+ "${min_image_width}x${min_image_height} are excluded.\n";
+ exit 1;
+}
+
+sub main() {
+ my $dir = undef;
+
+ while ($_ = $ARGV[0]) {
+ shift @ARGV;
+ if ($_ eq "--verbose") { $verbose++; }
+ elsif (m/^-v+$/) { $verbose += length($_)-1; }
+ elsif ($_ eq "--name") { } # ignored, for compatibility
+ elsif ($_ eq "--spotlight") { $use_spotlight_p = 1; }
+ elsif ($_ eq "--no-spotlight") { $use_spotlight_p = 0; }
+ elsif ($_ eq "--cache") { $cache_p = 1; }
+ elsif ($_ eq "--no-cache") { $cache_p = 0; }
+ elsif (m/^-./) { usage; }
+ elsif (!defined($dir)) { $dir = $_; }
+ else { usage; }
+ }
+
+ usage unless (defined($dir));
+
+ $dir =~ s@^~/@$ENV{HOME}/@s; # allow literal "~/"
+ $dir =~ s@/+$@@s; # omit trailing /
+
+ if (! -d $dir) {
+ print STDERR "$progname: $dir: not a directory\n";
+ usage;
+ }
+
+ my $file = find_random_file ($dir);
+ print STDOUT "$file\n";
+}
+
+main;
+exit 0;
diff --git a/patches/source/xscreensaver/xscreensaver.SlackBuild b/patches/source/xscreensaver/xscreensaver.SlackBuild
new file mode 100755
index 00000000..3846d532
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.SlackBuild
@@ -0,0 +1,141 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2012, 2013, 2014, 2016 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 xscreensaver-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1_slack14.2}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i586 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-xscreensaver
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+
+cd $TMP
+rm -rf xscreensaver-$VERSION
+tar xvf $CWD/xscreensaver-$VERSION.tar.?z* || exit 1
+cd xscreensaver-$VERSION
+
+# Allow xscreensaver to work setgid shadow. I'd rather avoid requiring
+# setuid root on this if at all possible...
+zcat $CWD/xscreensaver.setuid.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+# Add support for the electricsheep distributed screensaver:
+zcat $CWD/xscreensaver.electricsheep.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
+
+# Remove a feature that pops up a nag screen claiming the version is old
+# after one year. Just don't send in bug reports on an old version, OK folks?
+# I hate to swim against upstream, but with all respect this feature is not
+# helpful to distributions.
+zcat $CWD/xscreensaver.no.expiration.date.diff.gz | patch -p1 --verbose --backup --suffix=.orig || 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 {} \;
+
+xml_config=/usr/bin/xml-config xml2_config=/usr/bin/xml2-config \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --with-x-app-defaults=/etc/X11/app-defaults \
+ --with-text-file=/usr/doc/netdate/COPYRIGHT \
+ --with-shadow \
+ --with-jpeg \
+ --with-gl \
+ --build=$ARCH-slackware-linux || exit 1
+
+# Build:
+make $NUMJOBS || make || exit 1
+make install_prefix=$PKG install-strip || exit 1
+
+# Needed for password unlock:
+chown root:shadow $PKG/usr/bin/xscreensaver
+chmod 2751 $PKG/usr/bin/xscreensaver
+
+# This is needed for the menus:
+mkdir -p $PKG/usr/share/pixmaps
+mkdir -p $PKG/etc
+mkdir -p $PKG/usr/doc/xscreensaver-$VERSION
+cp -a \
+ README* \
+ $PKG/usr/doc/xscreensaver-$VERSION
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1 | grep -v '\.gz$') ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Insert an older version of xscreensaver-getimage-file to avoid depending
+# on libwww-perl. Maybe we'll eventually add this, but bundling 14 perl
+# modules is a lot of maintainance just to get slidescreen working again.
+# This restores the functionality that we had before without all that.
+cat $CWD/xscreensaver-getimage-file-5.14 > $PKG/usr/bin/xscreensaver-getimage-file
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/xscreensaver-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/patches/source/xscreensaver/xscreensaver.electricsheep.diff b/patches/source/xscreensaver/xscreensaver.electricsheep.diff
new file mode 100644
index 00000000..27b11961
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.electricsheep.diff
@@ -0,0 +1,20 @@
+--- ./driver/XScreenSaver_ad.h.orig 2008-12-28 01:59:19.000000000 -0600
++++ ./driver/XScreenSaver_ad.h 2009-05-15 16:22:44.000000000 -0500
+@@ -138,6 +138,7 @@
+ squiral -root \\n\
+ wander -root \\n\
+ - webcollage -root \\n\
++ electricsheep --root 1 \\n\
+ xflame -root \\n\
+ xmatrix -root \\n\
+ GL: gflux -root \\n\
+--- ./driver/XScreenSaver.ad.in.orig 2008-12-28 01:33:15.000000000 -0600
++++ ./driver/XScreenSaver.ad.in 2009-05-15 16:22:04.000000000 -0500
+@@ -239,6 +239,7 @@
+ squiral -root \n\
+ wander -root \n\
+ - webcollage -root \n\
++ electricsheep --root 1 \n\
+ xflame -root \n\
+ xmatrix -root \n\
+ @GL_KLUDGE@ GL: gflux -root \n\
diff --git a/patches/source/xscreensaver/xscreensaver.no.expiration.date.diff b/patches/source/xscreensaver/xscreensaver.no.expiration.date.diff
new file mode 100644
index 00000000..bdbcbe1d
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.no.expiration.date.diff
@@ -0,0 +1,29 @@
+--- ./driver/prefs.c.orig 2016-05-23 22:08:27.000000000 -0500
++++ ./driver/prefs.c 2016-05-30 15:29:36.446721679 -0500
+@@ -1734,6 +1734,17 @@
+ shipping the last version with the old license and then never
+ upgrading it again -- which would be the worst possible outcome for
+ everyone involved, most especially the users.
++
++ ---
++
++ NOTE: This feature is disabled by Slackware... we do not ship multi-year
++ old versions, nor do we think it is a good idea to include nag screens
++ that activate when an expiration date is reached. In this case, the
++ nag screen was activated after only one year, which practically insures
++ that this will be seen before the next stable Slackware release.
++ If there's a problem that needs fixing, we'll issue a fix.
++ No nag screens please. Thanks for possibly reconsidering this!
++
+ */
+
+ time_t now = time ((time_t *) 0); /* */
+@@ -1766,5 +1777,7 @@
+ months = ((((tm->tm_year + 1900) * 12) + tm->tm_mon) - /* h */
+ (y * 12 + m)); /* p */
+ /* . */
+- return (months >= 17); /* */
++ /* Disable date checking for Slackware: */ /* \ö/ */
++ /* return (months >= 17); */ /* */
++ return ( 0 );
+ }
diff --git a/patches/source/xscreensaver/xscreensaver.setuid.diff b/patches/source/xscreensaver/xscreensaver.setuid.diff
new file mode 100644
index 00000000..c6810af5
--- /dev/null
+++ b/patches/source/xscreensaver/xscreensaver.setuid.diff
@@ -0,0 +1,179 @@
+--- ./driver/setuid.c.orig 2006-02-08 20:28:38.000000000 -0600
++++ ./driver/setuid.c 2006-04-04 16:48:08.000000000 -0500
+@@ -1,5 +1,5 @@
+ /* setuid.c --- management of runtime privileges.
+- * xscreensaver, Copyright (c) 1993-1998, 2005 Jamie Zawinski <jwz@jwz.org>
++ * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+@@ -41,7 +41,7 @@
+ struct group *g = 0;
+ p = getpwuid (uid);
+ g = getgrgid (gid);
+- sprintf (buf, "%.100s/%.100s (%ld/%ld)",
++ sprintf (buf, "%s/%s (%ld/%ld)",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+@@ -74,50 +74,11 @@
+ }
+
+
+-/* Returns true if we need to call setgroups().
+-
+- Without calling setgroups(), the process will retain any supplementary
+- gids associated with the uid, e.g.:
+-
+- % groups root
+- root : root bin daemon sys adm disk wheel
+-
+- However, setgroups() can only be called by root, and returns EPERM
+- for other users even if the call would be a no-op (e.g., setting the
+- group list to the current list.) So, to avoid that spurious error,
+- before calling setgroups() we first check whether the current list
+- of groups contains only one element, our target group. If so, we
+- don't need to call setgroups().
+- */
+-static int
+-setgroups_needed_p (uid_t target_group)
+-{
+- gid_t groups[1024];
+- int n, size;
+- size = sizeof(groups) / sizeof(gid_t);
+- n = getgroups (size - 1, groups);
+- if (n < 0)
+- {
+- char buf [1024];
+- sprintf (buf, "%s: getgroups(%ld, ...)", blurb(), (long int)(size - 1));
+- perror (buf);
+- return 1;
+- }
+- else if (n == 0) /* an empty list means only egid is in effect. */
+- return 0;
+- else if (n == 1 && groups[0] == target_group) /* one element, the target */
+- return 0;
+- else /* more than one, or the wrong one. */
+- return 1;
+-}
+-
+-
+ static int
+ set_ids_by_number (uid_t uid, gid_t gid, char **message_ret)
+ {
+ int uid_errno = 0;
+ int gid_errno = 0;
+- int sgs_errno = 0;
+ struct passwd *p = getpwuid (uid);
+ struct group *g = getgrgid (gid);
+
+@@ -136,11 +97,6 @@
+ if (uid == (uid_t) -1) uid = (uid_t) -2;
+
+ errno = 0;
+- if (setgroups_needed_p (gid) &&
+- setgroups (1, &gid) < 0)
+- sgs_errno = errno ? errno : -1;
+-
+- errno = 0;
+ if (setgid (gid) != 0)
+ gid_errno = errno ? errno : -1;
+
+@@ -148,10 +104,10 @@
+ if (setuid (uid) != 0)
+ uid_errno = errno ? errno : -1;
+
+- if (uid_errno == 0 && gid_errno == 0 && sgs_errno == 0)
++ if (uid_errno == 0 && gid_errno == 0)
+ {
+ static char buf [1024];
+- sprintf (buf, "changed uid/gid to %.100s/%.100s (%ld/%ld).",
++ sprintf (buf, "changed uid/gid to %s/%s (%ld/%ld).",
+ (p && p->pw_name ? p->pw_name : "???"),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) uid, (long) gid);
+@@ -162,71 +118,28 @@
+ else
+ {
+ char buf [1024];
+- gid_t groups[1024];
+- int n, size;
+-
+- if (sgs_errno)
+- {
+- sprintf (buf, "%s: couldn't setgroups to %.100s (%ld)",
+- blurb(),
+- (g && g->gr_name ? g->gr_name : "???"),
+- (long) gid);
+- if (sgs_errno == -1)
+- fprintf(stderr, "%s: unknown error\n", buf);
+- else
+- {
+- errno = sgs_errno;
+- perror(buf);
+- }
+-
+- fprintf (stderr, "%s: effective group list: ", blurb());
+- size = sizeof(groups) / sizeof(gid_t);
+- n = getgroups (size - 1, groups);
+- if (n < 0)
+- fprintf (stderr, "unknown!\n");
+- else
+- {
+- int i;
+- fprintf (stderr, "[");
+- for (i = 0; i < n; i++)
+- {
+- g = getgrgid (groups[i]);
+- if (i > 0) fprintf (stderr, ", ");
+- if (g && g->gr_name) fprintf (stderr, "%s", g->gr_name);
+- else fprintf (stderr, "%ld", (long) groups[i]);
+- }
+- fprintf (stderr, "]\n");
+- }
+- }
+-
+ if (gid_errno)
+ {
+- sprintf (buf, "%s: couldn't set gid to %.100s (%ld)",
++ sprintf (buf, "%s: couldn't set gid to %s (%ld)",
+ blurb(),
+ (g && g->gr_name ? g->gr_name : "???"),
+ (long) gid);
+ if (gid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+- {
+- errno = gid_errno;
+- perror(buf);
+- }
++ perror(buf);
+ }
+
+ if (uid_errno)
+ {
+- sprintf (buf, "%s: couldn't set uid to %.100s (%ld)",
++ sprintf (buf, "%s: couldn't set uid to %s (%ld)",
+ blurb(),
+ (p && p->pw_name ? p->pw_name : "???"),
+ (long) uid);
+ if (uid_errno == -1)
+ fprintf(stderr, "%s: unknown error\n", buf);
+ else
+- {
+- errno = uid_errno;
+- perror(buf);
+- }
++ perror(buf);
+ }
+
+ return -1;
+@@ -350,7 +263,7 @@
+ !strcmp (p->pw_name, "games"))
+ {
+ static char buf [1024];
+- sprintf (buf, "running as %.100s",
++ sprintf (buf, "running as %s",
+ (p && p->pw_name && *p->pw_name
+ ? p->pw_name : "<unknown>"));
+ si->nolock_reason = buf;