summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIsmaël Bouya2016-10-25 15:37:38 +0200
committerIsmaël Bouya2016-10-25 15:38:23 +0200
commit8ec4c3d134e9432acd3e9b7a0d41143953637f38 (patch)
tree08dee9e3bf637111c59cad9b747ac46e721f1a76
parente5bff5ebdf2c9e5d98c0f3b9c95e06fb25e4c395 (diff)
downloadaur-8ec4c3d134e9432acd3e9b7a0d41143953637f38.tar.gz
Upgrade to 4.2.0 by Petron
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD47
-rw-r--r--conda_install.patch97
-rw-r--r--install.py.patch78
-rw-r--r--installer_sh_x86.patch32
-rw-r--r--installer_sh_x86_64.patch32
-rwxr-xr-xupgrade_helper.sh58
7 files changed, 116 insertions, 244 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ee79e82692f4..f1e6d0ba7cbc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
# Generated by mksrcinfo v8
-# Wed Jun 29 08:57:15 UTC 2016
+# Tue Oct 25 13:37:02 UTC 2016
pkgbase = anaconda
pkgdesc = Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing.
- pkgver = 4.1.0
+ pkgver = 4.2.0
pkgrel = 1
url = https://store.continuum.io/cshop/anaconda/
arch = x86
@@ -11,14 +11,10 @@ pkgbase = anaconda
makedepends = patch
options = !strip
options = libtool
- source = http://repo.continuum.io/archive/Anaconda3-4.1.0-Linux-x86_64.sh
- source = installer_sh_x86.patch
- source = installer_sh_x86_64.patch
- source = conda_install.patch
- sha256sums = 11d32cf4026603d3b327dc4299863be6b815905ff51a80329085e1bb9f96c8bd
- sha256sums = 426112c7adc263420b5a4419a11c455e93df23033d6a700f56142eae9108eb2d
- sha256sums = 153769574abc0bad758a1eeb8efb215fec0afa40bd0fe303af52f894984b2c77
- sha256sums = 7f6f9736f74b42dc0086b05f55898b56746bbd122a113496d2475c646a8ace9c
+ source = http://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh
+ source = install.py.patch
+ sha256sums = 73b51715a12b6382dd4df3dd1905b531bd6792d4aa7273b2377a0436d45f0e78
+ sha256sums = 9fbb8d46f0864e034cb56bbe33281f475091b021a64df500b89bcb06f2081e71
pkgname = anaconda
diff --git a/PKGBUILD b/PKGBUILD
index d70e691a5363..50782295bff1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,9 @@
# Maintainer : Immae <ismael.bouya@normalesup.org>
# Contributor : Martin Wimpress <code@flexion.org>
+# Contributor : Jingbei Li <i@jingbei.li>
pkgname=anaconda
-pkgver=4.1.0
+pkgver=4.2.0
pkgrel=1
pkgdesc="Completely free enterprise-ready Python distribution for large-scale data processing, predictive analytics, and scientific computing."
arch=('x86' 'x86_64')
@@ -10,16 +11,12 @@ url="https://store.continuum.io/cshop/anaconda/"
license=("custom")
makedepends=('patch')
source=("http://repo.continuum.io/archive/Anaconda3-${pkgver}-Linux-x86_64.sh"
- "installer_sh_x86.patch"
- "installer_sh_x86_64.patch"
- "conda_install.patch")
+ "install.py.patch")
options=(!strip libtool)
-sha256sums=('11d32cf4026603d3b327dc4299863be6b815905ff51a80329085e1bb9f96c8bd'
- '426112c7adc263420b5a4419a11c455e93df23033d6a700f56142eae9108eb2d'
- '153769574abc0bad758a1eeb8efb215fec0afa40bd0fe303af52f894984b2c77'
- '7f6f9736f74b42dc0086b05f55898b56746bbd122a113496d2475c646a8ace9c')
-_pythonver='3.5.1-5'
-_condaver='4.1.4'
+sha256sums=('73b51715a12b6382dd4df3dd1905b531bd6792d4aa7273b2377a0436d45f0e78'
+ '9fbb8d46f0864e034cb56bbe33281f475091b021a64df500b89bcb06f2081e71')
+_pythonver='3.5.2-0'
+_condaver='4.2.9'
_pkgarch=`uname -m`
if [ "$CARCH" == "x86" ]; then
@@ -30,16 +27,36 @@ fi
prepare() {
cd ${srcdir}
- patch --follow-symlinks -p1 < installer_sh_${_pkgarch}.patch
+ msg2 "Patching Anaconda3-${pkgver}-Linux-x86_64.sh"
+ sed \
+ -e '/^wc -c "\$THIS_PATH" | grep/s/^/#/' \
+ -e '/^mkdir \$HOME\/\.continuum/s/^/#/' \
+ -e '/^echo "creating default environment..."$/s/^/exit 0 || /' \
+ -i Anaconda3-${pkgver}-Linux-x86_64.sh
}
package() {
prefix=${pkgdir}/opt/${pkgname}
+ LD_PRELOAD="/usr/lib/libfakeroot/libfakeroot.so"
+
+ msg2 "Extracting default libraries"
bash ${srcdir}/Anaconda3-${pkgver}-Linux-${_pkgarch}.sh -b -p $prefix
[ "$BREAK_EARLY" = 1 ] && exit 1
+
+ msg2 "Patching .install.py"
cd $prefix
- patch -p1 < $srcdir/conda_install.patch
- CONDA_INSTALL="$prefix/pkgs/conda-${_condaver}-py35_0/lib/python3.5/site-packages/conda/install.py"
- $prefix/pkgs/python-${_pythonver}/bin/python -E -s $CONDA_INSTALL --prefix=$prefix --instdir=/opt/${pkgname} --file=conda-meta/.ilan || exit 1
- install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ CONDA_INSTALL="$prefix/pkgs/.install.py"
+ patch -p1 < $srcdir/install.py.patch
+
+ msg2 "Installing to /opt/${pkgname}"
+ $prefix/pkgs/python-${_pythonver}/bin/python -E -s $CONDA_INSTALL --root-prefix=$prefix --instdir=/opt/${pkgname} || exit 1
+
+ msg2 "Stripping the default package cache"
+ rm -r $prefix/pkgs
+
+ msg2 "Stripping \$pkgdir and urls from default meta"
+ find conda-meta -name '*.json' -exec sed -e "s/${pkgdir//\//\\\/}//g" -e "/\"url\":/d" -i {} \;
+
+ msg2 "Installing license"
+ install -D -m644 $prefix/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
diff --git a/conda_install.patch b/conda_install.patch
deleted file mode 100644
index 8242aa31d74c..000000000000
--- a/conda_install.patch
+++ /dev/null
@@ -1,97 +0,0 @@
---- a/pkgs/conda-4.1.4-py35_0/lib/python3.5/site-packages/conda/install.py 2016-06-29 10:46:47.704920551 +0200
-+++ b/pkgs/conda-4.1.4-py35_0/lib/python3.5/site-packages/conda/install.py 2016-06-29 10:53:40.637452974 +0200
-@@ -390,14 +390,14 @@
- return data
-
-
--def replace_prefix(mode, data, placeholder, new_prefix):
-+def replace_prefix(mode, data, placeholder, instdir):
- if mode == 'text':
-- data = data.replace(placeholder.encode('utf-8'), new_prefix.encode('utf-8'))
-+ data = data.replace(placeholder.encode('utf-8'), instdir.encode('utf-8'))
- # Skip binary replacement in Windows. Some files do have prefix information embedded, but
- # this should not matter, as it is not used for things like RPATH.
- elif mode == 'binary':
- if not on_win:
-- data = binary_replace(data, placeholder.encode('utf-8'), new_prefix.encode('utf-8'))
-+ data = binary_replace(data, placeholder.encode('utf-8'), instdir.encode('utf-8'))
- else:
- logging.debug("Skipping prefix replacement in binary on Windows")
- else:
-@@ -405,17 +405,19 @@
- return data
-
-
--def update_prefix(path, new_prefix, placeholder=prefix_placeholder, mode='text'):
-+def update_prefix(path, new_prefix, placeholder=prefix_placeholder, mode='text', instdir=None):
-+ if instdir is None:
-+ instdir = new_prefix
- if on_win:
- # force all prefix replacements to forward slashes to simplify need to escape backslashes
- # replace with unix-style path separators
-- new_prefix = new_prefix.replace('\\', '/')
-+ instdir = instdir.replace('\\', '/')
-
- path = os.path.realpath(path)
- with open(path, 'rb') as fi:
- original_data = data = fi.read()
-
-- data = replace_prefix(mode, data, placeholder, new_prefix)
-+ data = replace_prefix(mode, data, placeholder, instdir)
- if not on_win:
- data = replace_long_shebang(mode, data)
-
-@@ -1019,7 +1021,7 @@
- log.debug("Could not move %s to trash" % path)
-
-
--def link(prefix, dist, linktype=LINK_HARD, index=None, shortcuts=False):
-+def link(prefix, dist, linktype=LINK_HARD, index=None, shortcuts=False, instdir=None):
- """
- Set up a package in a specified (environment) prefix. We assume that
- the package has been extracted (using extract() above).
-@@ -1071,7 +1073,7 @@
- for f in sorted(has_prefix_files):
- placeholder, mode = has_prefix_files[f]
- try:
-- update_prefix(join(prefix, f), prefix, placeholder, mode)
-+ update_prefix(join(prefix, f), prefix, placeholder, mode, instdir=instdir)
- except PaddingError:
- sys.exit("ERROR: placeholder '%s' too short in: %s\n" %
- (placeholder, dist))
-@@ -1214,6 +1216,10 @@
- default=sys.prefix,
- help="prefix (defaults to %default)")
-
-+ p.add_option('--instdir',
-+ action="store",
-+ help="install dir (defaults to prefix)")
-+
- p.add_option('-v', '--verbose',
- action="store_true")
-
-@@ -1224,10 +1230,15 @@
- logging.basicConfig()
-
- prefix = opts.prefix
-+ if not opts.instdir:
-+ instdir = prefix
-+ else:
-+ instdir = opts.instdir
- pkgs_dir = join(prefix, 'pkgs')
- pkgs_dirs = [pkgs_dir]
- if opts.verbose:
- print("prefix: %r" % prefix)
-+ print("instdir : %r" % instdir)
-
- if opts.file:
- idists = list(yield_lines(join(prefix, opts.file)))
-@@ -1244,7 +1255,7 @@
- for dist in idists:
- if opts.verbose:
- print("linking: %s" % dist)
-- link(prefix, dist, linktype)
-+ link(prefix, dist, linktype, instdir=instdir)
-
- messages(prefix)
-
diff --git a/install.py.patch b/install.py.patch
new file mode 100644
index 000000000000..c25587f18c1d
--- /dev/null
+++ b/install.py.patch
@@ -0,0 +1,78 @@
+--- a/pkgs/.install.py> 2016-10-22 22:34:35.739932506 +0800
++++ b/pkgs/.install.py> 2016-10-22 22:35:04.296779737 +0800
+@@ -44,6 +44,7 @@
+-
+ # these may be changed in main()
+ ROOT_PREFIX = sys.prefix
++instdir = ROOT_PREFIX
+ PKGS_DIR = join(ROOT_PREFIX, 'pkgs')
+ SKIP_SCRIPTS = False
+ FORCE = False
+@@ -1145,7 +1146,9 @@
+ return res
+-
+-
+-def update_prefix(path, new_prefix, placeholder, mode):
++def update_prefix(path, new_prefix, placeholder, mode, instdir=None):
++ if not instdir is None:
++ new_prefix = instdir
+ if on_win:
+ # force all prefix replacements to forward slashes to simplify need
+ # to escape backslashes - replace with unix-style path separators
+@@ -1269,7 +1272,7 @@
+ return set(fn[:-5] for fn in os.listdir(meta_dir) if fn.endswith('.json'))
+-
+-
+-def link(prefix, dist, linktype=LINK_HARD):
++def link(prefix, dist, linktype=LINK_HARD, instdir=None):
+ '''
+ Link a package in a specified prefix. We assume that the packacge has
+ been extra_info in either
+@@ -1309,7 +1312,7 @@
+ for f in sorted(has_prefix_files):
+ placeholder, mode = has_prefix_files[f]
+ try:
+- update_prefix(join(prefix, f), prefix, placeholder, mode)
++ update_prefix(join(prefix, f), prefix, placeholder, mode, instdir)
+ except PaddingError:
+ sys.exit("ERROR: placeholder '%s' too short in: %s\n" %
+ (placeholder, dist))
+@@ -1384,7 +1387,7 @@
+ prefix = prefix_env(env_name)
+ for dist in dists:
+ assert dist in IDISTS
+- link(prefix, dist, linktype)
++ link(prefix, dist, linktype, instdir)
+-
+ for dist in duplicates_to_remove(linked(prefix), dists):
+ meta_path = join(prefix, 'conda-meta', dist + '.json')
+@@ -1419,7 +1422,7 @@
+-
+-
+ def main():
+- global ROOT_PREFIX, PKGS_DIR, FORCE
++ global ROOT_PREFIX, PKGS_DIR, FORCE, instdir
+-
+ p = OptionParser(description="conda link tool used by installers")
+-
+@@ -1428,6 +1431,10 @@
+ default=abspath(join(__file__, '..', '..')),
+ help="root prefix (defaults to %default)")
+-
++ p.add_option('--instdir',
++ action="store",
++ help="install dir (defaults to root prefix)")
++
+ p.add_option('--post',
+ action="store",
+ help="perform post extract (on a single package), "
+@@ -1439,6 +1446,10 @@ p.error('no arguments expected')
+-
+ ROOT_PREFIX = opts.root_prefix
++ if not opts.instdir:
++ instdir = ROOT_PREFIX
++ else:
++ instdir = opts.instdir
+ PKGS_DIR = join(ROOT_PREFIX, 'pkgs')
+-
+ if opts.post:
diff --git a/installer_sh_x86.patch b/installer_sh_x86.patch
deleted file mode 100644
index d05592d9b3bb..000000000000
--- a/installer_sh_x86.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/Anaconda3-4.1.0-Linux-x86.sh 2016-06-29 10:39:08.242859455 +0200
-+++ b/Anaconda3-4.1.0-Linux-x86.sh 2016-06-29 10:41:52.887875171 +0200
-@@ -56,9 +56,9 @@
- done
-
- # verify the size of the installer
--wc -c "$THIS_PATH" | grep 344388621 >/dev/null
-+wc -c "$THIS_PATH" | grep 344388628 >/dev/null
- if (( $? )); then
-- echo "ERROR: size of $THIS_FILE should be 344388621 bytes" >&2
-+ echo "ERROR: size of $THIS_FILE should be 344388628 bytes" >&2
- exit 1
- fi
-
-@@ -454,7 +454,7 @@
- extract_dist conda-env-2.5.1-py35_0
-
- mkdir $PREFIX/envs
--mkdir $HOME/.continuum 2>/dev/null
-+#mkdir $HOME/.continuum 2>/dev/null
-
- PYTHON="$PREFIX/pkgs/python-3.5.1-5/bin/python"
- $PYTHON -E -V
-@@ -464,7 +464,7 @@
- uname -a
- exit 1
- fi
--
-+exit 0
- echo "creating default environment..."
- CONDA_INSTALL="$PREFIX/pkgs/conda-4.1.4-py35_0/lib/python3.5/site-packages/conda/install.py"
- $PYTHON -E -s $CONDA_INSTALL --prefix=$PREFIX --file=conda-meta/.ilan || exit 1
diff --git a/installer_sh_x86_64.patch b/installer_sh_x86_64.patch
deleted file mode 100644
index 9b25bb8b84f0..000000000000
--- a/installer_sh_x86_64.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/Anaconda3-4.1.0-Linux-x86_64.sh 2016-06-29 10:39:08.059527960 +0200
-+++ b/Anaconda3-4.1.0-Linux-x86_64.sh 2016-06-29 10:40:12.882211260 +0200
-@@ -56,9 +56,9 @@
- done
-
- # verify the size of the installer
--wc -c "$THIS_PATH" | grep 424649707 >/dev/null
-+wc -c "$THIS_PATH" | grep 424649714 >/dev/null
- if (( $? )); then
-- echo "ERROR: size of $THIS_FILE should be 424649707 bytes" >&2
-+ echo "ERROR: size of $THIS_FILE should be 424649714 bytes" >&2
- exit 1
- fi
-
-@@ -455,7 +455,7 @@
- extract_dist conda-env-2.5.1-py35_0
-
- mkdir $PREFIX/envs
--mkdir $HOME/.continuum 2>/dev/null
-+#mkdir $HOME/.continuum 2>/dev/null
-
- PYTHON="$PREFIX/pkgs/python-3.5.1-5/bin/python"
- $PYTHON -E -V
-@@ -465,7 +465,7 @@
- uname -a
- exit 1
- fi
--
-+exit 0
- echo "creating default environment..."
- CONDA_INSTALL="$PREFIX/pkgs/conda-4.1.4-py35_0/lib/python3.5/site-packages/conda/install.py"
- $PYTHON -E -s $CONDA_INSTALL --prefix=$PREFIX --file=conda-meta/.ilan || exit 1
diff --git a/upgrade_helper.sh b/upgrade_helper.sh
deleted file mode 100755
index d1910a458cba..000000000000
--- a/upgrade_helper.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/bin/bash
-
-echo "update pkgver in PKGBUILD"
-read
-
-echo "Downloading files (checks will fail)"
-makepkg --verifysource
-CARCH=x86 makepkg --verifysource
-
-source PKGBUILD
-anaconda_x86_64=Anaconda3-${pkgver}-Linux-x86_64.sh
-anaconda_x86=Anaconda3-${pkgver}-Linux-x86.sh
-cp $anaconda_x86_64 ${anaconda_x86_64}.old
-cp $anaconda_x86 ${anaconda_x86}.old
-
-echo "Modify $anaconda_x86 and $anaconda_x86_64"
-read
-
-diff -u ${anaconda_x86_64}.old $anaconda_x86_64 > installer_sh_x86_64.patch
-diff -u ${anaconda_x86}.old $anaconda_x86 > installer_sh_x86.patch
-
-mv -f ${anaconda_x86_64}.old $anaconda_x86_64
-mv -f ${anaconda_x86}.old $anaconda_x86
-
-echo "Clean installer_sh_x86_64.patch and installer_sh_x86.patch (update header and remove tail)"
-read
-
-updpkgsums
-sha256sum $anaconda_x86
-echo "update sha256sum for $anaconda_x86 in PKGBUILD"
-read
-BREAK_EARLY=1 makepkg
-grep CONDA_INSTALL= installer_sh_x86_64.patch
-echo "Edit conda_install patch to have correct conda version in header"
-read
-
-cd pkg/anaconda/opt/anaconda/
-conda_install=`ls -1 pkgs/conda-*/lib/python*/site-packages/conda/install.py`
-cp $conda_install ${conda_install}.old
-echo "Trying patch as is:"
-patch -p1 < ../../../../conda_install.patch
-
-diff -u ${conda_install}.old ${conda_install} > ../../../../conda_install.patch
-
-cd -
-
-echo "Check conda_install.patch and update header"
-
-read
-updpkgsums
-grep CONDA_INSTALL= installer_sh_x86_64.patch
-grep PYTHON= installer_sh_x86_64.patch
-echo "Update _pythonver and _condaver in PKGBUILD"
-read
-
-echo "upgrading srcinfo"
-mksrcinfo
-echo "Done"