removed the old Android app
Running git-annex linux builds in termux seems to work well enough that the only reason to keep the Android app would be to support Android 4-5, which the old Android app supported, and which I don't know if the termux method works on (although I see no reason why it would not). According to [1], Android 4-5 remains on around 29% of devices, down from 51% one year ago. [1] https://www.statista.com/statistics/271774/share-of-android-platforms-on-mobile-devices-with-android-os/ This is a rather large commit, but mostly very straightfoward removal of android ifdefs and patches and associated cruft. Also, removed support for building with very old ghc < 8.0.1, and with yesod < 1.4.3, and without concurrent-output, which were only being used by the cross build. Some documentation specific to the Android app (screenshots etc) needs to be updated still. This commit was sponsored by Brett Eisenberg on Patreon.
2
standalone/android/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
|||
build-utils
|
||||
start
|
|
@ -1,84 +0,0 @@
|
|||
# Cross-compiles utilities needed for git-annex on Android,
|
||||
# and builds the Android app.
|
||||
|
||||
build:
|
||||
./buildapk 4
|
||||
./buildapk 5
|
||||
|
||||
# Targets below are used by buildapk, which sets
|
||||
# GIT_ANNEX_ANDROID_SOURCETREE
|
||||
|
||||
source: $(GIT_ANNEX_ANDROID_SOURCETREE)
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE):
|
||||
mkdir -p $(GIT_ANNEX_ANDROID_SOURCETREE)
|
||||
git clone git://git.debian.org/git/d-i/busybox $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox
|
||||
git clone git://git.kernel.org/pub/scm/git/git.git $(GIT_ANNEX_ANDROID_SOURCETREE)/git
|
||||
git clone git://git.samba.org/rsync.git $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync
|
||||
git clone git://git.gnupg.org/gnupg.git $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg
|
||||
git clone git://git.openssl.org/openssl $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl
|
||||
git clone git://github.com/CyanogenMod/android_external_openssh.git $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh
|
||||
git clone git://github.com/jackpal/Android-Terminal-Emulator.git $(GIT_ANNEX_ANDROID_SOURCETREE)/term
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE)/openssl/build-stamp:
|
||||
# This is a version which the openssh below can build with.
|
||||
# Newer versions changed something to do with BIGNUM.
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && git reset --hard 616f71e486d693991b594439c884ec624b32c2d4
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && CC=$$(which cc) ./Configure android
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssl && $(MAKE)
|
||||
touch $@
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/build-stamp: openssh.patch openssh.config.h
|
||||
# This is a known-good version that the patch works with.
|
||||
# TODO: Upgrade
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && git reset --hard 0a8617ed5af2f0248d0e9648e26b224e16ada742
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && ./configure --host=arm-linux-androideabi --with-ssl-dir=../openssl --without-openssl-header-check
|
||||
cat openssh.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && patch -p1)
|
||||
cp openssh.config.h $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh/config.h
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && sed -i -e 's/getrrsetbyname.o //' openbsd-compat/Makefile
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && sed -i -e 's/auth-passwd.o //' Makefile
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/openssh && $(MAKE) ssh ssh-keygen
|
||||
touch $@
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/build-stamp: busybox_config
|
||||
cp busybox_config $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox/.config
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox && git reset --hard a758e3e1e04e7705f5d37b2f27be654cd0e7282c
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox && yes '' | $(MAKE) oldconfig
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/busybox && $(MAKE)
|
||||
touch $@
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE)/git/build-stamp: git.patch
|
||||
# This is a known-good version that the patch works with.
|
||||
cat git.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/git && git reset --hard d9c691a759d62cef53a6cc11864a2ef4b0829244 && git am)
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/git && $(MAKE) install NO_OPENSSL=1 NO_GETTEXT=1 NO_GECOS_IN_PWENT=1 NO_GETPASS=1 NO_NSEC=1 NO_MKDTEMP=1 NO_PTHREADS=1 NO_PERL=1 NO_CURL=1 NO_EXPAT=1 NO_TCLTK=1 NO_ICONV=1 HAVE_CLOCK_GETTIME= HAVE_GETDELIM= prefix= DESTDIR=installed-tree
|
||||
touch $@
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE)/rsync/build-stamp: rsync.patch
|
||||
# This is a known-good version that the patch works with.
|
||||
cat rsync.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync && git reset --hard eec26089b1c7bdbb260674480ffe6ece257bca63 && git am)
|
||||
cp /usr/share/misc/config.sub /usr/share/misc/config.guess $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync/
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync && ./configure --host=arm-linux-androideabi --disable-locale --disable-iconv-open --disable-iconv --disable-acl-support --disable-xattr-support
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/rsync && $(MAKE)
|
||||
touch $@
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg/build-stamp:
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg && git checkout gnupg-1.4.15
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg && ./autogen.sh
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg && ./configure --host=arm-linux-androideabi --disable-gnupg-iconv --disable-card-support --disable-agent-support --disable-photo-viewers --disable-keyserver-helpers --disable-nls
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/gnupg; $(MAKE) || true # expected failure in doc build
|
||||
touch $@
|
||||
|
||||
$(GIT_ANNEX_ANDROID_SOURCETREE)/term/build-stamp: term.patch icons
|
||||
# This is a known-good version that the patch works with.
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && git reset --hard 3d34b3c42295c215b62e70f3ee696dd664ba08ce
|
||||
cat term.patch | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && patch -p1)
|
||||
(cd icons && tar c .) | (cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term/res && tar x)
|
||||
# This renaming has a purpose. It makes the path to the app's
|
||||
# /data directory shorter, which makes ssh connection caching
|
||||
# sockets placed there have more space for their filenames.
|
||||
# Also, it avoids overlap with the Android Terminal Emulator
|
||||
# app, if it's also installed.
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && find -name .git -prune -o -type f -print0 | xargs -0 perl -pi -e 's/jackpal/ga/g'
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && perl -pi -e 's/Terminal Emulator/Git Annex/g' res/*/strings.xml
|
||||
cd $(GIT_ANNEX_ANDROID_SOURCETREE)/term && echo y | tools/update.sh || true
|
||||
touch $@
|
|
@ -1 +0,0 @@
|
|||
android-14/arm-linux-androideabi-4.8
|
|
@ -1,112 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Cross-compiles utilities needed for git-annex on Android,
|
||||
# and builds the Android app.
|
||||
|
||||
set -e
|
||||
|
||||
androidversion=$1
|
||||
if [ -z "$androidversion" ]; then
|
||||
echo "need android version (4 or 5) as parameter" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VER="$(perl -e '$_=<>;print m/\((.*?)\)/'<../../CHANGELOG)"
|
||||
|
||||
PATH=$(./toolchainpath "$androidversion")
|
||||
export PATH
|
||||
|
||||
# Paths to the Android SDK and NDK.
|
||||
export ANDROID_SDK_ROOT="$HOME/.android/adt-bundle-linux-x86/sdk"
|
||||
export ANDROID_NDK_ROOT="$HOME/.android/android-ndk"
|
||||
|
||||
GIT_ANNEX_ANDROID_SOURCETREE="$HOME/.android/git-annex-sourcetree"
|
||||
export GIT_ANNEX_ANDROID_SOURCETREE
|
||||
if [ ! -e "$GIT_ANNEX_ANDROID_SOURCETREE" ]; then
|
||||
make source
|
||||
fi
|
||||
src="$GIT_ANNEX_ANDROID_SOURCETREE-$androidversion"
|
||||
if [ ! -e "$src" ] ; then
|
||||
cp -a "$GIT_ANNEX_ANDROID_SOURCETREE" "$src"
|
||||
fi
|
||||
GIT_ANNEX_ANDROID_SOURCETREE="$src"
|
||||
export GIT_ANNEX_ANDROID_SOURCETREE
|
||||
|
||||
gittree="$GIT_ANNEX_ANDROID_SOURCETREE/git/installed-tree"
|
||||
|
||||
make "$GIT_ANNEX_ANDROID_SOURCETREE/openssl/build-stamp"
|
||||
make "$GIT_ANNEX_ANDROID_SOURCETREE/openssh/build-stamp"
|
||||
make "$GIT_ANNEX_ANDROID_SOURCETREE/busybox/build-stamp"
|
||||
make "$GIT_ANNEX_ANDROID_SOURCETREE/rsync/build-stamp"
|
||||
make "$GIT_ANNEX_ANDROID_SOURCETREE/gnupg/build-stamp"
|
||||
make "$GIT_ANNEX_ANDROID_SOURCETREE/git/build-stamp"
|
||||
make "$GIT_ANNEX_ANDROID_SOURCETREE/term/build-stamp"
|
||||
|
||||
perl -i -pe 's/(android:versionName=)"[^"]+"/$1"'"$VER"'"/' \
|
||||
"$GIT_ANNEX_ANDROID_SOURCETREE/term/AndroidManifest.xml"
|
||||
|
||||
# Debug build because it does not need signing keys.
|
||||
(cd "$GIT_ANNEX_ANDROID_SOURCETREE/term" && tools/build-debug)
|
||||
|
||||
# Install executables as pseudo-libraries so they will be
|
||||
# unpacked from the .apk.
|
||||
mkdir -p "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/busybox/busybox" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.busybox.so"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/openssh/ssh" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.ssh.so"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/openssh/ssh-keygen" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.ssh-keygen.so"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/rsync/rsync" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.rsync.so"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/gnupg/g10/gpg" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.gpg.so"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git.so"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git-shell" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-shell.so"
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git-upload-pack" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-upload-pack.so"
|
||||
arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note "$GIT_ANNEX_ANDROID_SOURCETREE"/term/libs/armeabi/*
|
||||
cp runshell "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.runshell.so"
|
||||
cc start.c -o "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.start.so"
|
||||
|
||||
# remove git stuff we don't need to save space
|
||||
rm -rf $gittree/bin/git-cvsserver \
|
||||
$gittree/libexec/git-core/git-daemon \
|
||||
$gittree/libexec/git-core/git-show-index \
|
||||
$gittree/libexec/git-core/mergetools \
|
||||
$gittree/libexec/git-core/git-credential-* \
|
||||
$gittree/libexec/git-core/git-cvsserver \
|
||||
$gittree/libexec/git-core/git-cvsimport \
|
||||
$gittree/libexec/git-core/git-fast-import \
|
||||
$gittree/libexec/git-core/git-http-backend \
|
||||
$gittree/libexec/git-core/git-imap-send \
|
||||
$gittree/libexec/git-core/git-instaweb \
|
||||
$gittree/libexec/git-core/git-p4 \
|
||||
$gittree/libexec/git-core/git-remote-test* \
|
||||
$gittree/libexec/git-core/git-submodule \
|
||||
$gittree/libexec/git-core/git-svn \
|
||||
$gittree/libexec/git-core/git-web--browse
|
||||
|
||||
# Most of git is in one multicall binary, but a few important
|
||||
# commands are still shell scripts. Those are put into
|
||||
# a tarball, along with a list of all the links that should be
|
||||
# set up.
|
||||
(cd $gittree && mkdir -p links)
|
||||
(cd $gittree && find -samefile bin/git -not -wholename ./bin/git > links/git)
|
||||
(cd $gittree && find -samefile bin/git-shell -not -wholename ./bin/git-shell > links/git-shell)
|
||||
(cd $gittree && find -samefile bin/git-upload-pack -not -wholename ./bin/git-upload-pack > links/git-upload-pack)
|
||||
(cd $gittree && find -type f -not -samefile bin/git -not -samefile bin/git-shell -not -samefile bin/git-upload-pack | tar czf ../git.tar.gz -T -)
|
||||
(cp "$GIT_ANNEX_ANDROID_SOURCETREE/git/git.tar.gz" "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git.tar.gz.so")
|
||||
|
||||
git rev-parse HEAD > "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.version.so"
|
||||
cp ../trustedkeys.gpg "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.trustedkeys.so"
|
||||
|
||||
genapk () {
|
||||
mkdir -p ../../tmp/$1; \
|
||||
cp ../../tmp/androidtree/dist/build/git-annex/$1/git-annex "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-annex.so"
|
||||
arm-linux-androideabi-strip --strip-unneeded --remove-section=.comment --remove-section=.note "$GIT_ANNEX_ANDROID_SOURCETREE/term/libs/armeabi/lib.git-annex.so"
|
||||
(cd "$GIT_ANNEX_ANDROID_SOURCETREE/term" && ant debug)
|
||||
cp "$GIT_ANNEX_ANDROID_SOURCETREE/term/bin/Term-debug.apk" ../../tmp/$1/git-annex.apk
|
||||
}
|
||||
|
||||
if [ "$androidversion" = 4 ]; then
|
||||
for v in 4.0 4.3; do
|
||||
genapk $v
|
||||
done
|
||||
else
|
||||
genapk 5.0
|
||||
fi
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
if [ "$(whoami)" != root ]; then
|
||||
echo "Must run this as root!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
debootstrap --arch=i386 jessie debian-stable-android
|
||||
cp $0-inchroot debian-stable-android/tmp
|
||||
cp $0-inchroot-asuser debian-stable-android/tmp
|
||||
cp $(dirname $0)/abiversion debian-stable-android/tmp
|
||||
|
||||
# Don't use these vars in the chroot.
|
||||
unset TMP
|
||||
unset TEMP
|
||||
unset TMPDIR
|
||||
unset TEMPDIR
|
||||
|
||||
chroot debian-stable-android "tmp/$(basename $0)-inchroot"
|
||||
|
||||
echo
|
||||
echo
|
||||
echo "debian-stable-android is set up, with a user builder"
|
||||
echo "your next step is probably to check out git-annex in this chroot"
|
||||
echo "and run standalone/android/install-haskell-packages"
|
||||
echo
|
||||
echo
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Runs inside the chroot set up by buildchroot
|
||||
set -e
|
||||
set -x
|
||||
if [ "$(whoami)" != root ]; then
|
||||
echo "Must run this as root!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# java needs this mounted to work
|
||||
mount -t proc proc /proc || true
|
||||
|
||||
echo "deb-src http://ftp.us.debian.org/debian jessie main" >> /etc/apt/sources.list
|
||||
apt-get update
|
||||
apt-get -y install build-essential ghc git libncurses5-dev cabal-install
|
||||
apt-get -y install happy alex
|
||||
apt-get -y install llvm-3.4
|
||||
apt-get -y install ca-certificates curl file m4 autoconf zlib1g-dev
|
||||
apt-get -y install libgnutls28-dev libxml2-dev libgsasl7-dev pkg-config c2hs
|
||||
apt-get -y install ant default-jdk rsync wget gnupg lsof
|
||||
apt-get -y install gettext unzip python
|
||||
apt-get -y install locales automake
|
||||
echo en_US.UTF-8 UTF-8 >> /etc/locale.gen
|
||||
locale-gen
|
||||
apt-get clean
|
||||
useradd builder --create-home || true
|
||||
su builder -c $0-asuser
|
|
@ -1,40 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Runs inside the chroot set up by buildchroot, as the user it creates
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# Put in /tmp by buildchroot, but when bootstrapping with propellor,
|
||||
# this is run inside a checked out git-annex tree.
|
||||
if [ -e /tmp/abiversion ]; then
|
||||
ABIVERSION=$(cat /tmp/abiversion)
|
||||
else
|
||||
ABIVERSION=$(cat standalone/android/abiversion)
|
||||
fi
|
||||
|
||||
cd
|
||||
rm -rf .ghc .cabal .android
|
||||
mkdir -p .android
|
||||
cd .android
|
||||
git clone https://github.com/joeyh/ghc-android
|
||||
cd ghc-android
|
||||
git checkout jessie-ghc-snapshot
|
||||
./build
|
||||
|
||||
# This saves 2 gb, and the same sources are in build-*/ghc
|
||||
rm -rf stage0
|
||||
|
||||
# Set up android SDK where the git-annex android Makefile
|
||||
# expects to find it.
|
||||
cd ..
|
||||
ln -s ghc-android/android-ndk-* android-ndk
|
||||
wget http://dl.google.com/android/adt/adt-bundle-linux-x86-20130917.zip
|
||||
unzip adt*.zip
|
||||
rm adt*.zip
|
||||
mv adt-bundle-linux-x86-* adt-bundle-linux-x86
|
||||
rm -rf adt-bundle-linux-x86/eclipse
|
||||
|
||||
# The git-annex android Makefile needs this cc symlink.
|
||||
ln -s arm-linux-androideabi-gcc $HOME/.ghc/$ABIVERSION/bin/cc
|
||||
|
||||
git config --global user.email androidbuilder@example.com
|
||||
git config --global user.name androidbuilder
|
|
@ -1,997 +0,0 @@
|
|||
# Run "make android2_defconfig", then "make".
|
||||
#
|
||||
# Tested with the standalone toolchain from ndk r6:
|
||||
# android-ndk-r6/build/tools/make-standalone-toolchain.sh --platform=android-8
|
||||
#
|
||||
CONFIG_HAVE_DOT_CONFIG=y
|
||||
|
||||
#
|
||||
# Busybox Settings
|
||||
#
|
||||
|
||||
#
|
||||
# General Configuration
|
||||
#
|
||||
# CONFIG_DESKTOP is not set
|
||||
# CONFIG_EXTRA_COMPAT is not set
|
||||
# CONFIG_INCLUDE_SUSv2 is not set
|
||||
# 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 is not set
|
||||
# CONFIG_FEATURE_VERBOSE_USAGE is not set
|
||||
# CONFIG_FEATURE_COMPRESS_USAGE is not set
|
||||
CONFIG_FEATURE_INSTALLER=y
|
||||
# CONFIG_INSTALL_NO_USR is not set
|
||||
# CONFIG_LOCALE_SUPPORT is not set
|
||||
# CONFIG_UNICODE_SUPPORT is not set
|
||||
# CONFIG_UNICODE_USING_LOCALE is not set
|
||||
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
|
||||
CONFIG_SUBST_WCHAR=0
|
||||
CONFIG_LAST_SUPPORTED_WCHAR=0
|
||||
# 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 is not set
|
||||
# CONFIG_FEATURE_DEVPTS is not set
|
||||
# CONFIG_FEATURE_CLEAN_UP is not set
|
||||
# CONFIG_FEATURE_UTMP is not set
|
||||
# CONFIG_FEATURE_WTMP is not set
|
||||
# CONFIG_FEATURE_PIDFILE is not set
|
||||
# CONFIG_FEATURE_SUID is not set
|
||||
# CONFIG_FEATURE_SUID_CONFIG is not set
|
||||
# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set
|
||||
# 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 is not set
|
||||
|
||||
#
|
||||
# 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 is not set
|
||||
CONFIG_CROSS_COMPILER_PREFIX="arm-linux-androideabi-"
|
||||
CONFIG_EXTRA_CFLAGS=""
|
||||
|
||||
#
|
||||
# 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="./_install"
|
||||
|
||||
#
|
||||
# Busybox Library Tuning
|
||||
#
|
||||
# CONFIG_FEATURE_SYSTEMD is not set
|
||||
# CONFIG_FEATURE_RTMINMAX is not set
|
||||
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 is not set
|
||||
CONFIG_FEATURE_EDITING_MAX_LEN=0
|
||||
# CONFIG_FEATURE_EDITING_VI is not set
|
||||
CONFIG_FEATURE_EDITING_HISTORY=0
|
||||
# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
|
||||
# CONFIG_FEATURE_TAB_COMPLETION is not set
|
||||
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
|
||||
# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set
|
||||
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
|
||||
# CONFIG_FEATURE_NON_POSIX_CP is not set
|
||||
# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set
|
||||
CONFIG_FEATURE_COPYBUF_KB=4
|
||||
# CONFIG_FEATURE_SKIP_ROOTFS is not set
|
||||
# CONFIG_MONOTONIC_SYSCALL is not set
|
||||
# CONFIG_IOCTL_HEX2STR_ERROR is not set
|
||||
# CONFIG_FEATURE_HWIB is not set
|
||||
|
||||
#
|
||||
# Applets
|
||||
#
|
||||
|
||||
#
|
||||
# Archival Utilities
|
||||
#
|
||||
CONFIG_FEATURE_SEAMLESS_XZ=y
|
||||
CONFIG_FEATURE_SEAMLESS_LZMA=y
|
||||
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=y
|
||||
CONFIG_BUNZIP2=y
|
||||
CONFIG_BZIP2=y
|
||||
CONFIG_CPIO=y
|
||||
CONFIG_FEATURE_CPIO_O=y
|
||||
CONFIG_FEATURE_CPIO_P=y
|
||||
CONFIG_DPKG=y
|
||||
CONFIG_DPKG_DEB=y
|
||||
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
|
||||
CONFIG_GUNZIP=y
|
||||
CONFIG_GZIP=y
|
||||
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
|
||||
CONFIG_LZOP=y
|
||||
CONFIG_LZOP_COMPR_HIGH=y
|
||||
CONFIG_RPM2CPIO=y
|
||||
CONFIG_RPM=y
|
||||
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=y
|
||||
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
|
||||
# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
|
||||
# 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 is not set
|
||||
# CONFIG_FEATURE_DATE_ISOFMT is not set
|
||||
# CONFIG_FEATURE_DATE_NANO is not set
|
||||
# CONFIG_FEATURE_DATE_COMPAT is not set
|
||||
# CONFIG_ID is not set
|
||||
# CONFIG_GROUPS is not set
|
||||
CONFIG_TEST=y
|
||||
CONFIG_FEATURE_TEST_64=y
|
||||
CONFIG_TOUCH=y
|
||||
CONFIG_TR=y
|
||||
CONFIG_FEATURE_TR_CLASSES=y
|
||||
CONFIG_FEATURE_TR_EQUIV=y
|
||||
CONFIG_BASE64=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 is not set
|
||||
CONFIG_CUT=y
|
||||
CONFIG_DD=y
|
||||
CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
|
||||
CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
|
||||
CONFIG_FEATURE_DD_IBS_OBS=y
|
||||
# CONFIG_DF is not set
|
||||
# CONFIG_FEATURE_DF_FANCY is not set
|
||||
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 is not set
|
||||
# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set
|
||||
CONFIG_EXPAND=y
|
||||
# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
|
||||
# CONFIG_EXPR is not set
|
||||
# CONFIG_EXPR_MATH_SUPPORT_64 is not set
|
||||
CONFIG_FALSE=y
|
||||
CONFIG_FOLD=y
|
||||
# CONFIG_FSYNC is not set
|
||||
CONFIG_HEAD=y
|
||||
CONFIG_FEATURE_FANCY_HEAD=y
|
||||
# CONFIG_HOSTID is not set
|
||||
CONFIG_INSTALL=y
|
||||
# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
|
||||
CONFIG_LN=y
|
||||
# CONFIG_LOGNAME is not set
|
||||
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 is not set
|
||||
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
|
||||
CONFIG_MD5SUM=y
|
||||
CONFIG_MKDIR=y
|
||||
# CONFIG_FEATURE_MKDIR_LONG_OPTIONS is not set
|
||||
CONFIG_MKFIFO=y
|
||||
CONFIG_MKNOD=y
|
||||
CONFIG_MV=y
|
||||
# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
|
||||
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=y
|
||||
CONFIG_SORT=y
|
||||
CONFIG_FEATURE_SORT_BIG=y
|
||||
CONFIG_SPLIT=y
|
||||
CONFIG_FEATURE_SPLIT_FANCY=y
|
||||
# CONFIG_STAT is not set
|
||||
# CONFIG_FEATURE_STAT_FORMAT is not set
|
||||
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 is not set
|
||||
CONFIG_UNAME=y
|
||||
CONFIG_UNEXPAND=y
|
||||
# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
|
||||
CONFIG_UNIQ=y
|
||||
# CONFIG_USLEEP is not set
|
||||
CONFIG_UUDECODE=y
|
||||
CONFIG_UUENCODE=y
|
||||
CONFIG_WC=y
|
||||
CONFIG_FEATURE_WC_LARGE=y
|
||||
# CONFIG_WHO is not set
|
||||
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 is not set
|
||||
# CONFIG_LOADFONT is not set
|
||||
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 is not set
|
||||
# CONFIG_SETFONT is not set
|
||||
# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set
|
||||
CONFIG_DEFAULT_SETFONT_DIR=""
|
||||
CONFIG_SETKEYCODES=y
|
||||
CONFIG_SETLOGCONS=y
|
||||
CONFIG_SHOWKEY=y
|
||||
# CONFIG_FEATURE_LOADFONT_PSF2 is not set
|
||||
# CONFIG_FEATURE_LOADFONT_RAW is not set
|
||||
|
||||
#
|
||||
# Debian Utilities
|
||||
#
|
||||
CONFIG_MKTEMP=y
|
||||
CONFIG_PIPE_PROGRESS=y
|
||||
CONFIG_RUN_PARTS=y
|
||||
# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
|
||||
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 is not set
|
||||
CONFIG_WHICH=y
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
CONFIG_PATCH=y
|
||||
CONFIG_VI=y
|
||||
CONFIG_FEATURE_VI_MAX_LEN=0
|
||||
# CONFIG_FEATURE_VI_8BIT is not set
|
||||
# CONFIG_FEATURE_VI_COLON is not set
|
||||
# CONFIG_FEATURE_VI_YANKMARK is not set
|
||||
CONFIG_FEATURE_VI_SEARCH=y
|
||||
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
|
||||
CONFIG_FEATURE_VI_USE_SIGNALS=y
|
||||
# CONFIG_FEATURE_VI_DOT_CMD is not set
|
||||
# CONFIG_FEATURE_VI_READONLY is not set
|
||||
# CONFIG_FEATURE_VI_SETOPTS is not set
|
||||
# CONFIG_FEATURE_VI_SET is not set
|
||||
CONFIG_FEATURE_VI_WIN_RESIZE=y
|
||||
# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
|
||||
# CONFIG_FEATURE_VI_OPTIMIZE_CURSOR is not set
|
||||
# CONFIG_AWK is not set
|
||||
# CONFIG_FEATURE_AWK_LIBM is not set
|
||||
CONFIG_CMP=y
|
||||
CONFIG_DIFF=y
|
||||
# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set
|
||||
CONFIG_FEATURE_DIFF_DIR=y
|
||||
# CONFIG_ED is not set
|
||||
CONFIG_SED=y
|
||||
# CONFIG_FEATURE_ALLOW_EXEC is not set
|
||||
|
||||
#
|
||||
# Finding Utilities
|
||||
#
|
||||
CONFIG_FIND=y
|
||||
CONFIG_FEATURE_FIND_PRINT0=y
|
||||
CONFIG_FEATURE_FIND_MTIME=y
|
||||
# CONFIG_FEATURE_FIND_MMIN is not set
|
||||
CONFIG_FEATURE_FIND_PERM=y
|
||||
CONFIG_FEATURE_FIND_TYPE=y
|
||||
# CONFIG_FEATURE_FIND_XDEV is not set
|
||||
# CONFIG_FEATURE_FIND_MAXDEPTH is not set
|
||||
# CONFIG_FEATURE_FIND_NEWER is not set
|
||||
# CONFIG_FEATURE_FIND_INUM is not set
|
||||
# CONFIG_FEATURE_FIND_EXEC is not set
|
||||
# CONFIG_FEATURE_FIND_USER is not set
|
||||
# CONFIG_FEATURE_FIND_GROUP is not set
|
||||
# CONFIG_FEATURE_FIND_NOT is not set
|
||||
# CONFIG_FEATURE_FIND_DEPTH is not set
|
||||
# CONFIG_FEATURE_FIND_PAREN is not set
|
||||
# CONFIG_FEATURE_FIND_SIZE is not set
|
||||
# CONFIG_FEATURE_FIND_PRUNE is not set
|
||||
# CONFIG_FEATURE_FIND_DELETE is not set
|
||||
# CONFIG_FEATURE_FIND_PATH is not set
|
||||
# CONFIG_FEATURE_FIND_REGEX is not set
|
||||
# CONFIG_FEATURE_FIND_CONTEXT is not set
|
||||
# CONFIG_FEATURE_FIND_LINKS is not set
|
||||
CONFIG_GREP=y
|
||||
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
|
||||
# CONFIG_FEATURE_GREP_CONTEXT is not set
|
||||
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 is not set
|
||||
# CONFIG_FEATURE_CALL_TELINIT is not set
|
||||
# CONFIG_TELINIT_PATH=""
|
||||
# CONFIG_INIT is not set
|
||||
# CONFIG_FEATURE_USE_INITTAB is not set
|
||||
# CONFIG_FEATURE_KILL_REMOVED is not set
|
||||
# CONFIG_FEATURE_KILL_DELAY=0
|
||||
# CONFIG_FEATURE_INIT_SCTTY is not set
|
||||
# CONFIG_FEATURE_INIT_SYSLOG is not set
|
||||
# CONFIG_FEATURE_EXTRA_QUIET is not set
|
||||
# CONFIG_FEATURE_INIT_COREDUMPS is not set
|
||||
# CONFIG_FEATURE_INITRD is not set
|
||||
# CONFIG_INIT_TERMINAL_TYPE="linux"
|
||||
# CONFIG_MESG is not set
|
||||
# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y
|
||||
|
||||
#
|
||||
# Login/Password Management Utilities
|
||||
#
|
||||
# CONFIG_ADD_SHELL is not set
|
||||
# CONFIG_REMOVE_SHELL is not set
|
||||
# CONFIG_FEATURE_SHADOWPASSWDS is not set
|
||||
# CONFIG_USE_BB_PWD_GRP is not set
|
||||
# CONFIG_USE_BB_SHADOW is not set
|
||||
# CONFIG_USE_BB_CRYPT is not set
|
||||
# CONFIG_USE_BB_CRYPT_SHA is not set
|
||||
# CONFIG_ADDUSER is not set
|
||||
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_CHECK_NAMES is not set
|
||||
CONFIG_FIRST_SYSTEM_ID=0
|
||||
CONFIG_LAST_SYSTEM_ID=0
|
||||
# CONFIG_ADDGROUP is not set
|
||||
# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
|
||||
# CONFIG_DELUSER is not set
|
||||
# CONFIG_DELGROUP is not set
|
||||
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
|
||||
# CONFIG_GETTY is not set
|
||||
# CONFIG_LOGIN is not set
|
||||
# CONFIG_PAM is not set
|
||||
# CONFIG_LOGIN_SCRIPTS is not set
|
||||
# CONFIG_FEATURE_NOLOGIN is not set
|
||||
# CONFIG_FEATURE_SECURETTY is not set
|
||||
# CONFIG_PASSWD is not set
|
||||
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
|
||||
# CONFIG_CRYPTPW is not set
|
||||
# CONFIG_CHPASSWD is not set
|
||||
# CONFIG_SU is not set
|
||||
# CONFIG_FEATURE_SU_SYSLOG is not set
|
||||
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
|
||||
# CONFIG_SULOGIN is not set
|
||||
# CONFIG_VLOCK is not set
|
||||
|
||||
#
|
||||
# Linux Ext2 FS Progs
|
||||
#
|
||||
CONFIG_CHATTR=y
|
||||
# CONFIG_FSCK is not set
|
||||
CONFIG_LSATTR=y
|
||||
CONFIG_TUNE2FS=y
|
||||
|
||||
#
|
||||
# Linux Module Utilities
|
||||
#
|
||||
# CONFIG_MODINFO is not set
|
||||
# CONFIG_MODPROBE_SMALL is not set
|
||||
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y
|
||||
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y
|
||||
# CONFIG_INSMOD is not set
|
||||
# CONFIG_RMMOD is not set
|
||||
# CONFIG_LSMOD is not set
|
||||
# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
|
||||
# CONFIG_MODPROBE is not set
|
||||
# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set
|
||||
# CONFIG_DEPMOD is not set
|
||||
|
||||
#
|
||||
# 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 is not set
|
||||
# CONFIG_FEATURE_MODUTILS_ALIAS is not set
|
||||
# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set
|
||||
# CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
|
||||
# CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
|
||||
|
||||
#
|
||||
# Linux System Utilities
|
||||
#
|
||||
CONFIG_BLOCKDEV=y
|
||||
CONFIG_REV=y
|
||||
# CONFIG_ACPID is not set
|
||||
# CONFIG_FEATURE_ACPID_COMPAT is not set
|
||||
CONFIG_BLKID=y
|
||||
# CONFIG_FEATURE_BLKID_TYPE is not set
|
||||
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=y
|
||||
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 is not set
|
||||
# CONFIG_FEATURE_GPT_LABEL is not set
|
||||
CONFIG_FEATURE_FDISK_ADVANCED=y
|
||||
CONFIG_FINDFS=y
|
||||
CONFIG_FLOCK=y
|
||||
CONFIG_FREERAMDISK=y
|
||||
# CONFIG_FSCK_MINIX is not set
|
||||
# CONFIG_MKFS_EXT2 is not set
|
||||
# CONFIG_MKFS_MINIX is not set
|
||||
# CONFIG_FEATURE_MINIX2 is not set
|
||||
# CONFIG_MKFS_REISER is not set
|
||||
# CONFIG_MKFS_VFAT is not set
|
||||
CONFIG_GETOPT=y
|
||||
CONFIG_FEATURE_GETOPT_LONG=y
|
||||
CONFIG_HEXDUMP=y
|
||||
CONFIG_FEATURE_HEXDUMP_REVERSE=y
|
||||
CONFIG_HD=y
|
||||
# CONFIG_HWCLOCK is not set
|
||||
# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set
|
||||
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
|
||||
# CONFIG_IPCRM is not set
|
||||
# CONFIG_IPCS is not set
|
||||
CONFIG_LOSETUP=y
|
||||
CONFIG_LSPCI=y
|
||||
CONFIG_LSUSB=y
|
||||
# CONFIG_MDEV is not set
|
||||
# CONFIG_FEATURE_MDEV_CONF is not set
|
||||
# CONFIG_FEATURE_MDEV_RENAME is not set
|
||||
# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
|
||||
# CONFIG_FEATURE_MDEV_EXEC is not set
|
||||
# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
|
||||
CONFIG_MKSWAP=y
|
||||
CONFIG_FEATURE_MKSWAP_UUID=y
|
||||
CONFIG_MORE=y
|
||||
# CONFIG_MOUNT is not set
|
||||
# CONFIG_FEATURE_MOUNT_FAKE is not set
|
||||
# CONFIG_FEATURE_MOUNT_VERBOSE is not set
|
||||
# CONFIG_FEATURE_MOUNT_HELPERS is not set
|
||||
# CONFIG_FEATURE_MOUNT_LABEL is not set
|
||||
# CONFIG_FEATURE_MOUNT_NFS is not set
|
||||
# CONFIG_FEATURE_MOUNT_CIFS is not set
|
||||
# CONFIG_FEATURE_MOUNT_FLAGS is not set
|
||||
# CONFIG_FEATURE_MOUNT_FSTAB is not set
|
||||
# CONFIG_PIVOT_ROOT is not set
|
||||
# CONFIG_RDATE is not set
|
||||
CONFIG_RDEV=y
|
||||
CONFIG_READPROFILE=y
|
||||
CONFIG_RTCWAKE=y
|
||||
CONFIG_SCRIPT=y
|
||||
CONFIG_SCRIPTREPLAY=y
|
||||
# CONFIG_SETARCH is not set
|
||||
# CONFIG_SWAPONOFF is not set
|
||||
# CONFIG_FEATURE_SWAPON_PRI is not set
|
||||
# CONFIG_SWITCH_ROOT is not set
|
||||
# CONFIG_UMOUNT is not set
|
||||
# CONFIG_FEATURE_UMOUNT_ALL is not set
|
||||
# CONFIG_FEATURE_MOUNT_LOOP is not set
|
||||
# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set
|
||||
# CONFIG_FEATURE_MTAB_SUPPORT is not set
|
||||
CONFIG_VOLUMEID=y
|
||||
|
||||
#
|
||||
# Filesystem/Volume identification
|
||||
#
|
||||
CONFIG_FEATURE_VOLUMEID_EXT=y
|
||||
CONFIG_FEATURE_VOLUMEID_BTRFS=y
|
||||
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=y
|
||||
CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
|
||||
|
||||
#
|
||||
# Miscellaneous Utilities
|
||||
#
|
||||
# CONFIG_CONSPY is not set
|
||||
# CONFIG_NANDWRITE is not set
|
||||
CONFIG_NANDDUMP=y
|
||||
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 is not set
|
||||
# CONFIG_BBCONFIG is not set
|
||||
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
|
||||
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=y
|
||||
CONFIG_FEATURE_CHAT_SEND_ESCAPES=y
|
||||
CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y
|
||||
CONFIG_FEATURE_CHAT_CLR_ABORT=y
|
||||
CONFIG_CHRT=y
|
||||
# CONFIG_CROND is not set
|
||||
# CONFIG_FEATURE_CROND_D is not set
|
||||
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
|
||||
CONFIG_FEATURE_CROND_DIR=""
|
||||
# CONFIG_CRONTAB is not set
|
||||
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 is not set
|
||||
# CONFIG_FEATURE_EJECT_SCSI is not set
|
||||
CONFIG_FBSPLASH=y
|
||||
CONFIG_FLASHCP=y
|
||||
CONFIG_FLASH_LOCK=y
|
||||
CONFIG_FLASH_UNLOCK=y
|
||||
# CONFIG_FLASH_ERASEALL is not set
|
||||
# CONFIG_IONICE is not set
|
||||
CONFIG_INOTIFYD=y
|
||||
# CONFIG_LAST is not set
|
||||
# CONFIG_FEATURE_LAST_SMALL is not set
|
||||
# CONFIG_FEATURE_LAST_FANCY is not set
|
||||
# CONFIG_LESS is not set
|
||||
CONFIG_FEATURE_LESS_MAXLINES=0
|
||||
# CONFIG_FEATURE_LESS_BRACKETS is not set
|
||||
# CONFIG_FEATURE_LESS_FLAGS is not set
|
||||
# CONFIG_FEATURE_LESS_MARKS is not set
|
||||
# CONFIG_FEATURE_LESS_REGEXP is not set
|
||||
# CONFIG_FEATURE_LESS_WINCH is not set
|
||||
# CONFIG_FEATURE_LESS_DASHCMD is not set
|
||||
# CONFIG_FEATURE_LESS_LINENUMS 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=y
|
||||
# CONFIG_MICROCOM is not set
|
||||
# CONFIG_MOUNTPOINT is not set
|
||||
# CONFIG_MT is not set
|
||||
CONFIG_RAIDAUTORUN=y
|
||||
# CONFIG_READAHEAD is not set
|
||||
# CONFIG_RFKILL is not set
|
||||
# CONFIG_RUNLEVEL is not set
|
||||
CONFIG_RX=y
|
||||
CONFIG_SETSID=y
|
||||
CONFIG_STRINGS=y
|
||||
# CONFIG_TASKSET is not set
|
||||
# CONFIG_FEATURE_TASKSET_FANCY is not set
|
||||
CONFIG_TIME=y
|
||||
CONFIG_TIMEOUT=y
|
||||
CONFIG_TTYSIZE=y
|
||||
CONFIG_VOLNAME=y
|
||||
# CONFIG_WALL is not set
|
||||
# CONFIG_WATCHDOG is not set
|
||||
|
||||
#
|
||||
# Networking Utilities
|
||||
#
|
||||
# CONFIG_NAMEIF is not set
|
||||
# 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 is not set
|
||||
# CONFIG_PING6 is not set
|
||||
# CONFIG_FEATURE_FANCY_PING is not set
|
||||
CONFIG_WHOIS=y
|
||||
# CONFIG_FEATURE_IPV6 is not set
|
||||
# CONFIG_FEATURE_UNIX_LOCAL is not set
|
||||
# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set
|
||||
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
|
||||
CONFIG_ARP=y
|
||||
# CONFIG_ARPING is not set
|
||||
# CONFIG_BRCTL is not set
|
||||
# CONFIG_FEATURE_BRCTL_FANCY is not set
|
||||
# CONFIG_FEATURE_BRCTL_SHOW is not set
|
||||
CONFIG_DNSD=y
|
||||
# CONFIG_ETHER_WAKE is not set
|
||||
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 is not set
|
||||
# CONFIG_HOSTNAME is not set
|
||||
CONFIG_HTTPD=y
|
||||
CONFIG_FEATURE_HTTPD_RANGES=y
|
||||
CONFIG_FEATURE_HTTPD_USE_SENDFILE=y
|
||||
CONFIG_FEATURE_HTTPD_SETUID=y
|
||||
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
|
||||
# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
|
||||
CONFIG_FEATURE_HTTPD_CGI=y
|
||||
CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
|
||||
CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
|
||||
CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
|
||||
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
|
||||
CONFIG_FEATURE_HTTPD_PROXY=y
|
||||
CONFIG_FEATURE_HTTPD_GZIP=y
|
||||
CONFIG_IFCONFIG=y
|
||||
CONFIG_FEATURE_IFCONFIG_STATUS=y
|
||||
# CONFIG_FEATURE_IFCONFIG_SLIP is not set
|
||||
CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
|
||||
CONFIG_FEATURE_IFCONFIG_HW=y
|
||||
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
|
||||
# CONFIG_IFENSLAVE is not set
|
||||
# CONFIG_IFPLUGD is not set
|
||||
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 is not set
|
||||
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
|
||||
# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
|
||||
# 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 is not set
|
||||
CONFIG_NETSTAT=y
|
||||
CONFIG_FEATURE_NETSTAT_WIDE=y
|
||||
CONFIG_FEATURE_NETSTAT_PRG=y
|
||||
# CONFIG_NSLOOKUP is not set
|
||||
# CONFIG_NTPD is not set
|
||||
# CONFIG_FEATURE_NTPD_SERVER is not set
|
||||
CONFIG_PSCAN=y
|
||||
CONFIG_ROUTE=y
|
||||
# CONFIG_SLATTACH is not set
|
||||
CONFIG_TCPSVD=y
|
||||
# CONFIG_TELNET is not set
|
||||
# CONFIG_FEATURE_TELNET_TTYPE is not set
|
||||
# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set
|
||||
# CONFIG_TELNETD is not set
|
||||
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
|
||||
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
|
||||
# CONFIG_TFTP is not set
|
||||
# CONFIG_TFTPD is not set
|
||||
# CONFIG_FEATURE_TFTP_GET is not set
|
||||
# CONFIG_FEATURE_TFTP_PUT is not set
|
||||
# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
|
||||
# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set
|
||||
# CONFIG_TFTP_DEBUG is not set
|
||||
# CONFIG_TRACEROUTE is not set
|
||||
# CONFIG_TRACEROUTE6 is not set
|
||||
# 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_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=y
|
||||
CONFIG_FEATURE_UDHCPC_ARPING=y
|
||||
# CONFIG_FEATURE_UDHCP_PORT is not set
|
||||
CONFIG_UDHCP_DEBUG=9
|
||||
CONFIG_FEATURE_UDHCP_RFC3397=y
|
||||
CONFIG_FEATURE_UDHCP_8021Q=y
|
||||
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
|
||||
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
|
||||
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
|
||||
# CONFIG_UDPSVD is not set
|
||||
# CONFIG_VCONFIG is not set
|
||||
CONFIG_WGET=y
|
||||
CONFIG_FEATURE_WGET_STATUSBAR=y
|
||||
CONFIG_FEATURE_WGET_AUTHENTICATION=y
|
||||
# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
|
||||
CONFIG_FEATURE_WGET_TIMEOUT=y
|
||||
# CONFIG_ZCIP is not set
|
||||
|
||||
#
|
||||
# Print Utilities
|
||||
#
|
||||
CONFIG_LPD=y
|
||||
CONFIG_LPR=y
|
||||
CONFIG_LPQ=y
|
||||
|
||||
#
|
||||
# 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=y
|
||||
|
||||
#
|
||||
# Process Utilities
|
||||
#
|
||||
CONFIG_IOSTAT=y
|
||||
CONFIG_MPSTAT=y
|
||||
CONFIG_NMETER=y
|
||||
CONFIG_PMAP=y
|
||||
# CONFIG_POWERTOP is not set
|
||||
CONFIG_PSTREE=y
|
||||
CONFIG_PWDX=y
|
||||
CONFIG_SMEMCAP=y
|
||||
# CONFIG_FREE is not set
|
||||
CONFIG_FUSER=y
|
||||
# CONFIG_KILL is not set
|
||||
# CONFIG_KILLALL is not set
|
||||
# CONFIG_KILLALL5 is not set
|
||||
# CONFIG_PGREP is not set
|
||||
CONFIG_PIDOF=y
|
||||
CONFIG_FEATURE_PIDOF_SINGLE=y
|
||||
CONFIG_FEATURE_PIDOF_OMIT=y
|
||||
# CONFIG_PKILL is not set
|
||||
# CONFIG_PS is not set
|
||||
# CONFIG_FEATURE_PS_WIDE is not set
|
||||
# CONFIG_FEATURE_PS_TIME is not set
|
||||
# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set
|
||||
# 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_UPTIME is not set
|
||||
CONFIG_WATCH=y
|
||||
|
||||
#
|
||||
# Runit Utilities
|
||||
#
|
||||
CONFIG_RUNSV=y
|
||||
CONFIG_RUNSVDIR=y
|
||||
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
|
||||
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 is not set
|
||||
# CONFIG_ASH_IDLE_TIMEOUT is not set
|
||||
CONFIG_ASH_JOB_CONTROL=y
|
||||
# CONFIG_ASH_ALIAS is not set
|
||||
CONFIG_ASH_GETOPTS=y
|
||||
# CONFIG_ASH_BUILTIN_ECHO is not set
|
||||
# CONFIG_ASH_BUILTIN_PRINTF is not set
|
||||
# CONFIG_ASH_BUILTIN_TEST is not set
|
||||
# CONFIG_ASH_CMDCMD is not set
|
||||
# CONFIG_ASH_MAIL is not set
|
||||
# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set
|
||||
# CONFIG_ASH_RANDOM_SUPPORT is not set
|
||||
# CONFIG_ASH_EXPAND_PRMT is not set
|
||||
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 is not set
|
||||
# CONFIG_SH_MATH_SUPPORT_64 is not set
|
||||
# CONFIG_FEATURE_SH_EXTRA_QUIET is not set
|
||||
CONFIG_FEATURE_SH_STANDALONE=y
|
||||
# CONFIG_FEATURE_SH_NOFORK is not set
|
||||
# CONFIG_FEATURE_SH_HISTFILESIZE is not set
|
||||
|
||||
#
|
||||
# System Logging Utilities
|
||||
#
|
||||
# CONFIG_SYSLOGD is not set
|
||||
# CONFIG_FEATURE_ROTATE_LOGFILE is not set
|
||||
# CONFIG_FEATURE_REMOTE_LOG is not set
|
||||
# CONFIG_FEATURE_SYSLOGD_DUP is not set
|
||||
# CONFIG_FEATURE_SYSLOGD_CFG is not set
|
||||
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
|
||||
# CONFIG_FEATURE_IPC_SYSLOG is not set
|
||||
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
|
||||
# CONFIG_LOGREAD is not set
|
||||
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
|
||||
CONFIG_KLOGD=y
|
||||
CONFIG_FEATURE_KLOGD_KLOGCTL=y
|
||||
# CONFIG_LOGGER is not set
|
|
@ -1,209 +0,0 @@
|
|||
constraints: unix installed,
|
||||
blaze-html ==0.8.1.3,
|
||||
blaze-markup ==0.7.0.3,
|
||||
basement ==0.0.7,
|
||||
memory ==0.14.9,
|
||||
connection ==0.2.8,
|
||||
aws ==0.13.0,
|
||||
lifted-base ==0.2.3.6,
|
||||
Crypto ==4.2.5.1,
|
||||
binary ==0.7.6.1,
|
||||
DAV ==1.0.3,
|
||||
HTTP ==4000.2.17,
|
||||
HUnit ==1.2.5.2,
|
||||
IfElse ==0.85,
|
||||
MissingH ==1.2.1.0,
|
||||
directory ==1.2.2.0,
|
||||
MonadRandom ==0.1.13,
|
||||
QuickCheck ==2.7.6,
|
||||
SafeSemaphore ==0.10.1,
|
||||
aeson ==0.7.0.6,
|
||||
ansi-wl-pprint ==0.6.7.1,
|
||||
appar ==0.1.4,
|
||||
asn1-encoding ==0.9.5,
|
||||
asn1-parse ==0.9.4,
|
||||
asn1-types ==0.3.2,
|
||||
async ==2.0.1.5,
|
||||
attoparsec ==0.11.3.4,
|
||||
attoparsec-conduit ==1.1.0,
|
||||
authenticate ==1.3.2.10,
|
||||
base-unicode-symbols ==0.2.2.4,
|
||||
base16-bytestring ==0.1.1.6,
|
||||
base64-bytestring ==1.0.0.1,
|
||||
bifunctors ==4.1.1.1,
|
||||
bloomfilter ==2.0.0.0,
|
||||
byteable ==0.1.1,
|
||||
byteorder ==1.0.4,
|
||||
case-insensitive ==1.2.0.1,
|
||||
cereal ==0.4.0.1,
|
||||
cipher-aes ==0.2.8,
|
||||
cipher-des ==0.0.6,
|
||||
cipher-rc4 ==0.1.4,
|
||||
clientsession ==0.9.0.3,
|
||||
comonad ==4.2,
|
||||
conduit ==1.1.6,
|
||||
conduit-extra ==1.1.3,
|
||||
contravariant ==0.6.1.1,
|
||||
cookie ==0.4.1.2,
|
||||
cprng-aes ==0.5.2,
|
||||
crypto-api ==0.13.2,
|
||||
crypto-cipher-types ==0.0.9,
|
||||
crypto-numbers ==0.2.3,
|
||||
crypto-pubkey ==0.2.4,
|
||||
crypto-pubkey-types ==0.4.2.3,
|
||||
crypto-random ==0.0.7,
|
||||
cryptohash ==0.11.6,
|
||||
cryptohash-conduit ==0.1.1,
|
||||
css-text ==0.1.2.1,
|
||||
data-default ==0.5.3,
|
||||
data-default-class ==0.0.1,
|
||||
data-default-instances-base ==0.0.1,
|
||||
data-default-instances-containers ==0.0.1,
|
||||
data-default-instances-dlist ==0.0.1,
|
||||
data-default-instances-old-locale ==0.0.1,
|
||||
sandi ==0.3.0.1,
|
||||
dbus ==0.10.8,
|
||||
distributive ==0.4.4,
|
||||
dlist ==0.7.0.1,
|
||||
dns ==1.3.0,
|
||||
edit-distance ==0.2.1.2,
|
||||
either ==4.3,
|
||||
email-validate ==1.0.0,
|
||||
entropy ==0.2.1,
|
||||
errors ==1.4.7,
|
||||
exceptions ==0.6.1,
|
||||
failure ==0.2.0.3,
|
||||
fast-logger ==2.1.5,
|
||||
fdo-notify ==0.3.1,
|
||||
feed ==0.3.9.2,
|
||||
file-embed ==0.0.6,
|
||||
fingertree ==0.1.0.0,
|
||||
free ==4.9,
|
||||
gnuidn ==0.2,
|
||||
gnutls ==0.1.4,
|
||||
gsasl ==0.3.5,
|
||||
hS3 ==0.5.7,
|
||||
hashable ==1.2.1.0,
|
||||
hinotify ==0.3.5,
|
||||
hjsmin ==0.1.4.7,
|
||||
hslogger ==1.2.10,
|
||||
http-client ==0.4.31.1,
|
||||
http-client-tls ==0.2.4.1,
|
||||
http-conduit ==2.1.9,
|
||||
http-date ==0.0.6.1,
|
||||
http-types ==0.9.1,
|
||||
blaze-builder ==0.3.3.2,
|
||||
hxt ==9.3.1.4,
|
||||
hxt-charproperties ==9.1.1.1,
|
||||
hxt-regex-xmlschema ==9.0.4,
|
||||
hxt-unicode ==9.0.2.2,
|
||||
idna ==0.2,
|
||||
iproute ==1.3.1,
|
||||
json ==0.5,
|
||||
keys ==3.10.1,
|
||||
language-javascript ==0.5.13,
|
||||
lens ==4.4.0.2,
|
||||
libxml-sax ==0.7.5,
|
||||
mime-mail ==0.4.1.2,
|
||||
mime-types ==0.1.0.4,
|
||||
mmorph ==1.0.3,
|
||||
monad-control ==0.3.2.2,
|
||||
monad-logger ==0.3.6.1,
|
||||
monad-loops ==0.4.2.1,
|
||||
monads-tf ==0.1.0.2,
|
||||
mtl ==2.1.2,
|
||||
nats ==0.1.2,
|
||||
network ==2.6.3.1
|
||||
network-conduit ==1.1.0,
|
||||
network-info ==0.2.0.5,
|
||||
network-multicast ==0.0.10,
|
||||
network-uri ==2.6.0.1,
|
||||
optparse-applicative ==0.11.0.2,
|
||||
parallel ==3.2.0.4,
|
||||
path-pieces ==0.1.4,
|
||||
pem ==0.2.2,
|
||||
persistent ==1.3.3,
|
||||
persistent-template ==1.3.2.2,
|
||||
pointed ==4.0,
|
||||
prelude-extras ==0.4,
|
||||
profunctors ==4.0.4,
|
||||
publicsuffixlist ==0.1,
|
||||
punycode ==2.0,
|
||||
random ==1.0.1.1,
|
||||
ranges ==0.2.4,
|
||||
reducers ==3.10.2.1,
|
||||
reflection ==1.2.0.1,
|
||||
regex-base ==0.93.2,
|
||||
regex-compat ==0.95.1,
|
||||
regex-posix ==0.95.2,
|
||||
regex-tdfa ==1.2.0,
|
||||
resource-pool ==0.2.1.1,
|
||||
resourcet ==1.1.2.3,
|
||||
safe ==0.3.8,
|
||||
securemem ==0.1.3,
|
||||
semigroupoids ==4.2,
|
||||
semigroups ==0.15.3,
|
||||
shakespeare ==2.0.5,
|
||||
silently ==1.2.4.1,
|
||||
simple-sendfile ==0.2.14,
|
||||
skein ==1.0.9,
|
||||
socks ==0.5.5,
|
||||
split ==0.2.2,
|
||||
stm ==2.4.2,
|
||||
stm-chans ==3.0.0.2,
|
||||
streaming-commons ==0.1.4.1,
|
||||
stringprep ==0.1.5,
|
||||
stringsearch ==0.3.6.5,
|
||||
syb ==0.4.0,
|
||||
system-fileio ==0.3.14,
|
||||
system-filepath ==0.4.12,
|
||||
tagged ==0.7.2,
|
||||
tagsoup ==0.13.1,
|
||||
tagstream-conduit ==0.5.5.1,
|
||||
text ==1.1.1.0,
|
||||
text-icu ==0.6.3.7,
|
||||
tf-random ==0.5,
|
||||
tls ==1.3.8,
|
||||
transformers ==0.3.0.0,
|
||||
transformers-base ==0.4.1,
|
||||
transformers-compat ==0.3.3.3,
|
||||
unbounded-delays ==0.1.0.8,
|
||||
unix-compat ==0.4.1.3,
|
||||
unix-time ==0.2.2,
|
||||
unordered-containers ==0.2.5.0,
|
||||
utf8-string ==0.3.7,
|
||||
uuid ==1.3.3,
|
||||
vault ==0.3.0.3,
|
||||
vector ==0.10.0.1,
|
||||
void ==0.6.1,
|
||||
wai ==3.0.1.1,
|
||||
wai-app-static ==3.0.0.1,
|
||||
wai-extra ==3.0.1.2,
|
||||
wai-logger ==2.1.1,
|
||||
warp ==3.0.8,
|
||||
warp-tls ==3.0.4.2,
|
||||
word8 ==0.1.1,
|
||||
x509 ==1.6.5,
|
||||
x509-store ==1.6.3,
|
||||
x509-system ==1.6.6,
|
||||
x509-validation ==1.6.8,
|
||||
xml ==1.3.13,
|
||||
xml-conduit ==1.2.1,
|
||||
xml-hamlet ==0.4.0.9,
|
||||
xml-types ==0.3.4,
|
||||
xss-sanitize ==0.3.5.2,
|
||||
yaml ==0.8.9.3,
|
||||
yesod ==1.2.6.1,
|
||||
yesod-auth ==1.3.4.6,
|
||||
yesod-core ==1.2.20.1,
|
||||
yesod-default ==1.2.0,
|
||||
yesod-form ==1.3.16,
|
||||
yesod-persistent ==1.2.3.1,
|
||||
yesod-routes ==1.2.0.7,
|
||||
yesod-static ==1.2.4,
|
||||
zlib ==0.5.4.1,
|
||||
bytestring installed,
|
||||
process ==1.2.3.0,
|
||||
scientific ==0.3.3.1,
|
||||
clock ==0.4.6.0,
|
||||
cryptonite ==0.15
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Removes all currently installed cross-compiled haskell packages
|
||||
# except those part of ghc.
|
||||
# Useful if the build failed.
|
||||
rm -f $(grep -l $HOME/.ghc/$(cat abiversion)/.cabal/lib/ $HOME/.ghc/android-14/arm-linux-androideabi-4.8/lib/*-ghc-*/package.conf.d/*.conf)
|
||||
$HOME/.ghc/$(cat abiversion)/arm-linux-androideabi/bin/ghc-pkg recache
|
|
@ -1,55 +0,0 @@
|
|||
From 014dadb02fd984828a6232534c47dba8e2f7818a Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Wed, 13 Feb 2013 15:29:52 -0400
|
||||
Subject: [PATCH] android patch for dropbear
|
||||
|
||||
* Disable HOME override
|
||||
* Use urandom to avoid blocking on every ssh connection.
|
||||
* Enable use of netbsd_getpass.c
|
||||
---
|
||||
cli-auth.c | 1 +
|
||||
cli-main.c | 2 --
|
||||
options.h | 2 +-
|
||||
3 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/cli-auth.c b/cli-auth.c
|
||||
index 4c17a21..91dfdf8 100644
|
||||
--- a/cli-auth.c
|
||||
+++ b/cli-auth.c
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "ssh.h"
|
||||
#include "packet.h"
|
||||
#include "runopts.h"
|
||||
+#include "netbsd_getpass.c"
|
||||
|
||||
void cli_authinitialise() {
|
||||
|
||||
diff --git a/cli-main.c b/cli-main.c
|
||||
index 106006b..68cf023 100644
|
||||
--- a/cli-main.c
|
||||
+++ b/cli-main.c
|
||||
@@ -47,8 +47,6 @@ int main(int argc, char ** argv) {
|
||||
_dropbear_exit = cli_dropbear_exit;
|
||||
_dropbear_log = cli_dropbear_log;
|
||||
|
||||
- putenv("HOME=/data/local");
|
||||
-
|
||||
disallow_core();
|
||||
|
||||
cli_getopts(argc, argv);
|
||||
diff --git a/options.h b/options.h
|
||||
index 7625151..48e404d 100644
|
||||
--- a/options.h
|
||||
+++ b/options.h
|
||||
@@ -159,7 +159,7 @@ etc) slower (perhaps by 50%). Recommended for most small systems. */
|
||||
* however significantly reduce the security of your ssh connections
|
||||
* if the PRNG state becomes guessable - make sure you know what you are
|
||||
* doing if you change this. */
|
||||
-#define DROPBEAR_RANDOM_DEV "/dev/random"
|
||||
+#define DROPBEAR_RANDOM_DEV "/dev/urandom"
|
||||
|
||||
/* prngd must be manually set up to produce output */
|
||||
/*#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"*/
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From e0fffe80a8815e64dbc1d690c79bf006651c7642 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Wed, 13 Aug 2014 13:50:56 -0400
|
||||
Subject: [PATCH] avoid using of chmod on android when changing config
|
||||
|
||||
This breaks on Android's /sdcard, which has a variety of FUSE
|
||||
implentations, all total shite.
|
||||
---
|
||||
config.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/config.c b/config.c
|
||||
index 9ba40bc..a350638 100644
|
||||
--- a/config.c
|
||||
+++ b/config.c
|
||||
@@ -2124,12 +2124,14 @@ int git_config_set_multivar_in_file_gently(const char *config_filename,
|
||||
close(in_fd);
|
||||
in_fd = -1;
|
||||
|
||||
+ /* not on android
|
||||
if (chmod(get_lock_file_path(lock), st.st_mode & 07777) < 0) {
|
||||
error("chmod on %s failed: %s",
|
||||
get_lock_file_path(lock), strerror(errno));
|
||||
ret = CONFIG_NO_WRITE;
|
||||
goto out_free;
|
||||
}
|
||||
+ */
|
||||
|
||||
if (store.seen == 0)
|
||||
store.seen = 1;
|
||||
@@ -2329,11 +2331,13 @@ int git_config_rename_section_in_file(const char *config_filename,
|
||||
|
||||
fstat(fileno(config_file), &st);
|
||||
|
||||
+ /* not on android
|
||||
if (chmod(get_lock_file_path(lock), st.st_mode & 07777) < 0) {
|
||||
ret = error("chmod on %s failed: %s",
|
||||
get_lock_file_path(lock), strerror(errno));
|
||||
goto out;
|
||||
}
|
||||
+ */
|
||||
|
||||
while (fgets(buf, sizeof(buf), config_file)) {
|
||||
int i;
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From cc0c373b69f93057cbdcb634a461e10ec019d87a Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Wed, 20 Jun 2018 00:29:11 +0100
|
||||
Subject: [PATCH] fix build on android
|
||||
|
||||
---
|
||||
Basement/Terminal.hs | 2 --
|
||||
basement.cabal | 1 -
|
||||
2 files changed, 3 deletions(-)
|
||||
|
||||
diff --git a/Basement/Terminal.hs b/Basement/Terminal.hs
|
||||
index 8136e52..cca9606 100644
|
||||
--- a/Basement/Terminal.hs
|
||||
+++ b/Basement/Terminal.hs
|
||||
@@ -1,11 +1,9 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Basement.Terminal
|
||||
( initialize
|
||||
- , getDimensions
|
||||
) where
|
||||
|
||||
import Basement.Compat.Base
|
||||
-import Basement.Terminal.Size (getDimensions)
|
||||
#ifdef mingw32_HOST_OS
|
||||
import System.IO (hSetEncoding, utf8, hPutStrLn, stderr, stdin, stdout)
|
||||
import System.Win32.Console (setConsoleCP, setConsoleOutputCP, getConsoleCP, getConsoleOutputCP)
|
||||
diff --git a/basement.cabal b/basement.cabal
|
||||
index af50291..0824c94 100644
|
||||
--- a/basement.cabal
|
||||
+++ b/basement.cabal
|
||||
@@ -135,7 +135,6 @@ library
|
||||
Basement.String.Encoding.ASCII7
|
||||
Basement.String.Encoding.ISO_8859_1
|
||||
|
||||
- Basement.Terminal.Size
|
||||
|
||||
|
||||
build-depends: base >= 4.7 && < 5
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
From 3779c75175e895f94b21341ebd6361e9d6af54fd Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Thu, 9 May 2013 12:36:23 -0400
|
||||
Subject: [PATCH] support Android cert store
|
||||
|
||||
Android puts it in a different place and has only hashed files.
|
||||
See https://github.com/vincenthz/hs-certificate/issues/19
|
||||
---
|
||||
System/Certificate/X509/Unix.hs | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/System/Certificate/X509/Unix.hs b/System/Certificate/X509/Unix.hs
|
||||
index 8463465..74e9503 100644
|
||||
--- a/System/Certificate/X509/Unix.hs
|
||||
+++ b/System/Certificate/X509/Unix.hs
|
||||
@@ -35,7 +35,8 @@ import qualified Control.Exception as E
|
||||
import Data.Char
|
||||
|
||||
defaultSystemPath :: FilePath
|
||||
-defaultSystemPath = "/etc/ssl/certs/"
|
||||
+defaultSystemPath = "/system/etc/security/cacerts/"
|
||||
+--defaultSystemPath = "/etc/ssl/certs/"
|
||||
|
||||
envPathOverride :: String
|
||||
envPathOverride = "SYSTEM_CERTIFICATE_PATH"
|
||||
@@ -47,7 +48,7 @@ listDirectoryCerts path = (map (path </>) . filter isCert <$> getDirectoryConten
|
||||
&& isDigit (s !! 9)
|
||||
&& (s !! 8) == '.'
|
||||
&& all isHexDigit (take 8 s)
|
||||
- isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x)
|
||||
+ isCert x = (not $ isPrefixOf "." x)
|
||||
|
||||
getSystemCertificateStore :: IO CertificateStore
|
||||
getSystemCertificateStore = makeCertificateStore . concat <$> (getSystemPath >>= listDirectoryCerts >>= mapM readCertificates)
|
||||
--
|
||||
1.8.2.rc3
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
From 5be3bdfc5ec83eaa5defd42e99f73a685123bea0 Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Fri, 22 May 2015 18:35:43 +0000
|
||||
Subject: [PATCH] hack for android
|
||||
|
||||
---
|
||||
System/Clock.hsc | 32 ++------------------------------
|
||||
1 file changed, 2 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/System/Clock.hsc b/System/Clock.hsc
|
||||
index b6a4968..92bcf8b 100644
|
||||
--- a/System/Clock.hsc
|
||||
+++ b/System/Clock.hsc
|
||||
@@ -35,8 +35,6 @@ import GHC.Generics (Generic)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
-#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
|
||||
-
|
||||
-- | Clock types. A clock may be system-wide (that is, visible to all processes)
|
||||
-- or per-process (measuring time that is meaningful only within a process).
|
||||
-- All implementations shall support CLOCK_REALTIME.
|
||||
@@ -119,7 +117,7 @@ getTime ThreadCPUTime = allocaAndPeek hs_clock_win32_gettime_threadtime
|
||||
#elif defined(__MACH__)
|
||||
getTime clk = allocaAndPeek $ hs_clock_darwin_gettime $ clockToConst clk
|
||||
#else
|
||||
-getTime clk = allocaAndPeek $ clock_gettime $ clockToConst clk
|
||||
+getTime clk = error "getTime clk not implemented"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
@@ -130,7 +128,7 @@ getRes ThreadCPUTime = allocaAndPeek hs_clock_win32_getres_threadtime
|
||||
#elif defined(__MACH__)
|
||||
getRes clk = allocaAndPeek $ hs_clock_darwin_getres $ clockToConst clk
|
||||
#else
|
||||
-getRes clk = allocaAndPeek $ clock_getres $ clockToConst clk
|
||||
+getRes clk = error "getRes clk not implemented"
|
||||
#endif
|
||||
|
||||
-- | TimeSpec structure
|
||||
@@ -139,32 +137,6 @@ data TimeSpec = TimeSpec
|
||||
, nsec :: {-# UNPACK #-} !Int64 -- ^ nanoseconds
|
||||
} deriving (Eq, Generic, Read, Show, Typeable)
|
||||
|
||||
-#if defined(_WIN32)
|
||||
-instance Storable TimeSpec where
|
||||
- sizeOf _ = sizeOf (undefined :: Int64) * 2
|
||||
- alignment _ = alignment (undefined :: Int64)
|
||||
- poke ptr ts = do
|
||||
- pokeByteOff ptr 0 (sec ts)
|
||||
- pokeByteOff ptr (sizeOf (undefined :: Int64)) (nsec ts)
|
||||
- peek ptr = do
|
||||
- TimeSpec
|
||||
- <$> peekByteOff ptr 0
|
||||
- <*> peekByteOff ptr (sizeOf (undefined :: Int64))
|
||||
-#else
|
||||
-instance Storable TimeSpec where
|
||||
- sizeOf _ = #{size struct timespec}
|
||||
- alignment _ = #{alignment struct timespec}
|
||||
- poke ptr ts = do
|
||||
- let xs :: #{type time_t} = fromIntegral $ sec ts
|
||||
- xn :: #{type long} = fromIntegral $ nsec ts
|
||||
- #{poke struct timespec, tv_sec} ptr (xs)
|
||||
- #{poke struct timespec, tv_nsec} ptr (xn)
|
||||
- peek ptr = do
|
||||
- xs :: #{type time_t} <- #{peek struct timespec, tv_sec} ptr
|
||||
- xn :: #{type long} <- #{peek struct timespec, tv_nsec} ptr
|
||||
- return $ TimeSpec (fromIntegral xs) (fromIntegral xn)
|
||||
-#endif
|
||||
-
|
||||
normalize :: TimeSpec -> TimeSpec
|
||||
normalize (TimeSpec xs xn) =
|
||||
let (q, r) = xn `divMod` (10^9)
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 589c6a87ec62e35942c9a86ea8d91b443c80da99 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Fri, 18 Oct 2013 23:07:02 +0000
|
||||
Subject: [PATCH] cross build
|
||||
|
||||
---
|
||||
comonad.cabal | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/comonad.cabal b/comonad.cabal
|
||||
index 5d34b13..756ed92 100644
|
||||
--- a/comonad.cabal
|
||||
+++ b/comonad.cabal
|
||||
@@ -13,7 +13,7 @@ copyright: Copyright (C) 2008-2013 Edward A. Kmett,
|
||||
Copyright (C) 2004-2008 Dave Menendez
|
||||
synopsis: Comonads
|
||||
description: Comonads
|
||||
-build-type: Custom
|
||||
+build-type: Simple
|
||||
extra-source-files:
|
||||
.ghci
|
||||
.gitignore
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,227 +0,0 @@
|
|||
From 0cfdb30120976290068f4bcbebbf236b960afbb6 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 26 Dec 2013 20:01:30 -0400
|
||||
Subject: [PATCH] hack to build
|
||||
|
||||
---
|
||||
Crypto/Number/Basic.hs | 14 --------------
|
||||
Crypto/Number/ModArithmetic.hs | 29 -----------------------------
|
||||
Crypto/Number/Prime.hs | 18 ------------------
|
||||
crypto-numbers.cabal | 2 +-
|
||||
4 files changed, 1 insertion(+), 62 deletions(-)
|
||||
|
||||
diff --git a/Crypto/Number/Basic.hs b/Crypto/Number/Basic.hs
|
||||
index 65c14b3..eaee853 100644
|
||||
--- a/Crypto/Number/Basic.hs
|
||||
+++ b/Crypto/Number/Basic.hs
|
||||
@@ -20,11 +20,7 @@ module Crypto.Number.Basic
|
||||
, areEven
|
||||
) where
|
||||
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-import GHC.Integer.GMP.Internals
|
||||
-#else
|
||||
import Data.Bits
|
||||
-#endif
|
||||
|
||||
-- | sqrti returns two integer (l,b) so that l <= sqrt i <= b
|
||||
-- the implementation is quite naive, use an approximation for the first number
|
||||
@@ -63,25 +59,16 @@ sqrti i
|
||||
-- gcde 'a' 'b' find (x,y,gcd(a,b)) where ax + by = d
|
||||
--
|
||||
gcde :: Integer -> Integer -> (Integer, Integer, Integer)
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-gcde a b = (s, t, g)
|
||||
- where (# g, s #) = gcdExtInteger a b
|
||||
- t = (g - s * a) `div` b
|
||||
-#else
|
||||
gcde a b = if d < 0 then (-x,-y,-d) else (x,y,d) where
|
||||
(d, x, y) = f (a,1,0) (b,0,1)
|
||||
f t (0, _, _) = t
|
||||
f (a', sa, ta) t@(b', sb, tb) =
|
||||
let (q, r) = a' `divMod` b' in
|
||||
f t (r, sa - (q * sb), ta - (q * tb))
|
||||
-#endif
|
||||
|
||||
-- | get the extended GCD of two integer using the extended binary algorithm (HAC 14.61)
|
||||
-- get (x,y,d) where d = gcd(a,b) and x,y satisfying ax + by = d
|
||||
gcde_binary :: Integer -> Integer -> (Integer, Integer, Integer)
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-gcde_binary = gcde
|
||||
-#else
|
||||
gcde_binary a' b'
|
||||
| b' == 0 = (1,0,a')
|
||||
| a' >= b' = compute a' b'
|
||||
@@ -105,7 +92,6 @@ gcde_binary a' b'
|
||||
in if u2 >= v2
|
||||
then loop g x y (u2 - v2) v2 (a2 - c2) (b2 - d2) c2 d2
|
||||
else loop g x y u2 (v2 - u2) a2 b2 (c2 - a2) (d2 - b2)
|
||||
-#endif
|
||||
|
||||
-- | check if a list of integer are all even
|
||||
areEven :: [Integer] -> Bool
|
||||
diff --git a/Crypto/Number/ModArithmetic.hs b/Crypto/Number/ModArithmetic.hs
|
||||
index 942c12f..f8cfc32 100644
|
||||
--- a/Crypto/Number/ModArithmetic.hs
|
||||
+++ b/Crypto/Number/ModArithmetic.hs
|
||||
@@ -29,12 +29,8 @@ module Crypto.Number.ModArithmetic
|
||||
import Control.Exception (throw, Exception)
|
||||
import Data.Typeable
|
||||
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-import GHC.Integer.GMP.Internals
|
||||
-#else
|
||||
import Crypto.Number.Basic (gcde_binary)
|
||||
import Data.Bits
|
||||
-#endif
|
||||
|
||||
-- | Raised when two numbers are supposed to be coprimes but are not.
|
||||
data CoprimesAssertionError = CoprimesAssertionError
|
||||
@@ -55,13 +51,7 @@ expSafe :: Integer -- ^ base
|
||||
-> Integer -- ^ exponant
|
||||
-> Integer -- ^ modulo
|
||||
-> Integer -- ^ result
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-expSafe b e m
|
||||
- | odd m = powModSecInteger b e m
|
||||
- | otherwise = powModInteger b e m
|
||||
-#else
|
||||
expSafe = exponentiation
|
||||
-#endif
|
||||
|
||||
-- | Compute the modular exponentiation of base^exponant using
|
||||
-- the fastest algorithm without any consideration for
|
||||
@@ -74,11 +64,7 @@ expFast :: Integer -- ^ base
|
||||
-> Integer -- ^ modulo
|
||||
-> Integer -- ^ result
|
||||
expFast =
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
- powModInteger
|
||||
-#else
|
||||
exponentiation
|
||||
-#endif
|
||||
|
||||
-- note on exponentiation: 0^0 is treated as 1 for mimicking the standard library;
|
||||
-- the mathematic debate is still open on whether or not this is true, but pratically
|
||||
@@ -87,22 +73,15 @@ expFast =
|
||||
-- | exponentiation_rtl_binary computes modular exponentiation as b^e mod m
|
||||
-- using the right-to-left binary exponentiation algorithm (HAC 14.79)
|
||||
exponentiation_rtl_binary :: Integer -> Integer -> Integer -> Integer
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-exponentiation_rtl_binary = expSafe
|
||||
-#else
|
||||
exponentiation_rtl_binary 0 0 m = 1 `mod` m
|
||||
exponentiation_rtl_binary b e m = loop e b 1
|
||||
where sq x = (x * x) `mod` m
|
||||
loop !0 _ !a = a `mod` m
|
||||
loop !i !s !a = loop (i `shiftR` 1) (sq s) (if odd i then a * s else a)
|
||||
-#endif
|
||||
|
||||
-- | exponentiation computes modular exponentiation as b^e mod m
|
||||
-- using repetitive squaring.
|
||||
exponentiation :: Integer -> Integer -> Integer -> Integer
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-exponentiation = expSafe
|
||||
-#else
|
||||
exponentiation b e m
|
||||
| b == 1 = b
|
||||
| e == 0 = 1
|
||||
@@ -110,7 +89,6 @@ exponentiation b e m
|
||||
| even e = let p = (exponentiation b (e `div` 2) m) `mod` m
|
||||
in (p^(2::Integer)) `mod` m
|
||||
| otherwise = (b * exponentiation b (e-1) m) `mod` m
|
||||
-#endif
|
||||
|
||||
--{-# DEPRECATED exponantiation_rtl_binary "typo in API name it's called exponentiation_rtl_binary #-}
|
||||
exponantiation_rtl_binary :: Integer -> Integer -> Integer -> Integer
|
||||
@@ -122,17 +100,10 @@ exponantiation = exponentiation
|
||||
|
||||
-- | inverse computes the modular inverse as in g^(-1) mod m
|
||||
inverse :: Integer -> Integer -> Maybe Integer
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-inverse g m
|
||||
- | r == 0 = Nothing
|
||||
- | otherwise = Just r
|
||||
- where r = recipModInteger g m
|
||||
-#else
|
||||
inverse g m
|
||||
| d > 1 = Nothing
|
||||
| otherwise = Just (x `mod` m)
|
||||
where (x,_,d) = gcde_binary g m
|
||||
-#endif
|
||||
|
||||
-- | Compute the modular inverse of 2 coprime numbers.
|
||||
-- This is equivalent to inverse except that the result
|
||||
diff --git a/Crypto/Number/Prime.hs b/Crypto/Number/Prime.hs
|
||||
index 0cea9da..458c94d 100644
|
||||
--- a/Crypto/Number/Prime.hs
|
||||
+++ b/Crypto/Number/Prime.hs
|
||||
@@ -3,9 +3,7 @@
|
||||
#ifndef MIN_VERSION_integer_gmp
|
||||
#define MIN_VERSION_integer_gmp(a,b,c) 0
|
||||
#endif
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
{-# LANGUAGE MagicHash #-}
|
||||
-#endif
|
||||
-- |
|
||||
-- Module : Crypto.Number.Prime
|
||||
-- License : BSD-style
|
||||
@@ -30,12 +28,7 @@ import Crypto.Number.Generate
|
||||
import Crypto.Number.Basic (sqrti, gcde_binary)
|
||||
import Crypto.Number.ModArithmetic (exponantiation)
|
||||
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-import GHC.Integer.GMP.Internals
|
||||
-import GHC.Base
|
||||
-#else
|
||||
import Data.Bits
|
||||
-#endif
|
||||
|
||||
-- | returns if the number is probably prime.
|
||||
-- first a list of small primes are implicitely tested for divisibility,
|
||||
@@ -78,21 +71,11 @@ findPrimeFromWith rng prop !n
|
||||
-- | find a prime from a starting point with no specific property.
|
||||
findPrimeFrom :: CPRG g => g -> Integer -> (Integer, g)
|
||||
findPrimeFrom rng n =
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
- (nextPrimeInteger n, rng)
|
||||
-#else
|
||||
findPrimeFromWith rng (\g _ -> (True, g)) n
|
||||
-#endif
|
||||
|
||||
-- | Miller Rabin algorithm return if the number is probably prime or composite.
|
||||
-- the tries parameter is the number of recursion, that determines the accuracy of the test.
|
||||
primalityTestMillerRabin :: CPRG g => g -> Int -> Integer -> (Bool, g)
|
||||
-#if MIN_VERSION_integer_gmp(0,5,1)
|
||||
-primalityTestMillerRabin rng (I# tries) !n =
|
||||
- case testPrimeInteger n tries of
|
||||
- 0# -> (False, rng)
|
||||
- _ -> (True, rng)
|
||||
-#else
|
||||
primalityTestMillerRabin rng tries !n
|
||||
| n <= 3 = error "Miller-Rabin requires tested value to be > 3"
|
||||
| even n = (False, rng)
|
||||
@@ -129,7 +112,6 @@ primalityTestMillerRabin rng tries !n
|
||||
| x2 == 1 = False
|
||||
| x2 /= nm1 = loop' ws ((x2*x2) `mod` n) (r+1)
|
||||
| otherwise = loop ws
|
||||
-#endif
|
||||
|
||||
{-
|
||||
n < z -> witness to test
|
||||
diff --git a/crypto-numbers.cabal b/crypto-numbers.cabal
|
||||
index 9610e34..6669d78 100644
|
||||
--- a/crypto-numbers.cabal
|
||||
+++ b/crypto-numbers.cabal
|
||||
@@ -15,7 +15,7 @@ Extra-Source-Files: Tests/*.hs
|
||||
|
||||
Flag integer-gmp
|
||||
Description: Are we using integer-gmp?
|
||||
- Default: True
|
||||
+ Default: False
|
||||
|
||||
Library
|
||||
Build-Depends: base >= 4 && < 5
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 86eca0993e1716b4db14570836efbe838626892f Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Sun, 25 May 2014 09:11:15 +0200
|
||||
Subject: [PATCH] cross build
|
||||
|
||||
---
|
||||
distributive.cabal | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/distributive.cabal b/distributive.cabal
|
||||
index 9be5133..3e72c65 100644
|
||||
--- a/distributive.cabal
|
||||
+++ b/distributive.cabal
|
||||
@@ -12,7 +12,7 @@ bug-reports: http://github.com/ekmett/distributive/issues
|
||||
copyright: Copyright (C) 2011-2014 Edward A. Kmett
|
||||
synopsis: Distributive functors -- Dual to Traversable
|
||||
description: Distributive functors -- Dual to Traversable
|
||||
-build-type: Custom
|
||||
+build-type: Simple
|
||||
extra-source-files:
|
||||
.ghci
|
||||
.travis.yml
|
||||
--
|
||||
2.0.0.rc2
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
From 087f1ae5e17f0e6d7c9f6b4092a5bb5bb6f5bf60 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:59:11 +0000
|
||||
Subject: [PATCH] port
|
||||
|
||||
---
|
||||
Network/DNS/Resolver.hs | 13 ++++++++-----
|
||||
dns.cabal | 1 +
|
||||
2 files changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Network/DNS/Resolver.hs b/Network/DNS/Resolver.hs
|
||||
index 5721e03..c4400d1 100644
|
||||
--- a/Network/DNS/Resolver.hs
|
||||
+++ b/Network/DNS/Resolver.hs
|
||||
@@ -19,7 +19,7 @@ module Network.DNS.Resolver (
|
||||
) where
|
||||
|
||||
import Control.Applicative ((<$>), (<*>), pure)
|
||||
-import Control.Exception (bracket)
|
||||
+import Control.Exception (bracket, catch, IOException)
|
||||
import qualified Data.ByteString.Char8 as BS
|
||||
import Data.Char (isSpace)
|
||||
import Data.List (isPrefixOf)
|
||||
@@ -32,6 +32,7 @@ import Network.Socket (AddrInfoFlag(..), AddrInfo(..), defaultHints, getAddrInfo
|
||||
import Prelude hiding (lookup)
|
||||
import System.Random (getStdRandom, randomR)
|
||||
import System.Timeout (timeout)
|
||||
+import System.Process
|
||||
|
||||
#if mingw32_HOST_OS == 1
|
||||
import Network.Socket (send)
|
||||
@@ -130,10 +131,12 @@ makeResolvSeed conf = ResolvSeed <$> addr
|
||||
where
|
||||
addr = case resolvInfo conf of
|
||||
RCHostName numhost -> makeAddrInfo numhost
|
||||
- RCFilePath file -> toAddr <$> readFile file >>= makeAddrInfo
|
||||
- toAddr cs = let l:_ = filter ("nameserver" `isPrefixOf`) $ lines cs
|
||||
- in extract l
|
||||
- extract = reverse . dropWhile isSpace . reverse . dropWhile isSpace . drop 11
|
||||
+ RCFilePath file -> do
|
||||
+ -- Android has no /etc/resolv.conf; use getprop command.
|
||||
+ ls <- catch (lines <$> readProcess "getprop" ["net.dns1"] []) (const (return []) :: IOException -> IO [String])
|
||||
+ makeAddrInfo $ case ls of
|
||||
+ [] -> "8.8.8.8" -- google public dns as a fallback only
|
||||
+ (l:_) -> l
|
||||
|
||||
makeAddrInfo :: HostName -> IO AddrInfo
|
||||
makeAddrInfo addr = do
|
||||
diff --git a/dns.cabal b/dns.cabal
|
||||
index ceaf5f4..cd15e61 100644
|
||||
--- a/dns.cabal
|
||||
+++ b/dns.cabal
|
||||
@@ -37,6 +37,7 @@ Library
|
||||
, network >= 2.3
|
||||
, random
|
||||
, resourcet
|
||||
+ , process
|
||||
else
|
||||
Build-Depends: base >= 4 && < 5
|
||||
, attoparsec
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From df0f41f92d003f7d59ef927737ffec3a9bd61827 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Tue, 7 May 2013 18:41:01 -0400
|
||||
Subject: [PATCH] avoid cabal hell
|
||||
|
||||
---
|
||||
gsasl.cabal | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gsasl.cabal b/gsasl.cabal
|
||||
index d991873..c5c2b19 100644
|
||||
--- a/gsasl.cabal
|
||||
+++ b/gsasl.cabal
|
||||
@@ -31,7 +31,7 @@ library
|
||||
build-depends:
|
||||
base >= 4.0 && < 5.0
|
||||
, transformers >= 0.2
|
||||
- , bytestring >= 0.9
|
||||
+ , bytestring >= 0.10.3.0
|
||||
|
||||
pkgconfig-depends: libgsasl >= 1.1
|
||||
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
From 7beec2e707d59f9573aa2dc7c57bd2a62f16b480 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Wed, 15 May 2013 19:06:03 -0400
|
||||
Subject: [PATCH] build without IPv6 stuff
|
||||
|
||||
---
|
||||
Data/IP.hs | 2 +-
|
||||
Data/IP/Addr.hs | 3 +++
|
||||
2 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Data/IP.hs b/Data/IP.hs
|
||||
index cffef93..ea486c9 100644
|
||||
--- a/Data/IP.hs
|
||||
+++ b/Data/IP.hs
|
||||
@@ -6,7 +6,7 @@ module Data.IP (
|
||||
-- ** IP data
|
||||
IP (..)
|
||||
, IPv4, toIPv4, fromIPv4, fromHostAddress, toHostAddress
|
||||
- , IPv6, toIPv6, fromIPv6, fromHostAddress6, toHostAddress6
|
||||
+ , IPv6, toIPv6, fromIPv6 -- , fromHostAddress6, toHostAddress6
|
||||
-- ** IP range data
|
||||
, IPRange (..)
|
||||
, AddrRange (addr, mask, mlen)
|
||||
diff --git a/Data/IP/Addr.hs b/Data/IP/Addr.hs
|
||||
index faaf0c7..5b556fb 100644
|
||||
--- a/Data/IP/Addr.hs
|
||||
+++ b/Data/IP/Addr.hs
|
||||
@@ -312,6 +312,7 @@ toHostAddress (IP4 addr4)
|
||||
| byteOrder == LittleEndian = fixByteOrder addr4
|
||||
| otherwise = addr4
|
||||
|
||||
+{-
|
||||
-- | The 'fromHostAddress6' function converts 'HostAddress6' to 'IPv6'.
|
||||
fromHostAddress6 :: HostAddress6 -> IPv6
|
||||
fromHostAddress6 = IP6
|
||||
@@ -320,6 +321,8 @@ fromHostAddress6 = IP6
|
||||
toHostAddress6 :: IPv6 -> HostAddress6
|
||||
toHostAddress6 (IP6 addr6) = addr6
|
||||
|
||||
+-}
|
||||
+
|
||||
fixByteOrder :: Word32 -> Word32
|
||||
fixByteOrder s = d1 .|. d2 .|. d3 .|. d4
|
||||
where
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From cb5252db1a0d515da69d9167a8b2facd839940b2 Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Mon, 11 Nov 2013 02:29:06 +0000
|
||||
Subject: [PATCH] fix build with new ghc
|
||||
|
||||
---
|
||||
src/Language/JavaScript/Parser/Lexer.hs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Language/JavaScript/Parser/Lexer.hs b/src/Language/JavaScript/Parser/Lexer.hs
|
||||
index 79fa9c5..fa96e29 100644
|
||||
--- a/src/Language/JavaScript/Parser/Lexer.hs
|
||||
+++ b/src/Language/JavaScript/Parser/Lexer.hs
|
||||
@@ -712,7 +712,7 @@ alex_scan_tkn user orig_input len input s last_acc =
|
||||
(offset) = (base +# ord_c)
|
||||
(check) = alexIndexInt16OffAddr alex_check offset
|
||||
|
||||
- (new_s) = if (offset >=# 0#) && (check ==# ord_c)
|
||||
+ (new_s) = if (tagToEnum# (offset >=# 0#)) && (tagToEnum# (check ==# ord_c))
|
||||
then alexIndexInt16OffAddr alex_table offset
|
||||
else alexIndexInt16OffAddr alex_deflt s
|
||||
in
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,341 +0,0 @@
|
|||
From 834a0d3bfe56b969a65eff834604442cde8798f7 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 20 Jun 2018 05:06:41 +0100
|
||||
Subject: [PATCH] android port fixes
|
||||
|
||||
Build note: Ensure a hsc2hs in PATH is modified to pass -x to the real
|
||||
one, to enable cross-compiling.
|
||||
---
|
||||
Network/BSD.hsc | 84 -------------------------------------------
|
||||
Network/Socket.hsc | 16 ++++-----
|
||||
Network/Socket/ByteString.hsc | 2 +-
|
||||
Network/Socket/Internal.hsc | 2 +-
|
||||
Network/Socket/Types.hsc | 14 +++-----
|
||||
cbits/HsNet.c | 18 ++++++++++
|
||||
configure | 1 +
|
||||
include/HsNetworkConfig.h | 4 +--
|
||||
8 files changed, 36 insertions(+), 105 deletions(-)
|
||||
|
||||
diff --git a/Network/BSD.hsc b/Network/BSD.hsc
|
||||
index 67f2fcd..4c86af5 100644
|
||||
--- a/Network/BSD.hsc
|
||||
+++ b/Network/BSD.hsc
|
||||
@@ -28,12 +28,8 @@ module Network.BSD
|
||||
, hostAddress
|
||||
|
||||
#if defined(HAVE_GETHOSTENT) && !defined(mingw32_HOST_OS)
|
||||
- , getHostEntries
|
||||
-
|
||||
-- ** Low level functionality
|
||||
- , setHostEntry
|
||||
, getHostEntry
|
||||
- , endHostEntry
|
||||
#endif
|
||||
|
||||
-- * Service names
|
||||
@@ -61,14 +57,6 @@ module Network.BSD
|
||||
, getProtocolNumber
|
||||
, defaultProtocol
|
||||
|
||||
-#if !defined(mingw32_HOST_OS)
|
||||
- , getProtocolEntries
|
||||
- -- ** Low level functionality
|
||||
- , setProtocolEntry
|
||||
- , getProtocolEntry
|
||||
- , endProtocolEntry
|
||||
-#endif
|
||||
-
|
||||
-- * Port numbers
|
||||
, PortNumber
|
||||
|
||||
@@ -80,11 +68,6 @@ module Network.BSD
|
||||
#if !defined(mingw32_HOST_OS)
|
||||
, getNetworkByName
|
||||
, getNetworkByAddr
|
||||
- , getNetworkEntries
|
||||
- -- ** Low level functionality
|
||||
- , setNetworkEntry
|
||||
- , getNetworkEntry
|
||||
- , endNetworkEntry
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IF_NAMETOINDEX)
|
||||
@@ -298,30 +281,6 @@ getProtocolNumber proto = do
|
||||
(ProtocolEntry _ _ num) <- getProtocolByName proto
|
||||
return num
|
||||
|
||||
-#if !defined(mingw32_HOST_OS)
|
||||
-getProtocolEntry :: IO ProtocolEntry -- Next Protocol Entry from DB
|
||||
-getProtocolEntry = withLock $ do
|
||||
- ent <- throwNoSuchThingIfNull "getProtocolEntry" "no such protocol entry"
|
||||
- $ c_getprotoent
|
||||
- peek ent
|
||||
-
|
||||
-foreign import ccall unsafe "getprotoent" c_getprotoent :: IO (Ptr ProtocolEntry)
|
||||
-
|
||||
-setProtocolEntry :: Bool -> IO () -- Keep DB Open ?
|
||||
-setProtocolEntry flg = withLock $ c_setprotoent (fromBool flg)
|
||||
-
|
||||
-foreign import ccall unsafe "setprotoent" c_setprotoent :: CInt -> IO ()
|
||||
-
|
||||
-endProtocolEntry :: IO ()
|
||||
-endProtocolEntry = withLock $ c_endprotoent
|
||||
-
|
||||
-foreign import ccall unsafe "endprotoent" c_endprotoent :: IO ()
|
||||
-
|
||||
-getProtocolEntries :: Bool -> IO [ProtocolEntry]
|
||||
-getProtocolEntries stayOpen = withLock $ do
|
||||
- setProtocolEntry stayOpen
|
||||
- getEntries (getProtocolEntry) (endProtocolEntry)
|
||||
-#endif
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
-- Host lookups
|
||||
@@ -405,21 +364,6 @@ getHostEntry = withLock $ do
|
||||
>>= peek
|
||||
|
||||
foreign import ccall unsafe "gethostent" c_gethostent :: IO (Ptr HostEntry)
|
||||
-
|
||||
-setHostEntry :: Bool -> IO ()
|
||||
-setHostEntry flg = withLock $ c_sethostent (fromBool flg)
|
||||
-
|
||||
-foreign import ccall unsafe "sethostent" c_sethostent :: CInt -> IO ()
|
||||
-
|
||||
-endHostEntry :: IO ()
|
||||
-endHostEntry = withLock $ c_endhostent
|
||||
-
|
||||
-foreign import ccall unsafe "endhostent" c_endhostent :: IO ()
|
||||
-
|
||||
-getHostEntries :: Bool -> IO [HostEntry]
|
||||
-getHostEntries stayOpen = do
|
||||
- setHostEntry stayOpen
|
||||
- getEntries (getHostEntry) (endHostEntry)
|
||||
#endif
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
@@ -482,34 +426,6 @@ getNetworkByAddr addr family = withLock $ do
|
||||
|
||||
foreign import ccall unsafe "getnetbyaddr"
|
||||
c_getnetbyaddr :: NetworkAddr -> CInt -> IO (Ptr NetworkEntry)
|
||||
-
|
||||
-getNetworkEntry :: IO NetworkEntry
|
||||
-getNetworkEntry = withLock $ do
|
||||
- throwNoSuchThingIfNull "getNetworkEntry" "no more network entries"
|
||||
- $ c_getnetent
|
||||
- >>= peek
|
||||
-
|
||||
-foreign import ccall unsafe "getnetent" c_getnetent :: IO (Ptr NetworkEntry)
|
||||
-
|
||||
--- | Open the network name database. The parameter specifies
|
||||
--- whether a connection is maintained open between various
|
||||
--- networkEntry calls
|
||||
-setNetworkEntry :: Bool -> IO ()
|
||||
-setNetworkEntry flg = withLock $ c_setnetent (fromBool flg)
|
||||
-
|
||||
-foreign import ccall unsafe "setnetent" c_setnetent :: CInt -> IO ()
|
||||
-
|
||||
--- | Close the connection to the network name database.
|
||||
-endNetworkEntry :: IO ()
|
||||
-endNetworkEntry = withLock $ c_endnetent
|
||||
-
|
||||
-foreign import ccall unsafe "endnetent" c_endnetent :: IO ()
|
||||
-
|
||||
--- | Get the list of network entries.
|
||||
-getNetworkEntries :: Bool -> IO [NetworkEntry]
|
||||
-getNetworkEntries stayOpen = do
|
||||
- setNetworkEntry stayOpen
|
||||
- getEntries (getNetworkEntry) (endNetworkEntry)
|
||||
#endif
|
||||
|
||||
-- ---------------------------------------------------------------------------
|
||||
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
|
||||
index 8b2e6fe..b02b80d 100644
|
||||
--- a/Network/Socket.hsc
|
||||
+++ b/Network/Socket.hsc
|
||||
@@ -59,7 +59,7 @@ module Network.Socket
|
||||
, HostName
|
||||
, ServiceName
|
||||
|
||||
-#if defined(IPV6_SOCKET_SUPPORT)
|
||||
+#if defined(IPV6_SOCKET_SUPPORT) || 1
|
||||
, AddrInfo(..)
|
||||
|
||||
, AddrInfoFlag(..)
|
||||
@@ -143,7 +143,7 @@ module Network.Socket
|
||||
-- * Special constants
|
||||
, aNY_PORT
|
||||
, iNADDR_ANY
|
||||
-#if defined(IPV6_SOCKET_SUPPORT)
|
||||
+#if defined(IPV6_SOCKET_SUPPORTNO)
|
||||
, iN6ADDR_ANY
|
||||
#endif
|
||||
, sOMAXCONN
|
||||
@@ -521,7 +521,7 @@ accept sock@(MkSocket s family stype protocol status) = do
|
||||
return new_sock
|
||||
#else
|
||||
with (fromIntegral sz) $ \ ptr_len -> do
|
||||
-# ifdef HAVE_ACCEPT4
|
||||
+#if 0
|
||||
new_sock <- throwSocketErrorIfMinus1RetryMayBlock "accept"
|
||||
(threadWaitRead (fromIntegral s))
|
||||
(c_accept4 s sockaddr ptr_len (#const SOCK_NONBLOCK))
|
||||
@@ -903,7 +903,7 @@ packSocketOption so =
|
||||
Just MaxSegment -> Just ((#const IPPROTO_TCP), (#const TCP_MAXSEG))
|
||||
#endif
|
||||
#ifdef TCP_NODELAY
|
||||
- Just NoDelay -> Just ((#const IPPROTO_TCP), (#const TCP_NODELAY))
|
||||
+ Just NoDelay -> Nothing -- Just ((#const IPPROTO_TCP), (#const TCP_NODELAY))
|
||||
#endif
|
||||
#ifdef TCP_USER_TIMEOUT
|
||||
Just UserTimeout -> Just ((#const IPPROTO_TCP), (#const TCP_USER_TIMEOUT))
|
||||
@@ -1036,9 +1036,9 @@ iNADDR_ANY :: HostAddress
|
||||
iNADDR_ANY = htonl (#const INADDR_ANY)
|
||||
|
||||
-- | Converts the from host byte order to network byte order.
|
||||
-foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32
|
||||
+foreign import CALLCONV unsafe "my_htonl" htonl :: Word32 -> Word32
|
||||
-- | Converts the from network byte order to host byte order.
|
||||
-foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32
|
||||
+foreign import CALLCONV unsafe "my_ntohl" ntohl :: Word32 -> Word32
|
||||
|
||||
#if defined(IPV6_SOCKET_SUPPORT)
|
||||
-- | The IPv6 wild card address.
|
||||
@@ -1206,7 +1206,7 @@ unpackBits ((k,v):xs) r
|
||||
-----------------------------------------------------------------------------
|
||||
-- Address and service lookups
|
||||
|
||||
-#if defined(IPV6_SOCKET_SUPPORT)
|
||||
+#if defined(IPV6_SOCKET_SUPPORT) || 1
|
||||
|
||||
-- | Flags that control the querying behaviour of 'getAddrInfo'.
|
||||
-- For more information, see <https://tools.ietf.org/html/rfc3493#page-25>
|
||||
@@ -1568,7 +1568,7 @@ foreign import CALLCONV unsafe "bind"
|
||||
c_bind :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
|
||||
foreign import CALLCONV SAFE_ON_WIN "connect"
|
||||
c_connect :: CInt -> Ptr SockAddr -> CInt{-CSockLen???-} -> IO CInt
|
||||
-#ifdef HAVE_ACCEPT4
|
||||
+#if 0
|
||||
foreign import CALLCONV unsafe "accept4"
|
||||
c_accept4 :: CInt -> Ptr SockAddr -> Ptr CInt{-CSockLen???-} -> CInt -> IO CInt
|
||||
#else
|
||||
diff --git a/Network/Socket/ByteString.hsc b/Network/Socket/ByteString.hsc
|
||||
index 93e29c9..a736932 100644
|
||||
--- a/Network/Socket/ByteString.hsc
|
||||
+++ b/Network/Socket/ByteString.hsc
|
||||
@@ -177,7 +177,7 @@ sendMany sock@(MkSocket fd _ _ _ _) cs = do
|
||||
liftM fromIntegral . withIOVec cs $ \(iovsPtr, iovsLen) ->
|
||||
throwSocketErrorWaitWrite sock "writev" $
|
||||
c_writev (fromIntegral fd) iovsPtr
|
||||
- (fromIntegral (min iovsLen (#const IOV_MAX)))
|
||||
+ (fromIntegral (min iovsLen (0x0026)))
|
||||
#else
|
||||
sendMany sock = sendAll sock . B.concat
|
||||
#endif
|
||||
diff --git a/Network/Socket/Internal.hsc b/Network/Socket/Internal.hsc
|
||||
index c8bf4f6..2463bd7 100644
|
||||
--- a/Network/Socket/Internal.hsc
|
||||
+++ b/Network/Socket/Internal.hsc
|
||||
@@ -24,7 +24,7 @@ module Network.Socket.Internal
|
||||
(
|
||||
-- * Socket addresses
|
||||
HostAddress
|
||||
-#if defined(IPV6_SOCKET_SUPPORT)
|
||||
+#if defined(IPV6_SOCKET_SUPPORTNO)
|
||||
, HostAddress6
|
||||
, FlowInfo
|
||||
, ScopeID
|
||||
diff --git a/Network/Socket/Types.hsc b/Network/Socket/Types.hsc
|
||||
index b42c98d..e5bb9fe 100644
|
||||
--- a/Network/Socket/Types.hsc
|
||||
+++ b/Network/Socket/Types.hsc
|
||||
@@ -758,10 +758,10 @@ intToPortNumber v = PortNum (htons (fromIntegral v))
|
||||
portNumberToInt :: PortNumber -> Int
|
||||
portNumberToInt (PortNum po) = fromIntegral (ntohs po)
|
||||
|
||||
-foreign import CALLCONV unsafe "ntohs" ntohs :: Word16 -> Word16
|
||||
-foreign import CALLCONV unsafe "htons" htons :: Word16 -> Word16
|
||||
-foreign import CALLCONV unsafe "ntohl" ntohl :: Word32 -> Word32
|
||||
-foreign import CALLCONV unsafe "htonl" htonl :: Word32 -> Word32
|
||||
+foreign import CALLCONV unsafe "my_ntohs" ntohs :: Word16 -> Word16
|
||||
+foreign import CALLCONV unsafe "my_htons" htons :: Word16 -> Word16
|
||||
+foreign import CALLCONV unsafe "my_ntohl" ntohl :: Word32 -> Word32
|
||||
+foreign import CALLCONV unsafe "my_htonl" htonl :: Word32 -> Word32
|
||||
|
||||
instance Enum PortNumber where
|
||||
toEnum = intToPortNumber
|
||||
@@ -1071,13 +1071,9 @@ poke32 p i0 a = do
|
||||
-- | Private newtype proxy for the Storable instance. To avoid orphan instances.
|
||||
newtype In6Addr = In6Addr HostAddress6
|
||||
|
||||
-#if __GLASGOW_HASKELL__ < 800
|
||||
-#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
|
||||
-#endif
|
||||
-
|
||||
instance Storable In6Addr where
|
||||
sizeOf _ = #const sizeof(struct in6_addr)
|
||||
- alignment _ = #alignment struct in6_addr
|
||||
+ alignment _ = 64
|
||||
|
||||
peek p = do
|
||||
a <- peek32 p 0
|
||||
diff --git a/cbits/HsNet.c b/cbits/HsNet.c
|
||||
index 86b55dc..6225c32 100644
|
||||
--- a/cbits/HsNet.c
|
||||
+++ b/cbits/HsNet.c
|
||||
@@ -6,3 +6,21 @@
|
||||
|
||||
#define INLINE
|
||||
#include "HsNet.h"
|
||||
+
|
||||
+#include <sys/endian.h>
|
||||
+uint16_t my_htons(uint16_t v)
|
||||
+{
|
||||
+ htons(v);
|
||||
+}
|
||||
+uint32_t my_htonl(uint32_t v)
|
||||
+{
|
||||
+ htonl(v);
|
||||
+}
|
||||
+uint16_t my_ntohs(uint16_t v)
|
||||
+{
|
||||
+ ntohs(v);
|
||||
+}
|
||||
+uint32_t my_ntohl(uint32_t v)
|
||||
+{
|
||||
+ ntohl(v);
|
||||
+}
|
||||
diff --git a/configure b/configure
|
||||
index 9e82879..24ef3ce 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1,4 +1,5 @@
|
||||
#! /bin/sh
|
||||
+set -- --host=arm-linux-androideabi
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for Haskell network package 2.3.0.14.
|
||||
#
|
||||
diff --git a/include/HsNetworkConfig.h b/include/HsNetworkConfig.h
|
||||
index 383f6e2..62b8852 100644
|
||||
--- a/include/HsNetworkConfig.h
|
||||
+++ b/include/HsNetworkConfig.h
|
||||
@@ -2,7 +2,7 @@
|
||||
/* include/HsNetworkConfig.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if you have the `accept4' function. */
|
||||
-#define HAVE_ACCEPT4 1
|
||||
+/* #undef HAVE_ACCEPT4 */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
@@ -73,7 +73,7 @@
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the <linux/can.h> header file. */
|
||||
-#define HAVE_LINUX_CAN_H 1
|
||||
+/* #undef HAVE_LINUX_CAN_H */
|
||||
|
||||
/* Define to 1 if you have a Linux sendfile(2) implementation. */
|
||||
#define HAVE_LINUX_SENDFILE 1
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From ff2d1519fb294a123636ac6bd80e50741922c856 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Sun, 25 May 2014 09:41:13 +0200
|
||||
Subject: [PATCH] disable i386 opt stuff to allow cross-compilation
|
||||
|
||||
---
|
||||
primitive.cabal | 2 --
|
||||
1 file changed, 2 deletions(-)
|
||||
|
||||
diff --git a/primitive.cabal b/primitive.cabal
|
||||
index 9651dfd..b655e8d 100644
|
||||
--- a/primitive.cabal
|
||||
+++ b/primitive.cabal
|
||||
@@ -47,8 +47,6 @@ Library
|
||||
cc-options: -O3 -fomit-frame-pointer -Wall
|
||||
if !os(solaris)
|
||||
cc-options: -ftree-vectorize
|
||||
- if arch(i386) || arch(x86_64)
|
||||
- cc-options: -msse2
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
--
|
||||
2.0.0.rc2
|
||||
|
|
@ -1,135 +0,0 @@
|
|||
From e1a2f80f6bec25921ab645a0aaf1c6422a8917ab Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Mon, 11 Nov 2013 01:06:58 +0000
|
||||
Subject: [PATCH] fix
|
||||
|
||||
---
|
||||
Network/Socks5/Command.hs | 8 +-------
|
||||
Network/Socks5/Conf.hs | 1 -
|
||||
Network/Socks5/Lowlevel.hs | 1 -
|
||||
Network/Socks5/Types.hs | 18 +-----------------
|
||||
Network/Socks5/Wire.hs | 2 --
|
||||
5 files changed, 2 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/Network/Socks5/Command.hs b/Network/Socks5/Command.hs
|
||||
index db95fbd..fdba5ec 100644
|
||||
--- a/Network/Socks5/Command.hs
|
||||
+++ b/Network/Socks5/Command.hs
|
||||
@@ -13,7 +13,6 @@ module Network.Socks5.Command
|
||||
, Connect(..)
|
||||
, Command(..)
|
||||
, connectIPV4
|
||||
- , connectIPV6
|
||||
, connectDomainName
|
||||
-- * lowlevel interface
|
||||
, rpc
|
||||
@@ -29,7 +28,7 @@ import qualified Data.ByteString as B
|
||||
import qualified Data.ByteString.Char8 as BC
|
||||
import Data.Serialize
|
||||
|
||||
-import Network.Socket (Socket, PortNumber, HostAddress, HostAddress6)
|
||||
+import Network.Socket (Socket, PortNumber, HostAddress)
|
||||
import Network.Socket.ByteString
|
||||
|
||||
import Network.Socks5.Types
|
||||
@@ -65,11 +64,6 @@ connectIPV4 socket hostaddr port = onReply <$> rpc_ socket (Connect $ SocksAddre
|
||||
where onReply (SocksAddrIPV4 h, p) = (h, p)
|
||||
onReply _ = error "ipv4 requested, got something different"
|
||||
|
||||
-connectIPV6 :: Socket -> HostAddress6 -> PortNumber -> IO (HostAddress6, PortNumber)
|
||||
-connectIPV6 socket hostaddr6 port = onReply <$> rpc_ socket (Connect $ SocksAddress (SocksAddrIPV6 hostaddr6) port)
|
||||
- where onReply (SocksAddrIPV6 h, p) = (h, p)
|
||||
- onReply _ = error "ipv6 requested, got something different"
|
||||
-
|
||||
-- TODO: FQDN should only be ascii, maybe putting a "fqdn" data type
|
||||
-- in front to make sure and make the BC.pack safe.
|
||||
connectDomainName :: Socket -> String -> PortNumber -> IO (SocksHostAddress, PortNumber)
|
||||
diff --git a/Network/Socks5/Conf.hs b/Network/Socks5/Conf.hs
|
||||
index c29ff7b..007d382 100644
|
||||
--- a/Network/Socks5/Conf.hs
|
||||
+++ b/Network/Socks5/Conf.hs
|
||||
@@ -47,5 +47,4 @@ defaultSocksConfFromSockAddr sockaddr = SocksConf server SocksVer5
|
||||
where server = SocksAddress haddr port
|
||||
(haddr,port) = case sockaddr of
|
||||
SockAddrInet p h -> (SocksAddrIPV4 h, p)
|
||||
- SockAddrInet6 p _ h _ -> (SocksAddrIPV6 h, p)
|
||||
_ -> error "unsupported unix sockaddr type"
|
||||
diff --git a/Network/Socks5/Lowlevel.hs b/Network/Socks5/Lowlevel.hs
|
||||
index c10d9b9..2c3d59c 100644
|
||||
--- a/Network/Socks5/Lowlevel.hs
|
||||
+++ b/Network/Socks5/Lowlevel.hs
|
||||
@@ -17,7 +17,6 @@ resolveToSockAddr :: SocksAddress -> IO SockAddr
|
||||
resolveToSockAddr (SocksAddress sockHostAddr port) =
|
||||
case sockHostAddr of
|
||||
SocksAddrIPV4 ha -> return $ SockAddrInet port ha
|
||||
- SocksAddrIPV6 ha6 -> return $ SockAddrInet6 port 0 ha6 0
|
||||
SocksAddrDomainName bs -> do he <- getHostByName (BC.unpack bs)
|
||||
return $ SockAddrInet port (hostAddress he)
|
||||
|
||||
diff --git a/Network/Socks5/Types.hs b/Network/Socks5/Types.hs
|
||||
index 7fbec25..17c7c83 100644
|
||||
--- a/Network/Socks5/Types.hs
|
||||
+++ b/Network/Socks5/Types.hs
|
||||
@@ -19,7 +19,7 @@ module Network.Socks5.Types
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Word
|
||||
import Data.Data
|
||||
-import Network.Socket (HostAddress, HostAddress6, PortNumber)
|
||||
+import Network.Socket (HostAddress, PortNumber)
|
||||
import Control.Exception
|
||||
import qualified Data.ByteString.Char8 as BC
|
||||
import Numeric (showHex)
|
||||
@@ -53,12 +53,10 @@ data SocksMethod =
|
||||
data SocksHostAddress =
|
||||
SocksAddrIPV4 !HostAddress
|
||||
| SocksAddrDomainName !ByteString
|
||||
- | SocksAddrIPV6 !HostAddress6
|
||||
deriving (Eq,Ord)
|
||||
|
||||
instance Show SocksHostAddress where
|
||||
show (SocksAddrIPV4 ha) = "SocksAddrIPV4(" ++ showHostAddress ha ++ ")"
|
||||
- show (SocksAddrIPV6 ha6) = "SocksAddrIPV6(" ++ showHostAddress6 ha6 ++ ")"
|
||||
show (SocksAddrDomainName dn) = "SocksAddrDomainName(" ++ BC.unpack dn ++ ")"
|
||||
|
||||
-- | Converts a HostAddress to a String in dot-decimal notation
|
||||
@@ -69,20 +67,6 @@ showHostAddress num = concat [show q1, ".", show q2, ".", show q3, ".", show q4]
|
||||
(num''',q3) = num'' `quotRem` 256
|
||||
(_,q4) = num''' `quotRem` 256
|
||||
|
||||
--- | Converts a IPv6 HostAddress6 to standard hex notation
|
||||
-showHostAddress6 :: HostAddress6 -> String
|
||||
-showHostAddress6 (a,b,c,d) =
|
||||
- (concat . intersperse ":" . map (flip showHex ""))
|
||||
- [p1,p2,p3,p4,p5,p6,p7,p8]
|
||||
- where (a',p2) = a `quotRem` 65536
|
||||
- (_,p1) = a' `quotRem` 65536
|
||||
- (b',p4) = b `quotRem` 65536
|
||||
- (_,p3) = b' `quotRem` 65536
|
||||
- (c',p6) = c `quotRem` 65536
|
||||
- (_,p5) = c' `quotRem` 65536
|
||||
- (d',p8) = d `quotRem` 65536
|
||||
- (_,p7) = d' `quotRem` 65536
|
||||
-
|
||||
-- | Describe a Socket address on the SOCKS protocol
|
||||
data SocksAddress = SocksAddress !SocksHostAddress !PortNumber
|
||||
deriving (Show,Eq,Ord)
|
||||
diff --git a/Network/Socks5/Wire.hs b/Network/Socks5/Wire.hs
|
||||
index 10bd262..a30f32e 100644
|
||||
--- a/Network/Socks5/Wire.hs
|
||||
+++ b/Network/Socks5/Wire.hs
|
||||
@@ -46,12 +46,10 @@ data SocksResponse = SocksResponse
|
||||
|
||||
getAddr 1 = SocksAddrIPV4 <$> getWord32host
|
||||
getAddr 3 = SocksAddrDomainName <$> (getWord8 >>= getByteString . fromIntegral)
|
||||
-getAddr 4 = SocksAddrIPV6 <$> (liftM4 (,,,) getWord32host getWord32host getWord32host getWord32host)
|
||||
getAddr n = error ("cannot get unknown socket address type: " ++ show n)
|
||||
|
||||
putAddr (SocksAddrIPV4 h) = putWord8 1 >> putWord32host h
|
||||
putAddr (SocksAddrDomainName b) = putWord8 3 >> putWord8 (fromIntegral $ B.length b) >> putByteString b
|
||||
-putAddr (SocksAddrIPV6 (a,b,c,d)) = putWord8 4 >> mapM_ putWord32host [a,b,c,d]
|
||||
|
||||
getSocksRequest 5 = do
|
||||
cmd <- toEnum . fromIntegral <$> getWord8
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From c1b166ad1dbed80f7eed7b9c1b2dc5c668eeb8fc Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Fri, 18 Oct 2013 23:28:56 +0000
|
||||
Subject: [PATCH] cross build
|
||||
|
||||
---
|
||||
stm-chans.cabal | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/stm-chans.cabal b/stm-chans.cabal
|
||||
index 89d4780..2119a74 100644
|
||||
--- a/stm-chans.cabal
|
||||
+++ b/stm-chans.cabal
|
||||
@@ -6,7 +6,7 @@
|
||||
-- and source-repository:.
|
||||
Cabal-Version: >= 1.6
|
||||
-- We need a custom build in order to define __HADDOCK__
|
||||
-Build-Type: Custom
|
||||
+Build-Type: Simple
|
||||
|
||||
Name: stm-chans
|
||||
Version: 3.0.0
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 0e728d5b049224394908d793c73902a8c981e636 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Mon, 26 May 2014 01:04:40 +0000
|
||||
Subject: [PATCH] fix cross build
|
||||
|
||||
---
|
||||
system-filepath.cabal | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/system-filepath.cabal b/system-filepath.cabal
|
||||
index d6aa726..f4e5e0f 100644
|
||||
--- a/system-filepath.cabal
|
||||
+++ b/system-filepath.cabal
|
||||
@@ -6,7 +6,7 @@ license-file: license.txt
|
||||
author: John Millikin <jmillikin@gmail.com>
|
||||
maintainer: John Millikin <jmillikin@gmail.com>
|
||||
copyright: John Millikin 2010-2012
|
||||
-build-type: Custom
|
||||
+build-type: Simple
|
||||
cabal-version: >= 1.8
|
||||
category: System
|
||||
stability: experimental
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 0ad071f80ee72e7b8ca5b0b70dfae5bbf8677969 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Wed, 12 Mar 2014 12:18:17 -0400
|
||||
Subject: [PATCH] cross build
|
||||
|
||||
---
|
||||
unbounded-delays.cabal | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/unbounded-delays.cabal b/unbounded-delays.cabal
|
||||
index 76d0a50..0f27569 100644
|
||||
--- a/unbounded-delays.cabal
|
||||
+++ b/unbounded-delays.cabal
|
||||
@@ -1,7 +1,7 @@
|
||||
name: unbounded-delays
|
||||
version: 0.1.0.6
|
||||
cabal-version: >= 1.6
|
||||
-build-type: Custom
|
||||
+build-type: Simple
|
||||
author: Bas van Dijk <v.dijk.bas@gmail.com>
|
||||
Roel van Dijk <vandijk.roel@gmail.com>
|
||||
maintainer: Bas van Dijk <v.dijk.bas@gmail.com>
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
From db9eb179885874af342bb2c3adef7185496ba1f1 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 15 Oct 2014 16:37:32 +0000
|
||||
Subject: [PATCH] hack for bionic
|
||||
|
||||
---
|
||||
Data/UnixTime/Types.hsc | 12 ------------
|
||||
cbits/conv.c | 2 +-
|
||||
2 files changed, 1 insertion(+), 13 deletions(-)
|
||||
|
||||
diff --git a/Data/UnixTime/Types.hsc b/Data/UnixTime/Types.hsc
|
||||
index d30f39b..ec7ca4c 100644
|
||||
--- a/Data/UnixTime/Types.hsc
|
||||
+++ b/Data/UnixTime/Types.hsc
|
||||
@@ -9,8 +9,6 @@ import Foreign.Storable
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
-#let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__)
|
||||
-
|
||||
-- |
|
||||
-- Data structure for Unix time.
|
||||
data UnixTime = UnixTime {
|
||||
@@ -20,16 +18,6 @@ data UnixTime = UnixTime {
|
||||
, utMicroSeconds :: {-# UNPACK #-} !Int32
|
||||
} deriving (Eq,Ord,Show)
|
||||
|
||||
-instance Storable UnixTime where
|
||||
- sizeOf _ = (#size struct timeval)
|
||||
- alignment _ = (#alignment struct timeval)
|
||||
- peek ptr = UnixTime
|
||||
- <$> (#peek struct timeval, tv_sec) ptr
|
||||
- <*> (#peek struct timeval, tv_usec) ptr
|
||||
- poke ptr ut = do
|
||||
- (#poke struct timeval, tv_sec) ptr (utSeconds ut)
|
||||
- (#poke struct timeval, tv_usec) ptr (utMicroSeconds ut)
|
||||
-
|
||||
-- |
|
||||
-- Format of the strptime()/strftime() style.
|
||||
type Format = ByteString
|
||||
diff --git a/cbits/conv.c b/cbits/conv.c
|
||||
index ec31fef..b7bc0f9 100644
|
||||
--- a/cbits/conv.c
|
||||
+++ b/cbits/conv.c
|
||||
@@ -96,7 +96,7 @@ time_t c_parse_unix_time_gmt(char *fmt, char *src) {
|
||||
#else
|
||||
strptime(src, fmt, &dst);
|
||||
#endif
|
||||
- return timegm(&dst);
|
||||
+ return NULL; /* timegm(&dst); (not in Bionic) */
|
||||
}
|
||||
|
||||
size_t c_format_unix_time(char *fmt, time_t src, char* dst, int siz) {
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
From 87283f9b6f992a7f0e36c7b1bafc288bf2bf106a Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Mon, 11 Nov 2013 02:46:27 +0000
|
||||
Subject: [PATCH] build without v1 uuid which needs network-ino
|
||||
|
||||
---
|
||||
Data/UUID/Util.hs | 11 -----------
|
||||
Data/UUID/V1.hs | 2 --
|
||||
uuid.cabal | 2 --
|
||||
3 files changed, 15 deletions(-)
|
||||
|
||||
diff --git a/Data/UUID/Util.hs b/Data/UUID/Util.hs
|
||||
index 581391a..399e508 100644
|
||||
--- a/Data/UUID/Util.hs
|
||||
+++ b/Data/UUID/Util.hs
|
||||
@@ -3,7 +3,6 @@ module Data.UUID.Util (
|
||||
UnpackedUUID(..)
|
||||
, unpack, pack
|
||||
, version
|
||||
- , extractMac
|
||||
, extractTime
|
||||
, setTime
|
||||
) where
|
||||
@@ -13,7 +12,6 @@ import Data.Word
|
||||
import Data.Word.Util
|
||||
import Data.Bits
|
||||
import Data.UUID.Internal
|
||||
-import Network.Info
|
||||
import Data.Int (Int64)
|
||||
|
||||
version :: UUID -> Int
|
||||
@@ -43,12 +41,3 @@ extractTime uuid =
|
||||
timeAndVersionToTime :: Word16 -> Word16
|
||||
timeAndVersionToTime tv = tv .&. 0x0FFF
|
||||
|
||||
-extractMac :: UUID -> Maybe MAC
|
||||
-extractMac uuid =
|
||||
- if version uuid == 1
|
||||
- then Just $
|
||||
- MAC (node_0 unpacked) (node_1 unpacked) (node_2 unpacked) (node_3 unpacked) (node_4 unpacked) (node_5 unpacked)
|
||||
- else Nothing
|
||||
- where
|
||||
- unpacked = unpack uuid
|
||||
-
|
||||
diff --git a/Data/UUID/V1.hs b/Data/UUID/V1.hs
|
||||
index 067e729..ca4c235 100644
|
||||
--- a/Data/UUID/V1.hs
|
||||
+++ b/Data/UUID/V1.hs
|
||||
@@ -37,8 +37,6 @@ import System.IO.Unsafe
|
||||
|
||||
import qualified System.Random as R
|
||||
|
||||
-import Network.Info
|
||||
-
|
||||
import Data.UUID.Builder
|
||||
import Data.UUID.Internal
|
||||
|
||||
diff --git a/uuid.cabal b/uuid.cabal
|
||||
index 0a53059..57b1b86 100644
|
||||
--- a/uuid.cabal
|
||||
+++ b/uuid.cabal
|
||||
@@ -32,14 +32,12 @@ Library
|
||||
cryptohash >= 0.7 && < 0.12,
|
||||
deepseq == 1.3.*,
|
||||
hashable (>= 1.1.1.0 && < 1.2.0) || (>= 1.2.1 && < 1.3),
|
||||
- network-info == 0.2.*,
|
||||
random >= 1.0.1 && < 1.1,
|
||||
time >= 1.1 && < 1.5
|
||||
|
||||
Exposed-Modules:
|
||||
Data.UUID
|
||||
Data.UUID.Util
|
||||
- Data.UUID.V1
|
||||
Data.UUID.V3
|
||||
Data.UUID.V4
|
||||
Data.UUID.V5
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From 2f1d2eddde94d339d91d7b018dc90542b7625fd3 Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Wed, 20 Jun 2018 14:41:04 +0100
|
||||
Subject: [PATCH] remove ipv6 stuff
|
||||
|
||||
---
|
||||
Network/Wai/Handler/Warp/Run.hs | 9 +--------
|
||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
||||
|
||||
diff --git a/Network/Wai/Handler/Warp/Run.hs b/Network/Wai/Handler/Warp/Run.hs
|
||||
index 116b24e..5c7cbcb 100644
|
||||
--- a/Network/Wai/Handler/Warp/Run.hs
|
||||
+++ b/Network/Wai/Handler/Warp/Run.hs
|
||||
@@ -14,7 +14,7 @@ import Control.Monad (when, unless, void)
|
||||
import Data.ByteString (ByteString)
|
||||
import qualified Data.ByteString as S
|
||||
import Data.Char (chr)
|
||||
-import Data.IP (toHostAddress, toHostAddress6)
|
||||
+import Data.IP (toHostAddress)
|
||||
import Data.IORef (IORef, newIORef, readIORef, writeIORef)
|
||||
import Data.Streaming.Network (bindPortTCP)
|
||||
import Network (sClose, Socket)
|
||||
@@ -305,13 +305,6 @@ serveConnection conn ii origAddr transport settings app = do
|
||||
[a] -> Just (SockAddrInet (readInt clientPort)
|
||||
(toHostAddress a))
|
||||
_ -> Nothing
|
||||
- ["PROXY","TCP6",clientAddr,_,clientPort,_] ->
|
||||
- case [x | (x, t) <- reads (decodeAscii clientAddr), null t] of
|
||||
- [a] -> Just (SockAddrInet6 (readInt clientPort)
|
||||
- 0
|
||||
- (toHostAddress6 a)
|
||||
- 0)
|
||||
- _ -> Nothing
|
||||
("PROXY":"UNKNOWN":_) ->
|
||||
Just origAddr
|
||||
_ ->
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
From 717945172c2f3ff95cce9db2d075122bccfc9a1a Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Wed, 20 Jun 2018 02:01:30 +0100
|
||||
Subject: [PATCH] support Android cert store
|
||||
|
||||
Android has only hashsed cert files.
|
||||
See https://github.com/vincenthz/hs-certificate/issues/19
|
||||
---
|
||||
Data/X509/CertificateStore.hs | 2 +-
|
||||
2 files changed, 1 insertion(+), 1 deletion(-)
|
||||
delete mode 100644 Data/X509/.CertificateStore.hs.swp
|
||||
|
||||
diff --git a/Data/X509/CertificateStore.hs b/Data/X509/CertificateStore.hs
|
||||
index 07449a2..74b8bde 100644
|
||||
--- a/Data/X509/CertificateStore.hs
|
||||
+++ b/Data/X509/CertificateStore.hs
|
||||
@@ -106,7 +106,7 @@ listDirectoryCerts path =
|
||||
&& isDigit (s !! 9)
|
||||
&& (s !! 8) == '.'
|
||||
&& all isHexDigit (take 8 s)
|
||||
- isCert x = (not $ isPrefixOf "." x) && (not $ isHashedFile x)
|
||||
+ isCert x = (not $ isPrefixOf "." x)
|
||||
|
||||
getDirContents = E.catch (map (path </>) . filter isCert <$> getDirectoryContents path) emptyPaths
|
||||
where emptyPaths :: E.IOException -> IO [FilePath]
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
From 41eb8ab50125eb6ccf260c5510407483f1d78dd4 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 20 Jun 2018 14:52:52 +0100
|
||||
Subject: [PATCH] deps
|
||||
|
||||
---
|
||||
xss-sanitize.cabal | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/xss-sanitize.cabal b/xss-sanitize.cabal
|
||||
index 727dc95..2de4270 100644
|
||||
--- a/xss-sanitize.cabal
|
||||
+++ b/xss-sanitize.cabal
|
||||
@@ -19,6 +19,7 @@ library
|
||||
, tagsoup >= 0.12.2 && < 1
|
||||
, utf8-string >= 0.3 && < 1
|
||||
, network >= 2 && < 3
|
||||
+ , network-uri
|
||||
, css-text >= 0.1.1 && < 0.2
|
||||
, text >= 0.11 && < 2
|
||||
, attoparsec >= 0.10.0.3 && < 1
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
From 63d07ae4a1e3b77cbe023364599f7c2c3e853d5f Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Thu, 28 Feb 2013 23:40:57 -0400
|
||||
Subject: [PATCH] hack to build on Android
|
||||
|
||||
---
|
||||
Codec/Compression/Zlib/Stream.hsc | 4 ++--
|
||||
zlib.cabal | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Codec/Compression/Zlib/Stream.hsc b/Codec/Compression/Zlib/Stream.hsc
|
||||
index fe851e6..c6168f4 100644
|
||||
--- a/Codec/Compression/Zlib/Stream.hsc
|
||||
+++ b/Codec/Compression/Zlib/Stream.hsc
|
||||
@@ -921,7 +921,7 @@ foreign import ccall unsafe "zlib.h inflateInit2_"
|
||||
|
||||
c_inflateInit2 :: StreamState -> CInt -> IO CInt
|
||||
c_inflateInit2 z n =
|
||||
- withCAString #{const_str ZLIB_VERSION} $ \versionStr ->
|
||||
+ withCAString "1.2.5" $ \versionStr ->
|
||||
c_inflateInit2_ z n versionStr (#{const sizeof(z_stream)} :: CInt)
|
||||
|
||||
foreign import ccall unsafe "zlib.h inflate"
|
||||
@@ -940,7 +940,7 @@ foreign import ccall unsafe "zlib.h deflateInit2_"
|
||||
c_deflateInit2 :: StreamState
|
||||
-> CInt -> CInt -> CInt -> CInt -> CInt -> IO CInt
|
||||
c_deflateInit2 z a b c d e =
|
||||
- withCAString #{const_str ZLIB_VERSION} $ \versionStr ->
|
||||
+ withCAString "1.2.5" $ \versionStr ->
|
||||
c_deflateInit2_ z a b c d e versionStr (#{const sizeof(z_stream)} :: CInt)
|
||||
|
||||
foreign import ccall unsafe "zlib.h deflateSetDictionary"
|
||||
--
|
||||
1.7.10.4
|
||||
|
Before Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 946 B |
Before Width: | Height: | Size: 4 KiB |
Before Width: | Height: | Size: 1.8 KiB |
|
@ -1 +0,0 @@
|
|||
../drawable-mdpi/ic_launcher.png
|
|
@ -1 +0,0 @@
|
|||
../drawable-mdpi/ic_stat_service_notification_icon.png
|
|
@ -1,133 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Bootstraps from an empty cabal to all the necessary haskell packages
|
||||
# being installed, with the necessary patches to work on Android.
|
||||
#
|
||||
# You should install ghc-android first.
|
||||
#
|
||||
# The cabal.config is used to pin the haskell packages to the last
|
||||
# versions that have been gotten working. To update, delete the
|
||||
# cabal.config, run this script with an empty cabal and fix up the broken
|
||||
# patches, and then use cabal freeze to generate a new cabal.config.
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -d haskell-patches ]; then
|
||||
cd standalone/android
|
||||
fi
|
||||
|
||||
setupcabal () {
|
||||
# Some packages fail to install in a non unicode locale.
|
||||
LANG=en_US.UTF-8
|
||||
export LANG
|
||||
}
|
||||
|
||||
patched () {
|
||||
pkg=$1
|
||||
ver=$2
|
||||
if [ -z "$ver" ]; then
|
||||
ver="$(grep " $pkg " ../cabal.config | cut -d= -f 3 | sed 's/,$//')"
|
||||
fi
|
||||
if [ -z "$ver" ]; then
|
||||
cabal unpack --pristine $pkg
|
||||
else
|
||||
cabal unpack --pristine $pkg-$ver
|
||||
fi
|
||||
cd $pkg*
|
||||
git init
|
||||
git config user.name dummy
|
||||
git config user.email dummy@example.com
|
||||
git add .
|
||||
git commit -m "pre-patched state of $pkg"
|
||||
ln -sf ../../cabal.config
|
||||
for patch in ../../haskell-patches/${pkg}_* ../../../no-th/haskell-patches/${pkg}_*; do
|
||||
if [ -e "$patch" ]; then
|
||||
echo trying $patch
|
||||
if ! patch -p1 < $patch; then
|
||||
echo "failed to apply $patch"
|
||||
echo "please resolve this, replace the patch with a new version, and exit the subshell to continue"
|
||||
$SHELL
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ -e config.sub ]; then
|
||||
cp /usr/share/misc/config.sub .
|
||||
fi
|
||||
if [ -e config.guess ]; then
|
||||
cp /usr/share/misc/config.guess .
|
||||
fi
|
||||
cabal install # --force-reinstalls --reinstall
|
||||
rm -f cabal.config
|
||||
|
||||
rm -rf $pkg*
|
||||
cd ..
|
||||
}
|
||||
|
||||
installgitannexdeps () {
|
||||
pushd ../..
|
||||
ln -sf standalone/android/cabal.config
|
||||
cabal install --only-dependencies --flags="-magicmime -concurrentoutput" "$@" # --force-reinstalls --reinstall
|
||||
rm -f cabal.config
|
||||
popd
|
||||
}
|
||||
|
||||
install_pkgs () {
|
||||
rm -rf tmp
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
cat <<EOF
|
||||
EOF
|
||||
patched network
|
||||
patched unix-time
|
||||
patched lifted-base
|
||||
patched zlib
|
||||
patched distributive
|
||||
patched comonad
|
||||
patched iproute
|
||||
patched primitive
|
||||
patched socks
|
||||
patched vector
|
||||
patched stm-chans
|
||||
patched persistent
|
||||
patched profunctors
|
||||
patched skein
|
||||
patched lens
|
||||
patched certificate
|
||||
patched x509-store
|
||||
patched persistent-template
|
||||
patched system-filepath
|
||||
patched optparse-applicative
|
||||
patched warp
|
||||
patched wai-app-static
|
||||
patched yesod-routes
|
||||
patched shakespeare
|
||||
patched yesod-core
|
||||
patched yesod-persistent
|
||||
patched xss-sanitize
|
||||
patched yesod-form
|
||||
patched crypto-numbers
|
||||
patched clock
|
||||
patched yesod-auth
|
||||
patched yesod
|
||||
patched process-conduit
|
||||
patched DAV
|
||||
patched yesod-static
|
||||
patched dns
|
||||
patched unbounded-delays
|
||||
patched uuid
|
||||
patched basement
|
||||
|
||||
cd ..
|
||||
|
||||
installgitannexdeps -fAndroid -f-Pairing
|
||||
}
|
||||
|
||||
cabal update
|
||||
setupcabal
|
||||
|
||||
# Install packages for host ghc.
|
||||
installgitannexdeps
|
||||
|
||||
# Install packages for cross ghc, with patches as necessary.
|
||||
PATH=$HOME/.ghc/$(cat abiversion)/bin:$HOME/.ghc/$(cat abiversion)/arm-linux-androideabi/bin:$PATH
|
||||
cabal update
|
||||
install_pkgs
|
|
@ -1,249 +0,0 @@
|
|||
#define DISABLE_SHADOW 1
|
||||
#define DISABLE_UTMP 1
|
||||
#define DISABLE_UTMPX 1
|
||||
#define DISABLE_WTMP 1
|
||||
#define DISABLE_WTMPX 1
|
||||
#define ENABLE_PKCS11 /**/
|
||||
#define GETPGRP_VOID 1
|
||||
#define GLOB_HAS_ALTDIRFUNC 1
|
||||
#define HAS_SHADOW_EXPIRE 1
|
||||
#define HAVE_ADDR_IN_UTMP 1
|
||||
#define HAVE_ADDR_IN_UTMPX 1
|
||||
#define HAVE_ADDR_V6_IN_UTMP 1
|
||||
#define HAVE_ADDR_V6_IN_UTMPX 1
|
||||
#define HAVE_ASPRINTF 1
|
||||
#define HAVE_ATTRIBUTE__NONNULL__ 1
|
||||
#define HAVE_BASENAME 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_BN_IS_PRIME_EX 1
|
||||
#define HAVE_CLOCK 1
|
||||
#define HAVE_CLOCK_T 1
|
||||
#define HAVE_CONST_GAI_STRERROR_PROTO 1
|
||||
#define HAVE_CONTROL_IN_MSGHDR 1
|
||||
#define HAVE_DAEMON 1
|
||||
#define HAVE_DECL_GLOB_NOMATCH 1
|
||||
#define HAVE_DECL_H_ERRNO 1
|
||||
#define HAVE_DECL_MAXSYMLINKS 1
|
||||
#define HAVE_DECL_OFFSETOF 1
|
||||
#define HAVE_DECL_O_NONBLOCK 1
|
||||
#define HAVE_DECL_SHUT_RD 1
|
||||
#define HAVE_DECL_WRITEV 1
|
||||
#define HAVE_DECL__GETLONG 0
|
||||
#define HAVE_DECL__GETSHORT 0
|
||||
#define HAVE_DEV_PTMX 1
|
||||
#define HAVE_DIRENT_H 1
|
||||
#define HAVE_DIRFD 1
|
||||
#define HAVE_DIRNAME 1
|
||||
#define HAVE_DSA_GENERATE_PARAMETERS_EX 1
|
||||
#define HAVE_ENDIAN_H 1
|
||||
#define HAVE_ENDUTENT 1
|
||||
#define HAVE_ENDUTXENT 1
|
||||
#define HAVE_EVP_SHA256 1
|
||||
#define HAVE_EXIT_IN_UTMP 1
|
||||
#define HAVE_FCHMOD 1
|
||||
#define HAVE_FCHOWN 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
#define HAVE_FEATURES_H 1
|
||||
#define HAVE_FREEADDRINFO 1
|
||||
#define HAVE_FSBLKCNT_T 1
|
||||
#define HAVE_FSFILCNT_T 1
|
||||
#define HAVE_GAI_STRERROR 1
|
||||
#define HAVE_GETADDRINFO 1
|
||||
#define HAVE_GETCWD 1
|
||||
#define HAVE_GETNAMEINFO 1
|
||||
#define HAVE_GETOPT 1
|
||||
#define HAVE_GETOPT_H 1
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
#define HAVE_GETRLIMIT 1
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
#define HAVE_GETTTYENT 1
|
||||
#define HAVE_GETUTENT 1
|
||||
#define HAVE_GETUTID 1
|
||||
#define HAVE_GETUTLINE 1
|
||||
#define HAVE_GETUTXENT 1
|
||||
#define HAVE_GETUTXID 1
|
||||
#define HAVE_GETUTXLINE 1
|
||||
#define HAVE_GLOB 1
|
||||
#define HAVE_GLOB_H 1
|
||||
#define HAVE_HEADER_AD 1
|
||||
#define HAVE_HMAC_CTX_INIT 1
|
||||
#define HAVE_HOST_IN_UTMP 1
|
||||
#define HAVE_HOST_IN_UTMPX 1
|
||||
#define HAVE_ID_IN_UTMP 1
|
||||
#define HAVE_ID_IN_UTMPX 1
|
||||
#define HAVE_INET_ATON 1
|
||||
#define HAVE_INET_NTOA 1
|
||||
#define HAVE_INET_NTOP 1
|
||||
#define HAVE_INT64_T 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_INTXX_T 1
|
||||
#define HAVE_IN_ADDR_T 1
|
||||
#define HAVE_ISBLANK 1
|
||||
#define HAVE_LASTLOG_H 1
|
||||
#define HAVE_LIBGEN_H 1
|
||||
#define HAVE_LIBNSL 1
|
||||
#define HAVE_LIBZ 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_LINUX_AUDIT_H 1
|
||||
#define HAVE_LINUX_FILTER_H 1
|
||||
#define HAVE_LINUX_IF_TUN_H 1
|
||||
#define HAVE_LOGOUT 1
|
||||
#define HAVE_LOGWTMP 1
|
||||
#define HAVE_LONG_DOUBLE 1
|
||||
#define HAVE_LONG_LONG 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_MKDTEMP 1
|
||||
#define HAVE_MMAP 1
|
||||
#define HAVE_MODE_T 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_NETDB_H 1
|
||||
#define HAVE_OPENSSL 1
|
||||
#define HAVE_PATHS_H 1
|
||||
#define HAVE_PID_IN_UTMP 1
|
||||
#define HAVE_PID_T 1
|
||||
#define HAVE_POLL 1
|
||||
#define HAVE_POLL_H 1
|
||||
#define HAVE_PRCTL 1
|
||||
#define HAVE_PROC_PID 1
|
||||
#define HAVE_PUTUTLINE 1
|
||||
#define HAVE_PUTUTXLINE 1
|
||||
#define HAVE_REALPATH 1
|
||||
#define HAVE_RECVMSG 1
|
||||
#define HAVE_RLIMIT_NPROC /**/
|
||||
#define HAVE_RSA_GENERATE_KEY_EX 1
|
||||
#define HAVE_RSA_GET_DEFAULT_METHOD 1
|
||||
#define HAVE_SA_FAMILY_T 1
|
||||
#define HAVE_SENDMSG 1
|
||||
#define HAVE_SETEGID 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_SETEUID 1
|
||||
#define HAVE_SETGROUPS 1
|
||||
#define HAVE_SETREGID 1
|
||||
#define HAVE_SETRESGID 1
|
||||
#define HAVE_SETRESUID 1
|
||||
#define HAVE_SETREUID 1
|
||||
#define HAVE_SETRLIMIT 1
|
||||
#define HAVE_SETSID 1
|
||||
#define HAVE_SETUTENT 1
|
||||
#define HAVE_SETUTXENT 1
|
||||
#define HAVE_SETVBUF 1
|
||||
#define HAVE_SHA256_UPDATE 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SIGVEC 1
|
||||
#define HAVE_SIG_ATOMIC_T 1
|
||||
#define HAVE_SIZE_T 1
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define HAVE_SOCKETPAIR 1
|
||||
#define HAVE_SO_PEERCRED 1
|
||||
#define HAVE_SSIZE_T 1
|
||||
#define HAVE_SS_FAMILY_IN_SS 1
|
||||
#define HAVE_STATFS 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRDUP 1
|
||||
#define HAVE_STRERROR 1
|
||||
#define HAVE_STRFTIME 1
|
||||
#define HAVE_STRICT_MKSTEMP 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_STRNLEN 1
|
||||
#define HAVE_STRPTIME 1
|
||||
#define HAVE_STRSEP 1
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
#define HAVE_STRUCT_ADDRINFO 1
|
||||
#define HAVE_STRUCT_IN6_ADDR 1
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
|
||||
#define HAVE_STRUCT_TIMESPEC 1
|
||||
#define HAVE_STRUCT_TIMEVAL 1
|
||||
#define HAVE_SYSCONF 1
|
||||
#define HAVE_SYS_CDEFS_H 1
|
||||
#define HAVE_SYS_DIR_H 1
|
||||
#define HAVE_SYS_ERRLIST 1
|
||||
#define HAVE_SYS_MMAN_H 1
|
||||
#define HAVE_SYS_MOUNT_H 1
|
||||
#define HAVE_SYS_NERR 1
|
||||
#define HAVE_SYS_POLL_H 1
|
||||
#define HAVE_SYS_PRCTL_H 1
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
#define HAVE_SYS_SYSMACROS_H 1
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_SYS_UN_H 1
|
||||
#define HAVE_TCGETPGRP 1
|
||||
#define HAVE_TCSENDBREAK 1
|
||||
#define HAVE_TIME 1
|
||||
#define HAVE_TIME_H 1
|
||||
#define HAVE_TRUNCATE 1
|
||||
#define HAVE_TV_IN_UTMP 1
|
||||
#define HAVE_TV_IN_UTMPX 1
|
||||
#define HAVE_TYPE_IN_UTMP 1
|
||||
#define HAVE_TYPE_IN_UTMPX 1
|
||||
#define HAVE_UINTXX_T 1
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#define HAVE_UNSIGNED_LONG_LONG 1
|
||||
#define HAVE_UPDWTMP 1
|
||||
#define HAVE_UPDWTMPX 1
|
||||
#define HAVE_UTIMES 1
|
||||
#define HAVE_UTIME_H 1
|
||||
#define HAVE_UTMPNAME 1
|
||||
#define HAVE_UTMPXNAME 1
|
||||
#define HAVE_UTMP_H 1
|
||||
#define HAVE_U_CHAR 1
|
||||
#define HAVE_U_INT 1
|
||||
#define HAVE_U_INT64_T 1
|
||||
#define HAVE_U_INTXX_T 1
|
||||
#define HAVE_VASPRINTF 1
|
||||
#define HAVE_VA_COPY 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_WAITPID 1
|
||||
#define HAVE__GETLONG 1
|
||||
#define HAVE__GETSHORT 1
|
||||
#define HAVE__RES_EXTERN 1
|
||||
#define HAVE___FUNCTION__ 1
|
||||
#define HAVE___PROGNAME 1
|
||||
#define HAVE___VA_COPY 1
|
||||
#define HAVE___func__ 1
|
||||
#define IPV4_IN_IPV6 1
|
||||
#define LINK_OPNOTSUPP_ERRNO EPERM
|
||||
#define LINUX_OOM_ADJUST 1
|
||||
#define LOCKED_PASSWD_PREFIX "!"
|
||||
#define LOGIN_PROGRAM_FALLBACK "/bin/login"
|
||||
#define MISSING_FD_MASK 1
|
||||
#define MISSING_HOWMANY 1
|
||||
#define OPENSSL_HAS_ECC 1
|
||||
#define OPENSSL_PRNG_ONLY 1
|
||||
#define PACKAGE_BUGREPORT "openssh-unix-dev@mindrot.org"
|
||||
#define PACKAGE_NAME "OpenSSH"
|
||||
#define PACKAGE_STRING "OpenSSH Portable"
|
||||
#define PACKAGE_TARNAME "openssh"
|
||||
#define PACKAGE_URL ""
|
||||
#define PACKAGE_VERSION "Portable"
|
||||
#define PAM_TTY_KLUDGE 1
|
||||
#define SANDBOX_RLIMIT 1
|
||||
#define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM
|
||||
#define SIZEOF_CHAR 1
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG_INT 8
|
||||
#define SIZEOF_LONG_LONG_INT 8
|
||||
#define SIZEOF_SHORT_INT 2
|
||||
#define SNPRINTF_CONST const
|
||||
#define SPT_TYPE SPT_REUSEARGV
|
||||
#define SSH_PRIVSEP_USER "shell"
|
||||
#define SSH_TUN_COMPAT_AF 1
|
||||
#define SSH_TUN_LINUX 1
|
||||
#define SSH_TUN_PREPEND_AF 1
|
||||
#define STDC_HEADERS 1
|
||||
#define USER_PATH "/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin"
|
||||
#define XAUTH_PATH "/usr/bin/xauth"
|
||||
#define _PATH_BTMP "/var/log/btmp"
|
||||
#define _PATH_PASSWD_PROG "/usr/bin/passwd"
|
||||
#define _PATH_SSH_PIDDIR "/var/run"
|
||||
#define ANDROID
|
|
@ -1,217 +0,0 @@
|
|||
diff --git a/auth.c b/auth.c
|
||||
index 6623e0f..dd10253 100644
|
||||
--- a/auth.c
|
||||
+++ b/auth.c
|
||||
@@ -337,7 +337,7 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
|
||||
char *file, ret[MAXPATHLEN];
|
||||
int i;
|
||||
|
||||
- file = percent_expand(filename, "h", pw->pw_dir,
|
||||
+ file = percent_expand(filename, "h", _PATH_ROOT_HOME_PREFIX,
|
||||
"u", pw->pw_name, (char *)NULL);
|
||||
|
||||
/*
|
||||
@@ -347,7 +347,7 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
|
||||
if (*file == '/')
|
||||
return (file);
|
||||
|
||||
- i = snprintf(ret, sizeof(ret), "%s/%s", pw->pw_dir, file);
|
||||
+ i = snprintf(ret, sizeof(ret), "%s/%s", _PATH_ROOT_HOME_PREFIX, file);
|
||||
if (i < 0 || (size_t)i >= sizeof(ret))
|
||||
fatal("expand_authorized_keys: path too long");
|
||||
xfree(file);
|
||||
@@ -436,7 +436,7 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
|
||||
strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
- if (realpath(pw->pw_dir, homedir) != NULL)
|
||||
+ if (realpath(_PATH_ROOT_HOME_PREFIX, homedir) != NULL)
|
||||
comparehome = 1;
|
||||
|
||||
/* check the open file to avoid races */
|
||||
diff --git a/authfile.c b/authfile.c
|
||||
index 7dd4496..00462e9 100644
|
||||
--- a/authfile.c
|
||||
+++ b/authfile.c
|
||||
@@ -613,6 +613,7 @@ int
|
||||
key_perm_ok(int fd, const char *filename)
|
||||
{
|
||||
struct stat st;
|
||||
+ return 1; /* check doesn't make sense on android */
|
||||
|
||||
if (fstat(fd, &st) < 0)
|
||||
return 0;
|
||||
diff --git a/misc.c b/misc.c
|
||||
index 0bf2db6..4327d03 100644
|
||||
--- a/misc.c
|
||||
+++ b/misc.c
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
+#include "pathnames.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
@@ -538,12 +539,13 @@ tilde_expand_filename(const char *filename, uid_t uid)
|
||||
} else if ((pw = getpwuid(uid)) == NULL) /* ~/path */
|
||||
fatal("tilde_expand_filename: No such uid %ld", (long)uid);
|
||||
|
||||
- if (strlcpy(ret, pw->pw_dir, sizeof(ret)) >= sizeof(ret))
|
||||
+ char *pw_dir=_PATH_ROOT_HOME_PREFIX;
|
||||
+ if (strlcpy(ret, pw_dir, sizeof(ret)) >= sizeof(ret))
|
||||
fatal("tilde_expand_filename: Path too long");
|
||||
|
||||
/* Make sure directory has a trailing '/' */
|
||||
- len = strlen(pw->pw_dir);
|
||||
- if ((len == 0 || pw->pw_dir[len - 1] != '/') &&
|
||||
+ len = strlen(pw_dir);
|
||||
+ if ((len == 0 || pw_dir[len - 1] != '/') &&
|
||||
strlcat(ret, "/", sizeof(ret)) >= sizeof(ret))
|
||||
fatal("tilde_expand_filename: Path too long");
|
||||
|
||||
diff --git a/openbsd-compat/getrrsetbyname.c b/openbsd-compat/getrrsetbyname.c
|
||||
index d2bea21..5b5d599 100644
|
||||
--- a/openbsd-compat/getrrsetbyname.c
|
||||
+++ b/openbsd-compat/getrrsetbyname.c
|
||||
@@ -56,8 +56,7 @@
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "getrrsetbyname.h"
|
||||
-#include "nameser.h"
|
||||
-#include "nameser_compat.h"
|
||||
+#include "arpa/nameser.h"
|
||||
|
||||
#if defined(HAVE_DECL_H_ERRNO) && !HAVE_DECL_H_ERRNO
|
||||
extern int h_errno;
|
||||
diff --git a/pathnames.h b/pathnames.h
|
||||
index b7b9d91..3c10b11 100644
|
||||
--- a/pathnames.h
|
||||
+++ b/pathnames.h
|
||||
@@ -67,7 +67,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef _PATH_ROOT_HOME_PREFIX
|
||||
-#define _PATH_ROOT_HOME_PREFIX "/data"
|
||||
+#define _PATH_ROOT_HOME_PREFIX getenv("HOME")
|
||||
#endif
|
||||
|
||||
/*
|
||||
diff --git a/readconf.c b/readconf.c
|
||||
index 097bb05..dcbc008 100644
|
||||
--- a/readconf.c
|
||||
+++ b/readconf.c
|
||||
@@ -1085,7 +1085,7 @@ read_config_file(const char *filename, const char *host, Options *options,
|
||||
if ((f = fopen(filename, "r")) == NULL)
|
||||
return 0;
|
||||
|
||||
- if (checkperm) {
|
||||
+ if (checkperm && 0) {
|
||||
struct stat sb;
|
||||
|
||||
if (fstat(fileno(f), &sb) == -1)
|
||||
diff --git a/ssh-add.c b/ssh-add.c
|
||||
index 738644d..f6fce4a 100644
|
||||
--- a/ssh-add.c
|
||||
+++ b/ssh-add.c
|
||||
@@ -471,7 +471,7 @@ main(int argc, char **argv)
|
||||
}
|
||||
|
||||
for (i = 0; default_files[i]; i++) {
|
||||
- snprintf(buf, sizeof(buf), "%s/%s", pw->pw_dir,
|
||||
+ snprintf(buf, sizeof(buf), "%s/%s", _PATH_ROOT_HOME_PREFIX,
|
||||
default_files[i]);
|
||||
if (stat(buf, &st) < 0)
|
||||
continue;
|
||||
diff --git a/ssh-keygen.c b/ssh-keygen.c
|
||||
index 4baf7df..ef8bb25 100644
|
||||
--- a/ssh-keygen.c
|
||||
+++ b/ssh-keygen.c
|
||||
@@ -224,7 +224,7 @@ ask_filename(struct passwd *pw, const char *prompt)
|
||||
}
|
||||
}
|
||||
snprintf(identity_file, sizeof(identity_file), "%s/%s",
|
||||
- strcmp(pw->pw_dir, "/") ? pw->pw_dir : _PATH_ROOT_HOME_PREFIX, name);
|
||||
+ _PATH_ROOT_HOME_PREFIX, name);
|
||||
fprintf(stderr, "%s (%s): ", prompt, identity_file);
|
||||
if (fgets(buf, sizeof(buf), stdin) == NULL)
|
||||
exit(1);
|
||||
@@ -2268,7 +2268,7 @@ main(int argc, char **argv)
|
||||
|
||||
/* Create ~/.ssh directory if it doesn't already exist. */
|
||||
snprintf(dotsshdir, sizeof dotsshdir, "%s/%s",
|
||||
- strcmp(pw->pw_dir, "/") ? pw->pw_dir : _PATH_ROOT_HOME_PREFIX,
|
||||
+ _PATH_ROOT_HOME_PREFIX,
|
||||
_PATH_SSH_USER_DIR);
|
||||
if (strstr(identity_file, dotsshdir) != NULL) {
|
||||
if (stat(dotsshdir, &st) < 0) {
|
||||
diff --git a/ssh.c b/ssh.c
|
||||
index 898e966..ef6c858 100644
|
||||
--- a/ssh.c
|
||||
+++ b/ssh.c
|
||||
@@ -703,7 +703,7 @@ main(int ac, char **av)
|
||||
fatal("Can't open user config file %.100s: "
|
||||
"%.100s", config, strerror(errno));
|
||||
} else {
|
||||
- r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir,
|
||||
+ r = snprintf(buf, sizeof buf, "%s/%s", _PATH_ROOT_HOME_PREFIX,
|
||||
_PATH_SSH_USER_CONFFILE);
|
||||
if (r > 0 && (size_t)r < sizeof(buf))
|
||||
(void)read_config_file(buf, host, &options, 1);
|
||||
@@ -748,7 +748,7 @@ main(int ac, char **av)
|
||||
if (options.local_command != NULL) {
|
||||
debug3("expanding LocalCommand: %s", options.local_command);
|
||||
cp = options.local_command;
|
||||
- options.local_command = percent_expand(cp, "d", pw->pw_dir,
|
||||
+ options.local_command = percent_expand(cp, "d", _PATH_ROOT_HOME_PREFIX,
|
||||
"h", host, "l", thishost, "n", host_arg, "r", options.user,
|
||||
"p", portstr, "u", pw->pw_name, "L", shorthost,
|
||||
(char *)NULL);
|
||||
@@ -888,7 +888,7 @@ main(int ac, char **av)
|
||||
*/
|
||||
if (config == NULL) {
|
||||
r = snprintf(buf, sizeof buf, "%s/%s",
|
||||
- strcmp(pw->pw_dir, "/") ? pw->pw_dir : _PATH_ROOT_HOME_PREFIX,
|
||||
+ _PATH_ROOT_HOME_PREFIX,
|
||||
_PATH_SSH_USER_DIR);
|
||||
if (r > 0 && (size_t)r < sizeof(buf) && stat(buf, &st) < 0) {
|
||||
#ifdef WITH_SELINUX
|
||||
@@ -1532,7 +1532,7 @@ load_public_identity_files(void)
|
||||
if ((pw = getpwuid(original_real_uid)) == NULL)
|
||||
fatal("load_public_identity_files: getpwuid failed");
|
||||
pwname = xstrdup(pw->pw_name);
|
||||
- pwdir = xstrdup(pw->pw_dir);
|
||||
+ pwdir = xstrdup(_PATH_ROOT_HOME_PREFIX);
|
||||
if (gethostname(thishost, sizeof(thishost)) == -1)
|
||||
fatal("load_public_identity_files: gethostname: %s",
|
||||
strerror(errno));
|
||||
diff --git a/uidswap.c b/uidswap.c
|
||||
index bc6194e..5cbf5d1 100644
|
||||
--- a/uidswap.c
|
||||
+++ b/uidswap.c
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "xmalloc.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
-#include <private/android_filesystem_config.h>
|
||||
#include <linux/capability.h>
|
||||
#include <linux/prctl.h>
|
||||
#endif
|
||||
@@ -230,7 +229,7 @@ permanently_set_uid(struct passwd *pw)
|
||||
debug("permanently_set_uid: %u/%u", (u_int)pw->pw_uid,
|
||||
(u_int)pw->pw_gid);
|
||||
|
||||
-#ifdef ANDROID
|
||||
+#if 0
|
||||
if (pw->pw_uid == AID_SHELL) {
|
||||
prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
|
||||
|
||||
@@ -317,7 +316,7 @@ permanently_set_uid(struct passwd *pw)
|
||||
(u_int)pw->pw_uid);
|
||||
}
|
||||
|
||||
-#ifdef ANDROID
|
||||
+#if 0
|
||||
if (pw->pw_uid == AID_SHELL) {
|
||||
/* set CAP_SYS_BOOT capability, so "adb reboot" will succeed */
|
||||
header.version = _LINUX_CAPABILITY_VERSION;
|
|
@ -1,40 +0,0 @@
|
|||
From f91df535053958600d57f9df78d9ce84c8718655 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Wed, 13 Feb 2013 15:51:40 -0400
|
||||
Subject: [PATCH] android portability
|
||||
|
||||
---
|
||||
authenticate.c | 3 ++-
|
||||
batch.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/authenticate.c b/authenticate.c
|
||||
index 7650377..626dec6 100644
|
||||
--- a/authenticate.c
|
||||
+++ b/authenticate.c
|
||||
@@ -296,7 +296,8 @@ void auth_client(int fd, const char *user, const char *challenge)
|
||||
*
|
||||
* OpenBSD has a readpassphrase() that might be more suitable.
|
||||
*/
|
||||
- pass = getpass("Password: ");
|
||||
+ /*pass = getpass("Password: "); */
|
||||
+ exit(1);
|
||||
}
|
||||
|
||||
if (!pass)
|
||||
diff --git a/batch.c b/batch.c
|
||||
index a3e9dca..ee31532 100644
|
||||
--- a/batch.c
|
||||
+++ b/batch.c
|
||||
@@ -221,7 +221,7 @@ void write_batch_shell_file(int argc, char *argv[], int file_arg_cnt)
|
||||
stringjoin(filename, sizeof filename,
|
||||
batch_name, ".sh", NULL);
|
||||
fd = do_open(filename, O_WRONLY | O_CREAT | O_TRUNC,
|
||||
- S_IRUSR | S_IWUSR | S_IEXEC);
|
||||
+ S_IRUSR | S_IWUSR);
|
||||
if (fd < 0) {
|
||||
rsyserr(FERROR, errno, "Batch file %s open error",
|
||||
filename);
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
#!/system/bin/sh
|
||||
# This is runs a shell in an environment configured for git-annex.
|
||||
# Nearly the only command that can be used in here is busybox!
|
||||
# lib.start.so will run us in the root of our app directory
|
||||
base=$(./busybox pwd)
|
||||
cmd=$base/busybox
|
||||
|
||||
set -e
|
||||
|
||||
prep () {
|
||||
# Cannot rely on Android providing a sane HOME
|
||||
HOME="/sdcard/git-annex.home"
|
||||
export HOME
|
||||
}
|
||||
|
||||
buildtree () {
|
||||
$cmd echo "Installation starting to $base"
|
||||
$cmd cat "lib/lib.version.so"
|
||||
|
||||
if $cmd test -e "$base/bin"; then
|
||||
$cmd mv "$base/bin" "$base/bin.old"
|
||||
fi
|
||||
$cmd mkdir -p "$base/bin"
|
||||
|
||||
for prog in busybox git-annex git-shell git-upload-pack git gpg rsync ssh ssh-keygen; do
|
||||
$cmd echo "installing $prog"
|
||||
if $cmd test -e "$base/bin/$prog"; then
|
||||
$cmd rm -f "$base/bin/$prog"
|
||||
fi
|
||||
$cmd ln -s "$base/lib/lib.$prog.so" "$base/bin/$prog"
|
||||
done
|
||||
|
||||
$cmd --install -s $base/bin
|
||||
|
||||
$cmd rm -rf "$base/bin.old"
|
||||
|
||||
$cmd tar zxf $base/lib/lib.git.tar.gz.so
|
||||
for prog in git git-shell git-upload-pack; do
|
||||
for link in $($cmd cat "$base/links/$prog"); do
|
||||
$cmd echo "linking $link to $prog"
|
||||
if $cmd test -e "$base/$link"; then
|
||||
$cmd rm -f "$base/$link"
|
||||
fi
|
||||
$cmd ln -s "$base/bin/$prog" "$base/$link"
|
||||
done
|
||||
$cmd rm -f "$base/links/$prog"
|
||||
done
|
||||
|
||||
$cmd mkdir -p "$base/templates"
|
||||
$cmd mkdir -p "$base/tmp"
|
||||
|
||||
$cmd echo "#!/system/bin/sh" > "$base/runshell"
|
||||
$cmd echo "exec $base/lib/lib.start.so" >> "$base/runshell"
|
||||
$cmd chmod 755 runshell
|
||||
|
||||
$cmd cat "$base/lib/lib.trustedkeys.so" > "$base/bin/trustedkeys.gpg"
|
||||
$cmd cat "$base/lib/lib.version.so" > "$base/installed-version"
|
||||
$cmd echo "Installation complete"
|
||||
}
|
||||
|
||||
install () {
|
||||
if ! $cmd mkdir -p "$HOME"; then
|
||||
$cmd echo "mkdir of $HOME failed!"
|
||||
fi
|
||||
if $cmd test ! -e "$base/bin/git-annex"; then
|
||||
if ! buildtree > $HOME/git-annex-install.log 2>&1; then
|
||||
$cmd echo "Installation failed! Please report a bug and attach $HOME/git-annex-install.log"
|
||||
$cmd sh
|
||||
fi
|
||||
elif $cmd test ! -e "$base/installed-version" || ! $cmd cmp "$base/installed-version" "$base/lib/lib.version.so" >/dev/null; then
|
||||
if ! buildtree > $HOME/git-annex-install.log 2>&1; then
|
||||
$cmd echo "Upgrade failed! Please report a bug and attach $HOME/git-annex-install.log"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
run () {
|
||||
PATH="$base/bin:$PATH"
|
||||
export PATH
|
||||
|
||||
ORIG_GIT_EXEC_PATH="$GIT_EXEC_PATH"
|
||||
export ORIG_GIT_EXEC_PATH
|
||||
GIT_EXEC_PATH=$base/libexec/git-core
|
||||
export GIT_EXEC_PATH
|
||||
|
||||
ORIG_GIT_TEMPLATE_DIR="$GIT_TEMPLATE_DIR"
|
||||
export ORIG_GIT_TEMPLATE_DIR
|
||||
GIT_TEMPLATE_DIR="$base/templates"
|
||||
export GIT_TEMPLATE_DIR
|
||||
|
||||
# Indicate which variables were exported above.
|
||||
GIT_ANNEX_STANDLONE_ENV="GIT_EXEC_PATH GIT_TEMPLATE_DIR"
|
||||
export GIT_ANNEX_STANDLONE_ENV
|
||||
|
||||
# This is a temporary directory on a non-crippled filesystem.
|
||||
# Needs to be as short a path as possible, for ssh sockets.
|
||||
GIT_ANNEX_TMP_DIR=$base/tmp
|
||||
export GIT_ANNEX_TMP_DIR
|
||||
# /tmp probably doesn't exist, so also use it as TMPDIR
|
||||
TMPDIR=$GIT_ANNEX_TMP_DIR
|
||||
export TMPDIR
|
||||
|
||||
if $cmd test ! -e "$HOME/.gitconfig"; then
|
||||
git config --global user.email "git-annex@android"
|
||||
git config --global user.name "android"
|
||||
fi
|
||||
|
||||
if $cmd test "$1"; then
|
||||
cmd="$1"
|
||||
shift 1
|
||||
exec "$cmd" "$@"
|
||||
else
|
||||
# As good a start point as any.
|
||||
cd "$HOME"
|
||||
|
||||
/system/bin/sh
|
||||
fi
|
||||
}
|
||||
|
||||
if $cmd test -n "$MKFIFO"; then
|
||||
# because java is insane
|
||||
$cmd mkfifo "$MKFIFO"
|
||||
else
|
||||
if ! prep; then
|
||||
$cmd echo "prep failed. Please report a bug."
|
||||
read line
|
||||
fi
|
||||
if ! install; then
|
||||
$cmd echo "install failed. Please report a bug."
|
||||
read line
|
||||
fi
|
||||
run
|
||||
fi
|
|
@ -1,64 +0,0 @@
|
|||
/* Installed as lib.start.so, this bootstraps a working busybox and uses
|
||||
* it to run lib.runshell.so. */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
void chopdir (char *s) {
|
||||
char *p=strrchr(s, '/');
|
||||
if (p == NULL) {
|
||||
fprintf(stderr, "cannot find directory in %s", s);
|
||||
exit(1);
|
||||
}
|
||||
p[0] = '\0';
|
||||
}
|
||||
|
||||
main () {
|
||||
char buf[1024];
|
||||
char *p;
|
||||
struct stat st_buf;
|
||||
|
||||
/* Get something like /data/data/ga.androidterm/lib/lib.start.so */
|
||||
int n=readlink("/proc/self/exe", buf, 1023);
|
||||
if (n < 1) {
|
||||
fprintf(stderr, "failed to find own name");
|
||||
exit(1);
|
||||
}
|
||||
buf[n] = '\0';
|
||||
|
||||
/* Change directory to something like /data/data/ga.androidterm */
|
||||
chopdir(buf);
|
||||
chopdir(buf);
|
||||
if (chdir(buf) != 0) {
|
||||
perror("chdir");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (stat("lib/lib.busybox.so", &st_buf) != 0) {
|
||||
/* TODO my lib dir should be in LD_LIBRARY_PATH; check that */
|
||||
fprintf(stderr, "Falling back to hardcoded app location; cannot find expected files in %s\n", buf);
|
||||
if (chdir("/data/data/ga.androidterm") != 0) {
|
||||
perror("chdir");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* If this is the first run, set up busybox symlink,
|
||||
* which allows busybox to run. */
|
||||
if (stat("busybox", &st_buf) != 0) {
|
||||
if (symlink("lib/lib.busybox.so", "busybox") != 0) {
|
||||
/* Just in case! */
|
||||
if (link("lib/lib.busybox.so", "busybox") != 0) {
|
||||
perror("link busybox");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
execl("./busybox", "./busybox", "sh", "lib/lib.runshell.so", NULL);
|
||||
perror("error running busybox sh");
|
||||
}
|
|
@ -1,598 +0,0 @@
|
|||
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
|
||||
index b0e866a..1ab8515 100644
|
||||
--- a/AndroidManifest.xml
|
||||
+++ b/AndroidManifest.xml
|
||||
@@ -7,6 +7,7 @@
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
+ <uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<permission android:name="jackpal.androidterm.permission.RUN_SCRIPT"
|
||||
android:label="@string/perm_run_script"
|
||||
diff --git a/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java b/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java
|
||||
index f6952f0..1a8df8f 100644
|
||||
--- a/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java
|
||||
+++ b/examples/widget/src/jackpal/androidterm/sample/telnet/TermActivity.java
|
||||
@@ -166,7 +166,7 @@ public class TermActivity extends Activity
|
||||
/* ... create a process ... */
|
||||
String execPath = LaunchActivity.getDataDir(this) + "/bin/execpty";
|
||||
ProcessBuilder execBuild =
|
||||
- new ProcessBuilder(execPath, "/system/bin/sh", "-");
|
||||
+ new ProcessBuilder(execPath, "/data/data/ga.androidterm/lib/lib.start.so", "");
|
||||
execBuild.redirectErrorStream(true);
|
||||
Process exec = null;
|
||||
try {
|
||||
diff --git a/res/menu/main.xml b/res/menu/main.xml
|
||||
index 064f833..fe5f3a3 100644
|
||||
--- a/res/menu/main.xml
|
||||
+++ b/res/menu/main.xml
|
||||
@@ -16,6 +16,8 @@
|
||||
-->
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
+ <item android:id="@+id/menu_send_email"
|
||||
+ android:title="@string/send_email" />
|
||||
<item android:id="@+id/menu_new_window"
|
||||
android:title="@string/new_window"
|
||||
android:icon="@drawable/ic_menu_add" />
|
||||
@@ -34,8 +36,6 @@
|
||||
android:icon="@drawable/ic_menu_preferences" />
|
||||
<item android:id="@+id/menu_reset"
|
||||
android:title="@string/reset" />
|
||||
- <item android:id="@+id/menu_send_email"
|
||||
- android:title="@string/send_email" />
|
||||
<item android:id="@+id/menu_toggle_wakelock"
|
||||
android:title="@string/enable_wakelock" />
|
||||
<item android:id="@+id/menu_toggle_wifilock"
|
||||
diff --git a/res/values-cz/strings.xml b/res/values-cz/strings.xml
|
||||
index f3d19bc..882e19b 100644
|
||||
--- a/res/values-cz/strings.xml
|
||||
+++ b/res/values-cz/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Predešlé okno</string>
|
||||
<string name="next_window">Další okno</string>
|
||||
<string name="reset">Reset terminálu</string>
|
||||
- <string name="send_email">Napiš email</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Speciální znaky</string>
|
||||
<string name="toggle_soft_keyboard">Přepnout soft. klávesnici</string>
|
||||
|
||||
@@ -124,4 +124,4 @@
|
||||
<string name="control_key_dialog_fn_disabled_text">Není nastaveno žádné tlačitko pro funkční klávesu.</string>
|
||||
|
||||
<string name="confirm_window_close_message">Zavřít okno?</string>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
+</resources>
|
||||
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
|
||||
index f6134a5..06d2e1f 100644
|
||||
--- a/res/values-de/strings.xml
|
||||
+++ b/res/values-de/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Vorh. Fenster</string>
|
||||
<string name="next_window">Nächst. Fenster</string>
|
||||
<string name="reset">Zurücksetzen</string>
|
||||
- <string name="send_email">Email schreiben</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Spezialtasten</string>
|
||||
<string name="toggle_soft_keyboard">Tastatur an/aus</string>
|
||||
|
||||
@@ -124,4 +124,4 @@
|
||||
|
||||
<string name="perm_run_script">Beliebige Scripte im Terminal Emulator ausführen</string>
|
||||
<string name="permdesc_run_script">Erlaubt Anwendungen, neue Fenster im Android Terminal Emulator zu öffnen und in diesen Befehle auszuführen. Dies schließt alle Berechtigungen von Android Terminal Emulator ein, inklusive Internetzugang und Schreib-/Leserechte auf der SD-Karte.</string>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
+</resources>
|
||||
diff --git a/res/values-es/strings.xml b/res/values-es/strings.xml
|
||||
index 94553b2..92d9e2a 100644
|
||||
--- a/res/values-es/strings.xml
|
||||
+++ b/res/values-es/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Ventana anterior</string>
|
||||
<string name="next_window">Ventana posterior</string>
|
||||
<string name="reset">Reiniciar consola</string>
|
||||
- <string name="send_email">Enviar email</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Teclas especiales</string>
|
||||
<string name="toggle_soft_keyboard">Ver/ocultar teclado</string>
|
||||
|
||||
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
|
||||
index b9f0586..92a16a0 100644
|
||||
--- a/res/values-eu/strings.xml
|
||||
+++ b/res/values-eu/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Aurreko leihoa</string>
|
||||
<string name="next_window">Hurrengo leihoa</string>
|
||||
<string name="reset">Berrezarri terminala</string>
|
||||
- <string name="send_email">Bidali eposta ...(r)i</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Tekla bereziak</string>
|
||||
<string name="toggle_soft_keyboard">Txandakatu soft teklatua</string>
|
||||
|
||||
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
|
||||
index beab2be..529f720 100644
|
||||
--- a/res/values-fr/strings.xml
|
||||
+++ b/res/values-fr/strings.xml
|
||||
@@ -24,7 +24,7 @@
|
||||
<string name="prev_window">Fenêtre Préc.</string>
|
||||
<string name="next_window">Fenêtre Suiv.</string>
|
||||
<string name="reset">Terminal par défaut</string>
|
||||
- <string name="send_email">Envoyer un e-mail</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Touches spéciales</string>
|
||||
<string name="toggle_soft_keyboard">Afficher/Masquer Clavier</string>
|
||||
|
||||
diff --git a/res/values-hu/strings.xml b/res/values-hu/strings.xml
|
||||
index 5dbecb5..ce917c5 100644
|
||||
--- a/res/values-hu/strings.xml
|
||||
+++ b/res/values-hu/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Előző ablak</string>
|
||||
<string name="next_window">Következő ablak</string>
|
||||
<string name="reset">Alaphelyzet</string>
|
||||
- <string name="send_email">Küldés emailben</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Speciális billentyűk</string>
|
||||
<string name="toggle_soft_keyboard">Billentyűzet ki/be</string>
|
||||
|
||||
@@ -148,4 +148,4 @@
|
||||
<string name="alt_sends_esc">Az Alt billentyű ESC-et küld</string>
|
||||
<string name="alt_sends_esc_summary_on">Az Alt billentyű ESC-et küld.</string>
|
||||
<string name="alt_sends_esc_summary_off">Az Alt billentyű nem ESC-et küld.</string>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
+</resources>
|
||||
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
|
||||
index e6a7294..9d97869 100644
|
||||
--- a/res/values-it/strings.xml
|
||||
+++ b/res/values-it/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Fin. successiva</string>
|
||||
<string name="next_window">Fin. precedente</string>
|
||||
<string name="reset">Reset terminale</string>
|
||||
- <string name="send_email">Invia email</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Tasti speciali</string>
|
||||
<string name="toggle_soft_keyboard">Mostra/nascondi tastiera</string>
|
||||
|
||||
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
|
||||
index 502fa23..dbfe9fa 100644
|
||||
--- a/res/values-ja/strings.xml
|
||||
+++ b/res/values-ja/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">前のウインドウ</string>
|
||||
<string name="next_window">次のウインドウ</string>
|
||||
<string name="reset">端末をリセット</string>
|
||||
- <string name="send_email">メール送信</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">特殊キー</string>
|
||||
<string name="toggle_soft_keyboard">ソフトキーボード</string>
|
||||
|
||||
diff --git a/res/values-ka/strings.xml b/res/values-ka/strings.xml
|
||||
index 06629d0..1d545b6 100644
|
||||
--- a/res/values-ka/strings.xml
|
||||
+++ b/res/values-ka/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">წინა ფანჯარა</string>
|
||||
<string name="next_window">შემდეგი ფანჯარა</string>
|
||||
<string name="reset">ტერმინალის რესტარტი</string>
|
||||
- <string name="send_email">ელ-ფოსტის გაგზავნა</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">სპეციალური ღილაკები</string>
|
||||
<string name="toggle_soft_keyboard">პროგრამული კლავიატურის ჩართ./გამორთ.</string>
|
||||
|
||||
diff --git a/res/values-nb/strings.xml b/res/values-nb/strings.xml
|
||||
index d81ee07..c370c6f 100644
|
||||
--- a/res/values-nb/strings.xml
|
||||
+++ b/res/values-nb/strings.xml
|
||||
@@ -18,7 +18,7 @@
|
||||
<string name="application_terminal">Terminal Emulator</string>
|
||||
<string name="preferences">Innstillinger</string>
|
||||
<string name="reset">Tilbakestill terminal</string>
|
||||
- <string name="send_email">Send epost til</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Spesielle tegn</string>
|
||||
<string name="toggle_soft_keyboard">Veksle virtuelt tastatur</string>
|
||||
|
||||
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
|
||||
index 19fa3d0..e24fbf5 100644
|
||||
--- a/res/values-nl/strings.xml
|
||||
+++ b/res/values-nl/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Vorig venster</string>
|
||||
<string name="next_window">Volgend venster</string>
|
||||
<string name="reset">Herstellen</string>
|
||||
- <string name="send_email">E-mail sturen naar</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Speciale knoppen</string>
|
||||
<string name="toggle_soft_keyboard">Toetsenbord aan/uit</string>
|
||||
|
||||
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
|
||||
index 25b3b43..2e0e651 100644
|
||||
--- a/res/values-pl/strings.xml
|
||||
+++ b/res/values-pl/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Poprzednie okno</string>
|
||||
<string name="next_window">Następne okno</string>
|
||||
<string name="reset">Wyczyść terminal</string>
|
||||
- <string name="send_email">Wyślij e-mail</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Przyciski specjalne</string>
|
||||
<string name="toggle_soft_keyboard">Pokaż klawiaturę</string>
|
||||
|
||||
diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml
|
||||
index aa4ba54..aa3d735 100644
|
||||
--- a/res/values-pt-rPT/strings.xml
|
||||
+++ b/res/values-pt-rPT/strings.xml
|
||||
@@ -18,7 +18,7 @@
|
||||
<string name="application_terminal">Terminal Emulator</string>
|
||||
<string name="preferences">Preferências</string>
|
||||
<string name="reset">Reset terminal</string>
|
||||
- <string name="send_email">Email para</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Teclas especiais</string>
|
||||
<string name="toggle_soft_keyboard">Abrir teclado</string>
|
||||
|
||||
diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml
|
||||
index 2d992f9..e53a9ac 100644
|
||||
--- a/res/values-pt/strings.xml
|
||||
+++ b/res/values-pt/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Anterior</string>
|
||||
<string name="next_window">Seguinte</string>
|
||||
<string name="reset">Repor terminal</string>
|
||||
- <string name="send_email">Enviar mensagem para</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Teclas especiais</string>
|
||||
<string name="toggle_soft_keyboard">Mostrar/ocultar teclado</string>
|
||||
|
||||
diff --git a/res/values-ro/strings.xml b/res/values-ro/strings.xml
|
||||
index 3c7ea06..7a072d0 100644
|
||||
--- a/res/values-ro/strings.xml
|
||||
+++ b/res/values-ro/strings.xml
|
||||
@@ -21,7 +21,7 @@
|
||||
<string name="prev_window">"Fereastra anterioră"</string>
|
||||
<string name="next_window">"Fereastra următoare"</string>
|
||||
<string name="reset">"Resetaţi "</string>
|
||||
- <string name="send_email">"E-mail"</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">"Taste speciale"</string>
|
||||
<string name="toggle_soft_keyboard">"Comutați tastatura"</string>
|
||||
|
||||
@@ -123,4 +123,4 @@
|
||||
<string name="alt_sends_esc">"Tasta Alt trimite ESC"</string>
|
||||
<string name="alt_sends_esc_summary_on">"Tasta Alt trimite ESC."</string>
|
||||
<string name="alt_sends_esc_summary_off">"Tasta Alt nu trimite ESC."</string>
|
||||
-</resources>
|
||||
\ No newline at end of file
|
||||
+</resources>
|
||||
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
|
||||
index 0e96360..762324e 100644
|
||||
--- a/res/values-ru/strings.xml
|
||||
+++ b/res/values-ru/strings.xml
|
||||
@@ -8,7 +8,7 @@
|
||||
<string name="prev_window">Предыдущее окно</string>
|
||||
<string name="next_window">Следующее окно</string>
|
||||
<string name="reset">Сбросить терминал</string>
|
||||
- <string name="send_email">Отправить Email</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Специальные клавиши</string>
|
||||
<string name="toggle_soft_keyboard">Экранная клавиатура</string>
|
||||
<string name="reset_toast_notification">Терминальное состояние этого окна было сброшено.</string>
|
||||
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
|
||||
index ef35366..cc31d80 100644
|
||||
--- a/res/values-sk/strings.xml
|
||||
+++ b/res/values-sk/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Dalšie okno</string>
|
||||
<string name="next_window">Predch. okno</string>
|
||||
<string name="reset">Obnoviť term.</string>
|
||||
- <string name="send_email">Poslať e-mailom</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Špec. klávesy</string>
|
||||
<string name="toggle_soft_keyboard">Skryť/zobraziť klávesnicu</string>
|
||||
|
||||
diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml
|
||||
index 1aa9055..8de6c09 100644
|
||||
--- a/res/values-sv/strings.xml
|
||||
+++ b/res/values-sv/strings.xml
|
||||
@@ -3,7 +3,7 @@
|
||||
<string name="application_terminal">Terminalemulator</string>
|
||||
<string name="preferences">Inställningar</string>
|
||||
<string name="reset">Återställ terminal</string>
|
||||
- <string name="send_email">E-posta till</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Special tangenter</string>
|
||||
<string name="toggle_soft_keyboard">Växla till virtuellt tangentbord</string>
|
||||
<string name="enable_wakelock">Aktivera VäckningsLås</string>
|
||||
diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml
|
||||
index b45fa12..fb70f78 100644
|
||||
--- a/res/values-tr/strings.xml
|
||||
+++ b/res/values-tr/strings.xml
|
||||
@@ -18,7 +18,7 @@
|
||||
<string name="application_terminal">Terminal Emülatörü</string>
|
||||
<string name="preferences">Tercihler</string>
|
||||
<string name="reset">Terminali yeniden başlat</string>
|
||||
- <string name="send_email">Email olarak yolla</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Özel tuşlar</string>
|
||||
<string name="toggle_soft_keyboard">Ekran klavyesine geç</string>
|
||||
|
||||
diff --git a/res/values-uk/strings.xml b/res/values-uk/strings.xml
|
||||
index 2f267a9..d3622c4 100644
|
||||
--- a/res/values-uk/strings.xml
|
||||
+++ b/res/values-uk/strings.xml
|
||||
@@ -8,7 +8,7 @@
|
||||
<string name="prev_window">Попереднє вікно</string>
|
||||
<string name="next_window">Наступне вікно</string>
|
||||
<string name="reset">Скинути термінал</string>
|
||||
- <string name="send_email">Відіслати Email</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">Спеціальні клавіші</string>
|
||||
<string name="toggle_soft_keyboard">Екранна клавіатура</string>
|
||||
<string name="reset_toast_notification">"Термінальний стан цього вікна було скинуто."</string>
|
||||
diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml
|
||||
index 6f47b4f..81316ec 100644
|
||||
--- a/res/values-zh-rCN/strings.xml
|
||||
+++ b/res/values-zh-rCN/strings.xml
|
||||
@@ -18,7 +18,7 @@
|
||||
<string name="application_terminal">终端模拟器</string>
|
||||
<string name="preferences">首选项</string>
|
||||
<string name="reset">重置终端</string>
|
||||
- <string name="send_email">发送电子邮件到...</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">特殊键</string>
|
||||
<string name="toggle_soft_keyboard">打开/关闭软键盘</string>
|
||||
|
||||
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
|
||||
index afda0f1..37d1b50 100644
|
||||
--- a/res/values-zh-rTW/strings.xml
|
||||
+++ b/res/values-zh-rTW/strings.xml
|
||||
@@ -18,7 +18,7 @@
|
||||
<string name="application_terminal">模擬終端</string>
|
||||
<string name="preferences">設定</string>
|
||||
<string name="reset">結束</string>
|
||||
- <string name="send_email">以電郵傳送</string>
|
||||
+ <string name="send_email">WebApp</string>
|
||||
<string name="special_keys">特別按鍵</string>
|
||||
<string name="toggle_soft_keyboard">顯示/隱藏鍵盤</string>
|
||||
|
||||
diff --git a/res/values/defaults.xml b/res/values/defaults.xml
|
||||
index 67287b2..9b7cfcd 100644
|
||||
--- a/res/values/defaults.xml
|
||||
+++ b/res/values/defaults.xml
|
||||
@@ -13,10 +13,10 @@
|
||||
<string name="pref_fnkey_default">4</string>
|
||||
<string name="pref_ime_default">0</string>
|
||||
<bool name="pref_alt_sends_esc_default">false</bool>
|
||||
- <string name="pref_shell_default">/system/bin/sh -</string>
|
||||
- <string name="pref_initialcommand_default"></string>
|
||||
+ <string name="pref_shell_default">/data/data/ga.androidterm/lib/lib.start.so</string>
|
||||
+ <string name="pref_initialcommand_default">git annex webapp</string>
|
||||
<string name="pref_termtype_default">screen</string>
|
||||
- <bool name="pref_close_window_on_process_exit_default">true</bool>
|
||||
+ <bool name="pref_close_window_on_process_exit_default">false</bool>
|
||||
<bool name="pref_verify_path_default">true</bool>
|
||||
<bool name="pref_do_path_extensions_default">true</bool>
|
||||
<bool name="pref_allow_prepend_path_default">true</bool>
|
||||
diff --git a/res/values/strings.xml b/res/values/strings.xml
|
||||
index f1464e9..b06ec9a 100644
|
||||
--- a/res/values/strings.xml
|
||||
+++ b/res/values/strings.xml
|
||||
@@ -23,7 +23,7 @@
|
||||
<string name="prev_window">Prev window</string>
|
||||
<string name="next_window">Next window</string>
|
||||
<string name="reset">Reset term</string>
|
||||
- <string name="send_email">Email to</string>
|
||||
+ <string name="send_email">Open WebApp</string>
|
||||
<string name="special_keys">Special keys</string>
|
||||
<string name="toggle_soft_keyboard">Toggle soft keyboard</string>
|
||||
|
||||
diff --git a/src/jackpal/androidterm/ShellTermSession.java b/src/jackpal/androidterm/ShellTermSession.java
|
||||
index 501e7ab..0b43513 100644
|
||||
--- a/src/jackpal/androidterm/ShellTermSession.java
|
||||
+++ b/src/jackpal/androidterm/ShellTermSession.java
|
||||
@@ -80,12 +80,12 @@ public class ShellTermSession extends TermSession {
|
||||
}
|
||||
};
|
||||
|
||||
- public ShellTermSession(TermSettings settings, String initialCommand) {
|
||||
+ public ShellTermSession(TermSettings settings, String initialCommand, String webAppFifo) {
|
||||
super();
|
||||
|
||||
updatePrefs(settings);
|
||||
|
||||
- initializeSession();
|
||||
+ initializeSession(webAppFifo);
|
||||
mInitialCommand = initialCommand;
|
||||
|
||||
mWatcherThread = new Thread() {
|
||||
@@ -106,7 +106,7 @@ public class ShellTermSession extends TermSession {
|
||||
setDefaultUTF8Mode(settings.defaultToUTF8Mode());
|
||||
}
|
||||
|
||||
- private void initializeSession() {
|
||||
+ private void initializeSession(String webAppFifo) {
|
||||
TermSettings settings = mSettings;
|
||||
|
||||
int[] processId = new int[1];
|
||||
@@ -128,9 +128,10 @@ public class ShellTermSession extends TermSession {
|
||||
if (settings.verifyPath()) {
|
||||
path = checkPath(path);
|
||||
}
|
||||
- String[] env = new String[2];
|
||||
+ String[] env = new String[3];
|
||||
env[0] = "TERM=" + settings.getTermType();
|
||||
env[1] = "PATH=" + path;
|
||||
+ env[2] = "FIFO=" + webAppFifo;
|
||||
|
||||
createSubprocess(processId, settings.getShell(), env);
|
||||
mProcId = processId[0];
|
||||
diff --git a/src/jackpal/androidterm/Term.java b/src/jackpal/androidterm/Term.java
|
||||
index 8a3a4ac..824025d 100644
|
||||
--- a/src/jackpal/androidterm/Term.java
|
||||
+++ b/src/jackpal/androidterm/Term.java
|
||||
@@ -20,6 +20,13 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.text.Collator;
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
+import java.lang.Process;
|
||||
+import java.lang.ProcessBuilder;
|
||||
+import java.util.Map;
|
||||
+
|
||||
+import java.io.FileReader;
|
||||
+import java.io.BufferedReader;
|
||||
+import java.io.File;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
@@ -59,6 +66,11 @@ import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
+import android.content.Intent;
|
||||
+import android.net.Uri;
|
||||
+import android.app.Activity;
|
||||
+import android.content.Context;
|
||||
+
|
||||
import jackpal.androidterm.emulatorview.ColorScheme;
|
||||
import jackpal.androidterm.emulatorview.EmulatorView;
|
||||
import jackpal.androidterm.emulatorview.TermSession;
|
||||
@@ -107,6 +119,9 @@ public class Term extends Activity implements UpdateCallback {
|
||||
public static final String EXTRA_WINDOW_ID = "jackpal.androidterm.window_id";
|
||||
private int onResumeSelectWindow = -1;
|
||||
|
||||
+ public static String appDir;
|
||||
+ public static String webAppFifo;
|
||||
+
|
||||
private PowerManager.WakeLock mWakeLock;
|
||||
private WifiManager.WifiLock mWifiLock;
|
||||
// Available on API 12 and later
|
||||
@@ -257,6 +272,48 @@ public class Term extends Activity implements UpdateCallback {
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
+
|
||||
+ try {
|
||||
+ appDir = getApplicationContext().getPackageManager().getPackageInfo(getPackageName(), 0).applicationInfo.dataDir;
|
||||
+ } catch (Exception e) {
|
||||
+ appDir = "/data/data/ga.androidterm";
|
||||
+ }
|
||||
+ webAppFifo = appDir + "/fifo";
|
||||
+
|
||||
+ /* webapp url opening thread */
|
||||
+ new Thread() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ try {
|
||||
+ /* First, set up the fifo that urls to open will be
|
||||
+ * read from. This is complicated by java not being
|
||||
+ * able to mkfifo. */
|
||||
+ File f = new File (webAppFifo);
|
||||
+ if (! f.exists()) {
|
||||
+ ProcessBuilder pb = new ProcessBuilder(appDir + "/lib/lib.start.so");
|
||||
+ Map<String, String> env = pb.environment();
|
||||
+ env.put("MKFIFO", webAppFifo);
|
||||
+ Process p = pb.start();
|
||||
+ p.waitFor();
|
||||
+ }
|
||||
+
|
||||
+ /* Reading from the fifo blocks until a url is written
|
||||
+ * to it. */
|
||||
+ while (true) {
|
||||
+ BufferedReader buf = new BufferedReader(new FileReader(webAppFifo));
|
||||
+ String s = buf.readLine();
|
||||
+ try {
|
||||
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(s));
|
||||
+ startActivity(intent);
|
||||
+ } catch (Exception e) {
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ } catch (Exception e) {
|
||||
+ }
|
||||
+ }
|
||||
+ }.start();
|
||||
+
|
||||
Log.e(TermDebug.LOG_TAG, "onCreate");
|
||||
mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
mSettings = new TermSettings(getResources(), mPrefs);
|
||||
@@ -427,7 +484,7 @@ public class Term extends Activity implements UpdateCallback {
|
||||
}
|
||||
|
||||
protected static TermSession createTermSession(Context context, TermSettings settings, String initialCommand) {
|
||||
- ShellTermSession session = new ShellTermSession(settings, initialCommand);
|
||||
+ ShellTermSession session = new ShellTermSession(settings, initialCommand, webAppFifo);
|
||||
// XXX We should really be able to fetch this from within TermSession
|
||||
session.setProcessExitMessage(context.getString(R.string.process_exit_message));
|
||||
|
||||
@@ -911,31 +968,15 @@ public class Term extends Activity implements UpdateCallback {
|
||||
}
|
||||
|
||||
private void doEmailTranscript() {
|
||||
+ // Hack: repurposed to open the git-annex webapp
|
||||
TermSession session = getCurrentTermSession();
|
||||
if (session != null) {
|
||||
- // Don't really want to supply an address, but
|
||||
- // currently it's required, otherwise nobody
|
||||
- // wants to handle the intent.
|
||||
- String addr = "user@example.com";
|
||||
- Intent intent =
|
||||
- new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:"
|
||||
- + addr));
|
||||
-
|
||||
- String subject = getString(R.string.email_transcript_subject);
|
||||
- String title = session.getTitle();
|
||||
- if (title != null) {
|
||||
- subject = subject + " - " + title;
|
||||
- }
|
||||
- intent.putExtra(Intent.EXTRA_SUBJECT, subject);
|
||||
- intent.putExtra(Intent.EXTRA_TEXT,
|
||||
- session.getTranscriptText().trim());
|
||||
try {
|
||||
- startActivity(Intent.createChooser(intent,
|
||||
- getString(R.string.email_transcript_chooser_title)));
|
||||
- } catch (ActivityNotFoundException e) {
|
||||
- Toast.makeText(this,
|
||||
- R.string.email_transcript_no_email_activity_found,
|
||||
- Toast.LENGTH_LONG).show();
|
||||
+ BufferedReader buf = new BufferedReader(new FileReader("/sdcard/git-annex.home/.git-annex-url"));
|
||||
+ String s = buf.readLine();
|
||||
+ Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(s));
|
||||
+ startActivity(intent);
|
||||
+ } catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/tools/build-debug b/tools/build-debug
|
||||
index 1f15cd2..e611956 100755
|
||||
--- a/tools/build-debug
|
||||
+++ b/tools/build-debug
|
||||
@@ -34,4 +34,4 @@ fi
|
||||
|
||||
rm -rf `find . -name bin -o -name obj -prune`
|
||||
cd jni
|
||||
-$ANDROID_NDK_ROOT/ndk-build && cd .. && ant debug
|
||||
+$ANDROID_NDK_ROOT/ndk-build && cd ..
|
||||
diff --git a/tools/update.sh b/tools/update.sh
|
||||
index 57219c3..79b45ef 100755
|
||||
--- a/tools/update.sh
|
||||
+++ b/tools/update.sh
|
||||
@@ -18,7 +18,7 @@ command -v "$ANDROID" >/dev/null 2>&1 || { echo >&2 "The $ANDROID tool is not fo
|
||||
|
||||
# Make sure target-11 is installed
|
||||
|
||||
-$ANDROID update sdk -u -t android-11
|
||||
+$ANDROID update sdk -u -t android-19
|
||||
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
ATE_ROOT="$( cd $DIR/.. && pwd )"
|
||||
@@ -31,5 +31,5 @@ for PROJECT_FILE in $PROJECT_FILES
|
||||
do
|
||||
PROJECT_DIR="$( dirname "$PROJECT_FILE" )"
|
||||
echo "Updating $PROJECT_FILE"
|
||||
- $ANDROID update project -p "$PROJECT_DIR" --target android-11
|
||||
+ $ANDROID update project -p "$PROJECT_DIR" --target android-19
|
||||
done
|
|
@ -1,54 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Outputs a new PATH setting that is prefixed by the path to the
|
||||
# Android cross-compiler toolchain to use for a given Android version.
|
||||
#
|
||||
# For Android 5, force PIE build flags
|
||||
#
|
||||
# Since the ghc-android wrappers actually hardcode the path to the
|
||||
# toolchain, and we want to wrap the toolchain programs, the binaries
|
||||
# are moved to .orig and replaced by wrappers.
|
||||
|
||||
androidversion="$1"
|
||||
|
||||
# Allow running from the top or inside this directory.
|
||||
if [ -e abiversion ]; then
|
||||
top=.
|
||||
else
|
||||
top=standalone/android
|
||||
fi
|
||||
|
||||
wrap () {
|
||||
sed -e "s!PROG!$1!" -e "s!OPTS!$3!" < $top/wrapper.pl > "$2"
|
||||
chmod +x "$2"
|
||||
}
|
||||
|
||||
# location to toolchain as installed by ghc-android
|
||||
androidtoolchain="$HOME/.ghc/$(cat $top/abiversion)/bin"
|
||||
|
||||
for f in $(find "$androidtoolchain" -maxdepth 1 -type f -printf '%f\n' | grep -v \.orig); do
|
||||
bin="$androidtoolchain/$f"
|
||||
orig="$androidtoolchain/$f.orig"
|
||||
if [ ! -e "$orig" ]; then
|
||||
cp -a "$bin" "$orig"
|
||||
fi
|
||||
if [ "$androidversion" = 5 ]; then
|
||||
case "$f" in
|
||||
*-ld*)
|
||||
wrap "$orig" "$bin" "-pie"
|
||||
;;
|
||||
*-gcc)
|
||||
wrap "$orig" "$bin" "-pie -fPIE"
|
||||
;;
|
||||
*'-g++')
|
||||
wrap "$orig" "$bin" "-pie -fPIE"
|
||||
;;
|
||||
*)
|
||||
cp -a "$orig" "$bin"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
cp -a "$orig" "$bin"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$androidtoolchain:$PATH"
|
|
@ -1,11 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
my $prog=q{PROG}; # replaced
|
||||
my @opts=qw{OPTS}; # replaced
|
||||
|
||||
if (grep { $_ eq "-r" || $_ eq "--relocatable" } @ARGV) {
|
||||
exec($prog,@ARGV) || die "failed to run $prog";
|
||||
}
|
||||
else {
|
||||
my @args=grep { ! m/-no-pie/ } @ARGV;
|
||||
exec($prog,@opts,@args) || die "failed to run $prog";
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
|
||||
|
||||
{- This file was modified by the EvilSplicer, adding these headers,
|
||||
- and expanding Template Haskell.
|
||||
-
|
||||
- ** DO NOT COMMIT **
|
||||
-}
|
||||
import qualified Data.Monoid
|
||||
import qualified Control.Applicative
|
||||
import qualified Data.Set
|
||||
import qualified Data.Set as Data.Set.Base
|
||||
import qualified Data.Map
|
||||
import qualified Data.Map as Data.Map.Base
|
||||
import qualified Data.HashMap.Strict
|
||||
import qualified Data.HashMap.Strict as Data.HashMap.Base
|
||||
import qualified Data.Foldable
|
||||
import qualified Data.Text
|
||||
import qualified Data.Text.Lazy.Builder
|
||||
import qualified Data.Text.Lazy.Builder as Data.Text.Internal.Builder
|
||||
import qualified Text.Shakespeare
|
||||
import qualified Text.Hamlet
|
||||
import qualified Text.Julius
|
||||
import qualified Text.Css
|
||||
import qualified "blaze-markup" Text.Blaze.Internal
|
||||
import qualified Yesod.Core.Widget
|
||||
import qualified Yesod.Routes.TH.Types
|
||||
import qualified Yesod.Core.Dispatch
|
||||
import qualified Yesod.Routes.Dispatch
|
||||
import qualified WaiAppStatic.Storage.Embedded
|
||||
import qualified WaiAppStatic.Storage.Embedded.Runtime
|
||||
import qualified Data.FileEmbed
|
||||
import qualified Data.ByteString.Internal
|
||||
import qualified Data.Text.Encoding
|
||||
import qualified Network.Wai
|
||||
import qualified Network.Wai as Network.Wai.Internal
|
||||
import qualified Yesod.Core.Types
|
||||
import qualified GHC.IO
|
||||
import qualified Data.ByteString.Unsafe
|
||||
import qualified Data.ByteString.Char8
|
||||
import qualified Database.Persist.Class as Database.Persist.Class.PersistField
|
||||
import qualified Database.Persist as Database.Persist.Class.PersistField
|
||||
import qualified Database.Persist.Sql as Database.Persist.Sql.Class
|
||||
import qualified Database.Persist.Sql as Database.Persist.Types.Base
|
||||
import qualified Control.Monad.Logger
|
||||
import qualified Control.Monad.IO.Class
|
||||
import qualified Control.Monad.Trans.Control
|
||||
import Database.Persist.Sql (fromPersistValue)
|
||||
{- End EvilSplicer headers. -}
|
||||
|
||||
|
|
@ -1,420 +0,0 @@
|
|||
From e54cfacbb9fb24f75d3d93cd8ee6da67b161574f Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:51:28 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
DAV.cabal | 28 +----
|
||||
Network/Protocol/HTTP/DAV.hs | 92 +++++++++++++---
|
||||
Network/Protocol/HTTP/DAV/TH.hs | 232 +++++++++++++++++++++++++++++++++++++++-
|
||||
3 files changed, 306 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/DAV.cabal b/DAV.cabal
|
||||
index 95fffd8..5669c51 100644
|
||||
--- a/DAV.cabal
|
||||
+++ b/DAV.cabal
|
||||
@@ -47,33 +47,7 @@ library
|
||||
, utf8-string
|
||||
, xml-conduit >= 1.0 && < 1.3
|
||||
, xml-hamlet >= 0.4 && < 0.5
|
||||
-executable hdav
|
||||
- main-is: hdav.hs
|
||||
- ghc-options: -Wall
|
||||
- build-depends: base >= 4.5 && < 5
|
||||
- , bytestring
|
||||
- , bytestring
|
||||
- , case-insensitive >= 0.4
|
||||
- , containers
|
||||
- , data-default
|
||||
- , either >= 4.3
|
||||
- , errors
|
||||
- , exceptions
|
||||
- , http-client >= 0.2
|
||||
- , http-client-tls >= 0.2
|
||||
- , http-types >= 0.7
|
||||
- , lens >= 3.0
|
||||
- , mtl >= 2.1
|
||||
- , optparse-applicative >= 0.10.0
|
||||
- , transformers >= 0.3
|
||||
- , transformers-base
|
||||
- , utf8-string
|
||||
- , xml-conduit >= 1.0 && < 1.3
|
||||
- , xml-hamlet >= 0.4 && < 0.5
|
||||
- if flag(network-uri)
|
||||
- build-depends: network-uri >= 2.6, network >= 2.6
|
||||
- else
|
||||
- build-depends: network >= 2.3 && <2.6
|
||||
+ , text
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
diff --git a/Network/Protocol/HTTP/DAV.hs b/Network/Protocol/HTTP/DAV.hs
|
||||
index 4c6d68f..55979b6 100644
|
||||
--- a/Network/Protocol/HTTP/DAV.hs
|
||||
+++ b/Network/Protocol/HTTP/DAV.hs
|
||||
@@ -82,6 +82,7 @@ import Network.HTTP.Types (hContentType, Method, Status, RequestHeaders, unautho
|
||||
import qualified Text.XML as XML
|
||||
import Text.XML.Cursor (($/), (&/), element, node, fromDocument, checkName)
|
||||
import Text.Hamlet.XML (xml)
|
||||
+import qualified Data.Text
|
||||
|
||||
import Data.CaseInsensitive (mk)
|
||||
|
||||
@@ -330,31 +331,88 @@ withLockIfPossibleForDelete nocreate f = do
|
||||
propname :: XML.Document
|
||||
propname = XML.Document (XML.Prologue [] Nothing []) root []
|
||||
where
|
||||
- root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) [xml|
|
||||
-<D:allprop>
|
||||
-|]
|
||||
+ root = XML.Element "D:propfind" (Map.fromList [("xmlns:D", "DAV:")]) $ concat
|
||||
+ [[XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name
|
||||
+ (Data.Text.pack "D:allprop") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat []))]]
|
||||
+
|
||||
|
||||
locky :: XML.Document
|
||||
locky = XML.Document (XML.Prologue [] Nothing []) root []
|
||||
where
|
||||
- root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) [xml|
|
||||
-<D:lockscope>
|
||||
- <D:exclusive>
|
||||
-<D:locktype>
|
||||
- <D:write>
|
||||
-<D:owner>Haskell DAV user
|
||||
-|]
|
||||
+ root = XML.Element "D:lockinfo" (Map.fromList [("xmlns:D", "DAV:")]) $ concat
|
||||
+ [[XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name
|
||||
+ (Data.Text.pack "D:lockscope") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat
|
||||
+ [[XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name
|
||||
+ (Data.Text.pack "D:exclusive") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat []))]]))],
|
||||
+ [XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name
|
||||
+ (Data.Text.pack "D:locktype") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat
|
||||
+ [[XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name (Data.Text.pack "D:write") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat []))]]))],
|
||||
+ [XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name (Data.Text.pack "D:owner") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat
|
||||
+ [[XML.NodeContent
|
||||
+ (Data.Text.pack "Haskell DAV user")]]))]]
|
||||
+
|
||||
|
||||
calendarquery :: XML.Document
|
||||
calendarquery = XML.Document (XML.Prologue [] Nothing []) root []
|
||||
where
|
||||
- root = XML.Element "C:calendar-query" (Map.fromList [("xmlns:D", "DAV:"),("xmlns:C", "urn:ietf:params:xml:ns:caldav")]) [xml|
|
||||
-<D:prop>
|
||||
- <D:getetag>
|
||||
- <C:calendar-data>
|
||||
-<C:filter>
|
||||
- <C:comp-filter name="VCALENDAR">
|
||||
-|]
|
||||
+ root = XML.Element "C:calendar-query" (Map.fromList [("xmlns:D", "DAV:"),("xmlns:C", "urn:ietf:params:xml:ns:caldav")]) $ concat
|
||||
+ [[XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name (Data.Text.pack "D:prop") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat
|
||||
+ [[XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name
|
||||
+ (Data.Text.pack "D:getetag") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat []))],
|
||||
+ [XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name
|
||||
+ (Data.Text.pack "C:calendar-data") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat []))]]))],
|
||||
+ [XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name (Data.Text.pack "C:filter") Nothing Nothing)
|
||||
+ Map.empty
|
||||
+ (concat
|
||||
+ [[XML.NodeElement
|
||||
+ (XML.Element
|
||||
+ (XML.Name
|
||||
+ (Data.Text.pack "C:comp-filter") Nothing Nothing)
|
||||
+ (Map.insert
|
||||
+ (XML.Name (Data.Text.pack "name") Nothing Nothing)
|
||||
+ (Data.Text.concat
|
||||
+ [Data.Text.pack "VCALENDAR"])
|
||||
+ Map.empty)
|
||||
+ (concat []))]]))]]
|
||||
+
|
||||
|
||||
-- | Normally, DAVT actions act on the url that is provided to eg, evalDAVT.
|
||||
-- Sometimes, it's useful to adjust the url that is acted on, while
|
||||
diff --git a/Network/Protocol/HTTP/DAV/TH.hs b/Network/Protocol/HTTP/DAV/TH.hs
|
||||
index 0ecd476..1653bf6 100644
|
||||
--- a/Network/Protocol/HTTP/DAV/TH.hs
|
||||
+++ b/Network/Protocol/HTTP/DAV/TH.hs
|
||||
@@ -20,9 +20,11 @@
|
||||
|
||||
module Network.Protocol.HTTP.DAV.TH where
|
||||
|
||||
-import Control.Lens (makeLenses)
|
||||
+import Control.Lens
|
||||
import qualified Data.ByteString as B
|
||||
import Network.HTTP.Client (Manager, Request)
|
||||
+import qualified Data.Functor
|
||||
+import qualified Control.Lens.Type
|
||||
|
||||
data Depth = Depth0 | Depth1 | DepthInfinity
|
||||
instance Read Depth where
|
||||
@@ -47,4 +49,230 @@ data DAVContext = DAVContext {
|
||||
, _lockToken :: Maybe B.ByteString
|
||||
, _userAgent :: B.ByteString
|
||||
}
|
||||
-makeLenses ''DAVContext
|
||||
+allowedMethods :: Control.Lens.Type.Lens' DAVContext [B.ByteString]
|
||||
+allowedMethods
|
||||
+ _f_a3iH
|
||||
+ (DAVContext __allowedMethods'_a3iI
|
||||
+ __baseRequest_a3iK
|
||||
+ __basicusername_a3iL
|
||||
+ __basicpassword_a3iM
|
||||
+ __complianceClasses_a3iN
|
||||
+ __depth_a3iO
|
||||
+ __httpManager_a3iP
|
||||
+ __lockToken_a3iQ
|
||||
+ __userAgent_a3iR)
|
||||
+ = ((\ __allowedMethods_a3iJ
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3iJ
|
||||
+ __baseRequest_a3iK
|
||||
+ __basicusername_a3iL
|
||||
+ __basicpassword_a3iM
|
||||
+ __complianceClasses_a3iN
|
||||
+ __depth_a3iO
|
||||
+ __httpManager_a3iP
|
||||
+ __lockToken_a3iQ
|
||||
+ __userAgent_a3iR)
|
||||
+ Data.Functor.<$> (_f_a3iH __allowedMethods'_a3iI))
|
||||
+{-# INLINE allowedMethods #-}
|
||||
+baseRequest :: Control.Lens.Type.Lens' DAVContext Request
|
||||
+baseRequest
|
||||
+ _f_a3iS
|
||||
+ (DAVContext __allowedMethods_a3iT
|
||||
+ __baseRequest'_a3iU
|
||||
+ __basicusername_a3iW
|
||||
+ __basicpassword_a3iX
|
||||
+ __complianceClasses_a3iY
|
||||
+ __depth_a3iZ
|
||||
+ __httpManager_a3j0
|
||||
+ __lockToken_a3j1
|
||||
+ __userAgent_a3j2)
|
||||
+ = ((\ __baseRequest_a3iV
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3iT
|
||||
+ __baseRequest_a3iV
|
||||
+ __basicusername_a3iW
|
||||
+ __basicpassword_a3iX
|
||||
+ __complianceClasses_a3iY
|
||||
+ __depth_a3iZ
|
||||
+ __httpManager_a3j0
|
||||
+ __lockToken_a3j1
|
||||
+ __userAgent_a3j2)
|
||||
+ Data.Functor.<$> (_f_a3iS __baseRequest'_a3iU))
|
||||
+{-# INLINE baseRequest #-}
|
||||
+basicpassword :: Control.Lens.Type.Lens' DAVContext B.ByteString
|
||||
+basicpassword
|
||||
+ _f_a3j3
|
||||
+ (DAVContext __allowedMethods_a3j4
|
||||
+ __baseRequest_a3j5
|
||||
+ __basicusername_a3j6
|
||||
+ __basicpassword'_a3j7
|
||||
+ __complianceClasses_a3j9
|
||||
+ __depth_a3ja
|
||||
+ __httpManager_a3jb
|
||||
+ __lockToken_a3jc
|
||||
+ __userAgent_a3jd)
|
||||
+ = ((\ __basicpassword_a3j8
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3j4
|
||||
+ __baseRequest_a3j5
|
||||
+ __basicusername_a3j6
|
||||
+ __basicpassword_a3j8
|
||||
+ __complianceClasses_a3j9
|
||||
+ __depth_a3ja
|
||||
+ __httpManager_a3jb
|
||||
+ __lockToken_a3jc
|
||||
+ __userAgent_a3jd)
|
||||
+ Data.Functor.<$> (_f_a3j3 __basicpassword'_a3j7))
|
||||
+{-# INLINE basicpassword #-}
|
||||
+basicusername :: Control.Lens.Type.Lens' DAVContext B.ByteString
|
||||
+basicusername
|
||||
+ _f_a3je
|
||||
+ (DAVContext __allowedMethods_a3jf
|
||||
+ __baseRequest_a3jg
|
||||
+ __basicusername'_a3jh
|
||||
+ __basicpassword_a3jj
|
||||
+ __complianceClasses_a3jk
|
||||
+ __depth_a3jl
|
||||
+ __httpManager_a3jm
|
||||
+ __lockToken_a3jn
|
||||
+ __userAgent_a3jo)
|
||||
+ = ((\ __basicusername_a3ji
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3jf
|
||||
+ __baseRequest_a3jg
|
||||
+ __basicusername_a3ji
|
||||
+ __basicpassword_a3jj
|
||||
+ __complianceClasses_a3jk
|
||||
+ __depth_a3jl
|
||||
+ __httpManager_a3jm
|
||||
+ __lockToken_a3jn
|
||||
+ __userAgent_a3jo)
|
||||
+ Data.Functor.<$> (_f_a3je __basicusername'_a3jh))
|
||||
+{-# INLINE basicusername #-}
|
||||
+complianceClasses ::
|
||||
+ Control.Lens.Type.Lens' DAVContext [B.ByteString]
|
||||
+complianceClasses
|
||||
+ _f_a3jp
|
||||
+ (DAVContext __allowedMethods_a3jq
|
||||
+ __baseRequest_a3jr
|
||||
+ __basicusername_a3js
|
||||
+ __basicpassword_a3jt
|
||||
+ __complianceClasses'_a3ju
|
||||
+ __depth_a3jw
|
||||
+ __httpManager_a3jx
|
||||
+ __lockToken_a3jy
|
||||
+ __userAgent_a3jz)
|
||||
+ = ((\ __complianceClasses_a3jv
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3jq
|
||||
+ __baseRequest_a3jr
|
||||
+ __basicusername_a3js
|
||||
+ __basicpassword_a3jt
|
||||
+ __complianceClasses_a3jv
|
||||
+ __depth_a3jw
|
||||
+ __httpManager_a3jx
|
||||
+ __lockToken_a3jy
|
||||
+ __userAgent_a3jz)
|
||||
+ Data.Functor.<$> (_f_a3jp __complianceClasses'_a3ju))
|
||||
+{-# INLINE complianceClasses #-}
|
||||
+depth :: Control.Lens.Type.Lens' DAVContext (Maybe Depth)
|
||||
+depth
|
||||
+ _f_a3jA
|
||||
+ (DAVContext __allowedMethods_a3jB
|
||||
+ __baseRequest_a3jC
|
||||
+ __basicusername_a3jD
|
||||
+ __basicpassword_a3jE
|
||||
+ __complianceClasses_a3jF
|
||||
+ __depth'_a3jG
|
||||
+ __httpManager_a3jI
|
||||
+ __lockToken_a3jJ
|
||||
+ __userAgent_a3jK)
|
||||
+ = ((\ __depth_a3jH
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3jB
|
||||
+ __baseRequest_a3jC
|
||||
+ __basicusername_a3jD
|
||||
+ __basicpassword_a3jE
|
||||
+ __complianceClasses_a3jF
|
||||
+ __depth_a3jH
|
||||
+ __httpManager_a3jI
|
||||
+ __lockToken_a3jJ
|
||||
+ __userAgent_a3jK)
|
||||
+ Data.Functor.<$> (_f_a3jA __depth'_a3jG))
|
||||
+{-# INLINE depth #-}
|
||||
+httpManager :: Control.Lens.Type.Lens' DAVContext (Maybe Manager)
|
||||
+httpManager
|
||||
+ _f_a3jL
|
||||
+ (DAVContext __allowedMethods_a3jM
|
||||
+ __baseRequest_a3jN
|
||||
+ __basicusername_a3jO
|
||||
+ __basicpassword_a3jP
|
||||
+ __complianceClasses_a3jQ
|
||||
+ __depth_a3jR
|
||||
+ __httpManager'_a3jS
|
||||
+ __lockToken_a3jU
|
||||
+ __userAgent_a3jV)
|
||||
+ = ((\ __httpManager_a3jT
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3jM
|
||||
+ __baseRequest_a3jN
|
||||
+ __basicusername_a3jO
|
||||
+ __basicpassword_a3jP
|
||||
+ __complianceClasses_a3jQ
|
||||
+ __depth_a3jR
|
||||
+ __httpManager_a3jT
|
||||
+ __lockToken_a3jU
|
||||
+ __userAgent_a3jV)
|
||||
+ Data.Functor.<$> (_f_a3jL __httpManager'_a3jS))
|
||||
+{-# INLINE httpManager #-}
|
||||
+lockToken ::
|
||||
+ Control.Lens.Type.Lens' DAVContext (Maybe B.ByteString)
|
||||
+lockToken
|
||||
+ _f_a3jW
|
||||
+ (DAVContext __allowedMethods_a3jX
|
||||
+ __baseRequest_a3jY
|
||||
+ __basicusername_a3jZ
|
||||
+ __basicpassword_a3k0
|
||||
+ __complianceClasses_a3k1
|
||||
+ __depth_a3k2
|
||||
+ __httpManager_a3k3
|
||||
+ __lockToken'_a3k4
|
||||
+ __userAgent_a3k6)
|
||||
+ = ((\ __lockToken_a3k5
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3jX
|
||||
+ __baseRequest_a3jY
|
||||
+ __basicusername_a3jZ
|
||||
+ __basicpassword_a3k0
|
||||
+ __complianceClasses_a3k1
|
||||
+ __depth_a3k2
|
||||
+ __httpManager_a3k3
|
||||
+ __lockToken_a3k5
|
||||
+ __userAgent_a3k6)
|
||||
+ Data.Functor.<$> (_f_a3jW __lockToken'_a3k4))
|
||||
+{-# INLINE lockToken #-}
|
||||
+userAgent :: Control.Lens.Type.Lens' DAVContext B.ByteString
|
||||
+userAgent
|
||||
+ _f_a3k7
|
||||
+ (DAVContext __allowedMethods_a3k8
|
||||
+ __baseRequest_a3k9
|
||||
+ __basicusername_a3ka
|
||||
+ __basicpassword_a3kb
|
||||
+ __complianceClasses_a3kc
|
||||
+ __depth_a3kd
|
||||
+ __httpManager_a3ke
|
||||
+ __lockToken_a3kf
|
||||
+ __userAgent'_a3kg)
|
||||
+ = ((\ __userAgent_a3kh
|
||||
+ -> DAVContext
|
||||
+ __allowedMethods_a3k8
|
||||
+ __baseRequest_a3k9
|
||||
+ __basicusername_a3ka
|
||||
+ __basicpassword_a3kb
|
||||
+ __complianceClasses_a3kc
|
||||
+ __depth_a3kd
|
||||
+ __httpManager_a3ke
|
||||
+ __lockToken_a3kf
|
||||
+ __userAgent_a3kh)
|
||||
+ Data.Functor.<$> (_f_a3k7 __userAgent'_a3kg))
|
||||
+{-# INLINE userAgent #-}
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
From f147ec9aeaa03ca6e30232c84c413ef29b95fb62 Mon Sep 17 00:00:00 2001
|
||||
From: Your Name <you@example.com>
|
||||
Date: Tue, 20 May 2014 19:53:55 +0000
|
||||
Subject: [PATCH] avoid TH
|
||||
|
||||
---
|
||||
aeson.cabal | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/aeson.cabal b/aeson.cabal
|
||||
index 493d625..02dc6f4 100644
|
||||
--- a/aeson.cabal
|
||||
+++ b/aeson.cabal
|
||||
@@ -88,7 +88,6 @@ library
|
||||
Data.Aeson.Generic
|
||||
Data.Aeson.Parser
|
||||
Data.Aeson.Types
|
||||
- Data.Aeson.TH
|
||||
|
||||
other-modules:
|
||||
Data.Aeson.Functions
|
||||
@@ -121,7 +120,6 @@ library
|
||||
old-locale,
|
||||
scientific >= 0.3.1 && < 0.4,
|
||||
syb,
|
||||
- template-haskell >= 2.4,
|
||||
time,
|
||||
unordered-containers >= 0.2.3.0,
|
||||
vector >= 0.7.1
|
||||
@@ -164,7 +162,6 @@ test-suite tests
|
||||
base,
|
||||
containers,
|
||||
bytestring,
|
||||
- template-haskell,
|
||||
test-framework,
|
||||
test-framework-quickcheck2,
|
||||
test-framework-hunit,
|
||||
--
|
||||
2.0.0.rc2
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
From 497d09a91f9eb1e5979948cd128078491b0e8bca Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Fri, 12 Sep 2014 20:52:08 -0400
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
Data/FileEmbed.hs | 87 ++++---------------------------------------------------
|
||||
1 file changed, 5 insertions(+), 82 deletions(-)
|
||||
|
||||
diff --git a/Data/FileEmbed.hs b/Data/FileEmbed.hs
|
||||
index 5617493..adacdba 100644
|
||||
--- a/Data/FileEmbed.hs
|
||||
+++ b/Data/FileEmbed.hs
|
||||
@@ -17,13 +17,13 @@
|
||||
-- > {-# LANGUAGE TemplateHaskell #-}
|
||||
module Data.FileEmbed
|
||||
( -- * Embed at compile time
|
||||
- embedFile
|
||||
- , embedOneFileOf
|
||||
- , embedDir
|
||||
- , getDir
|
||||
+ -- embedFile
|
||||
+ --, embedOneFileOf
|
||||
+ --, embedDir
|
||||
+ getDir
|
||||
-- * Inject into an executable
|
||||
#if MIN_VERSION_template_haskell(2,5,0)
|
||||
- , dummySpace
|
||||
+ --, dummySpace
|
||||
#endif
|
||||
, inject
|
||||
, injectFile
|
||||
@@ -56,73 +56,12 @@ import Data.ByteString.Unsafe (unsafePackAddressLen)
|
||||
import System.IO.Unsafe (unsafePerformIO)
|
||||
import System.FilePath ((</>))
|
||||
|
||||
--- | Embed a single file in your source code.
|
||||
---
|
||||
--- > import qualified Data.ByteString
|
||||
--- >
|
||||
--- > myFile :: Data.ByteString.ByteString
|
||||
--- > myFile = $(embedFile "dirName/fileName")
|
||||
-embedFile :: FilePath -> Q Exp
|
||||
-embedFile fp =
|
||||
-#if MIN_VERSION_template_haskell(2,7,0)
|
||||
- qAddDependentFile fp >>
|
||||
-#endif
|
||||
- (runIO $ B.readFile fp) >>= bsToExp
|
||||
-
|
||||
--- | Embed a single existing file in your source code
|
||||
--- out of list a list of paths supplied.
|
||||
---
|
||||
--- > import qualified Data.ByteString
|
||||
--- >
|
||||
--- > myFile :: Data.ByteString.ByteString
|
||||
--- > myFile = $(embedFile' [ "dirName/fileName", "src/dirName/fileName" ])
|
||||
-embedOneFileOf :: [FilePath] -> Q Exp
|
||||
-embedOneFileOf ps =
|
||||
- (runIO $ readExistingFile ps) >>= \ ( path, content ) -> do
|
||||
-#if MIN_VERSION_template_haskell(2,7,0)
|
||||
- qAddDependentFile path
|
||||
-#endif
|
||||
- bsToExp content
|
||||
- where
|
||||
- readExistingFile :: [FilePath] -> IO ( FilePath, B.ByteString )
|
||||
- readExistingFile xs = do
|
||||
- ys <- filterM doesFileExist xs
|
||||
- case ys of
|
||||
- (p:_) -> B.readFile p >>= \ c -> return ( p, c )
|
||||
- _ -> throw $ ErrorCall "Cannot find file to embed as resource"
|
||||
-
|
||||
--- | Embed a directory recursively in your source code.
|
||||
---
|
||||
--- > import qualified Data.ByteString
|
||||
--- >
|
||||
--- > myDir :: [(FilePath, Data.ByteString.ByteString)]
|
||||
--- > myDir = $(embedDir "dirName")
|
||||
-embedDir :: FilePath -> Q Exp
|
||||
-embedDir fp = do
|
||||
- typ <- [t| [(FilePath, B.ByteString)] |]
|
||||
- e <- ListE <$> ((runIO $ fileList fp) >>= mapM (pairToExp fp))
|
||||
- return $ SigE e typ
|
||||
-
|
||||
-- | Get a directory tree in the IO monad.
|
||||
--
|
||||
-- This is the workhorse of 'embedDir'
|
||||
getDir :: FilePath -> IO [(FilePath, B.ByteString)]
|
||||
getDir = fileList
|
||||
|
||||
-pairToExp :: FilePath -> (FilePath, B.ByteString) -> Q Exp
|
||||
-pairToExp _root (path, bs) = do
|
||||
-#if MIN_VERSION_template_haskell(2,7,0)
|
||||
- qAddDependentFile $ _root ++ '/' : path
|
||||
-#endif
|
||||
- exp' <- bsToExp bs
|
||||
- return $! TupE [LitE $ StringL path, exp']
|
||||
-
|
||||
-bsToExp :: B.ByteString -> Q Exp
|
||||
-bsToExp bs = do
|
||||
- helper <- [| stringToBs |]
|
||||
- let chars = B8.unpack bs
|
||||
- return $! AppE helper $! LitE $! StringL chars
|
||||
-
|
||||
stringToBs :: String -> B.ByteString
|
||||
stringToBs = B8.pack
|
||||
|
||||
@@ -164,22 +103,6 @@ padSize i =
|
||||
let s = show i
|
||||
in replicate (sizeLen - length s) '0' ++ s
|
||||
|
||||
-#if MIN_VERSION_template_haskell(2,5,0)
|
||||
-dummySpace :: Int -> Q Exp
|
||||
-dummySpace space = do
|
||||
- let size = padSize space
|
||||
- let start = magic ++ size
|
||||
- let chars = LitE $ StringPrimL $
|
||||
-#if MIN_VERSION_template_haskell(2,6,0)
|
||||
- map (toEnum . fromEnum) $
|
||||
-#endif
|
||||
- start ++ replicate space '0'
|
||||
- let len = LitE $ IntegerL $ fromIntegral $ length start + space
|
||||
- upi <- [|unsafePerformIO|]
|
||||
- pack <- [|unsafePackAddressLen|]
|
||||
- getInner' <- [|getInner|]
|
||||
- return $ getInner' `AppE` (upi `AppE` (pack `AppE` len `AppE` chars))
|
||||
-#endif
|
||||
|
||||
inject :: B.ByteString -- ^ bs to inject
|
||||
-> B.ByteString -- ^ original BS containing dummy
|
||||
--
|
||||
2.1.0
|
||||
|
|
@ -1,394 +0,0 @@
|
|||
From 9a41401d903f160e11d56fff35c24eb59d97885d Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Tue, 17 Dec 2013 19:04:40 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
src/Generics/Deriving/TH.hs | 354 --------------------------------------------
|
||||
1 file changed, 354 deletions(-)
|
||||
|
||||
diff --git a/src/Generics/Deriving/TH.hs b/src/Generics/Deriving/TH.hs
|
||||
index 783cb65..9aab713 100644
|
||||
--- a/src/Generics/Deriving/TH.hs
|
||||
+++ b/src/Generics/Deriving/TH.hs
|
||||
@@ -19,18 +19,6 @@
|
||||
|
||||
-- Adapted from Generics.Regular.TH
|
||||
module Generics.Deriving.TH (
|
||||
-
|
||||
- deriveMeta
|
||||
- , deriveData
|
||||
- , deriveConstructors
|
||||
- , deriveSelectors
|
||||
-
|
||||
-#if __GLASGOW_HASKELL__ < 701
|
||||
- , deriveAll
|
||||
- , deriveRepresentable0
|
||||
- , deriveRep0
|
||||
- , simplInstance
|
||||
-#endif
|
||||
) where
|
||||
|
||||
import Generics.Deriving.Base
|
||||
@@ -41,124 +29,6 @@ import Language.Haskell.TH.Syntax (Lift(..))
|
||||
import Data.List (intercalate)
|
||||
import Control.Monad
|
||||
|
||||
--- | Given the names of a generic class, a type to instantiate, a function in
|
||||
--- the class and the default implementation, generates the code for a basic
|
||||
--- generic instance.
|
||||
-simplInstance :: Name -> Name -> Name -> Name -> Q [Dec]
|
||||
-simplInstance cl ty fn df = do
|
||||
- i <- reify (genRepName 0 ty)
|
||||
- x <- newName "x"
|
||||
- let typ = ForallT [PlainTV x] []
|
||||
- ((foldl (\a -> AppT a . VarT . tyVarBndrToName) (ConT (genRepName 0 ty))
|
||||
- (typeVariables i)) `AppT` (VarT x))
|
||||
- fmap (: []) $ instanceD (cxt []) (conT cl `appT` conT ty)
|
||||
- [funD fn [clause [] (normalB (varE df `appE`
|
||||
- (sigE (global 'undefined) (return typ)))) []]]
|
||||
-
|
||||
-
|
||||
--- | Given the type and the name (as string) for the type to derive,
|
||||
--- generate the 'Data' instance, the 'Constructor' instances, the 'Selector'
|
||||
--- instances, and the 'Representable0' instance.
|
||||
-deriveAll :: Name -> Q [Dec]
|
||||
-deriveAll n =
|
||||
- do a <- deriveMeta n
|
||||
- b <- deriveRepresentable0 n
|
||||
- return (a ++ b)
|
||||
-
|
||||
--- | Given the type and the name (as string) for the type to derive,
|
||||
--- generate the 'Data' instance, the 'Constructor' instances, and the 'Selector'
|
||||
--- instances.
|
||||
-deriveMeta :: Name -> Q [Dec]
|
||||
-deriveMeta n =
|
||||
- do a <- deriveData n
|
||||
- b <- deriveConstructors n
|
||||
- c <- deriveSelectors n
|
||||
- return (a ++ b ++ c)
|
||||
-
|
||||
--- | Given a datatype name, derive a datatype and instance of class 'Datatype'.
|
||||
-deriveData :: Name -> Q [Dec]
|
||||
-deriveData = dataInstance
|
||||
-
|
||||
--- | Given a datatype name, derive datatypes and
|
||||
--- instances of class 'Constructor'.
|
||||
-deriveConstructors :: Name -> Q [Dec]
|
||||
-deriveConstructors = constrInstance
|
||||
-
|
||||
--- | Given a datatype name, derive datatypes and instances of class 'Selector'.
|
||||
-deriveSelectors :: Name -> Q [Dec]
|
||||
-deriveSelectors = selectInstance
|
||||
-
|
||||
--- | Given the type and the name (as string) for the Representable0 type
|
||||
--- synonym to derive, generate the 'Representable0' instance.
|
||||
-deriveRepresentable0 :: Name -> Q [Dec]
|
||||
-deriveRepresentable0 n = do
|
||||
- rep0 <- deriveRep0 n
|
||||
- inst <- deriveInst n
|
||||
- return $ rep0 ++ inst
|
||||
-
|
||||
--- | Derive only the 'Rep0' type synonym. Not needed if 'deriveRepresentable0'
|
||||
--- is used.
|
||||
-deriveRep0 :: Name -> Q [Dec]
|
||||
-deriveRep0 n = do
|
||||
- i <- reify n
|
||||
- fmap (:[]) $ tySynD (genRepName 0 n) (typeVariables i) (rep0Type n)
|
||||
-
|
||||
-deriveInst :: Name -> Q [Dec]
|
||||
-deriveInst t = do
|
||||
- i <- reify t
|
||||
- let typ q = foldl (\a -> AppT a . VarT . tyVarBndrToName) (ConT q)
|
||||
- (typeVariables i)
|
||||
-#if __GLASGOW_HASKELL__ >= 707
|
||||
- let tyIns = TySynInstD ''Rep (TySynEqn [typ t] (typ (genRepName 0 t)))
|
||||
-#else
|
||||
- let tyIns = TySynInstD ''Rep [typ t] (typ (genRepName 0 t))
|
||||
-#endif
|
||||
- fcs <- mkFrom t 1 0 t
|
||||
- tcs <- mkTo t 1 0 t
|
||||
- liftM (:[]) $
|
||||
- instanceD (cxt []) (conT ''Generic `appT` return (typ t))
|
||||
- [return tyIns, funD 'from fcs, funD 'to tcs]
|
||||
-
|
||||
-
|
||||
-dataInstance :: Name -> Q [Dec]
|
||||
-dataInstance n = do
|
||||
- i <- reify n
|
||||
- case i of
|
||||
- TyConI (DataD _ n _ _ _) -> mkInstance n
|
||||
- TyConI (NewtypeD _ n _ _ _) -> mkInstance n
|
||||
- _ -> return []
|
||||
- where
|
||||
- mkInstance n = do
|
||||
- ds <- mkDataData n
|
||||
- is <- mkDataInstance n
|
||||
- return $ [ds,is]
|
||||
-
|
||||
-constrInstance :: Name -> Q [Dec]
|
||||
-constrInstance n = do
|
||||
- i <- reify n
|
||||
- case i of
|
||||
- TyConI (DataD _ n _ cs _) -> mkInstance n cs
|
||||
- TyConI (NewtypeD _ n _ c _) -> mkInstance n [c]
|
||||
- _ -> return []
|
||||
- where
|
||||
- mkInstance n cs = do
|
||||
- ds <- mapM (mkConstrData n) cs
|
||||
- is <- mapM (mkConstrInstance n) cs
|
||||
- return $ ds ++ is
|
||||
-
|
||||
-selectInstance :: Name -> Q [Dec]
|
||||
-selectInstance n = do
|
||||
- i <- reify n
|
||||
- case i of
|
||||
- TyConI (DataD _ n _ cs _) -> mkInstance n cs
|
||||
- TyConI (NewtypeD _ n _ c _) -> mkInstance n [c]
|
||||
- _ -> return []
|
||||
- where
|
||||
- mkInstance n cs = do
|
||||
- ds <- mapM (mkSelectData n) cs
|
||||
- is <- mapM (mkSelectInstance n) cs
|
||||
- return $ concat (ds ++ is)
|
||||
-
|
||||
typeVariables :: Info -> [TyVarBndr]
|
||||
typeVariables (TyConI (DataD _ _ tv _ _)) = tv
|
||||
typeVariables (TyConI (NewtypeD _ _ tv _ _)) = tv
|
||||
@@ -179,233 +49,9 @@ genName = mkName . (++"_") . intercalate "_" . map nameBase
|
||||
genRepName :: Int -> Name -> Name
|
||||
genRepName n = mkName . (++"_") . (("Rep" ++ show n) ++) . nameBase
|
||||
|
||||
-mkDataData :: Name -> Q Dec
|
||||
-mkDataData n = dataD (cxt []) (genName [n]) [] [] []
|
||||
-
|
||||
-mkConstrData :: Name -> Con -> Q Dec
|
||||
-mkConstrData dt (NormalC n _) =
|
||||
- dataD (cxt []) (genName [dt, n]) [] [] []
|
||||
-mkConstrData dt r@(RecC _ _) =
|
||||
- mkConstrData dt (stripRecordNames r)
|
||||
-mkConstrData dt (InfixC t1 n t2) =
|
||||
- mkConstrData dt (NormalC n [t1,t2])
|
||||
-
|
||||
-mkSelectData :: Name -> Con -> Q [Dec]
|
||||
-mkSelectData dt r@(RecC n fs) = return (map one fs)
|
||||
- where one (f, _, _) = DataD [] (genName [dt, n, f]) [] [] []
|
||||
-mkSelectData dt _ = return []
|
||||
-
|
||||
-
|
||||
-mkDataInstance :: Name -> Q Dec
|
||||
-mkDataInstance n =
|
||||
- instanceD (cxt []) (appT (conT ''Datatype) (conT $ genName [n]))
|
||||
- [funD 'datatypeName [clause [wildP] (normalB (stringE (nameBase n))) []]
|
||||
- ,funD 'moduleName [clause [wildP] (normalB (stringE name)) []]]
|
||||
- where
|
||||
- name = maybe (error "Cannot fetch module name!") id (nameModule n)
|
||||
-
|
||||
-instance Lift Fixity where
|
||||
- lift Prefix = conE 'Prefix
|
||||
- lift (Infix a n) = conE 'Infix `appE` [| a |] `appE` [| n |]
|
||||
-
|
||||
-instance Lift Associativity where
|
||||
- lift LeftAssociative = conE 'LeftAssociative
|
||||
- lift RightAssociative = conE 'RightAssociative
|
||||
- lift NotAssociative = conE 'NotAssociative
|
||||
-
|
||||
-mkConstrInstance :: Name -> Con -> Q Dec
|
||||
-mkConstrInstance dt (NormalC n _) = mkConstrInstanceWith dt n []
|
||||
-mkConstrInstance dt (RecC n _) = mkConstrInstanceWith dt n
|
||||
- [ funD 'conIsRecord [clause [wildP] (normalB (conE 'True)) []]]
|
||||
-mkConstrInstance dt (InfixC t1 n t2) =
|
||||
- do
|
||||
- i <- reify n
|
||||
- let fi = case i of
|
||||
- DataConI _ _ _ f -> convertFixity f
|
||||
- _ -> Prefix
|
||||
- instanceD (cxt []) (appT (conT ''Constructor) (conT $ genName [dt, n]))
|
||||
- [funD 'conName [clause [wildP] (normalB (stringE (nameBase n))) []],
|
||||
- funD 'conFixity [clause [wildP] (normalB [| fi |]) []]]
|
||||
- where
|
||||
- convertFixity (Fixity n d) = Infix (convertDirection d) n
|
||||
- convertDirection InfixL = LeftAssociative
|
||||
- convertDirection InfixR = RightAssociative
|
||||
- convertDirection InfixN = NotAssociative
|
||||
-
|
||||
-mkConstrInstanceWith :: Name -> Name -> [Q Dec] -> Q Dec
|
||||
-mkConstrInstanceWith dt n extra =
|
||||
- instanceD (cxt []) (appT (conT ''Constructor) (conT $ genName [dt, n]))
|
||||
- (funD 'conName [clause [wildP] (normalB (stringE (nameBase n))) []] : extra)
|
||||
-
|
||||
-mkSelectInstance :: Name -> Con -> Q [Dec]
|
||||
-mkSelectInstance dt r@(RecC n fs) = return (map one fs) where
|
||||
- one (f, _, _) =
|
||||
- InstanceD ([]) (AppT (ConT ''Selector) (ConT $ genName [dt, n, f]))
|
||||
- [FunD 'selName [Clause [WildP]
|
||||
- (NormalB (LitE (StringL (nameBase f)))) []]]
|
||||
-mkSelectInstance _ _ = return []
|
||||
-
|
||||
-rep0Type :: Name -> Q Type
|
||||
-rep0Type n =
|
||||
- do
|
||||
- -- runIO $ putStrLn $ "processing " ++ show n
|
||||
- i <- reify n
|
||||
- let b = case i of
|
||||
- TyConI (DataD _ dt vs cs _) ->
|
||||
- (conT ''D1) `appT` (conT $ genName [dt]) `appT`
|
||||
- (foldr1' sum (conT ''V1)
|
||||
- (map (rep0Con (dt, map tyVarBndrToName vs)) cs))
|
||||
- TyConI (NewtypeD _ dt vs c _) ->
|
||||
- (conT ''D1) `appT` (conT $ genName [dt]) `appT`
|
||||
- (rep0Con (dt, map tyVarBndrToName vs) c)
|
||||
- TyConI (TySynD t _ _) -> error "type synonym?"
|
||||
- _ -> error "unknown construct"
|
||||
- --appT b (conT $ mkName (nameBase n))
|
||||
- b where
|
||||
- sum :: Q Type -> Q Type -> Q Type
|
||||
- sum a b = conT ''(:+:) `appT` a `appT` b
|
||||
-
|
||||
-
|
||||
-rep0Con :: (Name, [Name]) -> Con -> Q Type
|
||||
-rep0Con (dt, vs) (NormalC n []) =
|
||||
- conT ''C1 `appT` (conT $ genName [dt, n]) `appT`
|
||||
- (conT ''S1 `appT` conT ''NoSelector `appT` conT ''U1)
|
||||
-rep0Con (dt, vs) (NormalC n fs) =
|
||||
- conT ''C1 `appT` (conT $ genName [dt, n]) `appT`
|
||||
- (foldr1 prod (map (repField (dt, vs) . snd) fs)) where
|
||||
- prod :: Q Type -> Q Type -> Q Type
|
||||
- prod a b = conT ''(:*:) `appT` a `appT` b
|
||||
-rep0Con (dt, vs) r@(RecC n []) =
|
||||
- conT ''C1 `appT` (conT $ genName [dt, n]) `appT` conT ''U1
|
||||
-rep0Con (dt, vs) r@(RecC n fs) =
|
||||
- conT ''C1 `appT` (conT $ genName [dt, n]) `appT`
|
||||
- (foldr1 prod (map (repField' (dt, vs) n) fs)) where
|
||||
- prod :: Q Type -> Q Type -> Q Type
|
||||
- prod a b = conT ''(:*:) `appT` a `appT` b
|
||||
-
|
||||
-rep0Con d (InfixC t1 n t2) = rep0Con d (NormalC n [t1,t2])
|
||||
-
|
||||
---dataDeclToType :: (Name, [Name]) -> Type
|
||||
---dataDeclToType (dt, vs) = foldl (\a b -> AppT a (VarT b)) (ConT dt) vs
|
||||
-
|
||||
-repField :: (Name, [Name]) -> Type -> Q Type
|
||||
---repField d t | t == dataDeclToType d = conT ''I
|
||||
-repField d t = conT ''S1 `appT` conT ''NoSelector `appT`
|
||||
- (conT ''Rec0 `appT` return t)
|
||||
-
|
||||
-repField' :: (Name, [Name]) -> Name -> (Name, Strict, Type) -> Q Type
|
||||
---repField' d ns (_, _, t) | t == dataDeclToType d = conT ''I
|
||||
-repField' (dt, vs) ns (f, _, t) = conT ''S1 `appT` conT (genName [dt, ns, f])
|
||||
- `appT` (conT ''Rec0 `appT` return t)
|
||||
--- Note: we should generate Par0 too, at some point
|
||||
-
|
||||
-
|
||||
-mkFrom :: Name -> Int -> Int -> Name -> Q [Q Clause]
|
||||
-mkFrom ns m i n =
|
||||
- do
|
||||
- -- runIO $ putStrLn $ "processing " ++ show n
|
||||
- let wrapE e = lrE m i e
|
||||
- i <- reify n
|
||||
- let b = case i of
|
||||
- TyConI (DataD _ dt vs cs _) ->
|
||||
- zipWith (fromCon wrapE ns (dt, map tyVarBndrToName vs)
|
||||
- (length cs)) [0..] cs
|
||||
- TyConI (NewtypeD _ dt vs c _) ->
|
||||
- [fromCon wrapE ns (dt, map tyVarBndrToName vs) 1 0 c]
|
||||
- TyConI (TySynD t _ _) -> error "type synonym?"
|
||||
- -- [clause [varP (field 0)] (normalB (wrapE $ conE 'K1 `appE` varE (field 0))) []]
|
||||
- _ -> error "unknown construct"
|
||||
- return b
|
||||
-
|
||||
-mkTo :: Name -> Int -> Int -> Name -> Q [Q Clause]
|
||||
-mkTo ns m i n =
|
||||
- do
|
||||
- -- runIO $ putStrLn $ "processing " ++ show n
|
||||
- let wrapP p = lrP m i p
|
||||
- i <- reify n
|
||||
- let b = case i of
|
||||
- TyConI (DataD _ dt vs cs _) ->
|
||||
- zipWith (toCon wrapP ns (dt, map tyVarBndrToName vs)
|
||||
- (length cs)) [0..] cs
|
||||
- TyConI (NewtypeD _ dt vs c _) ->
|
||||
- [toCon wrapP ns (dt, map tyVarBndrToName vs) 1 0 c]
|
||||
- TyConI (TySynD t _ _) -> error "type synonym?"
|
||||
- -- [clause [wrapP $ conP 'K1 [varP (field 0)]] (normalB $ varE (field 0)) []]
|
||||
- _ -> error "unknown construct"
|
||||
- return b
|
||||
-
|
||||
-fromCon :: (Q Exp -> Q Exp) -> Name -> (Name, [Name]) -> Int -> Int -> Con -> Q Clause
|
||||
-fromCon wrap ns (dt, vs) m i (NormalC cn []) =
|
||||
- clause
|
||||
- [conP cn []]
|
||||
- (normalB $ appE (conE 'M1) $ wrap $ lrE m i $ appE (conE 'M1) $
|
||||
- conE 'M1 `appE` (conE 'U1)) []
|
||||
-fromCon wrap ns (dt, vs) m i (NormalC cn fs) =
|
||||
- -- runIO (putStrLn ("constructor " ++ show ix)) >>
|
||||
- clause
|
||||
- [conP cn (map (varP . field) [0..length fs - 1])]
|
||||
- (normalB $ appE (conE 'M1) $ wrap $ lrE m i $ conE 'M1 `appE`
|
||||
- foldr1 prod (zipWith (fromField (dt, vs)) [0..] (map snd fs))) []
|
||||
- where prod x y = conE '(:*:) `appE` x `appE` y
|
||||
-fromCon wrap ns (dt, vs) m i r@(RecC cn []) =
|
||||
- clause
|
||||
- [conP cn []]
|
||||
- (normalB $ appE (conE 'M1) $ wrap $ lrE m i $ conE 'M1 `appE` (conE 'U1)) []
|
||||
-fromCon wrap ns (dt, vs) m i r@(RecC cn fs) =
|
||||
- clause
|
||||
- [conP cn (map (varP . field) [0..length fs - 1])]
|
||||
- (normalB $ appE (conE 'M1) $ wrap $ lrE m i $ conE 'M1 `appE`
|
||||
- foldr1 prod (zipWith (fromField (dt, vs)) [0..] (map trd fs))) []
|
||||
- where prod x y = conE '(:*:) `appE` x `appE` y
|
||||
-fromCon wrap ns (dt, vs) m i (InfixC t1 cn t2) =
|
||||
- fromCon wrap ns (dt, vs) m i (NormalC cn [t1,t2])
|
||||
-
|
||||
-fromField :: (Name, [Name]) -> Int -> Type -> Q Exp
|
||||
---fromField (dt, vs) nr t | t == dataDeclToType (dt, vs) = conE 'I `appE` varE (field nr)
|
||||
-fromField (dt, vs) nr t = conE 'M1 `appE` (conE 'K1 `appE` varE (field nr))
|
||||
-
|
||||
-toCon :: (Q Pat -> Q Pat) -> Name -> (Name, [Name]) -> Int -> Int -> Con -> Q Clause
|
||||
-toCon wrap ns (dt, vs) m i (NormalC cn []) =
|
||||
- clause
|
||||
- [wrap $ conP 'M1 [lrP m i $ conP 'M1 [conP 'M1 [conP 'U1 []]]]]
|
||||
- (normalB $ conE cn) []
|
||||
-toCon wrap ns (dt, vs) m i (NormalC cn fs) =
|
||||
- -- runIO (putStrLn ("constructor " ++ show ix)) >>
|
||||
- clause
|
||||
- [wrap $ conP 'M1 [lrP m i $ conP 'M1
|
||||
- [foldr1 prod (zipWith (toField (dt, vs)) [0..] (map snd fs))]]]
|
||||
- (normalB $ foldl appE (conE cn) (map (varE . field) [0..length fs - 1])) []
|
||||
- where prod x y = conP '(:*:) [x,y]
|
||||
-toCon wrap ns (dt, vs) m i r@(RecC cn []) =
|
||||
- clause
|
||||
- [wrap $ conP 'M1 [lrP m i $ conP 'M1 [conP 'U1 []]]]
|
||||
- (normalB $ conE cn) []
|
||||
-toCon wrap ns (dt, vs) m i r@(RecC cn fs) =
|
||||
- clause
|
||||
- [wrap $ conP 'M1 [lrP m i $ conP 'M1
|
||||
- [foldr1 prod (zipWith (toField (dt, vs)) [0..] (map trd fs))]]]
|
||||
- (normalB $ foldl appE (conE cn) (map (varE . field) [0..length fs - 1])) []
|
||||
- where prod x y = conP '(:*:) [x,y]
|
||||
-toCon wrap ns (dt, vs) m i (InfixC t1 cn t2) =
|
||||
- toCon wrap ns (dt, vs) m i (NormalC cn [t1,t2])
|
||||
-
|
||||
-toField :: (Name, [Name]) -> Int -> Type -> Q Pat
|
||||
---toField (dt, vs) nr t | t == dataDeclToType (dt, vs) = conP 'I [varP (field nr)]
|
||||
-toField (dt, vs) nr t = conP 'M1 [conP 'K1 [varP (field nr)]]
|
||||
-
|
||||
-
|
||||
field :: Int -> Name
|
||||
field n = mkName $ "f" ++ show n
|
||||
|
||||
-lrP :: Int -> Int -> (Q Pat -> Q Pat)
|
||||
-lrP 1 0 p = p
|
||||
-lrP m 0 p = conP 'L1 [p]
|
||||
-lrP m i p = conP 'R1 [lrP (m-1) (i-1) p]
|
||||
-
|
||||
-lrE :: Int -> Int -> (Q Exp -> Q Exp)
|
||||
-lrE 1 0 e = e
|
||||
-lrE m 0 e = conE 'L1 `appE` e
|
||||
-lrE m i e = conE 'R1 `appE` lrE (m-1) (i-1) e
|
||||
|
||||
trd (_,_,c) = c
|
||||
|
||||
--
|
||||
1.8.5.1
|
||||
|
|
@ -1,230 +0,0 @@
|
|||
From 10c9ade98b3ac2054947f411d77db2eb28896b9f Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 01:43:10 +0000
|
||||
Subject: [PATCH] avoid TH
|
||||
|
||||
---
|
||||
lens.cabal | 17 +----------------
|
||||
src/Control/Lens.hs | 8 ++------
|
||||
src/Control/Lens/Cons.hs | 2 --
|
||||
src/Control/Lens/Internal/Fold.hs | 2 --
|
||||
src/Control/Lens/Operators.hs | 2 +-
|
||||
src/Control/Lens/Prism.hs | 2 --
|
||||
src/Control/Monad/Primitive/Lens.hs | 1 -
|
||||
7 files changed, 4 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/lens.cabal b/lens.cabal
|
||||
index 5388301..d7b02b9 100644
|
||||
--- a/lens.cabal
|
||||
+++ b/lens.cabal
|
||||
@@ -10,7 +10,7 @@ stability: provisional
|
||||
homepage: http://github.com/ekmett/lens/
|
||||
bug-reports: http://github.com/ekmett/lens/issues
|
||||
copyright: Copyright (C) 2012-2014 Edward A. Kmett
|
||||
-build-type: Custom
|
||||
+build-type: Simple
|
||||
-- build-tools: cpphs
|
||||
tested-with: GHC == 7.4.1, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.1, GHC == 7.8.2
|
||||
synopsis: Lenses, Folds and Traversals
|
||||
@@ -217,7 +217,6 @@ library
|
||||
Control.Exception.Lens
|
||||
Control.Lens
|
||||
Control.Lens.Action
|
||||
- Control.Lens.At
|
||||
Control.Lens.Combinators
|
||||
Control.Lens.Cons
|
||||
Control.Lens.Each
|
||||
@@ -234,8 +233,6 @@ library
|
||||
Control.Lens.Internal.Context
|
||||
Control.Lens.Internal.Deque
|
||||
Control.Lens.Internal.Exception
|
||||
- Control.Lens.Internal.FieldTH
|
||||
- Control.Lens.Internal.PrismTH
|
||||
Control.Lens.Internal.Fold
|
||||
Control.Lens.Internal.Getter
|
||||
Control.Lens.Internal.Indexed
|
||||
@@ -247,25 +244,21 @@ library
|
||||
Control.Lens.Internal.Reflection
|
||||
Control.Lens.Internal.Review
|
||||
Control.Lens.Internal.Setter
|
||||
- Control.Lens.Internal.TH
|
||||
Control.Lens.Internal.Zoom
|
||||
Control.Lens.Iso
|
||||
Control.Lens.Lens
|
||||
Control.Lens.Level
|
||||
Control.Lens.Loupe
|
||||
Control.Lens.Operators
|
||||
- Control.Lens.Plated
|
||||
Control.Lens.Prism
|
||||
Control.Lens.Reified
|
||||
Control.Lens.Review
|
||||
Control.Lens.Setter
|
||||
- Control.Lens.TH
|
||||
Control.Lens.Traversal
|
||||
Control.Lens.Tuple
|
||||
Control.Lens.Type
|
||||
Control.Lens.Wrapped
|
||||
Control.Lens.Zoom
|
||||
- Control.Monad.Error.Lens
|
||||
Control.Monad.Primitive.Lens
|
||||
Control.Parallel.Strategies.Lens
|
||||
Control.Seq.Lens
|
||||
@@ -291,12 +284,8 @@ library
|
||||
Data.Typeable.Lens
|
||||
Data.Vector.Lens
|
||||
Data.Vector.Generic.Lens
|
||||
- Generics.Deriving.Lens
|
||||
- GHC.Generics.Lens
|
||||
System.Exit.Lens
|
||||
System.FilePath.Lens
|
||||
- System.IO.Error.Lens
|
||||
- Language.Haskell.TH.Lens
|
||||
Numeric.Lens
|
||||
|
||||
other-modules:
|
||||
@@ -403,7 +392,6 @@ test-suite doctests
|
||||
deepseq,
|
||||
doctest >= 0.9.1,
|
||||
filepath,
|
||||
- generic-deriving,
|
||||
mtl,
|
||||
nats,
|
||||
parallel,
|
||||
@@ -441,7 +429,6 @@ benchmark plated
|
||||
comonad,
|
||||
criterion,
|
||||
deepseq,
|
||||
- generic-deriving,
|
||||
lens,
|
||||
transformers
|
||||
|
||||
@@ -476,7 +463,6 @@ benchmark unsafe
|
||||
comonads-fd,
|
||||
criterion,
|
||||
deepseq,
|
||||
- generic-deriving,
|
||||
lens,
|
||||
transformers
|
||||
|
||||
@@ -493,6 +479,5 @@ benchmark zipper
|
||||
comonads-fd,
|
||||
criterion,
|
||||
deepseq,
|
||||
- generic-deriving,
|
||||
lens,
|
||||
transformers
|
||||
diff --git a/src/Control/Lens.hs b/src/Control/Lens.hs
|
||||
index 7e15267..433f1fc 100644
|
||||
--- a/src/Control/Lens.hs
|
||||
+++ b/src/Control/Lens.hs
|
||||
@@ -41,7 +41,6 @@
|
||||
----------------------------------------------------------------------------
|
||||
module Control.Lens
|
||||
( module Control.Lens.Action
|
||||
- , module Control.Lens.At
|
||||
, module Control.Lens.Cons
|
||||
, module Control.Lens.Each
|
||||
, module Control.Lens.Empty
|
||||
@@ -53,12 +52,11 @@ module Control.Lens
|
||||
, module Control.Lens.Lens
|
||||
, module Control.Lens.Level
|
||||
, module Control.Lens.Loupe
|
||||
- , module Control.Lens.Plated
|
||||
, module Control.Lens.Prism
|
||||
, module Control.Lens.Reified
|
||||
, module Control.Lens.Review
|
||||
, module Control.Lens.Setter
|
||||
-#ifndef DISABLE_TEMPLATE_HASKELL
|
||||
+#if 0
|
||||
, module Control.Lens.TH
|
||||
#endif
|
||||
, module Control.Lens.Traversal
|
||||
@@ -69,7 +67,6 @@ module Control.Lens
|
||||
) where
|
||||
|
||||
import Control.Lens.Action
|
||||
-import Control.Lens.At
|
||||
import Control.Lens.Cons
|
||||
import Control.Lens.Each
|
||||
import Control.Lens.Empty
|
||||
@@ -81,12 +78,11 @@ import Control.Lens.Iso
|
||||
import Control.Lens.Lens
|
||||
import Control.Lens.Level
|
||||
import Control.Lens.Loupe
|
||||
-import Control.Lens.Plated
|
||||
import Control.Lens.Prism
|
||||
import Control.Lens.Reified
|
||||
import Control.Lens.Review
|
||||
import Control.Lens.Setter
|
||||
-#ifndef DISABLE_TEMPLATE_HASKELL
|
||||
+#if 0
|
||||
import Control.Lens.TH
|
||||
#endif
|
||||
import Control.Lens.Traversal
|
||||
diff --git a/src/Control/Lens/Cons.hs b/src/Control/Lens/Cons.hs
|
||||
index a80e9c8..7d27b80 100644
|
||||
--- a/src/Control/Lens/Cons.hs
|
||||
+++ b/src/Control/Lens/Cons.hs
|
||||
@@ -55,8 +55,6 @@ import Data.Vector.Unboxed (Unbox)
|
||||
import qualified Data.Vector.Unboxed as Unbox
|
||||
import Data.Word
|
||||
|
||||
-{-# ANN module "HLint: ignore Eta reduce" #-}
|
||||
-
|
||||
-- $setup
|
||||
-- >>> :set -XNoOverloadedStrings
|
||||
-- >>> import Control.Lens
|
||||
diff --git a/src/Control/Lens/Internal/Fold.hs b/src/Control/Lens/Internal/Fold.hs
|
||||
index ab09c6b..43aa905 100644
|
||||
--- a/src/Control/Lens/Internal/Fold.hs
|
||||
+++ b/src/Control/Lens/Internal/Fold.hs
|
||||
@@ -37,8 +37,6 @@ import Data.Maybe
|
||||
import Data.Semigroup hiding (Min, getMin, Max, getMax)
|
||||
import Data.Reflection
|
||||
|
||||
-{-# ANN module "HLint: ignore Avoid lambda" #-}
|
||||
-
|
||||
------------------------------------------------------------------------------
|
||||
-- Folding
|
||||
------------------------------------------------------------------------------
|
||||
diff --git a/src/Control/Lens/Operators.hs b/src/Control/Lens/Operators.hs
|
||||
index 9992e63..631e8e6 100644
|
||||
--- a/src/Control/Lens/Operators.hs
|
||||
+++ b/src/Control/Lens/Operators.hs
|
||||
@@ -111,7 +111,7 @@ module Control.Lens.Operators
|
||||
, (<#~)
|
||||
, (<#=)
|
||||
-- * "Control.Lens.Plated"
|
||||
- , (...)
|
||||
+ --, (...)
|
||||
-- * "Control.Lens.Review"
|
||||
, ( # )
|
||||
-- * "Control.Lens.Setter"
|
||||
diff --git a/src/Control/Lens/Prism.hs b/src/Control/Lens/Prism.hs
|
||||
index b75c870..c6c6596 100644
|
||||
--- a/src/Control/Lens/Prism.hs
|
||||
+++ b/src/Control/Lens/Prism.hs
|
||||
@@ -61,8 +61,6 @@ import Unsafe.Coerce
|
||||
import Data.Profunctor.Unsafe
|
||||
#endif
|
||||
|
||||
-{-# ANN module "HLint: ignore Use camelCase" #-}
|
||||
-
|
||||
-- $setup
|
||||
-- >>> :set -XNoOverloadedStrings
|
||||
-- >>> import Control.Lens
|
||||
diff --git a/src/Control/Monad/Primitive/Lens.hs b/src/Control/Monad/Primitive/Lens.hs
|
||||
index ee942c6..2f37134 100644
|
||||
--- a/src/Control/Monad/Primitive/Lens.hs
|
||||
+++ b/src/Control/Monad/Primitive/Lens.hs
|
||||
@@ -20,7 +20,6 @@ import Control.Lens
|
||||
import Control.Monad.Primitive (PrimMonad(..))
|
||||
import GHC.Prim (State#)
|
||||
|
||||
-{-# ANN module "HLint: ignore Unused LANGUAGE pragma" #-}
|
||||
|
||||
prim :: (PrimMonad m) => Iso' (m a) (State# (PrimState m) -> (# State# (PrimState m), a #))
|
||||
prim = iso internal primitive
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
From 8e78a25ce0cc19e52d063f66bd4cd316462393d4 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 6 Mar 2014 23:27:06 +0000
|
||||
Subject: [PATCH] disable th
|
||||
|
||||
---
|
||||
monad-logger.cabal | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/monad-logger.cabal b/monad-logger.cabal
|
||||
index b0aa271..cd56c0f 100644
|
||||
--- a/monad-logger.cabal
|
||||
+++ b/monad-logger.cabal
|
||||
@@ -14,8 +14,8 @@ cabal-version: >=1.8
|
||||
|
||||
flag template_haskell {
|
||||
Description: Enable Template Haskell support
|
||||
- Default: True
|
||||
- Manual: True
|
||||
+ Default: False
|
||||
+ Manual: False
|
||||
}
|
||||
|
||||
library
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From b128590966d4946219e45e2efd88acf7a354abc2 Mon Sep 17 00:00:00 2001
|
||||
From: androidbuilder <androidbuilder@example.com>
|
||||
Date: Tue, 14 Oct 2014 02:28:02 +0000
|
||||
Subject: [PATCH] remove ANN
|
||||
|
||||
---
|
||||
Options/Applicative.hs | 2 --
|
||||
Options/Applicative/Help/Core.hs | 2 --
|
||||
2 files changed, 4 deletions(-)
|
||||
|
||||
diff --git a/Options/Applicative.hs b/Options/Applicative.hs
|
||||
index bd4129d..f412062 100644
|
||||
--- a/Options/Applicative.hs
|
||||
+++ b/Options/Applicative.hs
|
||||
@@ -34,5 +34,3 @@ import Options.Applicative.Common
|
||||
import Options.Applicative.Builder
|
||||
import Options.Applicative.Builder.Completer
|
||||
import Options.Applicative.Extra
|
||||
-
|
||||
-{-# ANN module "HLint: ignore Use import/export shortcut" #-}
|
||||
diff --git a/Options/Applicative/Help/Core.hs b/Options/Applicative/Help/Core.hs
|
||||
index 0a79169..3f1ce3f 100644
|
||||
--- a/Options/Applicative/Help/Core.hs
|
||||
+++ b/Options/Applicative/Help/Core.hs
|
||||
@@ -139,5 +139,3 @@ parserUsage pprefs p progn = hsep
|
||||
[ string "Usage:"
|
||||
, string progn
|
||||
, align (extractChunk (briefDesc pprefs p)) ]
|
||||
-
|
||||
-{-# ANN footerHelp "HLint: ignore Eta reduce" #-}
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
From b22a4d77c1262f77ce4298b53ca90a138a14ceb7 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joeyh@joeyh.name>
|
||||
Date: Sun, 22 Feb 2015 15:21:19 -0400
|
||||
Subject: [PATCH] stub out TH
|
||||
|
||||
this method avoids needing to delete the entire file contents, so patch is
|
||||
kept minimal
|
||||
---
|
||||
Database/Persist/TH.hs | 1 +
|
||||
persistent-template.cabal | 1 +
|
||||
stub/Database/Persist/TH.hs | 21 +++++++++++++++++++++
|
||||
3 files changed, 23 insertions(+)
|
||||
create mode 100644 stub/Database/Persist/TH.hs
|
||||
|
||||
diff --git a/Database/Persist/TH.hs b/Database/Persist/TH.hs
|
||||
index 43eb3ee..2172b77 100644
|
||||
--- a/Database/Persist/TH.hs
|
||||
+++ b/Database/Persist/TH.hs
|
||||
@@ -35,6 +35,7 @@ module Database.Persist.TH
|
||||
-- * Internal
|
||||
, packPTH
|
||||
, lensPTH
|
||||
+ , plusPlus
|
||||
) where
|
||||
|
||||
import Prelude hiding ((++), take, concat, splitAt)
|
||||
diff --git a/persistent-template.cabal b/persistent-template.cabal
|
||||
index 59b4149..4705d97 100644
|
||||
--- a/persistent-template.cabal
|
||||
+++ b/persistent-template.cabal
|
||||
@@ -30,6 +30,7 @@ library
|
||||
ghc-options: -Wall
|
||||
if impl(ghc >= 7.4)
|
||||
cpp-options: -DGHC_7_4
|
||||
+ hs-source-dirs: stub
|
||||
|
||||
test-suite test
|
||||
type: exitcode-stdio-1.0
|
||||
diff --git a/stub/Database/Persist/TH.hs b/stub/Database/Persist/TH.hs
|
||||
new file mode 100644
|
||||
index 0000000..dfbb874
|
||||
--- /dev/null
|
||||
+++ b/stub/Database/Persist/TH.hs
|
||||
@@ -0,0 +1,21 @@
|
||||
+{-# LANGUAGE RecordWildCards #-}
|
||||
+{-# LANGUAGE CPP #-}
|
||||
+{-# LANGUAGE OverloadedStrings #-}
|
||||
+{-# LANGUAGE RankNTypes #-}
|
||||
+{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-missing-fields #-}
|
||||
+-- | This module provides utilities for creating backends. Regular users do not
|
||||
+-- need to use this module.
|
||||
+module Database.Persist.TH where
|
||||
+
|
||||
+import Data.Text
|
||||
+
|
||||
+type Lens s t a b = forall f. Functor f => (a -> f b) -> s -> f t
|
||||
+
|
||||
+lensPTH :: (s -> a) -> (s -> b -> t) -> Lens s t a b
|
||||
+lensPTH sa sbt afb s = fmap (sbt s) (afb $ sa s)
|
||||
+
|
||||
+packPTH :: String -> Text
|
||||
+packPTH = pack
|
||||
+#if !MIN_VERSION_text(0, 11, 2)
|
||||
+{-# NOINLINE packPTH #-}
|
||||
+#endif
|
||||
--
|
||||
2.1.4
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
From aae3ace106cf26c931cc94c96fb6fbfe83f950f2 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 15 Oct 2014 17:05:37 +0000
|
||||
Subject: [PATCH] avoid TH
|
||||
|
||||
---
|
||||
Database/Persist/Sql/Raw.hs | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Database/Persist/Sql/Raw.hs b/Database/Persist/Sql/Raw.hs
|
||||
index 3ac2ca9..bcc2011 100644
|
||||
--- a/Database/Persist/Sql/Raw.hs
|
||||
+++ b/Database/Persist/Sql/Raw.hs
|
||||
@@ -11,7 +11,7 @@ import Data.IORef (writeIORef, readIORef, newIORef)
|
||||
import Control.Exception (throwIO)
|
||||
import Control.Monad (when, liftM)
|
||||
import Data.Text (Text, pack)
|
||||
-import Control.Monad.Logger (logDebugS)
|
||||
+--import Control.Monad.Logger (logDebugS)
|
||||
import Data.Int (Int64)
|
||||
import Control.Monad.Trans.Class (lift)
|
||||
import qualified Data.Text as T
|
||||
@@ -23,7 +23,6 @@ rawQuery :: (MonadSqlPersist m, MonadResource m)
|
||||
-> [PersistValue]
|
||||
-> Source m [PersistValue]
|
||||
rawQuery sql vals = do
|
||||
- lift $ $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals
|
||||
conn <- lift askSqlConn
|
||||
bracketP
|
||||
(getStmtConn conn sql)
|
||||
@@ -35,7 +34,6 @@ rawExecute x y = liftM (const ()) $ rawExecuteCount x y
|
||||
|
||||
rawExecuteCount :: MonadSqlPersist m => Text -> [PersistValue] -> m Int64
|
||||
rawExecuteCount sql vals = do
|
||||
- $logDebugS (pack "SQL") $ pack $ show sql ++ " " ++ show vals
|
||||
stmt <- getStmt sql
|
||||
res <- liftIO $ stmtExecute stmt vals
|
||||
liftIO $ stmtReset stmt
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
From ed77588c57704030a9d412dd49f11c172c6268ab Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Tue, 14 Oct 2014 03:46:03 +0000
|
||||
Subject: [PATCH] unused
|
||||
|
||||
---
|
||||
process-conduit.cabal | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/process-conduit.cabal b/process-conduit.cabal
|
||||
index 34bb168..2f137a8 100644
|
||||
--- a/process-conduit.cabal
|
||||
+++ b/process-conduit.cabal
|
||||
@@ -22,7 +22,6 @@ source-repository head
|
||||
|
||||
library
|
||||
exposed-modules: Data.Conduit.ProcessOld
|
||||
- System.Process.QQ
|
||||
|
||||
build-depends: base == 4.*
|
||||
, template-haskell >= 2.4
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 392602f5ff14c0b5a801397d075ddcbcd890aa83 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Thu, 18 Apr 2013 17:50:59 -0400
|
||||
Subject: [PATCH] fix cross build
|
||||
|
||||
---
|
||||
src/Data/Profunctor/Unsafe.hs | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/src/Data/Profunctor/Unsafe.hs b/src/Data/Profunctor/Unsafe.hs
|
||||
index 025c7c4..0249274 100644
|
||||
--- a/src/Data/Profunctor/Unsafe.hs
|
||||
+++ b/src/Data/Profunctor/Unsafe.hs
|
||||
@@ -40,9 +40,6 @@ import Data.Tagged
|
||||
import Prelude hiding (id,(.),sequence)
|
||||
import Unsafe.Coerce
|
||||
|
||||
-{-# ANN module "Hlint: ignore Redundant lambda" #-}
|
||||
-{-# ANN module "Hlint: ignore Collapse lambdas" #-}
|
||||
-
|
||||
infixr 9 #.
|
||||
infixl 8 .#
|
||||
|
||||
--
|
||||
1.8.2.rc3
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
From c0f5dcfd6ba7a05bb84b6adc4664c8dde109e6ac Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Fri, 7 Mar 2014 04:30:22 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
fast/Data/Reflection.hs | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/fast/Data/Reflection.hs b/fast/Data/Reflection.hs
|
||||
index ca57d35..d3f8356 100644
|
||||
--- a/fast/Data/Reflection.hs
|
||||
+++ b/fast/Data/Reflection.hs
|
||||
@@ -59,7 +59,7 @@ module Data.Reflection
|
||||
, Given(..)
|
||||
, give
|
||||
-- * Template Haskell reflection
|
||||
- , int, nat
|
||||
+ --, int, nat
|
||||
-- * Useful compile time naturals
|
||||
, Z, D, SD, PD
|
||||
) where
|
||||
@@ -161,6 +161,7 @@ instance Reifies n Int => Reifies (PD n) Int where
|
||||
-- instead of @$(int 3)@. Sometimes the two will produce the same
|
||||
-- representation (if compiled without the @-DUSE_TYPE_LITS@ preprocessor
|
||||
-- directive).
|
||||
+{-
|
||||
int :: Int -> TypeQ
|
||||
int n = case quotRem n 2 of
|
||||
(0, 0) -> conT ''Z
|
||||
@@ -176,7 +177,7 @@ nat :: Int -> TypeQ
|
||||
nat n
|
||||
| n >= 0 = int n
|
||||
| otherwise = error "nat: negative"
|
||||
-
|
||||
+-}
|
||||
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL < 704
|
||||
instance Show (Q a)
|
||||
instance Eq (Q a)
|
||||
@@ -195,6 +196,7 @@ instance Fractional a => Fractional (Q a) where
|
||||
recip = fmap recip
|
||||
fromRational = return . fromRational
|
||||
|
||||
+{-
|
||||
-- | This permits the use of $(5) as a type splice.
|
||||
instance Num Type where
|
||||
#ifdef USE_TYPE_LITS
|
||||
@@ -254,7 +256,7 @@ instance Num Exp where
|
||||
abs = onProxyType1 abs
|
||||
signum = onProxyType1 signum
|
||||
fromInteger n = ConE 'Proxy `SigE` (ConT ''Proxy `AppT` fromInteger n)
|
||||
-
|
||||
+-}
|
||||
#ifdef USE_TYPE_LITS
|
||||
addProxy :: Proxy a -> Proxy b -> Proxy (a + b)
|
||||
addProxy _ _ = Proxy
|
||||
--
|
||||
1.9.0
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
From 3a04b41ffce4e4e87b0fedd3a1e3434a3f06cc76 Mon Sep 17 00:00:00 2001
|
||||
From: foo <foo@bar>
|
||||
Date: Sun, 22 Sep 2013 00:18:12 +0000
|
||||
Subject: [PATCH] hardcode little endian
|
||||
|
||||
This is the same as building with a cabal flag.
|
||||
|
||||
---
|
||||
c_impl/optimized/skein_port.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/c_impl/optimized/skein_port.h b/c_impl/optimized/skein_port.h
|
||||
index a2d0fc2..6929bb0 100644
|
||||
--- a/c_impl/optimized/skein_port.h
|
||||
+++ b/c_impl/optimized/skein_port.h
|
||||
@@ -45,6 +45,7 @@ typedef uint64_t u64b_t; /* 64-bit unsigned integer */
|
||||
* platform-specific code instead (e.g., for big-endian CPUs).
|
||||
*
|
||||
*/
|
||||
+#define SKEIN_NEED_SWAP (0)
|
||||
#ifndef SKEIN_NEED_SWAP /* compile-time "override" for endianness? */
|
||||
|
||||
#include "brg_endian.h" /* get endianness selection */
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From 6ffd4fcb7d27ec6df709d80a40a262406446a259 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 15 Oct 2014 17:00:56 +0000
|
||||
Subject: [PATCH] cross build
|
||||
|
||||
---
|
||||
Data/Vector/Fusion/Stream/Monadic.hs | 1 -
|
||||
Data/Vector/Unboxed/Base.hs | 13 -------------
|
||||
2 files changed, 14 deletions(-)
|
||||
|
||||
diff --git a/Data/Vector/Fusion/Stream/Monadic.hs b/Data/Vector/Fusion/Stream/Monadic.hs
|
||||
index 51fec75..b089b3d 100644
|
||||
--- a/Data/Vector/Fusion/Stream/Monadic.hs
|
||||
+++ b/Data/Vector/Fusion/Stream/Monadic.hs
|
||||
@@ -101,7 +101,6 @@ import GHC.Exts ( SpecConstrAnnotation(..) )
|
||||
|
||||
data SPEC = SPEC | SPEC2
|
||||
#if __GLASGOW_HASKELL__ >= 700
|
||||
-{-# ANN type SPEC ForceSpecConstr #-}
|
||||
#endif
|
||||
|
||||
emptyStream :: String
|
||||
diff --git a/Data/Vector/Unboxed/Base.hs b/Data/Vector/Unboxed/Base.hs
|
||||
index 00350cb..34bfc4a 100644
|
||||
--- a/Data/Vector/Unboxed/Base.hs
|
||||
+++ b/Data/Vector/Unboxed/Base.hs
|
||||
@@ -65,19 +65,6 @@ vectorTyCon = mkTyCon3 "vector"
|
||||
vectorTyCon m s = mkTyCon $ m ++ "." ++ s
|
||||
#endif
|
||||
|
||||
-instance Typeable1 Vector where
|
||||
- typeOf1 _ = mkTyConApp (vectorTyCon "Data.Vector.Unboxed" "Vector") []
|
||||
-
|
||||
-instance Typeable2 MVector where
|
||||
- typeOf2 _ = mkTyConApp (vectorTyCon "Data.Vector.Unboxed.Mutable" "MVector") []
|
||||
-
|
||||
-instance (Data a, Unbox a) => Data (Vector a) where
|
||||
- gfoldl = G.gfoldl
|
||||
- toConstr _ = error "toConstr"
|
||||
- gunfold _ _ = error "gunfold"
|
||||
- dataTypeOf _ = G.mkType "Data.Vector.Unboxed.Vector"
|
||||
- dataCast1 = G.dataCast
|
||||
-
|
||||
-- ----
|
||||
-- Unit
|
||||
-- ----
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
From 3aef808eee43c973ae1fbf6e8769d89b7f0d355b Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Tue, 10 Jun 2014 14:47:42 +0000
|
||||
Subject: [PATCH] deal with TH
|
||||
|
||||
Export modules referenced by it.
|
||||
|
||||
Should not need these icons in git-annex, so not worth using the Evil
|
||||
Splicer.
|
||||
---
|
||||
Network/Wai/Application/Static.hs | 4 ----
|
||||
WaiAppStatic/Storage/Embedded.hs | 8 ++++----
|
||||
wai-app-static.cabal | 4 +---
|
||||
3 files changed, 5 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Network/Wai/Application/Static.hs b/Network/Wai/Application/Static.hs
|
||||
index db2b835..b2c1aec 100644
|
||||
--- a/Network/Wai/Application/Static.hs
|
||||
+++ b/Network/Wai/Application/Static.hs
|
||||
@@ -33,8 +33,6 @@ import Control.Monad.IO.Class (liftIO)
|
||||
|
||||
import Blaze.ByteString.Builder (toByteString)
|
||||
|
||||
-import Data.FileEmbed (embedFile)
|
||||
-
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
|
||||
@@ -198,8 +196,6 @@ staticAppPieces _ _ req sendResponse
|
||||
H.status405
|
||||
[("Content-Type", "text/plain")]
|
||||
"Only GET is supported"
|
||||
-staticAppPieces _ [".hidden", "folder.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/folder.png")]
|
||||
-staticAppPieces _ [".hidden", "haskell.png"] _ sendResponse = sendResponse $ W.responseLBS H.status200 [("Content-Type", "image/png")] $ L.fromChunks [$(embedFile "images/haskell.png")]
|
||||
staticAppPieces ss rawPieces req sendResponse = liftIO $ do
|
||||
case toPieces rawPieces of
|
||||
Just pieces -> checkPieces ss pieces req >>= response
|
||||
diff --git a/WaiAppStatic/Storage/Embedded.hs b/WaiAppStatic/Storage/Embedded.hs
|
||||
index daa6e50..9873d4e 100644
|
||||
--- a/WaiAppStatic/Storage/Embedded.hs
|
||||
+++ b/WaiAppStatic/Storage/Embedded.hs
|
||||
@@ -3,10 +3,10 @@ module WaiAppStatic.Storage.Embedded(
|
||||
embeddedSettings
|
||||
|
||||
-- * Template Haskell
|
||||
- , Etag
|
||||
- , EmbeddableEntry(..)
|
||||
- , mkSettings
|
||||
+ --, Etag
|
||||
+ --, EmbeddableEntry(..)
|
||||
+ --, mkSettings
|
||||
) where
|
||||
|
||||
import WaiAppStatic.Storage.Embedded.Runtime
|
||||
-import WaiAppStatic.Storage.Embedded.TH
|
||||
+--import WaiAppStatic.Storage.Embedded.TH
|
||||
diff --git a/wai-app-static.cabal b/wai-app-static.cabal
|
||||
index ef6f898..9a59d71 100644
|
||||
--- a/wai-app-static.cabal
|
||||
+++ b/wai-app-static.cabal
|
||||
@@ -33,7 +33,6 @@ library
|
||||
, containers >= 0.2
|
||||
, time >= 1.1.4
|
||||
, old-locale >= 1.0.0.2
|
||||
- , file-embed >= 0.0.3.1
|
||||
, text >= 0.7
|
||||
, blaze-builder >= 0.2.1.4
|
||||
, base64-bytestring >= 0.1
|
||||
@@ -61,9 +60,8 @@ library
|
||||
WaiAppStatic.Listing
|
||||
WaiAppStatic.Types
|
||||
WaiAppStatic.CmdLine
|
||||
- other-modules: Util
|
||||
WaiAppStatic.Storage.Embedded.Runtime
|
||||
- WaiAppStatic.Storage.Embedded.TH
|
||||
+ other-modules: Util
|
||||
ghc-options: -Wall
|
||||
extensions: CPP
|
||||
|
||||
--
|
||||
2.0.0
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
From b53713fbb4f3bb6bdd25b07afcaed4940b32dfa8 Mon Sep 17 00:00:00 2001
|
||||
From: Joey Hess <joey@kitenet.net>
|
||||
Date: Wed, 18 Dec 2013 03:32:44 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
Text/Hamlet/XML.hs | 81 +-----------------------------------------------------
|
||||
1 file changed, 1 insertion(+), 80 deletions(-)
|
||||
|
||||
diff --git a/Text/Hamlet/XML.hs b/Text/Hamlet/XML.hs
|
||||
index f587410..4e830bd 100644
|
||||
--- a/Text/Hamlet/XML.hs
|
||||
+++ b/Text/Hamlet/XML.hs
|
||||
@@ -1,9 +1,7 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-fields #-}
|
||||
module Text.Hamlet.XML
|
||||
- ( xml
|
||||
- , xmlFile
|
||||
- ) where
|
||||
+ () where
|
||||
|
||||
import Language.Haskell.TH.Syntax
|
||||
import Language.Haskell.TH.Quote
|
||||
@@ -19,80 +17,3 @@ import qualified Data.Foldable as F
|
||||
import Data.Maybe (fromMaybe)
|
||||
import qualified Data.Map as Map
|
||||
|
||||
-xml :: QuasiQuoter
|
||||
-xml = QuasiQuoter { quoteExp = strToExp }
|
||||
-
|
||||
-xmlFile :: FilePath -> Q Exp
|
||||
-xmlFile = strToExp . TL.unpack <=< qRunIO . readUtf8File
|
||||
-
|
||||
-strToExp :: String -> Q Exp
|
||||
-strToExp s =
|
||||
- case parseDoc s of
|
||||
- Error e -> error e
|
||||
- Ok x -> docsToExp [] x
|
||||
-
|
||||
-docsToExp :: Scope -> [Doc] -> Q Exp
|
||||
-docsToExp scope docs = [| concat $(fmap ListE $ mapM (docToExp scope) docs) |]
|
||||
-
|
||||
-docToExp :: Scope -> Doc -> Q Exp
|
||||
-docToExp scope (DocTag name attrs cs) =
|
||||
- [| [ X.NodeElement (X.Element ($(liftName name)) $(mkAttrs scope attrs) $(docsToExp scope cs))
|
||||
- ] |]
|
||||
-docToExp _ (DocContent (ContentRaw s)) = [| [ X.NodeContent (pack $(lift s)) ] |]
|
||||
-docToExp scope (DocContent (ContentVar d)) = [| [ X.NodeContent $(return $ derefToExp scope d) ] |]
|
||||
-docToExp scope (DocContent (ContentEmbed d)) = return $ derefToExp scope d
|
||||
-docToExp scope (DocForall deref ident@(Ident ident') inside) = do
|
||||
- let list' = derefToExp scope deref
|
||||
- name <- newName ident'
|
||||
- let scope' = (ident, VarE name) : scope
|
||||
- inside' <- docsToExp scope' inside
|
||||
- let lam = LamE [VarP name] inside'
|
||||
- [| F.concatMap $(return lam) $(return list') |]
|
||||
-docToExp scope (DocWith [] inside) = docsToExp scope inside
|
||||
-docToExp scope (DocWith ((deref, ident@(Ident name)):dis) inside) = do
|
||||
- let deref' = derefToExp scope deref
|
||||
- name' <- newName name
|
||||
- let scope' = (ident, VarE name') : scope
|
||||
- inside' <- docToExp scope' (DocWith dis inside)
|
||||
- let lam = LamE [VarP name'] inside'
|
||||
- return $ lam `AppE` deref'
|
||||
-docToExp scope (DocMaybe deref ident@(Ident name) just nothing) = do
|
||||
- let deref' = derefToExp scope deref
|
||||
- name' <- newName name
|
||||
- let scope' = (ident, VarE name') : scope
|
||||
- inside' <- docsToExp scope' just
|
||||
- let inside'' = LamE [VarP name'] inside'
|
||||
- nothing' <-
|
||||
- case nothing of
|
||||
- Nothing -> [| [] |]
|
||||
- Just n -> docsToExp scope n
|
||||
- [| maybe $(return nothing') $(return inside'') $(return deref') |]
|
||||
-docToExp scope (DocCond conds final) = do
|
||||
- unit <- [| () |]
|
||||
- body <- fmap GuardedB $ mapM go $ conds ++ [(DerefIdent $ Ident "otherwise", fromMaybe [] final)]
|
||||
- return $ CaseE unit [Match (TupP []) body []]
|
||||
- where
|
||||
- go (deref, inside) = do
|
||||
- inside' <- docsToExp scope inside
|
||||
- return (NormalG $ derefToExp scope deref, inside')
|
||||
-
|
||||
-mkAttrs :: Scope -> [(Maybe Deref, String, [Content])] -> Q Exp
|
||||
-mkAttrs _ [] = [| Map.empty |]
|
||||
-mkAttrs scope ((mderef, name, value):rest) = do
|
||||
- rest' <- mkAttrs scope rest
|
||||
- this <- [| Map.insert $(liftName name) (T.concat $(fmap ListE $ mapM go value)) |]
|
||||
- let with = [| $(return this) $(return rest') |]
|
||||
- case mderef of
|
||||
- Nothing -> with
|
||||
- Just deref -> [| if $(return $ derefToExp scope deref) then $(with) else $(return rest') |]
|
||||
- where
|
||||
- go (ContentRaw s) = [| pack $(lift s) |]
|
||||
- go (ContentVar d) = return $ derefToExp scope d
|
||||
- go ContentEmbed{} = error "Cannot use embed interpolation in attribute value"
|
||||
-
|
||||
-liftName :: String -> Q Exp
|
||||
-liftName s = do
|
||||
- X.Name local mns _ <- return $ fromString s
|
||||
- case mns of
|
||||
- Nothing -> [| X.Name (pack $(lift $ unpack local)) Nothing Nothing |]
|
||||
- Just ns -> [| X.Name (pack $(lift $ unpack local)) (Just $ pack $(lift $ unpack ns)) Nothing |]
|
||||
--
|
||||
1.8.5.1
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
From 583575461dc58b76c6c7e14d429f73182d49ef81 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Tue, 10 Jun 2014 20:29:51 +0000
|
||||
Subject: [PATCH] don't really build
|
||||
|
||||
---
|
||||
yesod-auth.cabal | 11 -----------
|
||||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/yesod-auth.cabal b/yesod-auth.cabal
|
||||
index 906c08b..b4bc841 100644
|
||||
--- a/yesod-auth.cabal
|
||||
+++ b/yesod-auth.cabal
|
||||
@@ -65,17 +65,6 @@ library
|
||||
, conduit-extra
|
||||
, attoparsec-conduit
|
||||
|
||||
- exposed-modules: Yesod.Auth
|
||||
- Yesod.Auth.BrowserId
|
||||
- Yesod.Auth.Dummy
|
||||
- Yesod.Auth.Email
|
||||
- Yesod.Auth.OpenId
|
||||
- Yesod.Auth.Rpxnow
|
||||
- Yesod.Auth.Message
|
||||
- Yesod.Auth.GoogleEmail
|
||||
- Yesod.Auth.GoogleEmail2
|
||||
- other-modules: Yesod.Auth.Routes
|
||||
- Yesod.PasswordStore
|
||||
ghc-options: -Wall
|
||||
|
||||
source-repository head
|
||||
--
|
||||
2.0.0
|
||||
|
|
@ -1,768 +0,0 @@
|
|||
From f1feea61dcba0b16afed5ce8dd5d2433fe505461 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:15:23 +0000
|
||||
Subject: [PATCH] hack TH
|
||||
|
||||
---
|
||||
Yesod/Core.hs | 30 +++---
|
||||
Yesod/Core/Class/Yesod.hs | 256 ++++++++++++++++++++++++++++++---------------
|
||||
Yesod/Core/Dispatch.hs | 38 ++-----
|
||||
Yesod/Core/Handler.hs | 25 ++---
|
||||
Yesod/Core/Internal/Run.hs | 6 +-
|
||||
Yesod/Core/Internal/TH.hs | 111 --------------------
|
||||
Yesod/Core/Types.hs | 3 +-
|
||||
Yesod/Core/Widget.hs | 32 +-----
|
||||
8 files changed, 213 insertions(+), 288 deletions(-)
|
||||
|
||||
diff --git a/Yesod/Core.hs b/Yesod/Core.hs
|
||||
index 9b29317..7c0792d 100644
|
||||
--- a/Yesod/Core.hs
|
||||
+++ b/Yesod/Core.hs
|
||||
@@ -31,16 +31,16 @@ module Yesod.Core
|
||||
, unauthorizedI
|
||||
-- * Logging
|
||||
, LogLevel (..)
|
||||
- , logDebug
|
||||
- , logInfo
|
||||
- , logWarn
|
||||
- , logError
|
||||
- , logOther
|
||||
- , logDebugS
|
||||
- , logInfoS
|
||||
- , logWarnS
|
||||
- , logErrorS
|
||||
- , logOtherS
|
||||
+ --, logDebug
|
||||
+ --, logInfo
|
||||
+ --, logWarn
|
||||
+ --, logError
|
||||
+ --, logOther
|
||||
+ --, logDebugS
|
||||
+ --, logInfoS
|
||||
+ --, logWarnS
|
||||
+ --, logErrorS
|
||||
+ --, logOtherS
|
||||
-- * Sessions
|
||||
, SessionBackend (..)
|
||||
, customizeSessionCookies
|
||||
@@ -87,17 +87,15 @@ module Yesod.Core
|
||||
, readIntegral
|
||||
-- * Shakespeare
|
||||
-- ** Hamlet
|
||||
- , hamlet
|
||||
- , shamlet
|
||||
- , xhamlet
|
||||
+ --, hamlet
|
||||
+ -- , shamlet
|
||||
+ --, xhamlet
|
||||
, HtmlUrl
|
||||
-- ** Julius
|
||||
- , julius
|
||||
+ --, julius
|
||||
, JavascriptUrl
|
||||
, renderJavascriptUrl
|
||||
-- ** Cassius/Lucius
|
||||
- , cassius
|
||||
- , lucius
|
||||
, CssUrl
|
||||
, renderCssUrl
|
||||
) where
|
||||
diff --git a/Yesod/Core/Class/Yesod.hs b/Yesod/Core/Class/Yesod.hs
|
||||
index 8631d27..c40eb10 100644
|
||||
--- a/Yesod/Core/Class/Yesod.hs
|
||||
+++ b/Yesod/Core/Class/Yesod.hs
|
||||
@@ -5,18 +5,22 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Yesod.Core.Class.Yesod where
|
||||
|
||||
-import Control.Monad.Logger (logErrorS)
|
||||
+--import Control.Monad.Logger (logErrorS)
|
||||
import Yesod.Core.Content
|
||||
import Yesod.Core.Handler
|
||||
|
||||
import Yesod.Routes.Class
|
||||
+import qualified Text.Blaze.Internal
|
||||
+import qualified Control.Monad.Logger
|
||||
+import qualified Text.Hamlet
|
||||
+import qualified Data.Foldable
|
||||
|
||||
import Blaze.ByteString.Builder (Builder)
|
||||
import Blaze.ByteString.Builder.Char.Utf8 (fromText)
|
||||
import Control.Arrow ((***), second)
|
||||
import Control.Monad (forM, when, void)
|
||||
import Control.Monad.IO.Class (MonadIO (liftIO))
|
||||
-import Control.Monad.Logger (LogLevel (LevelInfo, LevelOther),
|
||||
+import Control.Monad.Logger (Loc, LogLevel (LevelInfo, LevelOther),
|
||||
LogSource)
|
||||
import qualified Data.ByteString.Char8 as S8
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
@@ -33,7 +37,6 @@ import qualified Data.Text.Encoding.Error as TEE
|
||||
import Data.Text.Lazy.Builder (toLazyText)
|
||||
import Data.Text.Lazy.Encoding (encodeUtf8)
|
||||
import Data.Word (Word64)
|
||||
-import Language.Haskell.TH.Syntax (Loc (..))
|
||||
import Network.HTTP.Types (encodePath)
|
||||
import qualified Network.Wai as W
|
||||
import Data.Default (def)
|
||||
@@ -94,18 +97,26 @@ class RenderRoute site => Yesod site where
|
||||
defaultLayout w = do
|
||||
p <- widgetToPageContent w
|
||||
mmsg <- getMessage
|
||||
- withUrlRenderer [hamlet|
|
||||
- $newline never
|
||||
- $doctype 5
|
||||
- <html>
|
||||
- <head>
|
||||
- <title>#{pageTitle p}
|
||||
- ^{pageHead p}
|
||||
- <body>
|
||||
- $maybe msg <- mmsg
|
||||
- <p .message>#{msg}
|
||||
- ^{pageBody p}
|
||||
- |]
|
||||
+ withUrlRenderer $ \ _render_aHra
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<!DOCTYPE html>\n<html><head><title>");
|
||||
+ id (TBH.toHtml (pageTitle p));
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</title>");
|
||||
+ Text.Hamlet.asHtmlUrl (pageHead p) _render_aHra;
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</head><body>");
|
||||
+ Text.Hamlet.maybeH
|
||||
+ mmsg
|
||||
+ (\ msg_aHrb
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<p class=\"message\">");
|
||||
+ id (TBH.toHtml msg_aHrb);
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</p>") })
|
||||
+ Nothing;
|
||||
+ Text.Hamlet.asHtmlUrl (pageBody p) _render_aHra;
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack) "</body></html>") }
|
||||
|
||||
-- | Override the rendering function for a particular URL. One use case for
|
||||
-- this is to offload static hosting to a different domain name to avoid
|
||||
@@ -374,45 +385,103 @@ widgetToPageContent w = do
|
||||
-- modernizr should be at the end of the <head> http://www.modernizr.com/docs/#installing
|
||||
-- the asynchronous loader means your page doesn't have to wait for all the js to load
|
||||
let (mcomplete, asyncScripts) = asyncHelper render scripts jscript jsLoc
|
||||
- regularScriptLoad = [hamlet|
|
||||
- $newline never
|
||||
- $forall s <- scripts
|
||||
- ^{mkScriptTag s}
|
||||
- $maybe j <- jscript
|
||||
- $maybe s <- jsLoc
|
||||
- <script src="#{s}">
|
||||
- $nothing
|
||||
- <script>^{jelper j}
|
||||
- |]
|
||||
-
|
||||
- headAll = [hamlet|
|
||||
- $newline never
|
||||
- \^{head'}
|
||||
- $forall s <- stylesheets
|
||||
- ^{mkLinkTag s}
|
||||
- $forall s <- css
|
||||
- $maybe t <- right $ snd s
|
||||
- $maybe media <- fst s
|
||||
- <link rel=stylesheet media=#{media} href=#{t}>
|
||||
- $nothing
|
||||
- <link rel=stylesheet href=#{t}>
|
||||
- $maybe content <- left $ snd s
|
||||
- $maybe media <- fst s
|
||||
- <style media=#{media}>#{content}
|
||||
- $nothing
|
||||
- <style>#{content}
|
||||
- $case jsLoader master
|
||||
- $of BottomOfBody
|
||||
- $of BottomOfHeadAsync asyncJsLoader
|
||||
- ^{asyncJsLoader asyncScripts mcomplete}
|
||||
- $of BottomOfHeadBlocking
|
||||
- ^{regularScriptLoad}
|
||||
- |]
|
||||
- let bodyScript = [hamlet|
|
||||
- $newline never
|
||||
- ^{body}
|
||||
- ^{regularScriptLoad}
|
||||
- |]
|
||||
+ regularScriptLoad = \ _render_aHsO
|
||||
+ -> do { Data.Foldable.mapM_
|
||||
+ (\ s_aHsP
|
||||
+ -> Text.Hamlet.asHtmlUrl (mkScriptTag s_aHsP) _render_aHsO)
|
||||
+ scripts;
|
||||
+ Text.Hamlet.maybeH
|
||||
+ jscript
|
||||
+ (\ j_aHsQ
|
||||
+ -> Text.Hamlet.maybeH
|
||||
+ jsLoc
|
||||
+ (\ s_aHsR
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<script src=\"");
|
||||
+ id (TBH.toHtml s_aHsR);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "\"></script>") })
|
||||
+ (Just
|
||||
+ (do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack) "<script>");
|
||||
+ Text.Hamlet.asHtmlUrl (jelper j_aHsQ) _render_aHsO;
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</script>") })))
|
||||
+ Nothing }
|
||||
+
|
||||
+
|
||||
+ headAll = \ _render_aHsW
|
||||
+ -> do { Text.Hamlet.asHtmlUrl head' _render_aHsW;
|
||||
+ Data.Foldable.mapM_
|
||||
+ (\ s_aHsX -> Text.Hamlet.asHtmlUrl (mkLinkTag s_aHsX) _render_aHsW)
|
||||
+ stylesheets;
|
||||
+ Data.Foldable.mapM_
|
||||
+ (\ s_aHsY
|
||||
+ -> do { Text.Hamlet.maybeH
|
||||
+ (right (snd s_aHsY))
|
||||
+ (\ t_aHsZ
|
||||
+ -> Text.Hamlet.maybeH
|
||||
+ (fst s_aHsY)
|
||||
+ (\ media_aHt0
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<link rel=\"stylesheet\" media=\"");
|
||||
+ id (TBH.toHtml media_aHt0);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "\" href=\"");
|
||||
+ id (TBH.toHtml t_aHsZ);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "\">") })
|
||||
+ (Just
|
||||
+ (do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<link rel=\"stylesheet\" href=\"");
|
||||
+ id (TBH.toHtml t_aHsZ);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "\">") })))
|
||||
+ Nothing;
|
||||
+ Text.Hamlet.maybeH
|
||||
+ (left (snd s_aHsY))
|
||||
+ (\ content_aHt1
|
||||
+ -> Text.Hamlet.maybeH
|
||||
+ (fst s_aHsY)
|
||||
+ (\ media_aHt2
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<style media=\"");
|
||||
+ id (TBH.toHtml media_aHt2);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "\">");
|
||||
+ id (TBH.toHtml content_aHt1);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "</style>") })
|
||||
+ (Just
|
||||
+ (do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<style>");
|
||||
+ id (TBH.toHtml content_aHt1);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "</style>") })))
|
||||
+ Nothing })
|
||||
+ css;
|
||||
+ case jsLoader master of {
|
||||
+ BottomOfBody -> return ()
|
||||
+ ; BottomOfHeadAsync asyncJsLoader_aHt3
|
||||
+ -> Text.Hamlet.asHtmlUrl
|
||||
+ (asyncJsLoader_aHt3 asyncScripts mcomplete) _render_aHsW
|
||||
+ ; BottomOfHeadBlocking
|
||||
+ -> Text.Hamlet.asHtmlUrl regularScriptLoad _render_aHsW } }
|
||||
+
|
||||
+ let bodyScript = \ _render_aHt8 -> do { Text.Hamlet.asHtmlUrl body _render_aHt8;
|
||||
+ Text.Hamlet.asHtmlUrl regularScriptLoad _render_aHt8 }
|
||||
+
|
||||
|
||||
return $ PageContent title headAll $
|
||||
case jsLoader master of
|
||||
@@ -442,10 +511,13 @@ defaultErrorHandler NotFound = selectRep $ do
|
||||
r <- waiRequest
|
||||
let path' = TE.decodeUtf8With TEE.lenientDecode $ W.rawPathInfo r
|
||||
setTitle "Not Found"
|
||||
- toWidget [hamlet|
|
||||
- <h1>Not Found
|
||||
- <p>#{path'}
|
||||
- |]
|
||||
+ toWidget $ \ _render_aHte
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<h1>Not Found</h1>\n<p>");
|
||||
+ id (TBH.toHtml path');
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</p>") }
|
||||
+
|
||||
provideRep $ return $ object ["message" .= ("Not Found" :: Text)]
|
||||
|
||||
-- For API requests.
|
||||
@@ -455,10 +527,11 @@ defaultErrorHandler NotFound = selectRep $ do
|
||||
defaultErrorHandler NotAuthenticated = selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Not logged in"
|
||||
- toWidget [hamlet|
|
||||
- <h1>Not logged in
|
||||
- <p style="display:none;">Set the authRoute and the user will be redirected there.
|
||||
- |]
|
||||
+ toWidget $ \ _render_aHti
|
||||
+ -> id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<h1>Not logged in</h1>\n<p style=\"none;\">Set the authRoute and the user will be redirected there.</p>")
|
||||
+
|
||||
|
||||
provideRep $ do
|
||||
-- 401 *MUST* include a WWW-Authenticate header
|
||||
@@ -480,10 +553,13 @@ defaultErrorHandler NotAuthenticated = selectRep $ do
|
||||
defaultErrorHandler (PermissionDenied msg) = selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Permission Denied"
|
||||
- toWidget [hamlet|
|
||||
- <h1>Permission denied
|
||||
- <p>#{msg}
|
||||
- |]
|
||||
+ toWidget $ \ _render_aHtq
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<h1>Permission denied</h1>\n<p>");
|
||||
+ id (TBH.toHtml msg);
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</p>") }
|
||||
+
|
||||
provideRep $
|
||||
return $ object $ [
|
||||
"message" .= ("Permission Denied. " <> msg)
|
||||
@@ -492,30 +568,42 @@ defaultErrorHandler (PermissionDenied msg) = selectRep $ do
|
||||
defaultErrorHandler (InvalidArgs ia) = selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Invalid Arguments"
|
||||
- toWidget [hamlet|
|
||||
- <h1>Invalid Arguments
|
||||
- <ul>
|
||||
- $forall msg <- ia
|
||||
- <li>#{msg}
|
||||
- |]
|
||||
+ toWidget $ \ _render_aHtv
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<h1>Invalid Arguments</h1>\n<ul>");
|
||||
+ Data.Foldable.mapM_
|
||||
+ (\ msg_aHtw
|
||||
+ -> do { id ((Text.Blaze.Internal.preEscapedText . T.pack) "<li>");
|
||||
+ id (TBH.toHtml msg_aHtw);
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</li>") })
|
||||
+ ia;
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</ul>") }
|
||||
+
|
||||
provideRep $ return $ object ["message" .= ("Invalid Arguments" :: Text), "errors" .= ia]
|
||||
defaultErrorHandler (InternalError e) = do
|
||||
- $logErrorS "yesod-core" e
|
||||
selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle "Internal Server Error"
|
||||
- toWidget [hamlet|
|
||||
- <h1>Internal Server Error
|
||||
- <pre>#{e}
|
||||
- |]
|
||||
+ toWidget $ \ _render_aHtC
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<h1>Internal Server Error</h1>\n<pre>");
|
||||
+ id (TBH.toHtml e);
|
||||
+ id ((Text.Blaze.Internal.preEscapedText . T.pack) "</pre>") }
|
||||
+
|
||||
provideRep $ return $ object ["message" .= ("Internal Server Error" :: Text), "error" .= e]
|
||||
defaultErrorHandler (BadMethod m) = selectRep $ do
|
||||
provideRep $ defaultLayout $ do
|
||||
setTitle"Bad Method"
|
||||
- toWidget [hamlet|
|
||||
- <h1>Method Not Supported
|
||||
- <p>Method <code>#{S8.unpack m}</code> not supported
|
||||
- |]
|
||||
+ toWidget $ \ _render_aHtH
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<h1>Method Not Supported</h1>\n<p>Method <code>");
|
||||
+ id (TBH.toHtml (S8.unpack m));
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "</code> not supported</p>") }
|
||||
provideRep $ return $ object ["message" .= ("Bad method" :: Text), "method" .= TE.decodeUtf8With TEE.lenientDecode m]
|
||||
|
||||
asyncHelper :: (url -> [x] -> Text)
|
||||
@@ -682,8 +770,4 @@ loadClientSession key getCachedDate sessionName req = load
|
||||
-- turn the TH Loc loaction information into a human readable string
|
||||
-- leaving out the loc_end parameter
|
||||
fileLocationToString :: Loc -> String
|
||||
-fileLocationToString loc = (loc_package loc) ++ ':' : (loc_module loc) ++
|
||||
- ' ' : (loc_filename loc) ++ ':' : (line loc) ++ ':' : (char loc)
|
||||
- where
|
||||
- line = show . fst . loc_start
|
||||
- char = show . snd . loc_start
|
||||
+fileLocationToString loc = "unknown"
|
||||
diff --git a/Yesod/Core/Dispatch.hs b/Yesod/Core/Dispatch.hs
|
||||
index e0d1f0e..cc23fdd 100644
|
||||
--- a/Yesod/Core/Dispatch.hs
|
||||
+++ b/Yesod/Core/Dispatch.hs
|
||||
@@ -1,4 +1,3 @@
|
||||
-{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE FlexibleInstances #-}
|
||||
@@ -6,18 +5,18 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
module Yesod.Core.Dispatch
|
||||
( -- * Quasi-quoted routing
|
||||
- parseRoutes
|
||||
- , parseRoutesNoCheck
|
||||
- , parseRoutesFile
|
||||
- , parseRoutesFileNoCheck
|
||||
- , mkYesod
|
||||
+ -- parseRoutes
|
||||
+ --, parseRoutesNoCheck
|
||||
+ --, parseRoutesFile
|
||||
+ --, parseRoutesFileNoCheck
|
||||
+ --, mkYesod
|
||||
-- ** More fine-grained
|
||||
- , mkYesodData
|
||||
- , mkYesodSubData
|
||||
- , mkYesodDispatch
|
||||
- , mkYesodSubDispatch
|
||||
+ --, mkYesodData
|
||||
+ --, mkYesodSubData
|
||||
+ --, mkYesodDispatch
|
||||
+ --, mkYesodSubDispatch
|
||||
-- ** Path pieces
|
||||
- , PathPiece (..)
|
||||
+ PathPiece (..)
|
||||
, PathMultiPiece (..)
|
||||
, Texts
|
||||
-- * Convert to WAI
|
||||
@@ -135,13 +134,6 @@ toWaiAppLogger logger site = do
|
||||
, yreSite = site
|
||||
, yreSessionBackend = sb
|
||||
}
|
||||
- messageLoggerSource
|
||||
- site
|
||||
- logger
|
||||
- $(qLocation >>= liftLoc)
|
||||
- "yesod-core"
|
||||
- LevelInfo
|
||||
- (toLogStr ("Application launched" :: S.ByteString))
|
||||
middleware <- mkDefaultMiddlewares logger
|
||||
return $ middleware $ toWaiAppYre yre
|
||||
|
||||
@@ -170,14 +162,7 @@ warp port site = do
|
||||
]
|
||||
-}
|
||||
, Network.Wai.Handler.Warp.settingsOnException = const $ \e ->
|
||||
- when (shouldLog' e) $
|
||||
- messageLoggerSource
|
||||
- site
|
||||
- logger
|
||||
- $(qLocation >>= liftLoc)
|
||||
- "yesod-core"
|
||||
- LevelError
|
||||
- (toLogStr $ "Exception from Warp: " ++ show e)
|
||||
+ when (shouldLog' e) $ error (show e)
|
||||
}
|
||||
where
|
||||
shouldLog' =
|
||||
@@ -211,7 +196,6 @@ defaultMiddlewaresNoLogging = acceptOverride . autohead . gzip def . methodOverr
|
||||
-- | Deprecated synonym for 'warp'.
|
||||
warpDebug :: YesodDispatch site => Int -> site -> IO ()
|
||||
warpDebug = warp
|
||||
-{-# DEPRECATED warpDebug "Please use warp instead" #-}
|
||||
|
||||
-- | Runs your application using default middlewares (i.e., via 'toWaiApp'). It
|
||||
-- reads port information from the PORT environment variable, as used by tools
|
||||
diff --git a/Yesod/Core/Handler.hs b/Yesod/Core/Handler.hs
|
||||
index d2b196b..13cac17 100644
|
||||
--- a/Yesod/Core/Handler.hs
|
||||
+++ b/Yesod/Core/Handler.hs
|
||||
@@ -174,7 +174,7 @@ import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
|
||||
import Data.Text.Encoding.Error (lenientDecode)
|
||||
import qualified Data.Text.Lazy as TL
|
||||
import qualified Text.Blaze.Html.Renderer.Text as RenderText
|
||||
-import Text.Hamlet (Html, HtmlUrl, hamlet)
|
||||
+import Text.Hamlet (Html, HtmlUrl)
|
||||
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
@@ -203,6 +203,7 @@ import Control.Exception (throwIO)
|
||||
import Blaze.ByteString.Builder (Builder)
|
||||
import Safe (headMay)
|
||||
import Data.CaseInsensitive (CI)
|
||||
+import qualified Text.Blaze.Internal
|
||||
import qualified Data.Conduit.List as CL
|
||||
import Control.Monad (unless)
|
||||
import Control.Monad.Trans.Resource (MonadResource, InternalState, runResourceT, withInternalState, getInternalState, liftResourceT, resourceForkIO
|
||||
@@ -855,19 +856,15 @@ redirectToPost :: (MonadHandler m, RedirectUrl (HandlerSite m) url)
|
||||
-> m a
|
||||
redirectToPost url = do
|
||||
urlText <- toTextUrl url
|
||||
- withUrlRenderer [hamlet|
|
||||
-$newline never
|
||||
-$doctype 5
|
||||
-
|
||||
-<html>
|
||||
- <head>
|
||||
- <title>Redirecting...
|
||||
- <body onload="document.getElementById('form').submit()">
|
||||
- <form id="form" method="post" action=#{urlText}>
|
||||
- <noscript>
|
||||
- <p>Javascript has been disabled; please click on the button below to be redirected.
|
||||
- <input type="submit" value="Continue">
|
||||
-|] >>= sendResponse
|
||||
+ withUrlRenderer $ \ _render_awps
|
||||
+ -> do { id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "<!DOCTYPE html>\n<html><head><title>Redirecting...</title></head><body onload=\"document.getElementById('form').submit()\"><form id=\"form\" method=\"post\" action=\"");
|
||||
+ id (toHtml urlText);
|
||||
+ id
|
||||
+ ((Text.Blaze.Internal.preEscapedText . T.pack)
|
||||
+ "\"><noscript><p>Javascript has been disabled; please click on the button below to be redirected.</p></noscript><input type=\"submit\" value=\"Continue\"></form></body></html>") }
|
||||
+ >>= sendResponse
|
||||
|
||||
-- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'.
|
||||
hamletToRepHtml :: MonadHandler m => HtmlUrl (Route (HandlerSite m)) -> m Html
|
||||
diff --git a/Yesod/Core/Internal/Run.hs b/Yesod/Core/Internal/Run.hs
|
||||
index 311f208..63f666f 100644
|
||||
--- a/Yesod/Core/Internal/Run.hs
|
||||
+++ b/Yesod/Core/Internal/Run.hs
|
||||
@@ -16,7 +16,7 @@ import Control.Exception.Lifted (catch)
|
||||
import Control.Monad (mplus)
|
||||
import Control.Monad.IO.Class (MonadIO)
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
-import Control.Monad.Logger (LogLevel (LevelError), LogSource,
|
||||
+import Control.Monad.Logger (Loc, LogLevel (LevelError), LogSource,
|
||||
liftLoc)
|
||||
import Control.Monad.Trans.Resource (runResourceT, withInternalState, runInternalState, createInternalState, closeInternalState)
|
||||
import qualified Data.ByteString as S
|
||||
@@ -31,7 +31,7 @@ import qualified Data.Text as T
|
||||
import Data.Text.Encoding (encodeUtf8)
|
||||
import Data.Text.Encoding (decodeUtf8With)
|
||||
import Data.Text.Encoding.Error (lenientDecode)
|
||||
-import Language.Haskell.TH.Syntax (Loc, qLocation)
|
||||
+import Language.Haskell.TH.Syntax (qLocation)
|
||||
import qualified Network.HTTP.Types as H
|
||||
import Network.Wai
|
||||
#if MIN_VERSION_wai(2, 0, 0)
|
||||
@@ -158,8 +158,6 @@ safeEh :: (Loc -> LogSource -> LogLevel -> LogStr -> IO ())
|
||||
-> ErrorResponse
|
||||
-> YesodApp
|
||||
safeEh log' er req = do
|
||||
- liftIO $ log' $(qLocation >>= liftLoc) "yesod-core" LevelError
|
||||
- $ toLogStr $ "Error handler errored out: " ++ show er
|
||||
return $ YRPlain
|
||||
H.status500
|
||||
[]
|
||||
diff --git a/Yesod/Core/Internal/TH.hs b/Yesod/Core/Internal/TH.hs
|
||||
index 7e84c1c..a273c29 100644
|
||||
--- a/Yesod/Core/Internal/TH.hs
|
||||
+++ b/Yesod/Core/Internal/TH.hs
|
||||
@@ -23,114 +23,3 @@ import Yesod.Core.Content
|
||||
import Yesod.Core.Class.Dispatch
|
||||
import Yesod.Core.Internal.Run
|
||||
|
||||
--- | Generates URL datatype and site function for the given 'Resource's. This
|
||||
--- is used for creating sites, /not/ subsites. See 'mkYesodSub' for the latter.
|
||||
--- Use 'parseRoutes' to create the 'Resource's.
|
||||
-mkYesod :: String -- ^ name of the argument datatype
|
||||
- -> [ResourceTree String]
|
||||
- -> Q [Dec]
|
||||
-mkYesod name = fmap (uncurry (++)) . mkYesodGeneral name [] False
|
||||
-
|
||||
--- | Sometimes, you will want to declare your routes in one file and define
|
||||
--- your handlers elsewhere. For example, this is the only way to break up a
|
||||
--- monolithic file into smaller parts. Use this function, paired with
|
||||
--- 'mkYesodDispatch', to do just that.
|
||||
-mkYesodData :: String -> [ResourceTree String] -> Q [Dec]
|
||||
-mkYesodData name res = mkYesodDataGeneral name False res
|
||||
-
|
||||
-mkYesodSubData :: String -> [ResourceTree String] -> Q [Dec]
|
||||
-mkYesodSubData name res = mkYesodDataGeneral name True res
|
||||
-
|
||||
-mkYesodDataGeneral :: String -> Bool -> [ResourceTree String] -> Q [Dec]
|
||||
-mkYesodDataGeneral name isSub res = do
|
||||
- let (name':rest) = words name
|
||||
- fmap fst $ mkYesodGeneral name' rest isSub res
|
||||
-
|
||||
--- | See 'mkYesodData'.
|
||||
-mkYesodDispatch :: String -> [ResourceTree String] -> Q [Dec]
|
||||
-mkYesodDispatch name = fmap snd . mkYesodGeneral name [] False
|
||||
-
|
||||
--- | Get the Handler and Widget type synonyms for the given site.
|
||||
-masterTypeSyns :: Type -> [Dec]
|
||||
-masterTypeSyns site =
|
||||
- [ TySynD (mkName "Handler") []
|
||||
- $ ConT ''HandlerT `AppT` site `AppT` ConT ''IO
|
||||
- , TySynD (mkName "Widget") []
|
||||
- $ ConT ''WidgetT `AppT` site `AppT` ConT ''IO `AppT` ConT ''()
|
||||
- ]
|
||||
-
|
||||
-mkYesodGeneral :: String -- ^ foundation type
|
||||
- -> [String] -- ^ arguments for the type
|
||||
- -> Bool -- ^ it this a subsite
|
||||
- -> [ResourceTree String]
|
||||
- -> Q([Dec],[Dec])
|
||||
-mkYesodGeneral name args isSub resS = do
|
||||
- renderRouteDec <- mkRenderRouteInstance site res
|
||||
- routeAttrsDec <- mkRouteAttrsInstance site res
|
||||
- dispatchDec <- mkDispatchInstance site res
|
||||
- parse <- mkParseRouteInstance site res
|
||||
- let rname = mkName $ "resources" ++ name
|
||||
- eres <- lift resS
|
||||
- let resourcesDec =
|
||||
- [ SigD rname $ ListT `AppT` (ConT ''ResourceTree `AppT` ConT ''String)
|
||||
- , FunD rname [Clause [] (NormalB eres) []]
|
||||
- ]
|
||||
- let dataDec = concat
|
||||
- [ [parse]
|
||||
- , renderRouteDec
|
||||
- , [routeAttrsDec]
|
||||
- , resourcesDec
|
||||
- , if isSub then [] else masterTypeSyns site
|
||||
- ]
|
||||
- return (dataDec, dispatchDec)
|
||||
- where site = foldl' AppT (ConT $ mkName name) (map (VarT . mkName) args)
|
||||
- res = map (fmap parseType) resS
|
||||
-
|
||||
-mkMDS :: Q Exp -> MkDispatchSettings
|
||||
-mkMDS rh = MkDispatchSettings
|
||||
- { mdsRunHandler = rh
|
||||
- , mdsSubDispatcher =
|
||||
- [|\parentRunner getSub toParent env -> yesodSubDispatch
|
||||
- YesodSubRunnerEnv
|
||||
- { ysreParentRunner = parentRunner
|
||||
- , ysreGetSub = getSub
|
||||
- , ysreToParentRoute = toParent
|
||||
- , ysreParentEnv = env
|
||||
- }
|
||||
- |]
|
||||
- , mdsGetPathInfo = [|W.pathInfo|]
|
||||
- , mdsSetPathInfo = [|\p r -> r { W.pathInfo = p }|]
|
||||
- , mdsMethod = [|W.requestMethod|]
|
||||
- , mds404 = [|notFound >> return ()|]
|
||||
- , mds405 = [|badMethod >> return ()|]
|
||||
- , mdsGetHandler = defaultGetHandler
|
||||
- }
|
||||
-
|
||||
--- | If the generation of @'YesodDispatch'@ instance require finer
|
||||
--- control of the types, contexts etc. using this combinator. You will
|
||||
--- hardly need this generality. However, in certain situations, like
|
||||
--- when writing library/plugin for yesod, this combinator becomes
|
||||
--- handy.
|
||||
-mkDispatchInstance :: Type -- ^ The master site type
|
||||
- -> [ResourceTree a] -- ^ The resource
|
||||
- -> DecsQ
|
||||
-mkDispatchInstance master res = do
|
||||
- clause' <- mkDispatchClause (mkMDS [|yesodRunner|]) res
|
||||
- let thisDispatch = FunD 'yesodDispatch [clause']
|
||||
- return [InstanceD [] yDispatch [thisDispatch]]
|
||||
- where
|
||||
- yDispatch = ConT ''YesodDispatch `AppT` master
|
||||
-
|
||||
-mkYesodSubDispatch :: [ResourceTree a] -> Q Exp
|
||||
-mkYesodSubDispatch res = do
|
||||
- clause' <- mkDispatchClause (mkMDS [|subHelper . fmap toTypedContent|]) res
|
||||
- inner <- newName "inner"
|
||||
- let innerFun = FunD inner [clause']
|
||||
- helper <- newName "helper"
|
||||
- let fun = FunD helper
|
||||
- [ Clause
|
||||
- []
|
||||
- (NormalB $ VarE inner)
|
||||
- [innerFun]
|
||||
- ]
|
||||
- return $ LetE [fun] (VarE helper)
|
||||
diff --git a/Yesod/Core/Types.hs b/Yesod/Core/Types.hs
|
||||
index 388dfe3..b3fce0f 100644
|
||||
--- a/Yesod/Core/Types.hs
|
||||
+++ b/Yesod/Core/Types.hs
|
||||
@@ -21,6 +21,7 @@ import Control.Monad.Catch (MonadCatch (..))
|
||||
import Control.Monad.Catch (MonadMask (..))
|
||||
#endif
|
||||
import Control.Monad.IO.Class (MonadIO (liftIO))
|
||||
+import qualified Control.Monad.Logger
|
||||
import Control.Monad.Logger (LogLevel, LogSource,
|
||||
MonadLogger (..))
|
||||
import Control.Monad.Trans.Control (MonadBaseControl (..))
|
||||
@@ -191,7 +192,7 @@ data RunHandlerEnv site = RunHandlerEnv
|
||||
, rheRoute :: !(Maybe (Route site))
|
||||
, rheSite :: !site
|
||||
, rheUpload :: !(RequestBodyLength -> FileUpload)
|
||||
- , rheLog :: !(Loc -> LogSource -> LogLevel -> LogStr -> IO ())
|
||||
+ , rheLog :: !(Control.Monad.Logger.Loc -> LogSource -> LogLevel -> LogStr -> IO ())
|
||||
, rheOnError :: !(ErrorResponse -> YesodApp)
|
||||
-- ^ How to respond when an error is thrown internally.
|
||||
--
|
||||
diff --git a/Yesod/Core/Widget.hs b/Yesod/Core/Widget.hs
|
||||
index 481199e..8489fbe 100644
|
||||
--- a/Yesod/Core/Widget.hs
|
||||
+++ b/Yesod/Core/Widget.hs
|
||||
@@ -16,8 +16,8 @@ module Yesod.Core.Widget
|
||||
WidgetT
|
||||
, PageContent (..)
|
||||
-- * Special Hamlet quasiquoter/TH for Widgets
|
||||
- , whamlet
|
||||
- , whamletFile
|
||||
+ --, whamlet
|
||||
+ --, whamletFile
|
||||
, ihamletToRepHtml
|
||||
, ihamletToHtml
|
||||
-- * Convert to Widget
|
||||
@@ -46,7 +46,7 @@ module Yesod.Core.Widget
|
||||
, widgetToParentWidget
|
||||
, handlerToWidget
|
||||
-- * Internal
|
||||
- , whamletFileWithSettings
|
||||
+ --, whamletFileWithSettings
|
||||
, asWidgetT
|
||||
) where
|
||||
|
||||
@@ -207,35 +207,9 @@ addScriptRemote = flip addScriptRemoteAttrs []
|
||||
addScriptRemoteAttrs :: MonadWidget m => Text -> [(Text, Text)] -> m ()
|
||||
addScriptRemoteAttrs x y = tell $ GWData mempty mempty (toUnique $ Script (Remote x) y) mempty mempty mempty mempty
|
||||
|
||||
-whamlet :: QuasiQuoter
|
||||
-whamlet = NP.hamletWithSettings rules NP.defaultHamletSettings
|
||||
-
|
||||
-whamletFile :: FilePath -> Q Exp
|
||||
-whamletFile = NP.hamletFileWithSettings rules NP.defaultHamletSettings
|
||||
-
|
||||
-whamletFileWithSettings :: NP.HamletSettings -> FilePath -> Q Exp
|
||||
-whamletFileWithSettings = NP.hamletFileWithSettings rules
|
||||
-
|
||||
asWidgetT :: WidgetT site m () -> WidgetT site m ()
|
||||
asWidgetT = id
|
||||
|
||||
-rules :: Q NP.HamletRules
|
||||
-rules = do
|
||||
- ah <- [|asWidgetT . toWidget|]
|
||||
- let helper qg f = do
|
||||
- x <- newName "urender"
|
||||
- e <- f $ VarE x
|
||||
- let e' = LamE [VarP x] e
|
||||
- g <- qg
|
||||
- bind <- [|(>>=)|]
|
||||
- return $ InfixE (Just g) bind (Just e')
|
||||
- let ur f = do
|
||||
- let env = NP.Env
|
||||
- (Just $ helper [|getUrlRenderParams|])
|
||||
- (Just $ helper [|liftM (toHtml .) getMessageRender|])
|
||||
- f env
|
||||
- return $ NP.HamletRules ah ur $ \_ b -> return $ ah `AppE` b
|
||||
-
|
||||
-- | Wraps the 'Content' generated by 'hamletToContent' in a 'RepHtml'.
|
||||
ihamletToRepHtml :: (MonadHandler m, RenderMessage (HandlerSite m) message)
|
||||
=> HtmlUrlI18n message (Route (HandlerSite m))
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
From e82ed4e6fd7b5ea6dbe474b5de2755ec5794161c Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:23:50 +0000
|
||||
Subject: [PATCH] stub out
|
||||
|
||||
---
|
||||
yesod-persistent.cabal | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
diff --git a/yesod-persistent.cabal b/yesod-persistent.cabal
|
||||
index b116f3a..017b184 100644
|
||||
--- a/yesod-persistent.cabal
|
||||
+++ b/yesod-persistent.cabal
|
||||
@@ -14,16 +14,6 @@ description: Some helpers for using Persistent from Yesod.
|
||||
|
||||
library
|
||||
build-depends: base >= 4 && < 5
|
||||
- , yesod-core >= 1.2.2 && < 1.3
|
||||
- , persistent >= 1.2 && < 2.1
|
||||
- , persistent-template >= 1.2 && < 2.1
|
||||
- , transformers >= 0.2.2
|
||||
- , blaze-builder
|
||||
- , conduit
|
||||
- , resourcet >= 0.4.5
|
||||
- , resource-pool
|
||||
- exposed-modules: Yesod.Persist
|
||||
- Yesod.Persist.Core
|
||||
ghc-options: -Wall
|
||||
|
||||
test-suite test
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
From 8ba08c0efc035486a65f2fd33916a5da7e5210e7 Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 26 Dec 2013 19:32:55 -0400
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
Yesod/Routes/Parse.hs | 40 +++++-----------------------------------
|
||||
Yesod/Routes/TH.hs | 16 ++++++++--------
|
||||
Yesod/Routes/TH/Types.hs | 16 ----------------
|
||||
yesod-routes.cabal | 4 ----
|
||||
4 files changed, 13 insertions(+), 63 deletions(-)
|
||||
|
||||
diff --git a/Yesod/Routes/Parse.hs b/Yesod/Routes/Parse.hs
|
||||
index 232982d..7df7750 100644
|
||||
--- a/Yesod/Routes/Parse.hs
|
||||
+++ b/Yesod/Routes/Parse.hs
|
||||
@@ -2,11 +2,11 @@
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-fields #-} -- QuasiQuoter
|
||||
module Yesod.Routes.Parse
|
||||
- ( parseRoutes
|
||||
- , parseRoutesFile
|
||||
- , parseRoutesNoCheck
|
||||
- , parseRoutesFileNoCheck
|
||||
- , parseType
|
||||
+ --( parseRoutes
|
||||
+ --, parseRoutesFile
|
||||
+ --, parseRoutesNoCheck
|
||||
+ --, parseRoutesFileNoCheck
|
||||
+ ( parseType
|
||||
, parseTypeTree
|
||||
, TypeTree (..)
|
||||
) where
|
||||
@@ -19,42 +19,12 @@ import Yesod.Routes.TH
|
||||
import Yesod.Routes.Overlap (findOverlapNames)
|
||||
import Data.List (foldl')
|
||||
|
||||
--- | A quasi-quoter to parse a string into a list of 'Resource's. Checks for
|
||||
--- overlapping routes, failing if present; use 'parseRoutesNoCheck' to skip the
|
||||
--- checking. See documentation site for details on syntax.
|
||||
-parseRoutes :: QuasiQuoter
|
||||
-parseRoutes = QuasiQuoter { quoteExp = x }
|
||||
- where
|
||||
- x s = do
|
||||
- let res = resourcesFromString s
|
||||
- case findOverlapNames res of
|
||||
- [] -> lift res
|
||||
- z -> error $ unlines $ "Overlapping routes: " : map show z
|
||||
-
|
||||
-parseRoutesFile :: FilePath -> Q Exp
|
||||
-parseRoutesFile = parseRoutesFileWith parseRoutes
|
||||
-
|
||||
-parseRoutesFileNoCheck :: FilePath -> Q Exp
|
||||
-parseRoutesFileNoCheck = parseRoutesFileWith parseRoutesNoCheck
|
||||
-
|
||||
-parseRoutesFileWith :: QuasiQuoter -> FilePath -> Q Exp
|
||||
-parseRoutesFileWith qq fp = do
|
||||
- qAddDependentFile fp
|
||||
- s <- qRunIO $ readUtf8File fp
|
||||
- quoteExp qq s
|
||||
-
|
||||
readUtf8File :: FilePath -> IO String
|
||||
readUtf8File fp = do
|
||||
h <- SIO.openFile fp SIO.ReadMode
|
||||
SIO.hSetEncoding h SIO.utf8_bom
|
||||
SIO.hGetContents h
|
||||
|
||||
--- | Same as 'parseRoutes', but performs no overlap checking.
|
||||
-parseRoutesNoCheck :: QuasiQuoter
|
||||
-parseRoutesNoCheck = QuasiQuoter
|
||||
- { quoteExp = lift . resourcesFromString
|
||||
- }
|
||||
-
|
||||
-- | Convert a multi-line string to a set of resources. See documentation for
|
||||
-- the format of this string. This is a partial function which calls 'error' on
|
||||
-- invalid input.
|
||||
diff --git a/Yesod/Routes/TH.hs b/Yesod/Routes/TH.hs
|
||||
index 7b2e50b..b05fc57 100644
|
||||
--- a/Yesod/Routes/TH.hs
|
||||
+++ b/Yesod/Routes/TH.hs
|
||||
@@ -2,15 +2,15 @@
|
||||
module Yesod.Routes.TH
|
||||
( module Yesod.Routes.TH.Types
|
||||
-- * Functions
|
||||
- , module Yesod.Routes.TH.RenderRoute
|
||||
- , module Yesod.Routes.TH.ParseRoute
|
||||
- , module Yesod.Routes.TH.RouteAttrs
|
||||
+ -- , module Yesod.Routes.TH.RenderRoute
|
||||
+ -- , module Yesod.Routes.TH.ParseRoute
|
||||
+ -- , module Yesod.Routes.TH.RouteAttrs
|
||||
-- ** Dispatch
|
||||
- , module Yesod.Routes.TH.Dispatch
|
||||
+ -- , module Yesod.Routes.TH.Dispatch
|
||||
) where
|
||||
|
||||
import Yesod.Routes.TH.Types
|
||||
-import Yesod.Routes.TH.RenderRoute
|
||||
-import Yesod.Routes.TH.ParseRoute
|
||||
-import Yesod.Routes.TH.RouteAttrs
|
||||
-import Yesod.Routes.TH.Dispatch
|
||||
+--import Yesod.Routes.TH.RenderRoute
|
||||
+--import Yesod.Routes.TH.ParseRoute
|
||||
+--import Yesod.Routes.TH.RouteAttrs
|
||||
+--import Yesod.Routes.TH.Dispatch
|
||||
diff --git a/Yesod/Routes/TH/Types.hs b/Yesod/Routes/TH/Types.hs
|
||||
index d0a0405..3232e99 100644
|
||||
--- a/Yesod/Routes/TH/Types.hs
|
||||
+++ b/Yesod/Routes/TH/Types.hs
|
||||
@@ -31,10 +31,6 @@ instance Functor ResourceTree where
|
||||
fmap f (ResourceLeaf r) = ResourceLeaf (fmap f r)
|
||||
fmap f (ResourceParent a b c) = ResourceParent a (map (second $ fmap f) b) $ map (fmap f) c
|
||||
|
||||
-instance Lift t => Lift (ResourceTree t) where
|
||||
- lift (ResourceLeaf r) = [|ResourceLeaf $(lift r)|]
|
||||
- lift (ResourceParent a b c) = [|ResourceParent $(lift a) $(lift b) $(lift c)|]
|
||||
-
|
||||
data Resource typ = Resource
|
||||
{ resourceName :: String
|
||||
, resourcePieces :: [(CheckOverlap, Piece typ)]
|
||||
@@ -48,9 +44,6 @@ type CheckOverlap = Bool
|
||||
instance Functor Resource where
|
||||
fmap f (Resource a b c d) = Resource a (map (second $ fmap f) b) (fmap f c) d
|
||||
|
||||
-instance Lift t => Lift (Resource t) where
|
||||
- lift (Resource a b c d) = [|Resource a b c d|]
|
||||
-
|
||||
data Piece typ = Static String | Dynamic typ
|
||||
deriving Show
|
||||
|
||||
@@ -58,10 +51,6 @@ instance Functor Piece where
|
||||
fmap _ (Static s) = (Static s)
|
||||
fmap f (Dynamic t) = Dynamic (f t)
|
||||
|
||||
-instance Lift t => Lift (Piece t) where
|
||||
- lift (Static s) = [|Static $(lift s)|]
|
||||
- lift (Dynamic t) = [|Dynamic $(lift t)|]
|
||||
-
|
||||
data Dispatch typ =
|
||||
Methods
|
||||
{ methodsMulti :: Maybe typ -- ^ type of the multi piece at the end
|
||||
@@ -77,11 +66,6 @@ instance Functor Dispatch where
|
||||
fmap f (Methods a b) = Methods (fmap f a) b
|
||||
fmap f (Subsite a b) = Subsite (f a) b
|
||||
|
||||
-instance Lift t => Lift (Dispatch t) where
|
||||
- lift (Methods Nothing b) = [|Methods Nothing $(lift b)|]
|
||||
- lift (Methods (Just t) b) = [|Methods (Just $(lift t)) $(lift b)|]
|
||||
- lift (Subsite t b) = [|Subsite $(lift t) $(lift b)|]
|
||||
-
|
||||
resourceMulti :: Resource typ -> Maybe typ
|
||||
resourceMulti Resource { resourceDispatch = Methods (Just t) _ } = Just t
|
||||
resourceMulti _ = Nothing
|
||||
diff --git a/yesod-routes.cabal b/yesod-routes.cabal
|
||||
index 61980d1..33d2380 100644
|
||||
--- a/yesod-routes.cabal
|
||||
+++ b/yesod-routes.cabal
|
||||
@@ -27,10 +27,6 @@ library
|
||||
Yesod.Routes.Class
|
||||
Yesod.Routes.Parse
|
||||
Yesod.Routes.Overlap
|
||||
- other-modules: Yesod.Routes.TH.Dispatch
|
||||
- Yesod.Routes.TH.RenderRoute
|
||||
- Yesod.Routes.TH.ParseRoute
|
||||
- Yesod.Routes.TH.RouteAttrs
|
||||
Yesod.Routes.TH.Types
|
||||
ghc-options: -Wall
|
||||
|
||||
--
|
||||
1.7.10.4
|
||||
|
|
@ -1,193 +0,0 @@
|
|||
From 606c5f4f4b2d476d274907eb2bb8c12b60fc451f Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Wed, 21 May 2014 04:43:30 +0000
|
||||
Subject: [PATCH] remove TH
|
||||
|
||||
---
|
||||
Yesod/EmbeddedStatic/Generators.hs | 3 +--
|
||||
Yesod/Static.hs | 29 ++++++++++++++++++-----------
|
||||
yesod-static.cabal | 9 ---------
|
||||
3 files changed, 19 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/Yesod/EmbeddedStatic/Generators.hs b/Yesod/EmbeddedStatic/Generators.hs
|
||||
index 08febb9..e3a6d51 100644
|
||||
--- a/Yesod/EmbeddedStatic/Generators.hs
|
||||
+++ b/Yesod/EmbeddedStatic/Generators.hs
|
||||
@@ -42,7 +42,6 @@ import Language.Haskell.TH
|
||||
import Network.Mime (defaultMimeLookup)
|
||||
import System.Directory (doesDirectoryExist, getDirectoryContents, findExecutable)
|
||||
import System.FilePath ((</>))
|
||||
-import Text.Jasmine (minifym)
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import qualified Data.Conduit.List as C
|
||||
import Data.Conduit.Binary (sourceHandle)
|
||||
@@ -162,7 +161,7 @@ concatFilesWith loc process files = do
|
||||
|
||||
-- | Convienient rexport of 'minifym' with a type signature to work with 'concatFilesWith'.
|
||||
jasmine :: BL.ByteString -> IO BL.ByteString
|
||||
-jasmine ct = return $ either (const ct) id $ minifym ct
|
||||
+jasmine ct = return ct
|
||||
|
||||
-- | Use <https://github.com/mishoo/UglifyJS2 UglifyJS2> to compress javascript.
|
||||
-- Assumes @uglifyjs@ is located in the path and uses options @[\"-m\", \"-c\"]@
|
||||
diff --git a/Yesod/Static.hs b/Yesod/Static.hs
|
||||
index 725ebf4..33eaffd 100644
|
||||
--- a/Yesod/Static.hs
|
||||
+++ b/Yesod/Static.hs
|
||||
@@ -37,8 +37,8 @@ module Yesod.Static
|
||||
, staticDevel
|
||||
-- * Combining CSS/JS
|
||||
-- $combining
|
||||
- , combineStylesheets'
|
||||
- , combineScripts'
|
||||
+ --, combineStylesheets'
|
||||
+ --, combineScripts'
|
||||
-- ** Settings
|
||||
, CombineSettings
|
||||
, csStaticDir
|
||||
@@ -48,13 +48,13 @@ module Yesod.Static
|
||||
, csJsPreProcess
|
||||
, csCombinedFolder
|
||||
-- * Template Haskell helpers
|
||||
- , staticFiles
|
||||
- , staticFilesList
|
||||
- , publicFiles
|
||||
+ --, staticFiles
|
||||
+ --, staticFilesList
|
||||
+ --, publicFiles
|
||||
-- * Hashing
|
||||
, base64md5
|
||||
-- * Embed
|
||||
- , embed
|
||||
+ --, embed
|
||||
#ifdef TEST_EXPORT
|
||||
, getFileListPieces
|
||||
#endif
|
||||
@@ -64,7 +64,7 @@ import Prelude hiding (FilePath)
|
||||
import qualified Prelude
|
||||
import System.Directory
|
||||
import Control.Monad
|
||||
-import Data.FileEmbed (embedDir)
|
||||
+import Data.FileEmbed
|
||||
|
||||
import Control.Monad.Trans.Resource (runResourceT)
|
||||
import Yesod.Core
|
||||
@@ -136,6 +136,7 @@ staticDevel dir = do
|
||||
hashLookup <- cachedETagLookupDevel dir
|
||||
return $ Static $ webAppSettingsWithLookup (F.decodeString dir) hashLookup
|
||||
|
||||
+{-
|
||||
-- | Produce a 'Static' based on embedding all of the static files' contents in the
|
||||
-- executable at compile time.
|
||||
--
|
||||
@@ -150,6 +151,7 @@ staticDevel dir = do
|
||||
-- This will cause yesod to embed those assets into the generated HTML file itself.
|
||||
embed :: Prelude.FilePath -> Q Exp
|
||||
embed fp = [|Static (embeddedSettings $(embedDir fp))|]
|
||||
+-}
|
||||
|
||||
instance RenderRoute Static where
|
||||
-- | A route on the static subsite (see also 'staticFiles').
|
||||
@@ -215,6 +217,7 @@ getFileListPieces = flip evalStateT M.empty . flip go id
|
||||
put $ M.insert s s m
|
||||
return s
|
||||
|
||||
+{-
|
||||
-- | Template Haskell function that automatically creates routes
|
||||
-- for all of your static files.
|
||||
--
|
||||
@@ -267,7 +270,7 @@ staticFilesList dir fs =
|
||||
-- see if their copy is up-to-date.
|
||||
publicFiles :: Prelude.FilePath -> Q [Dec]
|
||||
publicFiles dir = mkStaticFiles' dir "StaticRoute" False
|
||||
-
|
||||
+-}
|
||||
|
||||
mkHashMap :: Prelude.FilePath -> IO (M.Map F.FilePath S8.ByteString)
|
||||
mkHashMap dir = do
|
||||
@@ -310,6 +313,7 @@ cachedETagLookup dir = do
|
||||
etags <- mkHashMap dir
|
||||
return $ (\f -> return $ M.lookup f etags)
|
||||
|
||||
+{-
|
||||
mkStaticFiles :: Prelude.FilePath -> Q [Dec]
|
||||
mkStaticFiles fp = mkStaticFiles' fp "StaticRoute" True
|
||||
|
||||
@@ -357,6 +361,7 @@ mkStaticFilesList fp fs routeConName makeHash = do
|
||||
[ Clause [] (NormalB $ (ConE route) `AppE` f' `AppE` qs) []
|
||||
]
|
||||
]
|
||||
+-}
|
||||
|
||||
base64md5File :: Prelude.FilePath -> IO String
|
||||
base64md5File = fmap (base64 . encode) . hashFile
|
||||
@@ -395,7 +400,7 @@ base64 = map tr
|
||||
-- single static file at compile time.
|
||||
|
||||
data CombineType = JS | CSS
|
||||
-
|
||||
+{-
|
||||
combineStatics' :: CombineType
|
||||
-> CombineSettings
|
||||
-> [Route Static] -- ^ files to combine
|
||||
@@ -429,7 +434,7 @@ combineStatics' combineType CombineSettings {..} routes = do
|
||||
case combineType of
|
||||
JS -> "js"
|
||||
CSS -> "css"
|
||||
-
|
||||
+-}
|
||||
-- | Data type for holding all settings for combining files.
|
||||
--
|
||||
-- This data type is a settings type. For more information, see:
|
||||
@@ -505,6 +510,7 @@ instance Default CombineSettings where
|
||||
errorIntro :: [FilePath] -> [Char] -> [Char]
|
||||
errorIntro fps s = "Error minifying " ++ show fps ++ ": " ++ s
|
||||
|
||||
+{-
|
||||
liftRoutes :: [Route Static] -> Q Exp
|
||||
liftRoutes =
|
||||
fmap ListE . mapM go
|
||||
@@ -551,4 +557,5 @@ combineScripts' :: Bool -- ^ development? if so, perform no combining
|
||||
-> Q Exp
|
||||
combineScripts' development cs con routes
|
||||
| development = [| mapM_ (addScript . $(return $ ConE con)) $(liftRoutes routes) |]
|
||||
- | otherwise = [| addScript $ $(return $ ConE con) $(combineStatics' JS cs routes) |]
|
||||
+ | otherwise = [| addScript $ $(return $ ConE con) $(combineStatics' JS cs routes) |]a
|
||||
+-}
|
||||
diff --git a/yesod-static.cabal b/yesod-static.cabal
|
||||
index 2582a95..5df03b3 100644
|
||||
--- a/yesod-static.cabal
|
||||
+++ b/yesod-static.cabal
|
||||
@@ -49,7 +49,6 @@ library
|
||||
, data-default
|
||||
, shakespeare-css >= 1.0.3
|
||||
, mime-types >= 0.1
|
||||
- , hjsmin
|
||||
, filepath >= 1.3
|
||||
, resourcet >= 0.4
|
||||
, unordered-containers >= 0.2
|
||||
@@ -62,13 +61,6 @@ library
|
||||
, hashable >= 1.1
|
||||
|
||||
exposed-modules: Yesod.Static
|
||||
- Yesod.EmbeddedStatic
|
||||
- Yesod.EmbeddedStatic.Generators
|
||||
- Yesod.EmbeddedStatic.Types
|
||||
- Yesod.EmbeddedStatic.Css.AbsoluteUrl
|
||||
-
|
||||
- other-modules: Yesod.EmbeddedStatic.Internal
|
||||
- Yesod.EmbeddedStatic.Css.Util
|
||||
|
||||
ghc-options: -Wall
|
||||
extensions: TemplateHaskell
|
||||
@@ -108,7 +100,6 @@ test-suite tests
|
||||
, data-default
|
||||
, shakespeare-css
|
||||
, mime-types
|
||||
- , hjsmin
|
||||
, filepath
|
||||
, resourcet
|
||||
, unordered-containers
|
||||
--
|
||||
2.0.0.rc2
|
||||
|
|
@ -1,199 +0,0 @@
|
|||
From 59091cd37958fee79b9e346fe3118d5ed7d0104b Mon Sep 17 00:00:00 2001
|
||||
From: dummy <dummy@example.com>
|
||||
Date: Thu, 16 Oct 2014 02:36:37 +0000
|
||||
Subject: [PATCH] hack TH
|
||||
|
||||
---
|
||||
Yesod.hs | 19 ++++++++++++--
|
||||
Yesod/Default/Main.hs | 31 +----------------------
|
||||
Yesod/Default/Util.hs | 69 ++-------------------------------------------------
|
||||
3 files changed, 20 insertions(+), 99 deletions(-)
|
||||
|
||||
diff --git a/Yesod.hs b/Yesod.hs
|
||||
index b367144..fbe309c 100644
|
||||
--- a/Yesod.hs
|
||||
+++ b/Yesod.hs
|
||||
@@ -5,9 +5,24 @@ module Yesod
|
||||
( -- * Re-exports from yesod-core
|
||||
module Yesod.Core
|
||||
, module Yesod.Form
|
||||
- , module Yesod.Persist
|
||||
+ , insertBy
|
||||
+ , replace
|
||||
+ , deleteBy
|
||||
+ , delete
|
||||
+ , insert
|
||||
+ , Key
|
||||
) where
|
||||
|
||||
import Yesod.Core
|
||||
import Yesod.Form
|
||||
-import Yesod.Persist
|
||||
+
|
||||
+-- These symbols are usually imported from persistent,
|
||||
+-- But it is not built on Android. Still export them
|
||||
+-- just so that hiding them will work.
|
||||
+data Key = DummyKey
|
||||
+insertBy = undefined
|
||||
+replace = undefined
|
||||
+deleteBy = undefined
|
||||
+delete = undefined
|
||||
+insert = undefined
|
||||
+
|
||||
diff --git a/Yesod/Default/Main.hs b/Yesod/Default/Main.hs
|
||||
index 565ed35..bf46642 100644
|
||||
--- a/Yesod/Default/Main.hs
|
||||
+++ b/Yesod/Default/Main.hs
|
||||
@@ -1,10 +1,8 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE DeriveDataTypeable #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
-{-# LANGUAGE TemplateHaskell #-}
|
||||
module Yesod.Default.Main
|
||||
( defaultMain
|
||||
- , defaultMainLog
|
||||
, defaultRunner
|
||||
, defaultDevelApp
|
||||
, LogFunc
|
||||
@@ -23,7 +21,7 @@ import Control.Monad (when)
|
||||
import System.Environment (getEnvironment)
|
||||
import Data.Maybe (fromMaybe)
|
||||
import Safe (readMay)
|
||||
-import Control.Monad.Logger (Loc, LogSource, LogLevel (LevelError), liftLoc)
|
||||
+import Control.Monad.Logger (Loc, LogSource, LogLevel (LevelError))
|
||||
import System.Log.FastLogger (LogStr, toLogStr)
|
||||
import Language.Haskell.TH.Syntax (qLocation)
|
||||
|
||||
@@ -55,33 +53,6 @@ defaultMain load getApp = do
|
||||
|
||||
type LogFunc = Loc -> LogSource -> LogLevel -> LogStr -> IO ()
|
||||
|
||||
--- | Same as @defaultMain@, but gets a logging function back as well as an
|
||||
--- @Application@ to install Warp exception handlers.
|
||||
---
|
||||
--- Since 1.2.5
|
||||
-defaultMainLog :: (Show env, Read env)
|
||||
- => IO (AppConfig env extra)
|
||||
- -> (AppConfig env extra -> IO (Application, LogFunc))
|
||||
- -> IO ()
|
||||
-defaultMainLog load getApp = do
|
||||
- config <- load
|
||||
- (app, logFunc) <- getApp config
|
||||
- runSettings defaultSettings
|
||||
- { settingsPort = appPort config
|
||||
- , settingsHost = appHost config
|
||||
- , settingsOnException = const $ \e -> when (shouldLog' e) $ logFunc
|
||||
- $(qLocation >>= liftLoc)
|
||||
- "yesod"
|
||||
- LevelError
|
||||
- (toLogStr $ "Exception from Warp: " ++ show e)
|
||||
- } app
|
||||
- where
|
||||
- shouldLog' =
|
||||
-#if MIN_VERSION_warp(2,1,3)
|
||||
- Warp.defaultShouldDisplayException
|
||||
-#else
|
||||
- const True
|
||||
-#endif
|
||||
|
||||
-- | Run your application continously, listening for SIGINT and exiting
|
||||
-- when received
|
||||
diff --git a/Yesod/Default/Util.hs b/Yesod/Default/Util.hs
|
||||
index a10358e..0547424 100644
|
||||
--- a/Yesod/Default/Util.hs
|
||||
+++ b/Yesod/Default/Util.hs
|
||||
@@ -5,10 +5,9 @@
|
||||
module Yesod.Default.Util
|
||||
( addStaticContentExternal
|
||||
, globFile
|
||||
- , widgetFileNoReload
|
||||
- , widgetFileReload
|
||||
+ --, widgetFileNoReload
|
||||
+ --, widgetFileReload
|
||||
, TemplateLanguage (..)
|
||||
- , defaultTemplateLanguages
|
||||
, WidgetFileSettings
|
||||
, wfsLanguages
|
||||
, wfsHamletSettings
|
||||
@@ -20,9 +19,6 @@ import Yesod.Core -- purposely using complete import so that Haddock will see ad
|
||||
import Control.Monad (when, unless)
|
||||
import System.Directory (doesFileExist, createDirectoryIfMissing)
|
||||
import Language.Haskell.TH.Syntax
|
||||
-import Text.Lucius (luciusFile, luciusFileReload)
|
||||
-import Text.Julius (juliusFile, juliusFileReload)
|
||||
-import Text.Cassius (cassiusFile, cassiusFileReload)
|
||||
import Text.Hamlet (HamletSettings, defaultHamletSettings)
|
||||
import Data.Maybe (catMaybes)
|
||||
import Data.Default (Default (def))
|
||||
@@ -69,68 +65,7 @@ data TemplateLanguage = TemplateLanguage
|
||||
, tlReload :: FilePath -> Q Exp
|
||||
}
|
||||
|
||||
-defaultTemplateLanguages :: HamletSettings -> [TemplateLanguage]
|
||||
-defaultTemplateLanguages hset =
|
||||
- [ TemplateLanguage False "hamlet" whamletFile' whamletFile'
|
||||
- , TemplateLanguage True "cassius" cassiusFile cassiusFileReload
|
||||
- , TemplateLanguage True "julius" juliusFile juliusFileReload
|
||||
- , TemplateLanguage True "lucius" luciusFile luciusFileReload
|
||||
- ]
|
||||
- where
|
||||
- whamletFile' = whamletFileWithSettings hset
|
||||
-
|
||||
data WidgetFileSettings = WidgetFileSettings
|
||||
{ wfsLanguages :: HamletSettings -> [TemplateLanguage]
|
||||
, wfsHamletSettings :: HamletSettings
|
||||
}
|
||||
-
|
||||
-instance Default WidgetFileSettings where
|
||||
- def = WidgetFileSettings defaultTemplateLanguages defaultHamletSettings
|
||||
-
|
||||
-widgetFileNoReload :: WidgetFileSettings -> FilePath -> Q Exp
|
||||
-widgetFileNoReload wfs x = combine "widgetFileNoReload" x False $ wfsLanguages wfs $ wfsHamletSettings wfs
|
||||
-
|
||||
-widgetFileReload :: WidgetFileSettings -> FilePath -> Q Exp
|
||||
-widgetFileReload wfs x = combine "widgetFileReload" x True $ wfsLanguages wfs $ wfsHamletSettings wfs
|
||||
-
|
||||
-combine :: String -> String -> Bool -> [TemplateLanguage] -> Q Exp
|
||||
-combine func file isReload tls = do
|
||||
- mexps <- qmexps
|
||||
- case catMaybes mexps of
|
||||
- [] -> error $ concat
|
||||
- [ "Called "
|
||||
- , func
|
||||
- , " on "
|
||||
- , show file
|
||||
- , ", but no template were found."
|
||||
- ]
|
||||
- exps -> return $ DoE $ map NoBindS exps
|
||||
- where
|
||||
- qmexps :: Q [Maybe Exp]
|
||||
- qmexps = mapM go tls
|
||||
-
|
||||
- go :: TemplateLanguage -> Q (Maybe Exp)
|
||||
- go tl = whenExists file (tlRequiresToWidget tl) (tlExtension tl) ((if isReload then tlReload else tlNoReload) tl)
|
||||
-
|
||||
-whenExists :: String
|
||||
- -> Bool -- ^ requires toWidget wrap
|
||||
- -> String -> (FilePath -> Q Exp) -> Q (Maybe Exp)
|
||||
-whenExists = warnUnlessExists False
|
||||
-
|
||||
-warnUnlessExists :: Bool
|
||||
- -> String
|
||||
- -> Bool -- ^ requires toWidget wrap
|
||||
- -> String -> (FilePath -> Q Exp) -> Q (Maybe Exp)
|
||||
-warnUnlessExists shouldWarn x wrap glob f = do
|
||||
- let fn = globFile glob x
|
||||
- e <- qRunIO $ doesFileExist fn
|
||||
- when (shouldWarn && not e) $ qRunIO $ putStrLn $ "widget file not found: " ++ fn
|
||||
- if e
|
||||
- then do
|
||||
- ex <- f fn
|
||||
- if wrap
|
||||
- then do
|
||||
- tw <- [|toWidget|]
|
||||
- return $ Just $ tw `AppE` ex
|
||||
- else return $ Just ex
|
||||
- else return Nothing
|
||||
--
|
||||
2.1.1
|
||||
|