Last active
October 1, 2015 08:11
-
-
Save the-admax/684d56db33f2f0792b69 to your computer and use it in GitHub Desktop.
Tiny script patching wget-1.14 sources for LTIB against Perl5.18 pod2man bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Originally posted for https://community.freescale.com/thread/324608 | |
# some config. Adapt to your env | |
#WGET=$(sort dist/lfs-5.1/wget/wget-ssl.spec | awk '/^Name|Version/{print $3}' | xargs printf "%s-%s\n") | |
WGET_PKG=wget-1.14 | |
LTIB_ROOT=/opt/ltib | |
##################################### | |
if [ "$USER" == 0 ]; then | |
echo DONT RUN THIS SCRIPT AS ROOT | |
exit 1 | |
fi | |
# Change dir to one with packages | |
pushd $LTIB_ROOT/pkgs | |
# Cleanup build dir as ltib ensists | |
rm -rf ../usr/src/rpm/BUILD/$WGET_PKG > /dev/null | |
# (Taken from http://patchwork.openwrt.org/patch/4062/ ) | |
cat << 'WGET_PATCH' > wget-1.14-perl5.18-fix.patch | |
--- a/doc/wget.texi | |
+++ b/doc/wget.texi | |
@@ -876,7 +876,7 @@ recommendation to block many unrelated u | |
actions of one. | |
@cindex proxy | |
-@itemx --no-proxy | |
+@item --no-proxy | |
Don't use proxies, even if the appropriate @code{*_proxy} environment | |
variable is defined. | |
@@ -977,7 +977,7 @@ are outside the range of @sc{ascii} char | |
whose encoding does not match the one used locally. | |
@cindex IPv6 | |
-@itemx -4 | |
+@item -4 | |
@itemx --inet4-only | |
@itemx -6 | |
@itemx --inet6-only | |
@@ -2106,32 +2106,32 @@ Wget may return one of several error cod | |
@table @asis | |
-@item 0 | |
+@item .0 | |
No problems occurred. | |
-@item 1 | |
+@item .1 | |
Generic error code. | |
-@item 2 | |
-Parse error---for instance, when parsing command-line options, the | |
+@item .2 | |
+Parse error - for instance, when parsing command-line options, the | |
@samp{.wgetrc} or @samp{.netrc}... | |
-@item 3 | |
+@item .3 | |
File I/O error. | |
-@item 4 | |
+@item .4 | |
Network failure. | |
-@item 5 | |
+@item .5 | |
SSL verification failure. | |
-@item 6 | |
+@item .6 | |
Username/password authentication failure. | |
-@item 7 | |
+@item .7 | |
Protocol errors. | |
-@item 8 | |
+@item .8 | |
Server issued an error response. | |
@end table | |
@@ -3094,7 +3094,7 @@ display properly---the same as @samp{-p} | |
Change setting of passive @sc{ftp}, equivalent to the | |
@samp{--passive-ftp} option. | |
-@itemx password = @var{string} | |
+@item password = @var{string} | |
Specify password @var{string} for both @sc{ftp} and @sc{http} file retrieval. | |
This command can be overridden using the @samp{ftp_password} and | |
@samp{http_password} command for @sc{ftp} and @sc{http} respectively. | |
@@ -3605,7 +3605,7 @@ In addition to the environment variables | |
may be specified from within Wget itself. | |
@table @samp | |
-@itemx --no-proxy | |
+@item --no-proxy | |
@itemx proxy = on/off | |
This option and the corresponding command may be used to suppress the | |
use of proxy, even if the appropriate environment variables are set. | |
WGET_PATCH | |
md5sum wget-1.14-perl5.18-fix.patch > wget-1.14-perl5.18-fix.patch.md5 | |
# Return to dir with ltib | |
popd | |
# Fix wget-ssl.spec file (add patch name there) | |
patch -p1 << 'SPEC_PATCH' | |
--- a/dist/lfs-5.1/wget/wget-ssl.spec 2014-07-04 02:49:10.338387548 +0400 | |
+++ b/dist/lfs-5.1/wget/wget-ssl.spec 2014-07-04 02:48:31.836591528 +0400 | |
@@ -10,4 +10,5 @@ | |
Group : Applications/Internet | |
Source : %{name}-%{version}.tar.gz | |
+Patch0 : wget-1.14-perl5.18-fix.patch | |
BuildRoot : %{_tmppath}/%{name} | |
Prefix : %{pfx} | |
@@ -18,4 +19,5 @@ | |
%Prep | |
%setup | |
+%patch0 -p1 | |
%Build | |
SPEC_PATCH | |
echo Ready to continue! | |
echo Now run | |
echo | |
echo ./ltib --hostcf | |
echo | |
echo and have fun :\) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment